You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had some time last night and worked something out using Cypress on a block starter I'm maintaining.
Basically it will set up wp-env to run in a GitHub action, then run integration tests on your block as you define them. I've ported a handful of the wp-e2e puppeteer tests as well, so you can do something like cy.loginUser() and expect it to log the user in.
I also set it up to run on both the latest WP install, plugin the master branch dev version. That way you can be sure the block won't break. Optionally the workflow can be set to run daily too without interaction.
Might be a cool stream? Was fun to set up and write the tests. I remember reading that Gutenberg might use playwright though, so maybe better to use that.
It would be nice to learn some tricks on testing during block development.
If possible, something that interacts with or mocks the database.
Thanks!
The text was updated successfully, but these errors were encountered: