Opened 14 months ago
Last modified 14 months ago
#59659 new feature request
Run Gutenberg e2e tests in core
Reported by: | swissspidy | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
Occasionally there are cases where a change in WordPress core can break the end-to-end tests in Gutenberg because of an uncaught bug. Right now, such bugs are only discovered once a change lands in WordPress trunk.
Ideally, we find a way to run the Gutenberg e2e tests against trunk or, even better, merge them into the core repository so that the tests run on PRs as well.
Previously this couldn't even be done because of the whole Puppeteer vs. Playwright difference, but now both projects use Playwright.
Footnotes is an example where this happened before and would be a valuable test to port over.
Change History (4)
#3
@
14 months ago
I haven't fully thought about the details upon creating the ticket, but there could be multiple ways to approach this. For instance:
- Every time we update packages in core, we copy over all the e2e test files from Gutenberg as well so they run. This way we know all the functionality covered by the tests is in core and that the tests should pass. Downside is that it's confusing for contributors as the source of truth for the tests is in another repo.
- We check out the Gutenberg repo on CI and run their tests, but not against their wp-env environment but the core environment. This requires activating Gutenberg and adding the same test plugins and themes. So it's testing core+Gutenberg and not core itself.
- Something else?
#4
@
14 months ago
Just stumbled upon tests/gutenberg/run.js
— does this actually already exist??
From a commit message:
In core, you can run
tests/gutenberg/run.js
script to run the Gutenberg e2e tests
against Core with the plugin being disabled. This test ensures that the integration
of the block editor with Core is working properly.
So basically all we need is to run this on CI.
I'm not too familiar with how they are set up on the Gutenberg repository side and I'm not strong with E2E tests. A few questions/thoughts:
trunk
, would that cause failures?