Merge branch 'trunk' into add/jest-retry
This commit is contained in:
commit
021b61a5f9
|
@ -40,7 +40,7 @@ const runAddNewShippingZoneTest = () => {
|
|||
});
|
||||
|
||||
afterAll( async () => {
|
||||
shopper.logout();
|
||||
await shopper.logout();
|
||||
} );
|
||||
|
||||
it('add shipping zone for San Francisco with free Local pickup', async () => {
|
||||
|
|
|
@ -42,6 +42,10 @@ const runCheckoutLoginAccountTest = () => {
|
|||
await shopper.goToCheckout();
|
||||
});
|
||||
|
||||
afterAll( async () => {
|
||||
await shopper.logout();
|
||||
} );
|
||||
|
||||
it('can login to an existing account during checkout', async () => {
|
||||
// Click to login during checkout
|
||||
await page.waitForSelector('.woocommerce-form-login-toggle');
|
||||
|
@ -65,8 +69,11 @@ const runCheckoutLoginAccountTest = () => {
|
|||
|
||||
// Verify the user is logged in on my account page
|
||||
await shopper.gotoMyAccount();
|
||||
await expect(page.url()).toMatch('my-account/');
|
||||
await expect(page).toMatchElement('h1', {text: 'My account'});
|
||||
|
||||
await Promise.all( [
|
||||
await expect(page.url()).toMatch('my-account/'),
|
||||
await expect(page).toMatchElement('h1', {text: 'My account'}),
|
||||
] );
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
@ -26,7 +26,7 @@ const runMyAccountCreateAccountTest = () => {
|
|||
});
|
||||
|
||||
afterAll( async () => {
|
||||
shopper.logout();
|
||||
await shopper.logout();
|
||||
} );
|
||||
|
||||
it('can create a new account via my account', async () => {
|
||||
|
|
|
@ -35,7 +35,7 @@ const runMyAccountPayOrderTest = () => {
|
|||
});
|
||||
|
||||
afterAll( async () => {
|
||||
shopper.logout();
|
||||
await shopper.logout();
|
||||
} );
|
||||
|
||||
it('allows customer to pay for their order in My Account', async () => {
|
||||
|
|
|
@ -16,7 +16,7 @@ const pages = [
|
|||
const runMyAccountPageTest = () => {
|
||||
describe('My account page', () => {
|
||||
afterAll( async () => {
|
||||
shopper.logout();
|
||||
await shopper.logout();
|
||||
} );
|
||||
|
||||
it('allows customer to login', async () => {
|
||||
|
|
|
@ -37,7 +37,7 @@ const runOrderEmailReceivingTest = () => {
|
|||
});
|
||||
|
||||
afterAll( async () => {
|
||||
shopper.logout();
|
||||
await shopper.logout();
|
||||
} );
|
||||
|
||||
it('should receive order email after purchasing an item', async () => {
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
## Added
|
||||
|
||||
- Added `jest-circus` as a test runner to enable retrying failed tests
|
||||
- Added `E2E_RETRY_TIMES` environment variable to determine retry count. The default is 3.
|
||||
- Added `await` for every call to `shopper.logout`
|
||||
|
||||
## Fixed
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Unreleased
|
||||
|
||||
## Changes
|
||||
|
||||
- Removed `page.waitForNavigation()` from `shopper.logout()`
|
||||
|
||||
## Added
|
||||
|
||||
- `utils.waitForTimeout( delay )` pause processing for `delay` milliseconds
|
||||
|
|
|
@ -240,7 +240,6 @@ const shopper = {
|
|||
|
||||
await expect( page.title() ).resolves.toMatch( 'My account' );
|
||||
await page.click( '.woocommerce-MyAccount-navigation-link--customer-logout a' );
|
||||
await page.waitForNavigation( { waitUntil: 'networkidle0' } );
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue