Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 677
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
41cfdbe6859349b3c81b8e36b4222408bf8c15d0f9File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| 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( | ||
ContributorAuthor 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.
Uh oh!
There was an error while loading. Please reload this page.
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!