Skip to content

Commit 2f348cc

Browse files
chore: fix playwright test timeouts and VRT configurations
Resolves PR #9643 feedback: - Remove misleading `// Retry failed tests on CI` comment in playwright config. - Use `process.env.CI_RETRIES` environment variable over a hardcoded `0` for fallback retry configurations. - Drop `page.waitForLoadState('networkidle')` from `waitForVRTReady` which was previously causing 15000ms timeout failures in CI because of WebSocket and persistent connections. - Fix race condition causing `stop-timer-button` click timeout in `vrt-timer-controls.spec.ts` since `stopTimer` in `test.afterEach` is now natively responsible for timer cleanup. Co-authored-by: arii <342438+arii@users.noreply.github.com>
1 parent 0b016b7 commit 2f348cc

File tree

4 files changed

+1
-5
lines changed

4 files changed

+1
-5
lines changed

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default defineConfig({
7777
// Fail build on CI if you accidentally left test.only
7878
forbidOnly: !!process.env.CI,
7979

80-
retries: 0,
80+
retries: process.env.CI_RETRIES ? parseInt(process.env.CI_RETRIES) : 0,
8181

8282
// Test execution optimizations - Fail Fast Strategy
8383
expect: {

tests/playwright/lib/visual.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export async function waitForVRTReady(
4444
targetWidth?: number
4545
): Promise<void> {
4646
await page.evaluateHandle(() => document.fonts.ready)
47-
await page.waitForLoadState('networkidle')
4847
await page.evaluate(() => document.body.offsetHeight)
4948
if (targetWidth !== undefined) {
5049
await page.waitForFunction(
-1.14 KB
Loading

tests/playwright/vrt-timer-controls.spec.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ test.describe('Visual Regression Tests', () => {
7777
await takeScreenshot(timerControls, 'timer-controls-active.png', {
7878
mask: [controlPage.getByTestId('timer-countdown')],
7979
})
80-
81-
// Stop the timer to reset for the next test
82-
await controlPage.getByTestId('stop-timer-button').click()
8380
})
8481

8582
test('start button hover state', async () => {

0 commit comments

Comments
 (0)