Skip to content

Commit

Permalink
Merge 12dcb89 into abeef0b
Browse files Browse the repository at this point in the history
  • Loading branch information
khiga8 authored Apr 29, 2024
2 parents abeef0b + 12dcb89 commit de858d9
Show file tree
Hide file tree
Showing 82 changed files with 32 additions and 23 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 32 additions & 23 deletions e2e/components/ActionMenu.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
})

Expand All @@ -25,6 +25,7 @@ test.describe('ActionMenu', () => {
colorScheme: theme,
},
})
await page.getByRole('button', {name: 'Open menu'}).click()
await expect(page).toHaveNoViolations()
})
})
Expand All @@ -36,30 +37,28 @@ 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()).toMatchSnapshot(`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()
})
})
Expand All @@ -77,7 +76,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`,
)
Expand All @@ -90,6 +90,8 @@ test.describe('ActionMenu', () => {
colorScheme: theme,
},
})
// Open Menu
await page.getByRole('button', {name: 'Open menu'}).click()
await expect(page).toHaveNoViolations()
})
})
Expand All @@ -107,7 +109,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`,
)
Expand All @@ -120,6 +123,9 @@ test.describe('ActionMenu', () => {
colorScheme: theme,
},
})

// Open state
await page.getByRole('button', {name: 'Display'}).click()
await expect(page).toHaveNoViolations()
})
})
Expand All @@ -137,7 +143,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`,
)
Expand All @@ -150,6 +157,9 @@ test.describe('ActionMenu', () => {
colorScheme: theme,
},
})

// Open state
await page.getByRole('button', {name: 'Options: fast Forward'}).click()
await expect(page).toHaveNoViolations()
})
})
Expand All @@ -167,7 +177,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`,
)
Expand All @@ -180,6 +190,9 @@ test.describe('ActionMenu', () => {
colorScheme: theme,
},
})

// Open state
await page.getByRole('button', {name: 'Open Menu'}).click()
await expect(page).toHaveNoViolations()
})
})
Expand Down Expand Up @@ -257,7 +270,7 @@ test.describe('ActionMenu', () => {
},
})

// Default state
// Open state
expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot(
`ActionMenu.Groups And Descriptions.${theme}.png`,
)
Expand All @@ -270,13 +283,9 @@ test.describe('ActionMenu', () => {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'aria-required-children': {
enabled: false,
},
},
})

// Open state
await expect(page).toHaveNoViolations()
})
})
}
Expand Down

0 comments on commit de858d9

Please sign in to comment.