Skip to content

fix(test): give each drawing test its own page - #477

Merged
kgoedecke merged 1 commit into
mainfrom
kgoedecke/drawing-test-page-per-test
Nov 10, 2026
Merged

kgoedecke merged 1 commit into
mainfrom
kgoedecke/drawing-test-page-per-test

Conversation

@kgoedecke

Copy link
Copy Markdown
Collaborator

Why

main has been red since #448: tests/drawingBrowser.test.ts fails in test shard 3 on most runs, with anywhere from 1 to 41 tests timing out in beforeEach.

All 98 tests in that file drove one page. On CI, about two minutes into the file, one page load stalls: the page never gets its app. The dev server's live-reload client then logs "server connection lost. Polling for restart..." and the page never comes back, so every later test's setup waits 30s on it. One stall failed every test after it.

What changes

  • Each test opens its own page in beforeEach and closes it in afterEach.
  • The file retries twice on CI, so a test that does hit a stalled load runs again on a fresh page.
  • tests/browser.ts logs it when Chromium loses a tab, and the drawing tests fail with that reason.

Verification

  • Before: the failing shard froze in 11 of 11 CI runs of current main.
  • After: drawingBrowser.test.ts passed in 8 of 8 CI runs of the same shard with this change, and no retry was needed in any of them.
  • Passes locally on macOS and in a 2-CPU Linux container.

The CI runs were on the private mirror, which has two more tests in this file.

Not covered

  • What triggers the one stalled load is not identified. With a page per test it did not occur at all in the 8 runs, which suggests it builds up in a long-lived page. The new key-symbol font from feat(canvas): action registry with ⌘K palette, main menu and editor shortcuts #448 raises the rate sharply (11 of 11 runs with it, 2 of 11 without), but removing it does not eliminate the stall.
  • The other browser test files still share one page per file. None of them is failing; this file is by far the longest.

🤖 Generated with Claude Code

All 98 tests in drawingBrowser.test.ts drove one page. On CI one page load
partway through the file stalled, the dev server's live-reload client then
went into its "server connection lost" polling, and the page never came
back: every later test's setup timed out at 30s, so one stall failed up to
41 tests.

Each test now opens and closes its own page, the file retries on CI, and
the shared browser harness logs it when Chromium loses a tab.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable issues were found.

Summary

The drawing tests now use a fresh page for each test.

  • Each drawing test starts on its own browser page.
  • Browser tests log which page Chromium loses.

No actionable issues were found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "fix(test): give each drawing test its ow..." · Reviewed by Greptile

@kgoedecke
kgoedecke merged commit 8b08ca2 into main Nov 10, 2026
11 checks 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