fix more tests
This commit is contained in:
parent
0861d29630
commit
b04880d7b8
|
|
@ -108,7 +108,7 @@ export type JsonTestStepEnd = {
|
|||
id: string;
|
||||
duration: number;
|
||||
error?: reporterTypes.TestError;
|
||||
attachments: number[]; // index of JsonTestResultEnd.attachments
|
||||
attachments?: number[]; // index of JsonTestResultEnd.attachments
|
||||
};
|
||||
|
||||
export type JsonFullResult = {
|
||||
|
|
@ -267,7 +267,7 @@ export class TeleReporterReceiver {
|
|||
const step = result._stepMap.get(payload.id)!;
|
||||
step.duration = payload.duration;
|
||||
step.error = payload.error;
|
||||
step._attachmentIndices = payload.attachments;
|
||||
step._attachmentIndices = payload.attachments ?? [];
|
||||
this._reporter.onStepEnd?.(test, result, step);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -263,11 +263,7 @@ test('should report toHaveScreenshot step with expectation name in title', async
|
|||
`end browserContext.newPage`,
|
||||
`end fixture: page`,
|
||||
`end Before Hooks`,
|
||||
`end attach "foo-expected.png"`,
|
||||
`end attach "foo-actual.png"`,
|
||||
`end expect.toHaveScreenshot(foo.png)`,
|
||||
`end attach "is-a-test-1-expected.png"`,
|
||||
`end attach "is-a-test-1-actual.png"`,
|
||||
`end expect.toHaveScreenshot(is-a-test-1.png)`,
|
||||
`end fixture: page`,
|
||||
`end fixture: context`,
|
||||
|
|
|
|||
|
|
@ -94,8 +94,6 @@ test('should merge screenshot assertions', async ({ runUITest }, testInfo) => {
|
|||
/Before Hooks[\d.]+m?s/,
|
||||
/page.setContent[\d.]+m?s/,
|
||||
/expect.toHaveScreenshot[\d.]+m?s/,
|
||||
/attach "trace-test-1-expected.png/,
|
||||
/attach "trace-test-1-actual.png/,
|
||||
/After Hooks[\d.]+m?s/,
|
||||
/Worker Cleanup[\d.]+m?s/,
|
||||
]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue