Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Wait for domcontent loaded when adding to cart
Browse files Browse the repository at this point in the history
  • Loading branch information
opr committed Aug 23, 2023
1 parent e9a5e10 commit 622200d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/e2e/utils/frontend/frontend-utils.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class FrontendUtils {
}

async addToCart( itemName = '' ) {
await this.page.waitForLoadState( 'domcontentloaded' );
if ( itemName !== '' ) {
await this.page
.getByLabel( `Add “${ itemName }” to your cart` )
Expand Down

0 comments on commit 622200d

Please sign in to comment.