From 6ddbbae2074bba9b95afe1f52b2ecf30310bb7b9 Mon Sep 17 00:00:00 2001 From: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:48:14 +0200 Subject: [PATCH] [e2e test] Fix locator for customer combobox in create order test (#45983) --- plugins/woocommerce/changelog/e2e-fix-create-order-test-fix | 4 ++++ .../tests/e2e-pw/tests/merchant/create-order.spec.js | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 plugins/woocommerce/changelog/e2e-fix-create-order-test-fix diff --git a/plugins/woocommerce/changelog/e2e-fix-create-order-test-fix b/plugins/woocommerce/changelog/e2e-fix-create-order-test-fix new file mode 100644 index 00000000000..95a52a295e2 --- /dev/null +++ b/plugins/woocommerce/changelog/e2e-fix-create-order-test-fix @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +E2E tests: fix locator in create order tests diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-order.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-order.spec.js index 38dea1a637d..56206d1d2b2 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-order.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/create-order.spec.js @@ -361,7 +361,9 @@ test.describe( 'WooCommerce Orders > Add new order', () => { // Select customer await page.getByText( 'Guest' ).click(); - await page.getByRole( 'combobox' ).nth( 4 ).fill( 'sideshowbob@' ); + await page + .locator( 'input[aria-owns="select2-customer_user-results"]' ) + .fill( 'sideshowbob@' ); await page.getByRole( 'option', { name: 'Sideshow Bob' } ).click(); // Add a product