Skip to content

Wait for each Console page to load before reading its styles - #970

Merged
JacobStephens2 merged 1 commit into
mainfrom
fix-flaky-account-test
Oct 21, 2026
Merged

JacobStephens2 merged 1 commit into
mainfrom
fix-flaky-account-test

Conversation

@JacobStephens2

Copy link
Copy Markdown
Owner

Summary

The accounts browser test read the body's background colour right after clicking a link, before the next page's stylesheet had applied. It now waits for each page's load the way its sign-in and sign-out steps already do.

 test("sign-in and sign-out work on a phone without JavaScript …")
-  click "Console log"
+  click "Console log" and wait for /console-log to load
   wait for "owner@example.test · sign-in"
   assert body background is rgb(18, 18, 20)
-  click "Account"
+  click "Account" and wait for /account to load
   assert body background is rgb(18, 18, 20)

Evidence

  • Before: console-test failed on PR Rename Replay to Experiment and Grade to Score, and add eval terms #943 (run 39642022517) with 'rgba(0, 0, 0, 0)' !== 'rgb(18, 18, 20)' at accounts.test.cjs:64. A rerun with no changes passed.
    After: I made local copies of the test that delay /assets/console.css by 300 ms:

    delay console.css 300 ms, run accounts test
      main:    ✖ rgba(0, 0, 0, 0) !== rgb(18, 18, 20)   (first fails at the Console log step)
      branch:  ✔
    

    The full Console suite passes locally: 37 of 37.

Merge Danger

Door: two-way

Blast Radius: test-only

Only console/tests/accounts.test.cjs changes. No product code changes.

🤖 Generated with Claude Code

The accounts browser test clicked the Console log and Account links and
read the body's background colour without waiting for the next page's
load. When the stylesheet arrived late it read rgba(0, 0, 0, 0), as on
PR #943's console-test run 39642022517.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JacobStephens2
JacobStephens2 merged commit 102cdff into main Oct 21, 2026
7 checks passed
@JacobStephens2
JacobStephens2 deleted the fix-flaky-account-test branch October 21, 2026 21:39
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 21, 2026
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