Skip to content

Commit

Permalink
Merge pull request #472 from woocommerce/dev/compat-wp-6-7-e2e-test
Browse files Browse the repository at this point in the history
WordPress 6.7 Compatibility: Fix the issue that E2E test can't log in to wp-admin
  • Loading branch information
eason9487 authored Nov 12, 2024
2 parents 44a8e25 + faf4658 commit 9807314
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/e2e/global-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ module.exports = async ( config ) => {
await adminPage
.locator( 'input[name="pwd"]' )
.fill( admin.password );
await adminPage.locator( 'text=Log In' ).click();
await adminPage.getByRole( 'button', { name: 'Log In' } ).click();
await adminPage.waitForLoadState( LOAD_STATE.DOM_CONTENT_LOADED );
await adminPage.goto( `/wp-admin` );
await adminPage.waitForLoadState( LOAD_STATE.DOM_CONTENT_LOADED );
Expand Down Expand Up @@ -110,7 +110,9 @@ module.exports = async ( config ) => {
await customerPage
.locator( 'input[name="pwd"]' )
.fill( customer.password );
await customerPage.locator( 'text=Log In' ).click();
await customerPage
.getByRole( 'button', { name: 'Log In' } )
.click();

await customerPage.goto( `/my-account` );
await expect(
Expand Down

0 comments on commit 9807314

Please sign in to comment.