diff --git a/changelog/e2e-update-locator-in-allows-customer-to-place-order-test b/changelog/e2e-update-locator-in-allows-customer-to-place-order-test new file mode 100644 index 00000000000..d2731df2f58 --- /dev/null +++ b/changelog/e2e-update-locator-in-allows-customer-to-place-order-test @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +Update locator to reduce flakiness when running tests against a JN site diff --git a/plugins/woocommerce/changelog/e2e-update-locator-to-reduce-flakiness-when-running-tests-against-an-external-site b/plugins/woocommerce/changelog/e2e-update-locator-to-reduce-flakiness-when-running-tests-against-an-external-site new file mode 100644 index 00000000000..2c5c0464bf0 --- /dev/null +++ b/plugins/woocommerce/changelog/e2e-update-locator-to-reduce-flakiness-when-running-tests-against-an-external-site @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +include post_ID in HPOS order edit screen diff --git a/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout.spec.js index 6aabb57cb29..75195a3ed48 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/shopper/checkout.spec.js @@ -346,9 +346,9 @@ test.describe( 'Checkout page', () => { await page.locator( 'text=Place order' ).click(); - await expect( page.locator( 'h1.entry-title' ) ).toContainText( - 'Order received' - ); + await expect( + page.getByRole( 'heading', { name: 'Order received' } ) + ).toBeVisible(); // get order ID from the page const orderReceivedText = await page