Skip to content

Commit

Permalink
adds VRT for IconButton with trailing counter
Browse files Browse the repository at this point in the history
  • Loading branch information
mperrotti committed Dec 16, 2024
1 parent 17e1174 commit fe74ed1
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions e2e/components/IconButton.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,4 +371,38 @@ test.describe('IconButton', () => {
})
}
})

test.describe('Trailing Counter', () => {
for (const theme of themes) {
test.describe(theme, () => {
test('default @vrt', async ({page}) => {
await visit(page, {
id: 'components-iconbutton-features--trailing-counter',
globals: {
colorScheme: theme,
},
})

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

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-iconbutton-features--trailing-counter',
globals: {
colorScheme: theme,
},
})
await expect(page).toHaveNoViolations({
rules: {
'color-contrast': {
enabled: theme !== 'dark_dimmed',
},
},
})
})
})
}
})
})

0 comments on commit fe74ed1

Please sign in to comment.