Skip to content

Conversation

@markjaquith
Copy link
Contributor

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 stop

With Cypress GUI:

npm i
npm run env start
npx cypress open

# When you're done:
npm run env stop

CleanShot 2021-09-03 at 17 38 09@2x

@jtsternberg
Copy link
Member

Amazing! Will get this merged hopefully today. Can’t wait to play with it.

@jtsternberg jtsternberg merged commit a94765b into CMB2:develop Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants