Skip to content

E2E: wait for the search to settle instead of sleeping 700ms - #66

Merged
davd-gzl merged 1 commit into
mainfrom
e2e-wait-for-search
Aug 20, 2026
Merged

davd-gzl merged 1 commit into
mainfrom
e2e-wait-for-search

Conversation

@davd-gzl

Copy link
Copy Markdown
Collaborator

The scheduled Pages deploy has not shipped since 14 August. npm run test:e2e fails one scenario, behaviour: a typed route edit stays staged until Search is clicked, on the same assertion every night: title did not update after Search.

That scenario clicks Search, sleeps 700ms, then reads #results-title. A re-search settles in 0.5 to 2.0 seconds against the committed snapshot: three consecutive local runs flipped the title after 456ms, 1253ms and 1999ms. The snapshot grew from 34,223 records in July to 55,466, which turned an occasional failure into a nightly one.

Every assertion on search output now polls. until() re-reads its condition every 100ms and gives up at 15 seconds, and scenario() waits for the mounted UI in place of its 900ms settle.

Riding along, the scenario typed Lyon into the origin field rather than the destination. .search-form .fields input[list="station-list"] matches the multi-city city box first, so index 1 is the origin; the edit now selects inside .od-fields. The assertion passed on a Lyon to Toulouse search, for a title that merely contained Lyon.

A re-search settles in 0.5 to 2.0 seconds against the committed snapshot, and the staged-edit scenario allowed 700ms, so the nightly deploy has been red since 14 August. Every assertion on search output now polls, and the scenario waits for the mounted UI in place of its 900ms settle.

The staged edit also went into the origin field rather than the destination.
@davd-gzl
davd-gzl marked this pull request as ready for review August 20, 2026 06:26
@davd-gzl
davd-gzl merged commit 43b44b0 into main Aug 20, 2026
1 check passed
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.

1 participant