10up / headstartwp

Build a headless website fast with WordPress, the world’s most popular CMS, and Next.js, the most popular React framework. A free and open source solution by the experts at 10up.
https://headstartwp.10up.com
164 stars 17 forks source link

Introduce Cypress e2e testing for the WordPress plugin #626

Open claytoncollie opened 1 year ago

claytoncollie commented 1 year ago

Is your enhancement related to a problem? Please describe.

We should introduce end-to-end testing with Cypress for the WordPress plugin so that it matches the same standards as our other open-source plugins and also makes sure we are shipping a solid, stable product to our clients and partners. These tests would be run in a matrix test again different versions of PHP and different versions of WordPress when the action is triggered.

Below are some examples of the tests we currently have at 10up.

Tests

https://github.com/10up/ElasticPress/tree/develop/tests/cypress

https://github.com/10up/simple-local-avatars/tree/develop/tests/cypress

https://github.com/10up/safe-redirect-manager/tree/develop/tests/cypress

Workflows

https://github.com/10up/ElasticPress/blob/develop/.github/workflows/cypress-tests.yml

https://github.com/10up/simple-local-avatars/blob/develop/.github/workflows/cypress.yml

https://github.com/10up/safe-redirect-manager/blob/develop/.github/workflows/cypress.yml

I am happy to make a pull request for this issue.

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct

nicholasio commented 1 year ago

Thanks for opening this issue. @Manussakis recently started working on setting up a basic e2e test. For now, we're looking to set up a very basic test but with the infra to add more tests in the future.

Feel free to drop any feedback on https://github.com/10up/headstartwp/pull/623