Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: dogfood jest-style aria snapshots (#34365)
Pavel Feldmanb339d457e343
diff --git a/tests/playwright-test/__screenshots__/ui-mode-test-tree.spec.ts/should-traverse-up-down-1.yml b/tests/playwright-test/__screenshots__/ui-mode-test-tree.spec.ts/should-traverse-up-down-1.ymlnew file mode 100644index 0000000000..2f556153ec--- /dev/null+++ b/tests/playwright-test/__screenshots__/ui-mode-test-tree.spec.ts/should-traverse-up-down-1.yml@@ -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"\ No newline at end of filediff --git a/tests/playwright-test/__screenshots__/ui-mode-test-tree.spec.ts/should-traverse-up-down-2.yml b/tests/playwright-test/__screenshots__/ui-mode-test-tree.spec.ts/should-traverse-up-down-2.ymlnew file mode 100644index 0000000000..7a9622befd--- /dev/null+++ b/tests/playwright-test/__screenshots__/ui-mode-test-tree.spec.ts/should-traverse-up-down-2.yml@@ -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"\ No newline at end of filediff --git a/tests/playwright-test/__screenshots__/ui-mode-test-tree.spec.ts/should-traverse-up-down-3.yml b/tests/playwright-test/__screenshots__/ui-mode-test-tree.spec.ts/should-traverse-up-down-3.ymlnew file mode 100644index 0000000000..2f556153ec--- /dev/null+++ b/tests/playwright-test/__screenshots__/ui-mode-test-tree.spec.ts/should-traverse-up-down-3.yml@@ -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"\ No newline at end of filediff --git a/tests/playwright-test/stable-test-runner/package-lock.json b/tests/playwright-test/stable-test-runner/package-lock.jsonindex 191deff43f..e3abdb32c5 100644--- a/tests/playwright-test/stable-test-runner/package-lock.json+++ b/tests/playwright-test/stable-test-runner/package-lock.json@@ -5,16 +5,16 @@"packages": {"": {"dependencies": {- "@playwright/test": "1.49.0-beta-1731772650000"+ "@playwright/test": "1.50.0-alpha-2025-01-17"}},"node_modules/@playwright/test": {- "version": "1.49.0-beta-1731772650000",- "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.0-beta-1731772650000.tgz",- "integrity": "sha512-0d7DBoGZ23lv1/EkNoFXj5fQ9k3qlYHRE7la68zXihtjTH1DdwEtgdMgXR4UEScF2r/YNXaGRZ7sK/DVu9f6Aw==",+ "version": "1.50.0-alpha-2025-01-17",+ "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.50.0-alpha-2025-01-17.tgz",+ "integrity": "sha512-fMUwMcP0YE2knged9GJXqv3fpT2xoywTtqYaSzpZmjnNESF+CUUAGY2hHm9/fz/v9ijcjyd62hYFbqS5KeKuHQ==","license": "Apache-2.0","dependencies": {- "playwright": "1.49.0-beta-1731772650000"+ "playwright": "1.50.0-alpha-2025-01-17"},"bin": {"playwright": "cli.js"@@ -38,12 +38,12 @@}},"node_modules/playwright": {- "version": "1.49.0-beta-1731772650000",- "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.0-beta-1731772650000.tgz",- "integrity": "sha512-+LLjx+DMLjx1qiBtLuURTLV3LmFxvQOSaVp9EDMH/qYpclhsp/W41vNxxZEqf8CIsL0BKHIVQYU+6D3OLnJq8g==",+ "version": "1.50.0-alpha-2025-01-17",+ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.0-alpha-2025-01-17.tgz",+ "integrity": "sha512-LRavQ9Qu27nHvJ57f+7UDBTAEWhGKV+MS2qLAJpF8HXtfSMVlLK82W9Oba41lCNUzgLoAuFv0wCO/RcHqLz7yQ==","license": "Apache-2.0","dependencies": {- "playwright-core": "1.49.0-beta-1731772650000"+ "playwright-core": "1.50.0-alpha-2025-01-17"},"bin": {"playwright": "cli.js"@@ -56,9 +56,9 @@}},"node_modules/playwright-core": {- "version": "1.49.0-beta-1731772650000",- "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.0-beta-1731772650000.tgz",- "integrity": "sha512-W1HbioibWPPsazFzU/PL9QzGEGubxizQOyMON8/d7DjOpNBqfzuemNuAsNBXucUEVbUlOOzMuoAEX/iqXUOl6Q==",+ "version": "1.50.0-alpha-2025-01-17",+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.0-alpha-2025-01-17.tgz",+ "integrity": "sha512-XkoLZ+7J5ybDq68xSlofPziH1Y8It9LpMisxtBfebjKWbVY8BzctlB1Da9udKDP0oWQPNq4tUnwW0hkeET3lUg==","license": "Apache-2.0","bin": {"playwright-core": "cli.js"@@ -70,11 +70,11 @@},"dependencies": {"@playwright/test": {- "version": "1.49.0-beta-1731772650000",- "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.0-beta-1731772650000.tgz",- "integrity": "sha512-0d7DBoGZ23lv1/EkNoFXj5fQ9k3qlYHRE7la68zXihtjTH1DdwEtgdMgXR4UEScF2r/YNXaGRZ7sK/DVu9f6Aw==",+ "version": "1.50.0-alpha-2025-01-17",+ "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.50.0-alpha-2025-01-17.tgz",+ "integrity": "sha512-fMUwMcP0YE2knged9GJXqv3fpT2xoywTtqYaSzpZmjnNESF+CUUAGY2hHm9/fz/v9ijcjyd62hYFbqS5KeKuHQ==","requires": {- "playwright": "1.49.0-beta-1731772650000"+ "playwright": "1.50.0-alpha-2025-01-17"}},"fsevents": {@@ -84,18 +84,18 @@"optional": true},"playwright": {- "version": "1.49.0-beta-1731772650000",- "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.0-beta-1731772650000.tgz",- "integrity": "sha512-+LLjx+DMLjx1qiBtLuURTLV3LmFxvQOSaVp9EDMH/qYpclhsp/W41vNxxZEqf8CIsL0BKHIVQYU+6D3OLnJq8g==",+ "version": "1.50.0-alpha-2025-01-17",+ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.50.0-alpha-2025-01-17.tgz",+ "integrity": "sha512-LRavQ9Qu27nHvJ57f+7UDBTAEWhGKV+MS2qLAJpF8HXtfSMVlLK82W9Oba41lCNUzgLoAuFv0wCO/RcHqLz7yQ==","requires": {"fsevents": "2.3.2",- "playwright-core": "1.49.0-beta-1731772650000"+ "playwright-core": "1.50.0-alpha-2025-01-17"}},"playwright-core": {- "version": "1.49.0-beta-1731772650000",- "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.0-beta-1731772650000.tgz",- "integrity": "sha512-W1HbioibWPPsazFzU/PL9QzGEGubxizQOyMON8/d7DjOpNBqfzuemNuAsNBXucUEVbUlOOzMuoAEX/iqXUOl6Q=="+ "version": "1.50.0-alpha-2025-01-17",+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.50.0-alpha-2025-01-17.tgz",+ "integrity": "sha512-XkoLZ+7J5ybDq68xSlofPziH1Y8It9LpMisxtBfebjKWbVY8BzctlB1Da9udKDP0oWQPNq4tUnwW0hkeET3lUg=="}}}diff --git a/tests/playwright-test/stable-test-runner/package.json b/tests/playwright-test/stable-test-runner/package.jsonindex eb5df89830..559cfc10e1 100644--- a/tests/playwright-test/stable-test-runner/package.json+++ b/tests/playwright-test/stable-test-runner/package.json@@ -1,6 +1,6 @@{"private": true,"dependencies": {- "@playwright/test": "1.49.0-beta-1731772650000"+ "@playwright/test": "1.50.0-alpha-2025-01-17"}}diff --git a/tests/playwright-test/ui-mode-test-tree.spec.ts b/tests/playwright-test/ui-mode-test-tree.spec.tsindex 69abd60cfd..e663b986b6 100644--- a/tests/playwright-test/ui-mode-test-tree.spec.ts+++ b/tests/playwright-test/ui-mode-test-tree.spec.ts@@ -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(`@@ -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(`@@ -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 }) => {