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 on trunk #264

Merged
merged 4 commits into from Aug 11, 2023
Merged

Fix failing E2E tests on trunk #264

merged 4 commits into from Aug 11, 2023

Conversation

iamdharmesh
Copy link
Member

@iamdharmesh iamdharmesh commented Aug 11, 2023

Description of the Change

E2E tests started failing in WP 6.3 due to changes in WP 6.3 where editor is moved into an iframe. 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.

Somehow Cypress was not allowing the editor iframe to be loaded (I believe maybe due to cross-origin or insecure(HTTP) iframes). Adding config chromeWebSecurity to false has fixed this issue and the iframe editor started loading now.

As the block editor is loaded via iframe now, interaction with the block editor also needs to update. PR adds the getBlockEditor() command which returns wrapped editor iframe and returns a normal HTML body element in case E2E tests are running on older versions of WP (minimum env)

Closes #260

How to test the Change

Verify E2E test run from GH action or locally.

Changelog Entry

Fixed - Ensure our E2E tests work properly on WordPress 6.3

Credits

Props @iamdharmesh

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.

@iamdharmesh iamdharmesh marked this pull request as ready for review August 11, 2023 06:50
@iamdharmesh iamdharmesh requested a review from a team August 11, 2023 06:50
@github-actions github-actions bot added the needs:code-review This requires code review. label Aug 11, 2023
@iamdharmesh iamdharmesh requested review from a team and peterwilsoncc and removed request for jeffpaul and a team August 11, 2023 06:50
@iamdharmesh iamdharmesh added this to the 2.2.0 milestone Aug 11, 2023
@iamdharmesh iamdharmesh requested review from dkotter and Sidsector9 and removed request for peterwilsoncc August 11, 2023 10:57
@iamdharmesh iamdharmesh merged commit 08d3424 into develop Aug 11, 2023
12 checks passed
@iamdharmesh iamdharmesh deleted the fix/260 branch August 11, 2023 13:34
@iamdharmesh iamdharmesh modified the milestones: 2.2.0, 2.1.1 Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

E2E tests failing on WP trunk env.
2 participants