Add Liberia as store location for e2e test (#37323)

This commit is contained in:
nigeljamesstevenson 2023-03-21 14:14:15 +00:00 committed by GitHub
commit e4eb7904fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 8 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: update
Update OBW end to end test as WC Pay supports Malta now

View File

@ -95,6 +95,24 @@ const storeDetails = {
downloadable: 'Downloads', 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 = { module.exports = {

View File

@ -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( 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.use( { storageState: process.env.ADMINSTATE } );
test.beforeEach( async () => { test.beforeEach( async () => {
// Complete "Store Details" step through the API to prevent flakiness when run on external sites. // 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 // eslint-disable-next-line jest/expect-expect
test( 'can choose the "Other" industry', async ( { page } ) => { test( 'can choose the "Other" industry', async ( { page } ) => {
await onboarding.completeIndustrySection( await onboarding.completeIndustrySection(
page, page,
storeDetails.malta.industries, storeDetails.liberia.industries,
storeDetails.malta.expectedIndustries storeDetails.liberia.expectedIndustries
); );
await page.click( 'button >> text=Continue' ); await page.click( 'button >> text=Continue' );
} ); } );
@ -174,14 +174,14 @@ test.describe(
await onboarding.completeIndustrySection( await onboarding.completeIndustrySection(
page, page,
storeDetails.malta.industries, storeDetails.liberia.industries,
storeDetails.malta.expectedIndustries storeDetails.liberia.expectedIndustries
); );
await page.click( 'button >> text=Continue' ); await page.click( 'button >> text=Continue' );
await onboarding.completeProductTypesSection( await onboarding.completeProductTypesSection(
page, page,
storeDetails.malta.products storeDetails.liberia.products
); );
// Make sure WC Payments is NOT present // Make sure WC Payments is NOT present
await expect( await expect(