chore: change pageSnapshot extension to .snapshot.yml

This commit is contained in:
Simon Knott 2025-02-26 09:01:04 +01:00
parent a9bbf4b56d
commit b767a087cc
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC
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',
]);
});