Skip to content

Commit

Permalink
disable animations on the first snapshots too
Browse files Browse the repository at this point in the history
  • Loading branch information
broccolinisoup committed Mar 7, 2023
1 parent 1b3740e commit dd3b055
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions e2e/components/DialogV2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ test.describe('DialogV2', () => {
})

// Default state
expect(await page.screenshot()).toMatchSnapshot(`DialogV2.Default.${theme}.png`)
expect(
await page.screenshot({
animations: 'disabled',
}),
).toMatchSnapshot(`DialogV2.Default.${theme}.png`)
// Open Dialog
await page.getByRole('button', {name: 'Show dialog'}).click()
// wait for dialog to open
Expand Down Expand Up @@ -53,7 +57,11 @@ test.describe('DialogV2', () => {
})

// Default state
expect(await page.screenshot()).toMatchSnapshot(`DialogV2.Basic Dialog.${theme}.png`)
expect(
await page.screenshot({
animations: 'disabled',
}),
).toMatchSnapshot(`DialogV2.Basic Dialog.${theme}.png`)
// Open Dialog
await page.getByRole('button', {name: 'Show dialog'}).click()
// wait for dialog to open
Expand Down Expand Up @@ -91,7 +99,11 @@ test.describe('DialogV2', () => {
})

// Default state
expect(await page.screenshot()).toMatchSnapshot(`DialogV2.Basic Confirmation Dialog.${theme}.png`)
expect(
await page.screenshot({
animations: 'disabled',
}),
).toMatchSnapshot(`DialogV2.Basic Confirmation Dialog.${theme}.png`)
// Open Dialog
await page.getByRole('button', {name: 'Show dialog'}).click()
// wait for dialog to open
Expand Down

0 comments on commit dd3b055

Please sign in to comment.