-
Notifications
You must be signed in to change notification settings - Fork 647
tests: add missing snapshot and axe coverage for ActionMenu #4538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
41cfdbe
tests: add missing axe coverage for open ActionMenu
khiga8 6859349
Update test
khiga8 b3c81b8
test(vrt): update snapshots
khiga8 e36b422
test(vrt): update snapshots
khiga8 2408bf8
test(vrt): update snapshots
khiga8 c15d0f9
test(ActionMenu): disable animations for snapshot test
joshblack File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file modified
BIN
+10.3 KB
(140%)
...tionMenu.test.ts-snapshots/ActionMenu-Controlled-Menu-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+11.3 KB
(150%)
...s/ActionMenu.test.ts-snapshots/ActionMenu-Controlled-Menu-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.2 KB
(140%)
...nMenu.test.ts-snapshots/ActionMenu-Controlled-Menu-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.4 KB
(140%)
...mponents/ActionMenu.test.ts-snapshots/ActionMenu-Controlled-Menu-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.4 KB
(140%)
...tionMenu.test.ts-snapshots/ActionMenu-Controlled-Menu-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.8 KB
(140%)
...ionMenu.test.ts-snapshots/ActionMenu-Controlled-Menu-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.8 KB
(150%)
...Menu.test.ts-snapshots/ActionMenu-Controlled-Menu-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.9 KB
(140%)
...ponents/ActionMenu.test.ts-snapshots/ActionMenu-Controlled-Menu-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.8 KB
(140%)
...ionMenu.test.ts-snapshots/ActionMenu-Controlled-Menu-light-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.6 KB
(260%)
...nents/ActionMenu.test.ts-snapshots/ActionMenu-Default-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+11.5 KB
(280%)
...omponents/ActionMenu.test.ts-snapshots/ActionMenu-Default-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.4 KB
(260%)
...ts/ActionMenu.test.ts-snapshots/ActionMenu-Default-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.6 KB
(260%)
...shots/components/ActionMenu.test.ts-snapshots/ActionMenu-Default-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.6 KB
(260%)
...nents/ActionMenu.test.ts-snapshots/ActionMenu-Default-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+11.1 KB
(270%)
...ents/ActionMenu.test.ts-snapshots/ActionMenu-Default-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10.8 KB
(260%)
...s/ActionMenu.test.ts-snapshots/ActionMenu-Default-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+11 KB
(270%)
...hots/components/ActionMenu.test.ts-snapshots/ActionMenu-Default-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+11 KB
(270%)
...ents/ActionMenu.test.ts-snapshots/ActionMenu-Default-light-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+34.9 KB
...ctionMenu.test.ts-snapshots/ActionMenu-Inactive-Items-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+36.6 KB
...ts/ActionMenu.test.ts-snapshots/ActionMenu-Inactive-Items-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+35.9 KB
...onMenu.test.ts-snapshots/ActionMenu-Inactive-Items-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+34.9 KB
...omponents/ActionMenu.test.ts-snapshots/ActionMenu-Inactive-Items-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+34.9 KB
...ctionMenu.test.ts-snapshots/ActionMenu-Inactive-Items-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+37.7 KB
...tionMenu.test.ts-snapshots/ActionMenu-Inactive-Items-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+38.2 KB
...nMenu.test.ts-snapshots/ActionMenu-Inactive-Items-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+37.7 KB
...mponents/ActionMenu.test.ts-snapshots/ActionMenu-Inactive-Items-light-linux.png
Oops, something went wrong.
Binary file added
BIN
+37.7 KB
...tionMenu.test.ts-snapshots/ActionMenu-Inactive-Items-light-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
+19.4 KB
(400%)
...onMenu.test.ts-snapshots/ActionMenu-Links-And-Actions-dark-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
+20.4 KB
(410%)
...ActionMenu.test.ts-snapshots/ActionMenu-Links-And-Actions-dark-dimmed-linux.png
Oops, something went wrong.
Binary file modified
BIN
+19.3 KB
(400%)
...enu.test.ts-snapshots/ActionMenu-Links-And-Actions-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
+19.4 KB
(400%)
...onents/ActionMenu.test.ts-snapshots/ActionMenu-Links-And-Actions-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
+19.4 KB
(400%)
...onMenu.test.ts-snapshots/ActionMenu-Links-And-Actions-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
+20 KB
(400%)
...nMenu.test.ts-snapshots/ActionMenu-Links-And-Actions-light-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
+20.3 KB
(410%)
...nu.test.ts-snapshots/ActionMenu-Links-And-Actions-light-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
+20 KB
(400%)
...nents/ActionMenu.test.ts-snapshots/ActionMenu-Links-And-Actions-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
+20 KB
(400%)
...nMenu.test.ts-snapshots/ActionMenu-Links-And-Actions-light-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
+9.16 KB
(240%)
.../ActionMenu.test.ts-snapshots/ActionMenu-Multi-Select-dark-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
+10.5 KB
(260%)
...ents/ActionMenu.test.ts-snapshots/ActionMenu-Multi-Select-dark-dimmed-linux.png
Oops, something went wrong.
Binary file modified
BIN
+9.05 KB
(240%)
...tionMenu.test.ts-snapshots/ActionMenu-Multi-Select-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
+9.16 KB
(240%)
.../components/ActionMenu.test.ts-snapshots/ActionMenu-Multi-Select-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
+9.16 KB
(240%)
.../ActionMenu.test.ts-snapshots/ActionMenu-Multi-Select-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
+9.67 KB
(250%)
...ActionMenu.test.ts-snapshots/ActionMenu-Multi-Select-light-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
+9.61 KB
(240%)
...ionMenu.test.ts-snapshots/ActionMenu-Multi-Select-light-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
+9.67 KB
(250%)
...components/ActionMenu.test.ts-snapshots/ActionMenu-Multi-Select-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
+9.67 KB
(250%)
...ActionMenu.test.ts-snapshots/ActionMenu-Multi-Select-light-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
+9.71 KB
(220%)
...ActionMenu.test.ts-snapshots/ActionMenu-Single-Select-dark-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
+10.8 KB
(230%)
...nts/ActionMenu.test.ts-snapshots/ActionMenu-Single-Select-dark-dimmed-linux.png
Oops, something went wrong.
Binary file modified
BIN
+9.62 KB
(220%)
...ionMenu.test.ts-snapshots/ActionMenu-Single-Select-dark-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
+9.71 KB
(220%)
...components/ActionMenu.test.ts-snapshots/ActionMenu-Single-Select-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
+9.71 KB
(220%)
...ActionMenu.test.ts-snapshots/ActionMenu-Single-Select-dark-tritanopia-linux.png
Oops, something went wrong.
Binary file modified
BIN
+10.2 KB
(220%)
...ctionMenu.test.ts-snapshots/ActionMenu-Single-Select-light-colorblind-linux.png
Oops, something went wrong.
Binary file modified
BIN
+10.3 KB
(230%)
...onMenu.test.ts-snapshots/ActionMenu-Single-Select-light-high-contrast-linux.png
Oops, something went wrong.
Binary file modified
BIN
+10.2 KB
(220%)
...omponents/ActionMenu.test.ts-snapshots/ActionMenu-Single-Select-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
+10.2 KB
(220%)
...ctionMenu.test.ts-snapshots/ActionMenu-Single-Select-light-tritanopia-linux.png
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,8 +13,8 @@ test.describe('ActionMenu', () => { | |
| colorScheme: theme, | ||
| }, | ||
| }) | ||
|
|
||
| // Default state | ||
| // Open state | ||
| await page.getByRole('button', {name: 'Open menu'}).click() | ||
| expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot(`ActionMenu.Default.${theme}.png`) | ||
| }) | ||
|
|
||
|
|
@@ -25,6 +25,7 @@ test.describe('ActionMenu', () => { | |
| colorScheme: theme, | ||
| }, | ||
| }) | ||
| await page.getByRole('button', {name: 'Open menu'}).click() | ||
| await expect(page).toHaveNoViolations() | ||
| }) | ||
| }) | ||
|
|
@@ -36,30 +37,30 @@ test.describe('ActionMenu', () => { | |
| test.describe(theme, () => { | ||
| test('default @vrt', async ({page}) => { | ||
| await visit(page, { | ||
| id: 'components-actionmenu-features--links-and-actions', | ||
| id: 'components-actionmenu-features--inactive-items', | ||
| globals: { | ||
| colorScheme: theme, | ||
| }, | ||
| }) | ||
|
|
||
| // Default state | ||
| expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot( | ||
| `ActionMenu.Links And Actions.${theme}.png`, | ||
| ) | ||
|
|
||
| // Open menu | ||
| // Open state | ||
| await page.locator('button', {hasText: 'Open menu'}).waitFor() | ||
| await page.getByRole('button', {name: 'Open menu'}).click() | ||
| expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot() | ||
| expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot( | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aha! Thank you @joshblack! 🌟 |
||
| `ActionMenu.Inactive Items.${theme}.png`, | ||
| ) | ||
| }) | ||
|
|
||
| test('axe @aat', async ({page}) => { | ||
| await visit(page, { | ||
| id: 'components-actionmenu-features--links-and-actions', | ||
| id: 'components-actionmenu-features--inactive-items', | ||
| globals: { | ||
| colorScheme: theme, | ||
| }, | ||
| }) | ||
| // Open menu | ||
| await page.locator('button', {hasText: 'Open menu'}).waitFor() | ||
| await page.getByRole('button', {name: 'Open menu'}).click() | ||
| await expect(page).toHaveNoViolations() | ||
| }) | ||
| }) | ||
|
|
@@ -77,7 +78,8 @@ test.describe('ActionMenu', () => { | |
| }, | ||
| }) | ||
|
|
||
| // Default state | ||
| // Open state | ||
| await page.getByRole('button', {name: 'Open menu'}).click() | ||
| expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot( | ||
| `ActionMenu.Links And Actions.${theme}.png`, | ||
| ) | ||
|
|
@@ -90,6 +92,8 @@ test.describe('ActionMenu', () => { | |
| colorScheme: theme, | ||
| }, | ||
| }) | ||
| // Open Menu | ||
| await page.getByRole('button', {name: 'Open menu'}).click() | ||
| await expect(page).toHaveNoViolations() | ||
| }) | ||
| }) | ||
|
|
@@ -107,7 +111,8 @@ test.describe('ActionMenu', () => { | |
| }, | ||
| }) | ||
|
|
||
| // Default state | ||
| // Open state | ||
| await page.getByRole('button', {name: 'Display'}).click() | ||
| expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot( | ||
| `ActionMenu.Multi Select.${theme}.png`, | ||
| ) | ||
|
|
@@ -120,6 +125,9 @@ test.describe('ActionMenu', () => { | |
| colorScheme: theme, | ||
| }, | ||
| }) | ||
|
|
||
| // Open state | ||
| await page.getByRole('button', {name: 'Display'}).click() | ||
| await expect(page).toHaveNoViolations() | ||
| }) | ||
| }) | ||
|
|
@@ -137,7 +145,8 @@ test.describe('ActionMenu', () => { | |
| }, | ||
| }) | ||
|
|
||
| // Default state | ||
| // Open state | ||
| await page.getByRole('button', {name: 'Options: fast Forward'}).click() | ||
| expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot( | ||
| `ActionMenu.Single Select.${theme}.png`, | ||
| ) | ||
|
|
@@ -150,6 +159,9 @@ test.describe('ActionMenu', () => { | |
| colorScheme: theme, | ||
| }, | ||
| }) | ||
|
|
||
| // Open state | ||
| await page.getByRole('button', {name: 'Options: fast Forward'}).click() | ||
| await expect(page).toHaveNoViolations() | ||
| }) | ||
| }) | ||
|
|
@@ -167,7 +179,7 @@ test.describe('ActionMenu', () => { | |
| }, | ||
| }) | ||
|
|
||
| // Default state | ||
| await page.getByRole('button', {name: 'Open Menu'}).click() | ||
| expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot( | ||
| `ActionMenu.Controlled Menu.${theme}.png`, | ||
| ) | ||
|
|
@@ -180,6 +192,9 @@ test.describe('ActionMenu', () => { | |
| colorScheme: theme, | ||
| }, | ||
| }) | ||
|
|
||
| // Open state | ||
| await page.getByRole('button', {name: 'Open Menu'}).click() | ||
| await expect(page).toHaveNoViolations() | ||
| }) | ||
| }) | ||
|
|
@@ -257,7 +272,7 @@ test.describe('ActionMenu', () => { | |
| }, | ||
| }) | ||
|
|
||
| // Default state | ||
| // Open state | ||
| expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot( | ||
| `ActionMenu.Groups And Descriptions.${theme}.png`, | ||
| ) | ||
|
|
@@ -270,13 +285,9 @@ test.describe('ActionMenu', () => { | |
| colorScheme: theme, | ||
| }, | ||
| }) | ||
| await expect(page).toHaveNoViolations({ | ||
| rules: { | ||
| 'aria-required-children': { | ||
| enabled: false, | ||
| }, | ||
| }, | ||
| }) | ||
|
|
||
| // Open state | ||
| await expect(page).toHaveNoViolations() | ||
| }) | ||
| }) | ||
| } | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that this test is under
Inactive itemsbut it's visiting the wrong ID,-links-and-actionswhich is actually a duplicate of another test. Updated!