diff --git a/tests/tracing.spec.ts b/tests/tracing.spec.ts index 8833ec1a70..ec23c1c224 100644 --- a/tests/tracing.spec.ts +++ b/tests/tracing.spec.ts @@ -139,6 +139,8 @@ test('should not include trace resources from the provious chunks', async ({ con await page.goto(server.EMPTY_PAGE); await page.setContent(''); await page.click('"Click"'); + // Give it enough time for both screenshots to get into the trace. + await new Promise(f => setTimeout(f, 1000)); await context.tracing.stopChunk({ path: testInfo.outputPath('trace1.zip') }); await context.tracing.startChunk();