diff --git a/tests/e2e/worktree-delete-dialog-layout.spec.ts b/tests/e2e/worktree-delete-dialog-layout.spec.ts index bc9dc951e70..8473ef425e3 100644 --- a/tests/e2e/worktree-delete-dialog-layout.spec.ts +++ b/tests/e2e/worktree-delete-dialog-layout.spec.ts @@ -120,7 +120,8 @@ for (const scenario of ['single', 'children', 'batch', 'known-dirty'] as const) confirmFocused: boolean }[] = [] const started = performance.now() - while (performance.now() - started < 2400) { + // Why a frame floor too: a loaded runner paints fewer than 21 frames in 2.4 s. + while (performance.now() - started < 2400 || samples.length <= 20) { const dialog = document.querySelector('[data-slot="dialog-content"]') // Why not the last button: force delete is a split button whose menu chevron comes last. const button = Array.from( @@ -167,7 +168,6 @@ for (const scenario of ['single', 'children', 'batch', 'known-dirty'] as const) } await page.screenshot({ path: testInfo.outputPath('loaded.png') }) await dialog.screenshot({ path: testInfo.outputPath('loaded-dialog.png') }) - expect(frames.length).toBeGreaterThan(20) expect(frames[0]?.confirmFocused).toBe(true) for (const frame of frames) { expect(frame).toEqual(frames[0])