Update permalink structure using Playwright global setup #35282
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:
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:
plugins/woocommerce/.wp-env.json
file. (e.g."core": "WordPress/WordPress#tags/5.8.6"
)pnpm env:test --filter=woocommerce && USE_WP_ENV=1 npx playwright test --config=tests/e2e-pw/playwright.config.js
Note: WooCommerce currently has a minimum WP version of 5.8.
Other information:
pnpm changelog add --filter=<project>
?FOR PR REVIEWER ONLY: