Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Mechanism-2 of PR #372 does not work #505

Closed
erikmd opened this issue Dec 13, 2022 · 0 comments · Fixed by #506
Closed

Bug: Mechanism-2 of PR #372 does not work #505

erikmd opened this issue Dec 13, 2022 · 0 comments · Fixed by #506
Assignees

Comments

@erikmd
Copy link
Member

erikmd commented Dec 13, 2022

Related issue(s) or PR(s):

Related project scope(s): Web UI

Related user(s):

Bug description

The test triggering the dialog "A more recent answer exists on the server. Do you want to fetch the new version?" has false negatives and false positives.
Moreover, a click on "Fetch from server & overwrite" does not trigger a fetch from the backend.

To reproduce

Steps to reproduce the behavior:

  1. Run a local instance of Learn-OCaml (where the timing 180s is replaced with 10s)
  2. Browse http://localhost:8080 and open the same exercise in two different browsers
  3. (in both Browsers) the Sync button should be grayed at first ("bug 0")
  4. (in Browser 1) change the text then sync, wait for 10s
  5. (in Browser 2) edit text → nothing happens (bug 1: false negative)
  6. (in Browser 1) edit text → the dialog shows up (bug 2: false positive), click on Ignore
  7. (in Browser 2) click on sync, wait for 10s
  8. ((in Browser 1) click on sync, wait for 10s) (optional)
  9. (in Browser 2) edit text → the dialog shows up
  10. (in Browser 2) click on Fetch from server & overwrite → same code of Browser 2 (bug 3: no fetch)

Expected behavior

Current configuration

  • OS name (and version): GNU/Linux
  • Browser name (and version): Firefox and Chromium
  • learn-ocaml --version: 0.14.0
  • git describe --long --always --abbrev=40 --tags: v0.14.0-14-g9bc28a63ab13986dab36c9843142094b05ab5856

Additional context

The 1st and 3rd bug crept into master despite the testing of #372 certainly because this testing only involved two tabs of the same browser (with a common local storage…)

erikmd added a commit to pfitaxel/learn-ocaml that referenced this issue Dec 16, 2022
erikmd added a commit to pfitaxel/learn-ocaml that referenced this issue Dec 16, 2022
erikmd added a commit to pfitaxel/learn-ocaml that referenced this issue Dec 29, 2022
…-sf#372

This button triggers a "Fetch_save" and makes a menu appear, allowing
end users to reuse their latest graded code, their latest saved code,
or the initial template code.

This button only shows up when a non-static backend is detected.

Update the French translation as well.

This fixes "bug 3" of issue ocaml-sf#505.
@erikmd erikmd self-assigned this Dec 29, 2022
@erikmd erikmd added this to the learn-ocaml 0.14.1 milestone Dec 29, 2022
erikmd added a commit to pfitaxel/learn-ocaml that referenced this issue Dec 29, 2022
…-sf#372

This button triggers a "Fetch_save" and makes a menu appear, allowing
end users to reuse their latest graded code, their latest saved code,
or the initial template code.

This button only shows up when a non-static backend is detected.

Update the French translation as well.

This fixes "bug 3" of issue ocaml-sf#505.

Close ocaml-sf#493
Close ocaml-sf#505
erikmd added a commit to pfitaxel/learn-ocaml that referenced this issue Dec 29, 2022
…-sf#372

This button triggers a "Fetch_save" and makes a menu appear, allowing
end users to reuse their latest graded code, their latest saved code,
or the initial template code.

This button only shows up when a non-static backend is detected.

Update the French translation as well.

This fixes "bug 3" of issue ocaml-sf#505.

Close ocaml-sf#493
Close ocaml-sf#505
erikmd added a commit to pfitaxel/learn-ocaml that referenced this issue Jan 6, 2023
…-sf#372

This button triggers a "Fetch_save" and makes a menu appear, allowing
end users to reuse their latest graded code, their latest saved code,
or the initial template code.

This button only shows up when a non-static backend is detected.

Update the French translation as well.

This fixes "bug 3" of issue ocaml-sf#505.

Close ocaml-sf#493
Close ocaml-sf#505
@yurug yurug closed this as completed in #506 Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant