Skip to content

Commit

Permalink
Disable all visual regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmx-dev committed Nov 14, 2024
1 parent faf5ef7 commit 1fd6d10
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 20 deletions.
4 changes: 4 additions & 0 deletions changelog/dev-disable-flaky-visual-regression-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: dev

Disable visual regression testing from Playwright until a more reliable approach is defined.
7 changes: 4 additions & 3 deletions tests/e2e-pw/specs/merchant/merchant-admin-deposits.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
} );
} );
Original file line number Diff line number Diff line change
Expand Up @@ -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();
} );
}
);
25 changes: 14 additions & 11 deletions tests/e2e-pw/specs/merchant/multi-currency-on-boarding.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 } );

Expand Down Expand Up @@ -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();

Expand All @@ -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' )
Expand Down
7 changes: 4 additions & 3 deletions tests/e2e-pw/specs/merchant/multi-currency.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down

0 comments on commit 1fd6d10

Please sign in to comment.