E2E: Fix skipping of core profiler in page-loads.spec.js
#39084
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.
Submission Review Guidelines:
Changes proposed in this Pull Request:
Closes #39056.
Currently, the E2E tests in
page-loads.spec.js
fail when it's run while the default admin user has not skipped OBW yet. This is because the if condition here, which was meant to skip the guided setup, doesn't execute --currentPage.name
will never be equal toHome
.This PR fixes this by:
beforeAll
hook so that the skipping will happen only once, rather than leaving it in thebeforeEach
block where it runs before each test unnecessarily.coreProfilerEnabled
istrue
or not.This PR also removes these lines, as I think we no longer have a use case where the old onboarding wizard will be shown to the user.
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Testing locally
wp-env
. But don't run any tests yet.http://localhost:8086/wp-json/wc-admin/onboarding/profile
with the following payload in order to reset the skipped state:page-loads.spec.js
file. All tests in it should pass.Testing on the permanent sites for daily and release tests
Assuming you don't have a running
wp-env
local environment, and you're on thewoocommerce
monorepo root dir:pnpm install
to install dependencies. No need to run thebuild
andenv:test
PNPM commands./wp-json/wc-admin/onboarding/profile
with this payload:page-loads.spec.js
E2E spec against the daily and release smoke test sites using the following environment variables. Get their values from the secret store if you haven't saved them yet.Changelog entry
Significance
Type
Message
Comment