mirror of
https://github.com/microsoft/playwright.git
synced 2024-11-30 23:45:33 +03:00
test: cover more aria escaping edge cases (#33463)
This commit is contained in:
parent
8c4738ab1a
commit
2f8a14c6e2
@ -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(`
|
||||
<button>Click \\ me</button>
|
||||
`);
|
||||
await expect(page.locator('body')).toMatchAriaSnapshot(`
|
||||
- button "Click \\\\ me"
|
||||
`);
|
||||
await expect(page.locator('body')).toMatchAriaSnapshot(`
|
||||
- button /Click \\\\ me/
|
||||
`);
|
||||
|
@ -167,7 +167,9 @@ test('should generate baseline with special characters', async ({ runInlineTest
|
||||
<button>Click ' me</button>
|
||||
<button>Click: ' me</button>
|
||||
<button>Click " me</button>
|
||||
<button>Click " me 123</button>
|
||||
<button>Click \\\\ me</button>
|
||||
<button>Click \\\\ me 123</button>
|
||||
<li>Item: 1</li>
|
||||
<li>Item {a: b}</li>
|
||||
</ul>\`);
|
||||
@ -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 @@
|
||||
<li>Item: 1</li>
|
||||
<li>Item {a: b}</li>
|
||||
</ul>\`);
|
||||
@ -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}\"
|
||||
+ \`);
|
||||
|
Loading…
Reference in New Issue
Block a user