From dd3b055f3cb521642dcd612404c35e1cb6ee683c Mon Sep 17 00:00:00 2001 From: Armagan Ersoz Date: Wed, 8 Mar 2023 09:34:57 +1000 Subject: [PATCH] disable animations on the first snapshots too --- e2e/components/DialogV2.test.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/e2e/components/DialogV2.test.ts b/e2e/components/DialogV2.test.ts index 6cf15303e1b..7f1e716386b 100644 --- a/e2e/components/DialogV2.test.ts +++ b/e2e/components/DialogV2.test.ts @@ -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 @@ -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 @@ -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