mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: improve a few test runner tests that time out (#15287)
This commit is contained in:
parent
aced45347b
commit
dc1d8dc3da
@ -122,6 +122,8 @@ const testFiles = {
|
|||||||
`,
|
`,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test.slow(true, 'Multiple browser launches in each test');
|
||||||
|
|
||||||
test('should work with screenshot: on', async ({ runInlineTest }, testInfo) => {
|
test('should work with screenshot: on', async ({ runInlineTest }, testInfo) => {
|
||||||
const result = await runInlineTest({
|
const result = await runInlineTest({
|
||||||
...testFiles,
|
...testFiles,
|
||||||
|
@ -67,8 +67,7 @@ test('should run in three browsers with --browser', async ({ runInlineTest }) =>
|
|||||||
`,
|
`,
|
||||||
'a.test.ts': `
|
'a.test.ts': `
|
||||||
const { test } = pwt;
|
const { test } = pwt;
|
||||||
test('pass', async ({ page, browserName }) => {
|
test('pass', async ({ browserName }) => {
|
||||||
expect(page.viewportSize()).toEqual({ width: 800, height: 800 });
|
|
||||||
console.log('\\n%%browser=' + browserName);
|
console.log('\\n%%browser=' + browserName);
|
||||||
});
|
});
|
||||||
`,
|
`,
|
||||||
@ -90,8 +89,7 @@ test('should run in one browser with --browser', async ({ runInlineTest }) => {
|
|||||||
`,
|
`,
|
||||||
'a.test.ts': `
|
'a.test.ts': `
|
||||||
const { test } = pwt;
|
const { test } = pwt;
|
||||||
test('pass', async ({ page, browserName }) => {
|
test('pass', async ({ browserName }) => {
|
||||||
expect(page.viewportSize()).toEqual({ width: 800, height: 800 });
|
|
||||||
console.log('\\n%%browser=' + browserName);
|
console.log('\\n%%browser=' + browserName);
|
||||||
});
|
});
|
||||||
`,
|
`,
|
||||||
@ -406,7 +404,7 @@ test('should not report waitForEventInfo as pending', async ({ runInlineTest },
|
|||||||
await page.click('text=Missing');
|
await page.click('text=Missing');
|
||||||
});
|
});
|
||||||
`,
|
`,
|
||||||
}, { workers: 1, timeout: 2000 });
|
}, { workers: 1, timeout: 5000 });
|
||||||
|
|
||||||
expect(result.exitCode).toBe(1);
|
expect(result.exitCode).toBe(1);
|
||||||
expect(result.passed).toBe(0);
|
expect(result.passed).toBe(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user