Skip to content

fix: stabilize flaky CI tests (clear-store + magnifier NOTAM interception)#992

Open
msupino wants to merge 3 commits into
devfrom
fix/no-persist-empty-route
Open

fix: stabilize flaky CI tests (clear-store + magnifier NOTAM interception)#992
msupino wants to merge 3 commits into
devfrom
fix/no-persist-empty-route

Conversation

@msupino

@msupino msupino commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Two independent flake fixes so CI is reliably green.

1. clear-store flake (app fix)

clear-store.spec.js:33 (navaid.route toBeNull) 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 (shared writeRoute()/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-btn appear in the open charts dropdown; a map click landed on it → opened the NOTAM list modal → intercepted later clicks (magnifier:105 timed out). _setup now blocks the notam-data fetch by default (app falls back to the empty same-origin data/notam.json); notam-layer keeps 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.
  • persist-view / persist-corrupt-quota / persistence-docs / routes / undo / share-route → green.

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.
@github-actions github-actions Bot marked this pull request as draft June 26, 2026 16:51
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview deployed

Open PR preview →

https://msupino.github.io/NavigationApp/branch/fix/no-persist-empty-route/

Commit: 091033d

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.
@msupino msupino changed the title fix(persist): store empty route as absent key (fixes clear-store CI flake) fix: stabilize flaky CI tests (clear-store + magnifier NOTAM interception) Jun 26, 2026
@msupino msupino marked this pull request as ready for review June 26, 2026 17:04
@github-actions github-actions Bot enabled auto-merge (squash) June 26, 2026 17:04
Comment thread tests/_setup.js
// 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants