test: wait for screenshots to get into trace before stopping (#10891)

This commit is contained in:
Yury Semikhatsky 2021-12-13 14:37:44 -08:00 committed by GitHub
parent 9491f6652d
commit a436cc8aa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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('<button>Click</button>');
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();