chore: dogfood jest-style aria snapshots (#34365)

This commit is contained in:
Pavel Feldman 2025-01-17 10:17:26 -08:00 committed by GitHub
parent 07bcbcd1b4
commit b339d457e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 66 additions and 24 deletions

View File

@ -0,0 +1,13 @@
- tree:
- treeitem "[icon-circle-outline] a.test.ts" [expanded]:
- group:
- treeitem "[icon-circle-outline] passes" [selected]:
- button "Run"
- button "Show source"
- button "Watch"
- treeitem "[icon-circle-outline] fails"
- treeitem "[icon-circle-outline] suite"
- treeitem "[icon-circle-outline] b.test.ts" [expanded]:
- group:
- treeitem "[icon-circle-outline] passes"
- treeitem "[icon-circle-outline] fails"

View File

@ -0,0 +1,13 @@
- tree:
- treeitem "[icon-circle-outline] a.test.ts" [expanded]:
- group:
- treeitem "[icon-circle-outline] passes"
- treeitem "[icon-circle-outline] fails" [selected]:
- button "Run"
- button "Show source"
- button "Watch"
- treeitem "[icon-circle-outline] suite"
- treeitem "[icon-circle-outline] b.test.ts" [expanded]:
- group:
- treeitem "[icon-circle-outline] passes"
- treeitem "[icon-circle-outline] fails"

View File

@ -0,0 +1,13 @@
- tree:
- treeitem "[icon-circle-outline] a.test.ts" [expanded]:
- group:
- treeitem "[icon-circle-outline] passes" [selected]:
- button "Run"
- button "Show source"
- button "Watch"
- treeitem "[icon-circle-outline] fails"
- treeitem "[icon-circle-outline] suite"
- treeitem "[icon-circle-outline] b.test.ts" [expanded]:
- group:
- treeitem "[icon-circle-outline] passes"
- treeitem "[icon-circle-outline] fails"

View File

@ -5,16 +5,16 @@
"packages": { "packages": {
"": { "": {
"dependencies": { "dependencies": {
"@playwright/test": "1.49.0-beta-1731772650000" "@playwright/test": "1.50.0-alpha-2025-01-17"
} }
}, },
"node_modules/@playwright/test": { "node_modules/@playwright/test": {
"version": "1.49.0-beta-1731772650000", "version": "1.50.0-alpha-2025-01-17",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.0-beta-1731772650000.tgz", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.50.0-alpha-2025-01-17.tgz",
"integrity": "sha512-0d7DBoGZ23lv1/EkNoFXj5fQ9k3qlYHRE7la68zXihtjTH1DdwEtgdMgXR4UEScF2r/YNXaGRZ7sK/DVu9f6Aw==", "integrity": "sha512-fMUwMcP0YE2knged9GJXqv3fpT2xoywTtqYaSzpZmjnNESF+CUUAGY2hHm9/fz/v9ijcjyd62hYFbqS5KeKuHQ==",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"playwright": "1.49.0-beta-1731772650000" "playwright": "1.50.0-alpha-2025-01-17"
}, },
"bin": { "bin": {
"playwright": "cli.js" "playwright": "cli.js"
@ -38,12 +38,12 @@
} }
}, },
"node_modules/playwright": { "node_modules/playwright": {
"version": "1.49.0-beta-1731772650000", "version": "1.50.0-alpha-2025-01-17",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.0-beta-1731772650000.tgz", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.0-alpha-2025-01-17.tgz",
"integrity": "sha512-+LLjx+DMLjx1qiBtLuURTLV3LmFxvQOSaVp9EDMH/qYpclhsp/W41vNxxZEqf8CIsL0BKHIVQYU+6D3OLnJq8g==", "integrity": "sha512-LRavQ9Qu27nHvJ57f+7UDBTAEWhGKV+MS2qLAJpF8HXtfSMVlLK82W9Oba41lCNUzgLoAuFv0wCO/RcHqLz7yQ==",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"playwright-core": "1.49.0-beta-1731772650000" "playwright-core": "1.50.0-alpha-2025-01-17"
}, },
"bin": { "bin": {
"playwright": "cli.js" "playwright": "cli.js"
@ -56,9 +56,9 @@
} }
}, },
"node_modules/playwright-core": { "node_modules/playwright-core": {
"version": "1.49.0-beta-1731772650000", "version": "1.50.0-alpha-2025-01-17",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.0-beta-1731772650000.tgz", "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.0-alpha-2025-01-17.tgz",
"integrity": "sha512-W1HbioibWPPsazFzU/PL9QzGEGubxizQOyMON8/d7DjOpNBqfzuemNuAsNBXucUEVbUlOOzMuoAEX/iqXUOl6Q==", "integrity": "sha512-XkoLZ+7J5ybDq68xSlofPziH1Y8It9LpMisxtBfebjKWbVY8BzctlB1Da9udKDP0oWQPNq4tUnwW0hkeET3lUg==",
"license": "Apache-2.0", "license": "Apache-2.0",
"bin": { "bin": {
"playwright-core": "cli.js" "playwright-core": "cli.js"
@ -70,11 +70,11 @@
}, },
"dependencies": { "dependencies": {
"@playwright/test": { "@playwright/test": {
"version": "1.49.0-beta-1731772650000", "version": "1.50.0-alpha-2025-01-17",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.0-beta-1731772650000.tgz", "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.50.0-alpha-2025-01-17.tgz",
"integrity": "sha512-0d7DBoGZ23lv1/EkNoFXj5fQ9k3qlYHRE7la68zXihtjTH1DdwEtgdMgXR4UEScF2r/YNXaGRZ7sK/DVu9f6Aw==", "integrity": "sha512-fMUwMcP0YE2knged9GJXqv3fpT2xoywTtqYaSzpZmjnNESF+CUUAGY2hHm9/fz/v9ijcjyd62hYFbqS5KeKuHQ==",
"requires": { "requires": {
"playwright": "1.49.0-beta-1731772650000" "playwright": "1.50.0-alpha-2025-01-17"
} }
}, },
"fsevents": { "fsevents": {
@ -84,18 +84,18 @@
"optional": true "optional": true
}, },
"playwright": { "playwright": {
"version": "1.49.0-beta-1731772650000", "version": "1.50.0-alpha-2025-01-17",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.0-beta-1731772650000.tgz", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.0-alpha-2025-01-17.tgz",
"integrity": "sha512-+LLjx+DMLjx1qiBtLuURTLV3LmFxvQOSaVp9EDMH/qYpclhsp/W41vNxxZEqf8CIsL0BKHIVQYU+6D3OLnJq8g==", "integrity": "sha512-LRavQ9Qu27nHvJ57f+7UDBTAEWhGKV+MS2qLAJpF8HXtfSMVlLK82W9Oba41lCNUzgLoAuFv0wCO/RcHqLz7yQ==",
"requires": { "requires": {
"fsevents": "2.3.2", "fsevents": "2.3.2",
"playwright-core": "1.49.0-beta-1731772650000" "playwright-core": "1.50.0-alpha-2025-01-17"
} }
}, },
"playwright-core": { "playwright-core": {
"version": "1.49.0-beta-1731772650000", "version": "1.50.0-alpha-2025-01-17",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.0-beta-1731772650000.tgz", "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.0-alpha-2025-01-17.tgz",
"integrity": "sha512-W1HbioibWPPsazFzU/PL9QzGEGubxizQOyMON8/d7DjOpNBqfzuemNuAsNBXucUEVbUlOOzMuoAEX/iqXUOl6Q==" "integrity": "sha512-XkoLZ+7J5ybDq68xSlofPziH1Y8It9LpMisxtBfebjKWbVY8BzctlB1Da9udKDP0oWQPNq4tUnwW0hkeET3lUg=="
} }
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"private": true, "private": true,
"dependencies": { "dependencies": {
"@playwright/test": "1.49.0-beta-1731772650000" "@playwright/test": "1.50.0-alpha-2025-01-17"
} }
} }

View File

@ -164,6 +164,7 @@ test('should traverse up/down', async ({ runUITest }) => {
- treeitem "[icon-circle-outline] fails" - treeitem "[icon-circle-outline] fails"
- treeitem "[icon-circle-outline] suite" [expanded=false] - treeitem "[icon-circle-outline] suite" [expanded=false]
`); `);
await expect(page.getByTestId('test-tree')).toMatchAriaSnapshot();
await page.keyboard.press('ArrowDown'); await page.keyboard.press('ArrowDown');
await expect.poll(dumpTestTree(page)).toContain(` await expect.poll(dumpTestTree(page)).toContain(`
@ -180,6 +181,7 @@ test('should traverse up/down', async ({ runUITest }) => {
- treeitem "[icon-circle-outline] fails" [selected] - treeitem "[icon-circle-outline] fails" [selected]
- treeitem "[icon-circle-outline] suite" [expanded=false] - treeitem "[icon-circle-outline] suite" [expanded=false]
`); `);
await expect(page.getByTestId('test-tree')).toMatchAriaSnapshot();
await page.keyboard.press('ArrowUp'); await page.keyboard.press('ArrowUp');
await expect.poll(dumpTestTree(page)).toContain(` await expect.poll(dumpTestTree(page)).toContain(`
@ -196,6 +198,7 @@ test('should traverse up/down', async ({ runUITest }) => {
- treeitem "[icon-circle-outline] fails" - treeitem "[icon-circle-outline] fails"
- treeitem "[icon-circle-outline] suite" [expanded=false] - treeitem "[icon-circle-outline] suite" [expanded=false]
`); `);
await expect(page.getByTestId('test-tree')).toMatchAriaSnapshot();
}); });
test('should expand / collapse groups', async ({ runUITest }) => { test('should expand / collapse groups', async ({ runUITest }) => {