diff --git a/package-lock.json b/package-lock.json index 0c351b950..3313c24c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "woocommerce-gateway-stripe", - "version": "8.5.1", + "version": "8.5.2", "hasInstallScript": true, "license": "GPL-3.0", "dependencies": { diff --git a/tests/e2e/bin/setup.sh b/tests/e2e/bin/setup.sh index 13dccdd73..39ba9ab14 100755 --- a/tests/e2e/bin/setup.sh +++ b/tests/e2e/bin/setup.sh @@ -34,7 +34,7 @@ if ! docker info > /dev/null 2>&1; then fi step "Starting E2E docker containers" -CWD="$CWD" E2E_ROOT="$E2E_ROOT" redirect_output docker-compose -p wcstripe-e2e -f "$E2E_ROOT"/env/docker-compose.yml up --build --force-recreate -d wordpress +CWD="$CWD" E2E_ROOT="$E2E_ROOT" redirect_output docker compose -p wcstripe-e2e -f "$E2E_ROOT"/env/docker-compose.yml up --build --force-recreate -d wordpress step "Configuring Wordpress" # Wait for containers to be started up before setup. diff --git a/tests/e2e/tests/_legacy-experience/checkout/sca-card.spec.js b/tests/e2e/tests/_legacy-experience/checkout/sca-card.spec.js index b3f4ebbc2..e12bf49e1 100644 --- a/tests/e2e/tests/_legacy-experience/checkout/sca-card.spec.js +++ b/tests/e2e/tests/_legacy-experience/checkout/sca-card.spec.js @@ -30,6 +30,8 @@ test( 'customer can checkout with a SCA card @smoke', async ( { page } ) => { ) { await page.waitForTimeout( 1000 ); } + // Not ideal, but the iframe body gets repalced after load, so a waitFor does not work here. + await page.waitForTimeout( 2000 ); await page .frame( { @@ -38,7 +40,7 @@ test( 'customer can checkout with a SCA card @smoke', async ( { page } ) => { .getByRole( 'button', { name: 'Complete' } ) .click(); - await page.waitForNavigation(); + await page.waitForURL( '**/checkout/order-received/**' ); await expect( page.locator( 'h1.entry-title' ) ).toHaveText( 'Order received' diff --git a/tests/e2e/tests/checkout/blocks/sca-card.spec.js b/tests/e2e/tests/checkout/blocks/sca-card.spec.js index 1fd57982d..1cb1ee434 100644 --- a/tests/e2e/tests/checkout/blocks/sca-card.spec.js +++ b/tests/e2e/tests/checkout/blocks/sca-card.spec.js @@ -29,6 +29,8 @@ test( 'customer can checkout with a SCA card @smoke @blocks', async ( { ) { await page.waitForTimeout( 1000 ); } + // Not ideal, but the iframe body gets repalced after load, so a waitFor does not work here. + await page.waitForTimeout( 2000 ); await page .frame( { @@ -37,7 +39,7 @@ test( 'customer can checkout with a SCA card @smoke @blocks', async ( { .getByRole( 'button', { name: 'Complete' } ) .click(); - await page.waitForNavigation(); + await page.waitForURL( '**/checkout/order-received/**' ); await expect( page.locator( 'h1.entry-title' ) ).toHaveText( 'Order received' diff --git a/tests/e2e/tests/checkout/shortcode/sca-card.spec.js b/tests/e2e/tests/checkout/shortcode/sca-card.spec.js index afa8407a8..74aef73e4 100644 --- a/tests/e2e/tests/checkout/shortcode/sca-card.spec.js +++ b/tests/e2e/tests/checkout/shortcode/sca-card.spec.js @@ -27,6 +27,8 @@ test( 'customer can checkout with a SCA card @smoke', async ( { page } ) => { ) { await page.waitForTimeout( 1000 ); } + // Not ideal, but the iframe body gets repalced after load, so a waitFor does not work here. + await page.waitForTimeout( 2000 ); await page .frame( { @@ -35,7 +37,7 @@ test( 'customer can checkout with a SCA card @smoke', async ( { page } ) => { .getByRole( 'button', { name: 'Complete' } ) .click(); - await page.waitForNavigation(); + await page.waitForURL( '**/checkout/order-received/**' ); await expect( page.locator( 'h1.entry-title' ) ).toHaveText( 'Order received'