Skip to content

Commit

Permalink
Fix multi-currency e2e tests (#7870)
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarcosta99 authored Dec 12, 2023
1 parent 3d373d6 commit a30b28c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog/dev-fix-multi-currency-e2e-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: Fix multi-currency e2e tests.


3 changes: 3 additions & 0 deletions tests/e2e/config/jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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();
Expand Down

0 comments on commit a30b28c

Please sign in to comment.