Skip to content
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

Fix failing E2E tests and add back testing on trunk #562

Merged
merged 2 commits into from
Aug 11, 2023
Merged

Conversation

dkotter
Copy link
Collaborator

@dkotter dkotter commented Aug 10, 2023

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

Fixed - Ensure our E2E tests work properly on WordPress 6.3

Credits

Props @dkotter

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@dkotter dkotter added this to the 2.3.0 milestone Aug 10, 2023
@dkotter dkotter self-assigned this Aug 10, 2023
@dkotter dkotter requested review from jeffpaul and a team as code owners August 10, 2023 21:27
@dkotter dkotter requested review from iamdharmesh and removed request for a team and jeffpaul August 10, 2023 21:33
Copy link
Member

@iamdharmesh iamdharmesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this @dkotter. LGTM 🚀

@dkotter dkotter merged commit 4f099b8 into develop Aug 11, 2023
12 of 13 checks passed
@dkotter dkotter deleted the fix/e2e-tests branch August 11, 2023 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants