diff --git a/tests/playwright-test/golden.spec.ts b/tests/playwright-test/golden.spec.ts index ad48d5a5bc..e816ef9402 100644 --- a/tests/playwright-test/golden.spec.ts +++ b/tests/playwright-test/golden.spec.ts @@ -770,8 +770,10 @@ test('should attach expected/actual/diff with snapshot path', async ({ runInline const outputText = stripAnsi(result.output); const attachments = outputText.split('\n').filter(l => l.startsWith('## ')).map(l => l.substring(3)).map(l => JSON.parse(l))[0]; - for (const attachment of attachments) + for (const attachment of attachments) { attachment.path = attachment.path.replace(/\\/g, '/').replace(/.*test-results\//, ''); + attachment.name = attachment.name.replace(/\\/g, '/'); + } expect(attachments).toEqual([ { name: 'test/path/snapshot-expected.png',