Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E PW Tests: Disable all visual regression tests #9718

Merged
merged 1 commit into from
Nov 14, 2024
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
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
Loading