From a436cc8aa03379d7c9bff094a84523034c004b78 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 13 Dec 2021 14:37:44 -0800 Subject: [PATCH] test: wait for screenshots to get into trace before stopping (#10891) --- tests/tracing.spec.ts | 2 ++ 1 file changed, 2 insertions(+) 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();