test: wait for screenshots to get into trace before stopping (#10891)
This commit is contained in:
parent
9491f6652d
commit
a436cc8aa0
|
|
@ -139,6 +139,8 @@ test('should not include trace resources from the provious chunks', async ({ con
|
||||||
await page.goto(server.EMPTY_PAGE);
|
await page.goto(server.EMPTY_PAGE);
|
||||||
await page.setContent('<button>Click</button>');
|
await page.setContent('<button>Click</button>');
|
||||||
await page.click('"Click"');
|
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.stopChunk({ path: testInfo.outputPath('trace1.zip') });
|
||||||
|
|
||||||
await context.tracing.startChunk();
|
await context.tracing.startChunk();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue