update assertion
This commit is contained in:
parent
bf83b70468
commit
866cc81125
|
|
@ -759,7 +759,7 @@ test('should not throw when screenshot on failure fails', async ({ runInlineTest
|
||||||
expect(result.exitCode).toBe(0);
|
expect(result.exitCode).toBe(0);
|
||||||
expect(result.passed).toBe(1);
|
expect(result.passed).toBe(1);
|
||||||
const trace = await parseTrace(testInfo.outputPath('test-results', 'a-has-download-page', 'trace.zip'));
|
const trace = await parseTrace(testInfo.outputPath('test-results', 'a-has-download-page', 'trace.zip'));
|
||||||
const attachedScreenshots = trace.actionTree.filter(s => s.trim() === `attach "screenshot"`);
|
const attachedScreenshots = trace.actions.flatMap(a => a.attachments);
|
||||||
// One screenshot for the page, no screenshot for the download page since it should have failed.
|
// One screenshot for the page, no screenshot for the download page since it should have failed.
|
||||||
expect(attachedScreenshots.length).toBe(1);
|
expect(attachedScreenshots.length).toBe(1);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue