chore: change pageSnapshot extension to `.snapshot.yml` (#34930)

This commit is contained in:
Simon Knott 2025-02-26 14:27:17 +01:00 committed by GitHub
parent 439427c14e
commit a04a93c1fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 22 deletions

View File

@ -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);
});

View File

@ -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',
]);
});