chore: change pageSnapshot extension to `.snapshot.yml` (#34930)
This commit is contained in:
parent
439427c14e
commit
a04a93c1fd
|
@ -628,7 +628,7 @@ class ArtifactsRecorder {
|
|||
await page.screenshot({ ...screenshotOptions, timeout: 5000, path, caret: 'initial' });
|
||||
});
|
||||
|
||||
this._pageSnapshotRecorder = new SnapshotRecorder(this, pageSnapshot, 'pageSnapshot', 'text/plain', '.ariasnapshot', async (page, path) => {
|
||||
this._pageSnapshotRecorder = new SnapshotRecorder(this, pageSnapshot, 'pageSnapshot', 'text/plain', '.snapshot.yml', async (page, path) => {
|
||||
const ariaSnapshot = await page.locator('body').ariaSnapshot({ timeout: 5000 });
|
||||
await fs.promises.writeFile(path, ariaSnapshot);
|
||||
});
|
||||
|
|
|
@ -435,29 +435,29 @@ test('should work with pageSnapshot: on', async ({ runInlineTest }, testInfo) =>
|
|||
expect(listFiles(testInfo.outputPath('test-results'))).toEqual([
|
||||
'.last-run.json',
|
||||
'artifacts-failing',
|
||||
' test-failed-1.ariasnapshot',
|
||||
' test-failed-1.snapshot.yml',
|
||||
'artifacts-own-context-failing',
|
||||
' test-failed-1.ariasnapshot',
|
||||
' test-failed-1.snapshot.yml',
|
||||
'artifacts-own-context-passing',
|
||||
' test-finished-1.ariasnapshot',
|
||||
' test-finished-1.snapshot.yml',
|
||||
'artifacts-passing',
|
||||
' test-finished-1.ariasnapshot',
|
||||
' test-finished-1.snapshot.yml',
|
||||
'artifacts-persistent-failing',
|
||||
' test-failed-1.ariasnapshot',
|
||||
' test-failed-1.snapshot.yml',
|
||||
'artifacts-persistent-passing',
|
||||
' test-finished-1.ariasnapshot',
|
||||
' test-finished-1.snapshot.yml',
|
||||
'artifacts-shared-shared-failing',
|
||||
' test-failed-1.ariasnapshot',
|
||||
' test-failed-2.ariasnapshot',
|
||||
' test-failed-1.snapshot.yml',
|
||||
' test-failed-2.snapshot.yml',
|
||||
'artifacts-shared-shared-passing',
|
||||
' test-finished-1.ariasnapshot',
|
||||
' test-finished-2.ariasnapshot',
|
||||
' test-finished-1.snapshot.yml',
|
||||
' test-finished-2.snapshot.yml',
|
||||
'artifacts-two-contexts',
|
||||
' test-finished-1.ariasnapshot',
|
||||
' test-finished-2.ariasnapshot',
|
||||
' test-finished-1.snapshot.yml',
|
||||
' test-finished-2.snapshot.yml',
|
||||
'artifacts-two-contexts-failing',
|
||||
' test-failed-1.ariasnapshot',
|
||||
' test-failed-2.ariasnapshot',
|
||||
' test-failed-1.snapshot.yml',
|
||||
' test-failed-2.snapshot.yml',
|
||||
]);
|
||||
});
|
||||
|
||||
|
@ -475,16 +475,16 @@ test('should work with pageSnapshot: only-on-failure', async ({ runInlineTest },
|
|||
expect(listFiles(testInfo.outputPath('test-results'))).toEqual([
|
||||
'.last-run.json',
|
||||
'artifacts-failing',
|
||||
' test-failed-1.ariasnapshot',
|
||||
' test-failed-1.snapshot.yml',
|
||||
'artifacts-own-context-failing',
|
||||
' test-failed-1.ariasnapshot',
|
||||
' test-failed-1.snapshot.yml',
|
||||
'artifacts-persistent-failing',
|
||||
' test-failed-1.ariasnapshot',
|
||||
' test-failed-1.snapshot.yml',
|
||||
'artifacts-shared-shared-failing',
|
||||
' test-failed-1.ariasnapshot',
|
||||
' test-failed-2.ariasnapshot',
|
||||
' test-failed-1.snapshot.yml',
|
||||
' test-failed-2.snapshot.yml',
|
||||
'artifacts-two-contexts-failing',
|
||||
' test-failed-1.ariasnapshot',
|
||||
' test-failed-2.ariasnapshot',
|
||||
' test-failed-1.snapshot.yml',
|
||||
' test-failed-2.snapshot.yml',
|
||||
]);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue