From 13ac9141a1643ea20ba5b18270904011b10fb14c Mon Sep 17 00:00:00 2001 From: Adrian Moldovan <3854374+adimoldovan@users.noreply.github.com> Date: Wed, 20 Mar 2024 15:59:48 +0200 Subject: [PATCH] [e2e tests] Stabilize product quick delete test (#45636) --- .../changelog/e2e-improve-product-quick-delete-test | 4 ++++ .../tests/e2e-pw/tests/merchant/product-delete.spec.js | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 plugins/woocommerce/changelog/e2e-improve-product-quick-delete-test diff --git a/plugins/woocommerce/changelog/e2e-improve-product-quick-delete-test b/plugins/woocommerce/changelog/e2e-improve-product-quick-delete-test new file mode 100644 index 00000000000..59627409f20 --- /dev/null +++ b/plugins/woocommerce/changelog/e2e-improve-product-quick-delete-test @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +E2E tests: stabilize product quick delete test diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/product-delete.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/product-delete.spec.js index 2097a1db0fc..e36bd47f9fc 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/product-delete.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/product-delete.spec.js @@ -70,7 +70,9 @@ baseTest.describe( 'Products > Delete Product', () => { product, } ) => { await test.step( 'Navigate to products list page', async () => { - await page.goto( `wp-admin/edit.php?post_type=product` ); + await page.goto( + `wp-admin/edit.php?post_type=product&s=${ product.name }` + ); } ); await test.step( 'Move product to trash', async () => {