address comments
This commit is contained in:
parent
946c04dc3d
commit
a7ef1f2d7d
|
|
@ -369,9 +369,7 @@ const playwrightFixtures: Fixtures<TestFixtures, WorkerFixtures> = ({
|
|||
});
|
||||
|
||||
let counter = 0;
|
||||
let closeReason = testInfo.status === 'timedOut' ? 'Test timeout of ' + testInfo.timeout + 'ms exceeded.' : 'Test ended.';
|
||||
if (testInfo.status === 'failed' && testInfo.error?.message?.startsWith('TimeoutError: Step timeout of '))
|
||||
closeReason = testInfo.error.message.substring('TimeoutError: '.length);
|
||||
const closeReason = testInfo.status === 'timedOut' ? 'Test timeout of ' + testInfo.timeout + 'ms exceeded.' : 'Test ended.';
|
||||
await Promise.all([...contexts.keys()].map(async context => {
|
||||
await (context as any)._wrapApiCall(async () => {
|
||||
await context.close({ reason: closeReason });
|
||||
|
|
|
|||
|
|
@ -438,7 +438,8 @@ test('step timeout includes interrupted action errors', async ({ runInlineTest }
|
|||
// Should include 2 errors, one for the step timeout and one for the aborted action.
|
||||
expect.soft(result.output).toContain('TimeoutError: Step timeout of 1000ms exceeded.');
|
||||
expect.soft(result.output).toContain(`> 4 | await test.step('my step', async () => {`);
|
||||
expect.soft(result.output).toContain('Error: page.waitForTimeout: Step timeout of 1000ms exceeded.');
|
||||
expect.soft(result.output).toContain('Error: page.waitForTimeout: Test ended.');
|
||||
expect.soft(result.output.split('Error: page.waitForTimeout: Test ended.').length).toBe(2);
|
||||
expect.soft(result.output).toContain('> 5 | await page.waitForTimeout(100_000);');
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue