Skip to content

Commit

Permalink
fine
Browse files Browse the repository at this point in the history
  • Loading branch information
langermank committed Dec 19, 2024
1 parent ad134d5 commit 8f82826
Showing 1 changed file with 31 additions and 13 deletions.
44 changes: 31 additions & 13 deletions e2e/components/IconButton.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,20 +371,38 @@ test.describe('IconButton', () => {
})
}
})
test.describe('Flex container', () => {
test('default @vrt', async ({page}) => {
await visit(page, {
id: 'components-iconbutton-devonly--icon-button-within-flex-container',
})

// Default state
expect(await page.screenshot()).toMatchSnapshot(`IconButton.Flex container.png`)
})
test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-iconbutton-devonly--icon-button-within-flex-container',
test.describe('Flex', () => {
for (const theme of themes) {
test.describe(theme, () => {
test('default @vrt', async ({page}) => {
await visit(page, {
id: 'components-iconbutton-devonly--icon-button-within-flex-container',
globals: {
colorScheme: theme,
},
})

// Default state
expect(await page.screenshot()).toMatchSnapshot(`IconButton.Flex.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-iconbutton-devonly--icon-button-within-flex-container',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: theme !== 'dark_dimmed',
},
},
})
})
})
await expect(page).toHaveNoViolations()
})
}
})
})

0 comments on commit 8f82826

Please sign in to comment.