Fix failing E2E tests and add back testing on trunk
#562
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
E2E tests have been failing on WP
trunk
for a few months (and thus we had removed that from our test matrix) and now tests are failing on the latest release. In digging in, it seems the issue is that in WordPress 6.3, the post editor is loaded in an iframe if all registered blocks support the Block API version 3 or greater. It seems that Cypress doesn't like this iframed approach and the editor fails to load. This means any tests that need to interact with the block editor (like creating a new post) won't work.I don't think this is an issue on the WordPress side, I think this is a Cypress specific problem. I was unable to figure out a true fix though and so this PR addresses this by ensuring our custom Recommended Content block is loaded for all tests. This block supports the Block API v2, so the editor ends up being loaded as before (not in an iframe) and tests work. This isn't a true fix and probably won't work forever but I figure having passing tests is worth it for now.
How to test the Change
Ensure E2E tests are passing
Changelog Entry
Credits
Props @dkotter
Checklist: