Repository navigation
test(e2e): three assertions that fail on a busy runner no longer do - #290
Open
connorburgess wants to merge 1 commit into
Open
connorburgess wants to merge 1 commit into
connorburgess wants to merge 1 commit into
Conversation
…he test is about split.spec.ts:662 compared window.scrollY after the covering panel closed with the number it had before it opened. Under the covering panel the pointer is off the list, so the board is not held, and a demo session that adds a card scrolls the page on by its height. The test now asks that a card on the board before and after the close is where it was in the window. mobile.spec.ts:1050 asked for a height of at least 44 and got 43.999969482421875 on the CI runner. It now allows for float rounding. pool-surfaces.spec.ts fromFirstTurn asked for no switch row whenever "Older turns" was shown. For a while the newest page both holds the switch and has older turns behind it. The helper now only loads them. Signed-off-by: Connor Burgess <connorburgesscodes@gmail.com>
This branch has not been deployed
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.
What
Three end-to-end assertions that fail now and then on CI, on
mainand on unrelated branches, are changed to ask for what each test is about. No product code changes; onlytest/e2e/split.spec.ts,test/e2e/mobile.spec.tsandtest/e2e/pool-surfaces.spec.ts.Why
Of the last 300 CI runs, 70 failed, 10 of them on
main. These three tests account for a good share of the ones I looked at (every failed run since 2026-11-30):split.spec.ts:662, "…restores window.scrollY on close". Failed both attempts onmainin run 46543174302, and in 47453784345, 47453784594, 47453783730 and 47498578403, on branches that change only server or docs files. The test scrolls the board to 120, opens the panel so that it covers the page, closes it, and expectswindow.scrollYto be 120 again. Under the covering panel the pointer is no longer on the list, soholdBoarddoes not hold the board. When a demo session adds a card above, the page keeps what is on screen in place by scrolling on by the card's height (52 px), andwindow.scrollYcomes back as 172. That is the page behaving well, and the test failing. The test now records where each card sits in the window just before Esc, and asks that a card on the board before and after the close is where it was (within 2 px), and that the page is not back at the top.mobile.spec.ts:1050, "Discard draft is an action in the tint, 44 tall". Failed both attempts onmainin run 47396304100 and run 47470694290, each time with a height of43.999969482421875against>= 44. The assertion now allows 0.01 px for float rounding.pool-surfaces.spec.ts,fromFirstTurn. Failed both attempts atpool-surfaces.spec.ts:188in run 47497357272 and run 47453783586, at the helper's lineif (await older.count()) await expect(page.locator("[data-swap]")).toHaveCount(0), with a count of 1. The pooled session grows through the run. For a while its newest page both still holds the switch and already has older turns behind it, so "Older turns" is shown and the switch row is on the page. The helper no longer asks for that; it only loads the older turns, which is what the tests that call it need.Proof
On macOS, Node 22.23.2, against a build of this branch:
split.spec.ts:662onmain(e8bfe999), with--repeat-each=8 --retries=0: 6 failed, 2 passed, each failureReceived: 52. Logging the page showedwindow.scrollY172 and one more card on the board in each failing run.--repeat-each=30 --retries=0: 30 passed.window.scrollTo(0, y)taken out of the close branch inweb/src/components/Shell.tsx, 4 of 4 runs failed.npx playwright test test/e2e/mobile.spec.ts test/e2e/pool-surfaces.spec.ts test/e2e/split.spec.ts --retries=0: 77 passed, 34 skipped.npm run typecheckexits 0.npx biome checkon the three files reports no new diagnostics.I could not make the
mobile.spec.tsandpool-surfaces.spec.tsfailures happen locally. Those two changes follow from the CI logs linked above.Checklist
git commit -s).npm run typecheckpasses; the three changed e2e files pass (the wholenpm testandnpm run test:e2ewere not run locally).shared/*.CHANGELOG.md: tests only, nothing a person running the GUI would notice.