diff --git a/plugins/woocommerce/changelog/e2e-fix-failing-malta-test b/plugins/woocommerce/changelog/e2e-fix-failing-malta-test new file mode 100644 index 00000000000..cc9f444a669 --- /dev/null +++ b/plugins/woocommerce/changelog/e2e-fix-failing-malta-test @@ -0,0 +1,4 @@ +Significance: patch +Type: update + +Update OBW end to end test as WC Pay supports Malta now diff --git a/plugins/woocommerce/tests/e2e-pw/test-data/data.js b/plugins/woocommerce/tests/e2e-pw/test-data/data.js index c4423c86be4..4a2868141e0 100644 --- a/plugins/woocommerce/tests/e2e-pw/test-data/data.js +++ b/plugins/woocommerce/tests/e2e-pw/test-data/data.js @@ -95,6 +95,24 @@ const storeDetails = { downloadable: 'Downloads', }, }, + liberia: { + store: { + address: 'addr1', + city: 'Kakata', + zip: 'Division 1', + email: admin.email, + country: 'Liberia — Margibi', // corresponding to the text value of the option, + countryCode: 'LR', + }, + expectedIndustries: 8, // There are 8 checkboxes on the page (in Liberia), adjust this constant if we change that + industries: { + other: 'Other', + }, + products: { + physical: 'Physical products', + downloadable: 'Downloads', + }, + }, }; module.exports = { diff --git a/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/complete-onboarding-wizard.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/complete-onboarding-wizard.spec.js index 6fe61713ae1..a4ecc40164d 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/complete-onboarding-wizard.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/complete-onboarding-wizard.spec.js @@ -145,23 +145,23 @@ test.describe( 'Store owner can complete onboarding wizard', () => { } ); } ); -// !Changed from Japanese to Malta store, as Japanese Yen does not use decimals +// !Changed from Japanese to Liberian store, as Japanese Yen does not use decimals test.describe( - 'A Malta store can complete the selective bundle install but does not include WCPay.', + 'A Liberian store can complete the selective bundle install but does not include WCPay.', () => { test.use( { storageState: process.env.ADMINSTATE } ); test.beforeEach( async () => { // Complete "Store Details" step through the API to prevent flakiness when run on external sites. - await api.update.storeDetails( storeDetails.malta.store ); + await api.update.storeDetails( storeDetails.liberia.store ); } ); // eslint-disable-next-line jest/expect-expect test( 'can choose the "Other" industry', async ( { page } ) => { await onboarding.completeIndustrySection( page, - storeDetails.malta.industries, - storeDetails.malta.expectedIndustries + storeDetails.liberia.industries, + storeDetails.liberia.expectedIndustries ); await page.click( 'button >> text=Continue' ); } ); @@ -174,14 +174,14 @@ test.describe( await onboarding.completeIndustrySection( page, - storeDetails.malta.industries, - storeDetails.malta.expectedIndustries + storeDetails.liberia.industries, + storeDetails.liberia.expectedIndustries ); await page.click( 'button >> text=Continue' ); await onboarding.completeProductTypesSection( page, - storeDetails.malta.products + storeDetails.liberia.products ); // Make sure WC Payments is NOT present await expect(