Fix customer login on My Account page
This commit is contained in:
parent
d65c3c76c3
commit
9d219dc5e0
|
@ -29,7 +29,7 @@ describe( 'Store owner can login and make sure WooCommerce is activated', () =>
|
||||||
}
|
}
|
||||||
await page.click( `tr[data-slug="${ slug }"] .activate a` );
|
await page.click( `tr[data-slug="${ slug }"] .activate a` );
|
||||||
await page.waitForSelector( `tr[data-slug="${ slug }"] .deactivate a` );
|
await page.waitForSelector( `tr[data-slug="${ slug }"] .deactivate a` );
|
||||||
});
|
} );
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* External dependencies
|
* Internal dependencies
|
||||||
*/
|
*/
|
||||||
import { switchUserToTest } from '@wordpress/e2e-test-utils';
|
import { CustomerFlow } from '../../utils/flows';
|
||||||
import { CustomerFlow } from "../../utils/flows";
|
|
||||||
|
|
||||||
describe( 'My account page', () => {
|
describe( 'My account page', () => {
|
||||||
it( 'allows customer to login', async () => {
|
it( 'allows customer to login', async () => {
|
||||||
|
await CustomerFlow.login();
|
||||||
await expect( page ).toMatch( 'Hello' );
|
await expect( page ).toMatch( 'Hello' );
|
||||||
await expect( page ).toMatchElement( '.woocommerce-MyAccount-navigation-link', { text: 'Dashboard' } );
|
await expect( page ).toMatchElement( '.woocommerce-MyAccount-navigation-link', { text: 'Dashboard' } );
|
||||||
await expect( page ).toMatchElement( '.woocommerce-MyAccount-navigation-link', { text: 'Orders' } );
|
await expect( page ).toMatchElement( '.woocommerce-MyAccount-navigation-link', { text: 'Orders' } );
|
||||||
|
|
Loading…
Reference in New Issue