From 8b847b7feae6a5cca114b2cba9fed042ac9d580a Mon Sep 17 00:00:00 2001 From: Sam Powers <35611153+sam-powers@users.noreply.github.com> Date: Fri, 10 Jul 2026 11:45:43 -0400 Subject: [PATCH] test(e2e): harden below-fold comment spec against parallel-load timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Full-suite runs intermittently blew the 30s default test budget inside document setup: keyboard.type types 60 paragraphs char-by-char, which took ~18s solo and >30s under parallel-worker CPU contention — the assertion never ran. Switch to keyboard.insertText (one bulk insertion per paragraph; setup now ~2.5s) and set a 60s belt-and-braces budget. Test-only change; no runtime code touched. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01ESi6dnK3Wc1jYRpZN5qfZA --- e2e/below-fold-comment.spec.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/e2e/below-fold-comment.spec.ts b/e2e/below-fold-comment.spec.ts index 8a306167..b629f84f 100644 --- a/e2e/below-fold-comment.spec.ts +++ b/e2e/below-fold-comment.spec.ts @@ -22,13 +22,20 @@ async function setup(page: Page) { } test('a comment on the last line of a tall document scrolls fully into view', async ({ page }) => { + // Belt-and-braces: document setup dominates this test's runtime, and under + // parallel-worker load the default 30s budget has been blown before the + // assertion ever ran. + test.setTimeout(60_000); + const editor = await setup(page); // Fill well past one viewport so there IS empty space below the last card to // reproduce the bug — a short doc leaves viewport below the anchor already. + // insertText (one bulk insertion per paragraph) instead of keyboard.type: + // char-by-char typing of 60 paragraphs is what blew the test budget. const lines = 60; for (let i = 0; i < lines; i++) { - await page.keyboard.type(`Paragraph ${i} — some body text to give the document height.`); + await page.keyboard.insertText(`Paragraph ${i} — some body text to give the document height.`); if (i < lines - 1) await page.keyboard.press('Enter'); } await page.waitForTimeout(100);