Update E2E tests logic a bit (https://github.com/woocommerce/woocommerce-admin/pull/7769)
This commit is contained in:
parent
40cba3b0fb
commit
a8a3238c38
|
@ -1,6 +1,8 @@
|
|||
# Unreleased
|
||||
- Add E2E tests for checking store currency if it matches the onboarded country. #7712
|
||||
|
||||
- Make unchecking free features more robust. #7761
|
||||
|
||||
# 0.1.2
|
||||
|
||||
- Add Customers to analytics pages tested #7573
|
||||
|
|
|
@ -9,7 +9,7 @@ import { ElementHandle, Page } from 'puppeteer';
|
|||
import { DropdownField } from '../elements/DropdownField';
|
||||
import { DropdownTypeaheadField } from '../elements/DropdownTypeaheadField';
|
||||
import { FormToggle } from '../elements/FormToggle';
|
||||
import { getElementByText } from '../utils/actions';
|
||||
import { getElementByText, waitForTimeout } from '../utils/actions';
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const config = require( 'config' );
|
||||
|
@ -99,6 +99,7 @@ export abstract class BasePage {
|
|||
// Uncheck all checkboxes, to avoid installing plugins
|
||||
for ( const checkbox of checkboxes ) {
|
||||
await this.toggleCheckbox( checkbox, false );
|
||||
await waitForTimeout( 200 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,6 +108,7 @@ export abstract class BasePage {
|
|||
// Uncheck all checkboxes, to avoid installing plugins
|
||||
for ( const checkbox of checkboxes ) {
|
||||
await this.toggleCheckbox( checkbox, true );
|
||||
await waitForTimeout( 200 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,6 +87,7 @@ export class WcHomescreen extends BasePage {
|
|||
);
|
||||
await taskListOptions?.click();
|
||||
await waitForElementByText( 'button', 'Hide this' );
|
||||
await waitForTimeout( 200 ); // Transition of popup.
|
||||
const hideThisButton = await getElementByText( 'button', 'Hide this' );
|
||||
await hideThisButton?.click();
|
||||
await waitForTimeout( 500 );
|
||||
|
|
Loading…
Reference in New Issue