Skip to content

Conversation

@tammullen
Copy link
Contributor

@tammullen tammullen commented May 15, 2022

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-admin used 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:

  1. Checkout this branch and build WooCommerce
    run
nvm use
pnpm install
pnpm nx composer-install woocommerce
pnpm nx build woocommerce
  1. Build local test environment
    change directory to plugins/woocommerce/tests/e2e/docker
    run cp init-sample-products.sh initialize.sh to 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:up

  2. Install k6 and run test
    run brew install k6
    For other platforms please see the k6 installation guide.
    change directory to plugins/woocommerce/tests/performance
    Run merchant tests with
    k6 run tests/simple-all-merchant-requests.js

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you created a changelog file for each project being changed, ie pnpm nx changelog <project>?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@tammullen tammullen added the focus: performance tests The issue/PR is release to performance testing. label May 15, 2022
@tammullen tammullen requested a review from a team May 15, 2022 12:35
@tammullen tammullen self-assigned this May 15, 2022
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label May 15, 2022
@alopezari
Copy link
Contributor

Thanks, @tammullen! It looks good, I'll approve it.

@alopezari alopezari self-requested a review May 16, 2022 16:05
@tammullen tammullen merged commit e8740f8 into trunk May 16, 2022
@tammullen tammullen deleted the update/k6-merch-wc-home-assert branch May 16, 2022 16:50
@github-actions github-actions bot added this to the 6.6.0 milestone May 16, 2022
@github-actions
Copy link
Contributor

Hi @tammullen, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

focus: performance tests The issue/PR is release to performance testing. plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants