-
Notifications
You must be signed in to change notification settings - Fork 71
Closed
Description
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:
- Run a local instance of Learn-OCaml (where the timing 180s is replaced with 10s)
- Browse http://localhost:8080 and open the same exercise in two different browsers
- (in both Browsers) the Sync button should be grayed at first ("bug 0")
- (in Browser 1) change the text then sync, wait for 10s
- (in Browser 2) edit text → nothing happens (bug 1: false negative)
- (in Browser 1) edit text → the dialog shows up (bug 2: false positive), click on Ignore
- (in Browser 2) click on sync, wait for 10s
- ((in Browser 1) click on sync, wait for 10s) (optional)
- (in Browser 2) edit text → the dialog shows up
- (in Browser 2) click on Fetch from server & overwrite → same code of Browser 2 (bug 3: no fetch)
Expected behavior
- Fix the three bugs above and/or disable the timer logic and the automatic check.
- Make it possible to do a fetch on demand (without waiting for 180s), along with Feature: Expose more easily last the two versions of a saved exercise #493.
Current configuration
- OS name (and version): GNU/Linux
- Browser name (and version): Firefox and Chromium
learn-ocaml --version: 0.14.0git 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…)