Skip to content

Commit

Permalink
Fix waitForNavigation
Browse files Browse the repository at this point in the history
  • Loading branch information
ralucaStan committed May 12, 2021
1 parent ed3398f commit af2f080
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/e2e/specs/frontend/cart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,11 @@ describe( `${ block.name } Block (frontend)`, () => {

// This is to ensure we've clicked the right cart button.
expect( selectedValue ).toBeGreaterThan( 1 );

await scrollTo( '.wc-block-cart__submit-button' );
await page.click( '.wc-block-cart__submit-button' );
await page.waitForNavigation();
await Promise.all( [
page.waitForNavigation(),
page.click( '.wc-block-cart__submit-button' ),
] );
await page.waitForSelector( '.wc-block-checkout' );
await page.goBack( { waitUntil: 'networkidle0' } );

Expand Down

0 comments on commit af2f080

Please sign in to comment.