Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
28 changes: 1 addition & 27 deletions e2e/components/IconButton.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {test, expect, type Page} from '@playwright/test'
import {test, expect} from '@playwright/test'
import {visit} from '../test-helpers/storybook'
import {themes} from '../test-helpers/themes'

Expand Down Expand Up @@ -39,28 +39,6 @@ const stories = [
title: 'Small',
id: 'components-iconbutton-features--small',
},
{
title: 'Keybinding Hint',
id: 'components-iconbutton-features--keybinding-hint',
disableAnimations: true,
async setup(page: Page) {
await page.keyboard.press('Tab') // focus on icon button
await page.getByText('Bold').waitFor({state: 'visible'})
// eslint-disable-next-line playwright/no-wait-for-timeout
await page.waitForTimeout(1000) // wait until after "tooltip delay" for a stable screenshot
},
},
{
title: 'Keybinding Hint on Description',
id: 'components-iconbutton-features--keybinding-hint-on-description',
disableAnimations: true,
async setup(page: Page) {
await page.keyboard.press('Tab') // focus on icon button
await page.getByText('You have unread notifications').waitFor({
state: 'visible',
})
},
},
{
title: 'Flex',
id: 'components-iconbutton-dev--icon-button-within-flex-container',
Expand All @@ -80,10 +58,6 @@ test.describe('IconButton', () => {
},
})

if ('setup' in story) {
await story.setup(page)
}

// Default state
expect(await page.screenshot({animations: 'disabled'})).toMatchSnapshot(
`IconButton.${story.title}.${theme}.png`,
Expand Down
Loading