#126 · Wait for each view's own window in the stored-windows test
- timeline-app
- pull request
- packages
The stored-windows test failed again in Firefox on PR #120 after #124, with storage holding only the four windows that cover the second view. This time the test was at fault, not the app. ## Cause Going to bounds animates. On the way to the first view (0–20), a coarse window can already show the "Nearby moment" marker the test waited for. The test then moved to the second view immediately. When the first view's own fine window was slow to arrive, the app cancelled its request, which is correct for an abandoned view. That window was never fetched or stored, so the reopened, offline page couldn't show the first view. **Reproduced:** with the first view's responses delayed by 2 s, the old test fails 2 runs of 2 with exactly CI's stored set (`16 8000..12000`, `256 −5484..15494`, `32/64 5000..15000`). ## Fix A `visit()` helper waits for the animation to land on each view (`markers.dataset.view`) and for its own window to answer it (`#loading-window` hidden) before moving on. ## Verification - With the same 2 s delay: 2 of 2 pass. - Normal speed, in a one-CPU container: 6 of 6 in Firefox and 6 of 6 in Chromium. (#124's change stands on its own: saves no longer delete windows of the current revision that the page has let go of.)
Sources
Open #126 · Wait for each view's own window in the stored-windows test in the timeline