Updated assertion for k6 merchant wc home request #33044
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
Changes included in #32611 for #32160 resulted in the WooCommerce > Home menu element changing to include an additional
<span>element with a badge.The existing k6 merchant request for
wp-admin/admin.php?page=wc-adminused this menu element to assert we had the correct request response. The aforementioned change therefore caused this assertion to fail.This PR updates the assertion to not include the closing link tag, this means the request will be able to assert with the badge change but also will still be able to assert ok on older versions without the badge change.
How to test the changes in this Pull Request:
run
Build local test environment
change directory to
plugins/woocommerce/tests/e2e/dockerrun
cp init-sample-products.sh initialize.shto use the Docker Initialization Script that will set up a shop with sample products imported and the shop settings (payment method, permalinks, address etc) needed for the tests already set.run
pnpm exec wc-e2e docker:upInstall k6 and run test
run
brew install k6For other platforms please see the k6 installation guide.
change directory to
plugins/woocommerce/tests/performanceRun merchant tests with
k6 run tests/simple-all-merchant-requests.jsOther information:
pnpm nx changelog <project>?FOR PR REVIEWER ONLY: