Skip to content

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

@erikmd

Description

@erikmd

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…)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions