From 79b05ad71c6140b4022704c053d1e223e6a8eecf Mon Sep 17 00:00:00 2001 From: "Jorge A. Torres" Date: Thu, 13 Apr 2023 15:23:30 -0500 Subject: [PATCH] Do not override `admin_update_order_base` in `merchant/add-order.js` perf test to prevent duplicate order IDs --- .../tests/performance/requests/merchant/add-order.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce/tests/performance/requests/merchant/add-order.js b/plugins/woocommerce/tests/performance/requests/merchant/add-order.js index dacf0519c5f..a39788bae2b 100644 --- a/plugins/woocommerce/tests/performance/requests/merchant/add-order.js +++ b/plugins/woocommerce/tests/performance/requests/merchant/add-order.js @@ -50,6 +50,7 @@ let admin_created_order_assert; let admin_open_order_base; let admin_open_order_assert; let admin_update_order_base; +let admin_update_order; let admin_update_order_id; let admin_update_order_params; let admin_update_order_assert; @@ -375,14 +376,15 @@ export function addOrder() { ] ); if ( cot_status === true ) { - admin_update_order_base = `${ admin_update_order_base }&id=${ hpos_post_id }`; + admin_update_order = `${ admin_update_order_base }&id=${ hpos_post_id }`; admin_update_order_params = cotOrderParams.toString(); } else { + admin_update_order = admin_update_order_base; admin_update_order_params = orderParams.toString(); } response = http.post( - `${ base_url }/wp-admin/${ admin_update_order_base }`, + `${ base_url }/wp-admin/${ admin_update_order }`, admin_update_order_params.toString(), { headers: requestHeaders,