From a30b28c1c6493291e391287b77a42034751c2753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Costa?= <10233985+cesarcosta99@users.noreply.github.com> Date: Tue, 12 Dec 2023 09:52:51 -0500 Subject: [PATCH] Fix multi-currency e2e tests (#7870) --- changelog/dev-fix-multi-currency-e2e-tests | 5 +++++ tests/e2e/config/jest.setup.js | 3 +++ .../wcpay/shopper/shopper-multi-currency-widget.spec.js | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 changelog/dev-fix-multi-currency-e2e-tests diff --git a/changelog/dev-fix-multi-currency-e2e-tests b/changelog/dev-fix-multi-currency-e2e-tests new file mode 100644 index 00000000000..45ac7deccc1 --- /dev/null +++ b/changelog/dev-fix-multi-currency-e2e-tests @@ -0,0 +1,5 @@ +Significance: patch +Type: dev +Comment: Fix multi-currency e2e tests. + + diff --git a/tests/e2e/config/jest.setup.js b/tests/e2e/config/jest.setup.js index 00f41b376ad..a29f5138fcb 100644 --- a/tests/e2e/config/jest.setup.js +++ b/tests/e2e/config/jest.setup.js @@ -24,6 +24,9 @@ const ERROR_MESSAGES_TO_IGNORE = [ 'Scripts that have a dependency on', 'was preloaded using link preload but not used within a few seconds', 'No UI will be shown. CanMakePayment and hasEnrolledInstrument', + 'Failed to load resource: the server responded with a status of 404 (Not Found)', + 'Store "wc/payments" is already registered.', + 'Preflight request for request with keepalive specified is currently not supported', ]; ERROR_MESSAGES_TO_IGNORE.forEach( ( errorMessage ) => { diff --git a/tests/e2e/specs/wcpay/shopper/shopper-multi-currency-widget.spec.js b/tests/e2e/specs/wcpay/shopper/shopper-multi-currency-widget.spec.js index 182802a62ba..23aec018d59 100644 --- a/tests/e2e/specs/wcpay/shopper/shopper-multi-currency-widget.spec.js +++ b/tests/e2e/specs/wcpay/shopper/shopper-multi-currency-widget.spec.js @@ -64,6 +64,7 @@ describe( 'Shopper Multi-Currency widget', () => { it( 'should display currency switcher widget if multi-currency is enabled', async () => { await merchantWCP.addMulticurrencyWidget(); + await merchant.logout(); await shopper.goToShop(); await page.waitForSelector( '.widget select[name=currency]', { visible: true, @@ -72,6 +73,7 @@ describe( 'Shopper Multi-Currency widget', () => { } ); it( 'should not display currency switcher widget if multi-currency is disabled', async () => { + await merchant.login(); await merchantWCP.openWCPSettings(); await merchantWCP.deactivateMulticurrency(); await shopper.goToShop();