Skip to content

Commit

Permalink
chore: dogfood jest-style aria snapshots (#34365)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman authored Jan 17, 2025
1 parent 07bcbcd commit b339d45
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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"
46 changes: 23 additions & 23 deletions tests/playwright-test/stable-test-runner/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/playwright-test/stable-test-runner/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"@playwright/test": "1.49.0-beta-1731772650000"
"@playwright/test": "1.50.0-alpha-2025-01-17"
}
}
3 changes: 3 additions & 0 deletions tests/playwright-test/ui-mode-test-tree.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ test('should traverse up/down', async ({ runUITest }) => {
- treeitem "[icon-circle-outline] fails"
- treeitem "[icon-circle-outline] suite" [expanded=false]
`);
await expect(page.getByTestId('test-tree')).toMatchAriaSnapshot();

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

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

test('should expand / collapse groups', async ({ runUITest }) => {
Expand Down

0 comments on commit b339d45

Please sign in to comment.