diff --git a/tests/page/to-match-aria-snapshot.spec.ts b/tests/page/to-match-aria-snapshot.spec.ts index 3b226f480a..754f3fd2a9 100644 --- a/tests/page/to-match-aria-snapshot.spec.ts +++ b/tests/page/to-match-aria-snapshot.spec.ts @@ -441,12 +441,21 @@ test('should unpack escaped names', async ({ page }) => { await expect(page.locator('body')).toMatchAriaSnapshot(` - button "Click \\\" me" `); + await expect(page.locator('body')).toMatchAriaSnapshot(` + - button /Click \" me/ + `); + await expect(page.locator('body')).toMatchAriaSnapshot(` + - button /Click \\\" me/ + `); } { await page.setContent(` `); + await expect(page.locator('body')).toMatchAriaSnapshot(` + - button "Click \\\\ me" + `); await expect(page.locator('body')).toMatchAriaSnapshot(` - button /Click \\\\ me/ `); diff --git a/tests/playwright-test/update-aria-snapshot.spec.ts b/tests/playwright-test/update-aria-snapshot.spec.ts index d58bfce899..e8999052a1 100644 --- a/tests/playwright-test/update-aria-snapshot.spec.ts +++ b/tests/playwright-test/update-aria-snapshot.spec.ts @@ -167,7 +167,9 @@ test('should generate baseline with special characters', async ({ runInlineTest + +
  • Item: 1
  • Item {a: b}
  • \`); @@ -181,7 +183,7 @@ test('should generate baseline with special characters', async ({ runInlineTest const data = fs.readFileSync(patchPath, 'utf-8'); expect(data).toBe(`--- a/a.spec.ts +++ b/a.spec.ts -@@ -11,6 +11,16 @@ +@@ -13,6 +13,18 @@
  • Item: 1
  • Item {a: b}
  • \`); @@ -193,7 +195,9 @@ test('should generate baseline with special characters', async ({ runInlineTest + - button "Click ' me" + - 'button "Click: '' me"' + - button "Click \\\\" me" ++ - button /Click " me \\\\d+/ + - button "Click \\\\\\\\ me" ++ - button /Click \\\\\\\\ me \\\\d+/ + - listitem: \"Item: 1\" + - listitem: \"Item {a: b}\" + \`);