From 3544ef300f9bead72fe25a8e949c8f1514c836b2 Mon Sep 17 00:00:00 2001 From: nigeljamesstevenson <105309450+nigeljamesstevenson@users.noreply.github.com> Date: Fri, 22 Sep 2023 00:10:38 +0100 Subject: [PATCH] update correlation in performance requests (#40359) * update correlation * update correlation --- .../woocommerce/changelog/update-k6-home-wc-admin-correlation | 4 ++++ .../tests/performance/requests/merchant/home-wc-admin.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 plugins/woocommerce/changelog/update-k6-home-wc-admin-correlation diff --git a/plugins/woocommerce/changelog/update-k6-home-wc-admin-correlation b/plugins/woocommerce/changelog/update-k6-home-wc-admin-correlation new file mode 100644 index 00000000000..344e7f8402e --- /dev/null +++ b/plugins/woocommerce/changelog/update-k6-home-wc-admin-correlation @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Update correlation to allow previously removed Perf Requests to run again diff --git a/plugins/woocommerce/tests/performance/requests/merchant/home-wc-admin.js b/plugins/woocommerce/tests/performance/requests/merchant/home-wc-admin.js index 1cf8bbb6d98..f4ac2d8b7cd 100644 --- a/plugins/woocommerce/tests/performance/requests/merchant/home-wc-admin.js +++ b/plugins/woocommerce/tests/performance/requests/merchant/home-wc-admin.js @@ -58,8 +58,8 @@ export function homeWCAdmin( includeTests = {} ) { // Correlate nonce values for use in subsequent requests. api_x_wp_nonce = findBetween( response.body, - 'wp-json\\/","nonce":"', - '",' + 'wp.apiFetch.createNonceMiddleware( "', + '"' ); // Create request header with nonce value for use in subsequent requests.