mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test(test-runner): unflake override-timeout.spec.ts (#7869)
This commit is contained in:
parent
82d2ec0b2d
commit
626dd23ce1
@ -19,12 +19,12 @@ import { test, expect } from './playwright-test-fixtures';
|
||||
test('should consider dynamically set value', async ({ runInlineTest }) => {
|
||||
const result = await runInlineTest({
|
||||
'playwright.config.js': `
|
||||
module.exports = { timeout: 100 };
|
||||
module.exports = { timeout: 2000 };
|
||||
`,
|
||||
'a.test.js': `
|
||||
const { test } = pwt;
|
||||
test('pass', ({}, testInfo) => {
|
||||
expect(testInfo.timeout).toBe(100);
|
||||
expect(testInfo.timeout).toBe(2000);
|
||||
})
|
||||
`
|
||||
});
|
||||
@ -36,8 +36,8 @@ test('should allow different timeouts', async ({ runInlineTest }) => {
|
||||
const result = await runInlineTest({
|
||||
'playwright.config.js': `
|
||||
module.exports = { projects: [
|
||||
{ timeout: 200 },
|
||||
{ timeout: 100 },
|
||||
{ timeout: 2000 },
|
||||
{ timeout: 4000 },
|
||||
] };
|
||||
`,
|
||||
'a.test.js': `
|
||||
@ -49,14 +49,14 @@ test('should allow different timeouts', async ({ runInlineTest }) => {
|
||||
});
|
||||
expect(result.exitCode).toBe(0);
|
||||
expect(result.passed).toBe(2);
|
||||
expect(result.output).toContain('timeout:100');
|
||||
expect(result.output).toContain('timeout:200');
|
||||
expect(result.output).toContain('timeout:2000');
|
||||
expect(result.output).toContain('timeout:4000');
|
||||
});
|
||||
|
||||
test('should prioritize value set via command line', async ({ runInlineTest }) => {
|
||||
const result = await runInlineTest({
|
||||
'playwright.config.js': `
|
||||
module.exports = { timeout: 100 };
|
||||
module.exports = { timeout: 2000 };
|
||||
`,
|
||||
'a.test.js': `
|
||||
const { test } = pwt;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user