-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E2E Tests: Add basic coverage for the Gutenberg plugin #3679
Conversation
As an alternative, we could consider making a WP CLI based test. Pro:
Con:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @ockham!
This review just contains a couple of minor suggestions for consistency with other tests and the Javascript documentation standards.
This is great! Do you think it's a better approach than running core tests in Gutenberg PRs (like I originally discussed here: https://wordpress.slack.com/archives/C03B0H5J0/p1650590706137509), or perhaps they're not mutually exclusive? I'd say they are complementary, so we could also try a similar approach in the GB repo. EDIT: I now see this is not really for running core GB PHPUnit tests in core, but only for activating the plugin, which is also great but not the same thing I was talking about above when I mentioned core tests in GB. Still, this is a great step forward! |
Thank you! Yeah, so this would be complementary to running Core's tests on Gutenberg PRs. (The latter sounds a bit familiar BTW: WordPress/gutenberg#26418 😬) |
Co-authored-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
Co-authored-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
Oh gosh! I didn't recall this PR, thanks for pointing that out! We should definitely resume work there! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates @ockham, LGTM! 👍
Thank you for reviewing @costdev! Committed to Core in https://core.trac.wordpress.org/changeset/54913/. |
Try to activate and install the Gutenberg plugin. This will catch naming collisions between Core and GB (see Core ticket 57197 for an example).
To test:
npm run env:start
.npm run test:e2e -- tests/e2e/specs/gutenberg-plugin.test.js
locally and verify that it passes.function_exists
guards or the like). I use the following:npm run test:e2e -- tests/e2e/specs/gutenberg-plugin.test.js
again and watch it fail.Trac ticket: https://core.trac.wordpress.org/ticket/57197
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.