From 2d56a1e94bb163c4e860c24964486fc53c3beaa1 Mon Sep 17 00:00:00 2001 From: Daniel Guerra <15204776+danielmx-dev@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:45:40 +0200 Subject: [PATCH] E2E PW Tests: Disable all visual regression tests (#9718) --- .../dev-disable-flaky-visual-regression-tests | 4 +++ .../merchant/merchant-admin-deposits.spec.ts | 7 +++--- ...utes-view-details-via-order-notice.spec.ts | 7 +++--- .../multi-currency-on-boarding.spec.ts | 25 +++++++++++-------- .../specs/merchant/multi-currency.spec.ts | 7 +++--- 5 files changed, 30 insertions(+), 20 deletions(-) create mode 100644 changelog/dev-disable-flaky-visual-regression-tests diff --git a/changelog/dev-disable-flaky-visual-regression-tests b/changelog/dev-disable-flaky-visual-regression-tests new file mode 100644 index 00000000000..e0d0a6b01cf --- /dev/null +++ b/changelog/dev-disable-flaky-visual-regression-tests @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +Disable visual regression testing from Playwright until a more reliable approach is defined. diff --git a/tests/e2e-pw/specs/merchant/merchant-admin-deposits.spec.ts b/tests/e2e-pw/specs/merchant/merchant-admin-deposits.spec.ts index 6c2e6b41e72..96008887630 100644 --- a/tests/e2e-pw/specs/merchant/merchant-admin-deposits.spec.ts +++ b/tests/e2e-pw/specs/merchant/merchant-admin-deposits.spec.ts @@ -54,8 +54,9 @@ test.describe( 'Merchant deposits', () => { await page.evaluate( () => { window.scrollTo( 0, 0 ); } ); - await expect( - page.locator( '.woocommerce-filters' ).last() - ).toHaveScreenshot(); + // TODO: This visual regression test is not flaky, but we should revisit the approach. + // await expect( + // page.locator( '.woocommerce-filters' ).last() + // ).toHaveScreenshot(); } ); } ); diff --git a/tests/e2e-pw/specs/merchant/merchant-disputes-view-details-via-order-notice.spec.ts b/tests/e2e-pw/specs/merchant/merchant-disputes-view-details-via-order-notice.spec.ts index 1e55cafba1e..b7da795ce06 100644 --- a/tests/e2e-pw/specs/merchant/merchant-disputes-view-details-via-order-notice.spec.ts +++ b/tests/e2e-pw/specs/merchant/merchant-disputes-view-details-via-order-notice.spec.ts @@ -74,9 +74,10 @@ test.describe( ).toBeVisible(); // Visual regression test for the dispute notice. - await expect( - merchantPage.locator( '.dispute-notice' ) - ).toHaveScreenshot(); + // TODO: This visual regression test is not flaky, but we should revisit the approach. + // await expect( + // merchantPage.locator( '.dispute-notice' ) + // ).toHaveScreenshot(); } ); } ); diff --git a/tests/e2e-pw/specs/merchant/multi-currency-on-boarding.spec.ts b/tests/e2e-pw/specs/merchant/multi-currency-on-boarding.spec.ts index f987ae71d8e..ccf557c00a6 100644 --- a/tests/e2e-pw/specs/merchant/multi-currency-on-boarding.spec.ts +++ b/tests/e2e-pw/specs/merchant/multi-currency-on-boarding.spec.ts @@ -58,11 +58,12 @@ test.describe( 'Multi-currency on-boarding', () => { test( 'should disable the submit button when no currencies are selected', async () => { // To take a better screenshot of the component. await page.setViewportSize( { width: 1280, height: 2000 } ); - await expect( - page.locator( - '.multi-currency-setup-wizard > div > .components-card-body' - ) - ).toHaveScreenshot(); + // TODO: fix flaky visual regression test. + // await expect( + // page.locator( + // '.multi-currency-setup-wizard > div > .components-card-body' + // ) + // ).toHaveScreenshot(); // Set the viewport back to the default size. await page.setViewportSize( { width: 1280, height: 720 } ); @@ -168,9 +169,10 @@ test.describe( 'Multi-currency on-boarding', () => { // To take a better screenshot of the iframe preview. await page.setViewportSize( { width: 1280, height: 1280 } ); await goToNextOnboardingStep( page ); - await expect( - page.locator( '.wcpay-wizard-task.is-active' ) - ).toHaveScreenshot(); + // TODO: fix flaky visual regression test. + // await expect( + // page.locator( '.wcpay-wizard-task.is-active' ) + // ).toHaveScreenshot(); await page.getByTestId( 'enable_auto_currency' ).check(); await page.getByRole( 'button', { name: 'Preview' } ).click(); @@ -185,9 +187,10 @@ test.describe( 'Multi-currency on-boarding', () => { await expect( await previewPage.locator( '.woocommerce-store-notice' ) ).toBeVisible(); - await expect( - page.locator( '.multi-currency-store-settings-preview-iframe' ) - ).toHaveScreenshot(); + // TODO: fix flaky visual regression test. + // await expect( + // page.locator( '.multi-currency-store-settings-preview-iframe' ) + // ).toHaveScreenshot(); const noticeText = await previewPage .locator( '.woocommerce-store-notice' ) diff --git a/tests/e2e-pw/specs/merchant/multi-currency.spec.ts b/tests/e2e-pw/specs/merchant/multi-currency.spec.ts index 45b6bf0b89b..3786b4f17f9 100644 --- a/tests/e2e-pw/specs/merchant/multi-currency.spec.ts +++ b/tests/e2e-pw/specs/merchant/multi-currency.spec.ts @@ -41,9 +41,10 @@ test.describe( 'Multi-currency', () => { page.getByRole( 'heading', { name: 'Enabled currencies' } ) ).toBeVisible(); await expect( page.getByText( 'Default currency' ) ).toBeVisible(); - await expect( - page.locator( '.multi-currency-settings' ).last() - ).toHaveScreenshot(); + // TODO: fix flaky visual regression test. + // await expect( + // page.locator( '.multi-currency-settings' ).last() + // ).toHaveScreenshot(); } ); test( 'add the currency switcher to the sidebar', async () => {