Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update permalink structure using Playwright global setup #35282

Merged
merged 1 commit into from
Oct 24, 2022

Conversation

MrJnrman
Copy link
Contributor

@MrJnrman MrJnrman commented Oct 24, 2022

All Submissions:

Changes proposed in this Pull Request:

This PR addresses a limitation with wp-env that didn't allow us to properly update permalink settings to the format that the E2E tests expected.

Reference: WordPress/gutenberg#28201

The work done here is to use PW to update the permalinks using the global-setup.js file in much the same way it adds the consumer tokens for admin and customer users.

How to test the changes in this Pull Request:

  1. Checkout this branch
  2. Specify the WordPress version in the plugins/woocommerce/.wp-env.json file. (e.g. "core": "WordPress/WordPress#tags/5.8.6")
  3. Run test using pnpm env:test --filter=woocommerce && USE_WP_ENV=1 npx playwright test --config=tests/e2e-pw/playwright.config.js
  4. Confirm that the tests are successfully executed.

Note: WooCommerce currently has a minimum WP version of 5.8.

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 created a changelog file for each project being changed, ie pnpm changelog add --filter=<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.

@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Oct 24, 2022
@MrJnrman MrJnrman requested a review from a team October 24, 2022 14:37
@github-actions
Copy link
Contributor

Test Results Summary

Commit SHA: 61f7abb

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests20300202050m 43s
E2E Tests186006019214m 38s

To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@MrJnrman MrJnrman changed the title Update permalink structure using in Playwright global setup Update permalink structure using Playwright global setup Oct 24, 2022
Copy link
Contributor

@lanej0 lanej0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid change, thanks for this @MrJnrman.

@lanej0 lanej0 merged commit ed23996 into trunk Oct 24, 2022
@lanej0 lanej0 deleted the add/setup-permalinks branch October 24, 2022 23:24
@github-actions github-actions bot added this to the 7.2.0 milestone Oct 24, 2022
@github-actions
Copy link
Contributor

Hi @lanej0, 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
plugin: woocommerce Issues related to the WooCommerce Core plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants