test: unflake two tests (#7115)
This commit is contained in:
parent
a3a9ccad6f
commit
cc186be9a9
|
|
@ -50,7 +50,8 @@ test.describe('non-stalling evaluate', () => {
|
||||||
// Testing this as a race.
|
// Testing this as a race.
|
||||||
expect([
|
expect([
|
||||||
'Frame does not yet have a main execution context',
|
'Frame does not yet have a main execution context',
|
||||||
'Frame is currently attempting a navigation'
|
'Frame is currently attempting a navigation',
|
||||||
|
'Navigation interrupted the evaluation',
|
||||||
]).toContain(error.message);
|
]).toContain(error.message);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,12 @@ import { expect, contextTest as test, browserTest } from './config/browserTest';
|
||||||
import yauzl from 'yauzl';
|
import yauzl from 'yauzl';
|
||||||
import jpeg from 'jpeg-js';
|
import jpeg from 'jpeg-js';
|
||||||
|
|
||||||
test('should collect trace', async ({ context, page, server, browserName }, testInfo) => {
|
test('should collect trace', async ({ context, page, server }, testInfo) => {
|
||||||
await context.tracing.start({ name: 'test', screenshots: true, snapshots: true });
|
await context.tracing.start({ name: 'test', screenshots: true, snapshots: true });
|
||||||
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"');
|
||||||
|
await page.waitForTimeout(2000); // Give it some time to produce screenshots.
|
||||||
await page.close();
|
await page.close();
|
||||||
await context.tracing.stop({ path: testInfo.outputPath('trace.zip') });
|
await context.tracing.stop({ path: testInfo.outputPath('trace.zip') });
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue