fix: stabilize flaky CI tests (clear-store + magnifier NOTAM interception)#992
Open
msupino wants to merge 3 commits into
Open
fix: stabilize flaky CI tests (clear-store + magnifier NOTAM interception)#992msupino wants to merge 3 commits into
msupino wants to merge 3 commits into
Conversation
After clear-store reload (or a fresh boot), the app re-persisted an
empty '{waypoints:[],legs:[],notes:[]}' to navaid.route, so the
clear-store test's null check flaked on timing. persist/flushPersist now
remove the key when the route is empty instead of writing an empty
object — deterministic 'cleared' state. Fixes the recurring
clear-store.spec.js CI flake.
Contributor
🚀 Preview deployed
Commit: |
UI specs (e.g. magnifier) open all toolbar sections; the live ~90-NOTAM feed made #notam-list-btn appear in the open charts dropdown, and a map click landed on it — opening the NOTAM list modal that then intercepted later clicks. Abort the notam-data fetch in _setup (app falls back to the empty same-origin data/notam.json); notam-layer keeps its own mock which wins by later registration.
| // The app falls back to the empty same-origin data/notam.json. Specs | ||
| // that need NOTAMs (notam-layer) register their own route, which wins. | ||
| if (host === 'raw.githubusercontent.com' && | ||
| /\/notam-data\/|notam\.json$/.test(new URL(url).pathname)) { |
Four reloads + language switches in one test occasionally exceeded the default 15s under parallel-worker load (page-closed flake). Give it 45s.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two independent flake fixes so CI is reliably green.
1. clear-store flake (app fix)
clear-store.spec.js:33(navaid.routetoBeNull) flaked: after the clear-store reload the app re-persisted an empty{waypoints:[],legs:[],notes:[]}.persist()/flushPersist()now remove the key when the route is empty (sharedwriteRoute()/routeIsEmpty()), a truly-cleared state.2. magnifier flake (test-infra fix)
UI specs open all toolbar sections. The live ~90-NOTAM feed (raw.githubusercontent notam-data) made
#notam-list-btnappear in the open charts dropdown; a map click landed on it → opened the NOTAM list modal → intercepted later clicks (magnifier:105 timed out)._setupnow blocks the notam-data fetch by default (app falls back to the empty same-origindata/notam.json);notam-layerkeeps its own mock (later registration wins).Verification
clear-store×8 → green.magnifier×3 (54) → green.notam-layer+keyboard-shortcuts-help+vertical-profile×2 (84) → green.