Establish Cypress E2E Testing #1437
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.
Establishes a Cypress end-to-end testing framework, some tests, and GitHub Actions Setup.
Description
Installs Cypress, sets up the ability to spin up a @wordpress/env environment in Docker on the fly, and adds some tests for it.
Additionally, it automatically runs the end-to-end tests in GitHub.
I intend to add a lot more tests, but even this base is useful in that it'll flag issues with logging in to WordPress, activating the plugin, or basic config/saving of CMB2 metaboxes.
Motivation and Context
More confidence in the codebase, and making it easier to trust PRs that touch hairy JavaScript code paths, like repeating groups.
Risk Level
Low. It doesn't change any core code.
Testing procedure
CLI:
npm i npm run cypress # When you're done: npm run env stopWith Cypress GUI:
npm i npm run env start npx cypress open # When you're done: npm run env stop