Skip to content

Commit c502fb2

Browse files
committed
fix(e2e): 50s timeout on TFJS-dependent waitFor (SwiftShader still slow in CI)
1 parent 5268800 commit c502fb2

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

e2e/play-again.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ test.describe('Play again', () => {
1919

2020
test('completing the last mode shows the play-again screen', async ({page}) => {
2121
const continueBtn = page.getByRole('button', {name: 'Continue'}).first();
22-
await continueBtn.waitFor({state: 'visible'});
22+
// TFJS model load in CI (SwiftShader, no GPU) can take 30-40s.
23+
await continueBtn.waitFor({state: 'visible', timeout: 50_000});
2324
await continueBtn.click();
2425

2526
await expect(page.getByTestId('play-again-screen')).toBeVisible();
@@ -28,7 +29,8 @@ test.describe('Play again', () => {
2829

2930
test('play-again resets progress and returns to step 0', async ({page}) => {
3031
const continueBtn = page.getByRole('button', {name: 'Continue'}).first();
31-
await continueBtn.waitFor({state: 'visible'});
32+
// TFJS model load in CI (SwiftShader, no GPU) can take 30-40s.
33+
await continueBtn.waitFor({state: 'visible', timeout: 50_000});
3234
await continueBtn.click();
3335

3436
await page.getByTestId('play-again-btn').click();

e2e/progress-bar.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ test.describe('Progress bar — onContinue integration', () => {
5757
test('completing a mode marks it done and advances to the next step', async ({page}) => {
5858
await page.goto('/');
5959
const continueBtn = page.getByRole('button', {name: 'Continue'}).first();
60-
await continueBtn.waitFor({state: 'visible'});
60+
await continueBtn.waitFor({state: 'visible', timeout: 50_000});
6161
await continueBtn.click();
6262

6363
await expect(page.getByTestId('step-0')).toHaveAttribute('data-state', 'completed');

0 commit comments

Comments
 (0)