From fe74ed1f303fd853332442f61bf0712c4d41c0bc Mon Sep 17 00:00:00 2001 From: Mike Perrotti Date: Mon, 16 Dec 2024 16:08:41 -0500 Subject: [PATCH] adds VRT for IconButton with trailing counter --- e2e/components/IconButton.test.ts | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/e2e/components/IconButton.test.ts b/e2e/components/IconButton.test.ts index 83b00e325e1..2fbc554995b 100644 --- a/e2e/components/IconButton.test.ts +++ b/e2e/components/IconButton.test.ts @@ -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', + }, + }, + }) + }) + }) + } + }) })