allow CBD to be optional in business details in E2E (https://github.com/woocommerce/woocommerce-admin/pull/7675)
This commit is contained in:
parent
aed89bfdc5
commit
f028d728fa
|
@ -5,7 +5,7 @@ import { BasePage } from '../../pages/BasePage';
|
|||
import { waitForElementByText } from '../../utils/actions';
|
||||
|
||||
export class IndustrySection extends BasePage {
|
||||
async isDisplayed( industryCount?: number ) {
|
||||
async isDisplayed( industryCount?: number, industryCountMax?: number ) {
|
||||
await waitForElementByText(
|
||||
'h2',
|
||||
'In which industry does the store operate?'
|
||||
|
@ -17,7 +17,13 @@ export class IndustrySection extends BasePage {
|
|||
( items ) => items.length
|
||||
);
|
||||
|
||||
expect( length === industryCount ).toBeTruthy();
|
||||
if ( industryCountMax ) {
|
||||
expect(
|
||||
length >= industryCount && length <= industryCountMax
|
||||
).toBeTruthy();
|
||||
} else {
|
||||
expect( length === industryCount ).toBeTruthy();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ const testAdminOnboardingWizard = () => {
|
|||
|
||||
it( 'can complete the industry section', async () => {
|
||||
// Query for the industries checkboxes
|
||||
await profileWizard.industry.isDisplayed( 8 );
|
||||
await profileWizard.industry.isDisplayed( 7, 8 );
|
||||
await profileWizard.industry.uncheckIndustries();
|
||||
|
||||
// Select just "fashion" and "health/beauty" to get the single checkbox business section when
|
||||
|
|
Loading…
Reference in New Issue