-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Mobile] - Try splitting E2E tests #47814
Conversation
Size Change: -83 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
Flaky tests detected in 3ff8caf. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4114842566
|
…on CI. It also changes the approach on iOS to also scroll to get the last block if needed. After the React Native upgrade the block list doesn't render the whole thing at the same time so on iOS it was causing flakiness due to trying to get the last block without scrolling or waiting for all content to be there.
d00944e
to
e00cba1
Compare
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.
I tested the E2E tests locally on both platforms and worked as expected 🎊 . Before proceeding with the approval, @geriux let me know if you could check the comments I added to the PR. Thanks!
packages/react-native-editor/__device-tests__/gutenberg-editor-rendering-media-blocks.test.js
Outdated
Show resolved
Hide resolved
packages/react-native-editor/__device-tests__/pages/editor-page.js
Outdated
Show resolved
Hide resolved
As you mentioned @geriux , looks like the flakiness could be mostly caused by the fact that the initial HTML E2E tests are being run on slow machines. However, this might be the signal that performance regressions might have been introduced recently. Since performance issues and tooling to identify this type of regressions will be introduced in the future, as they are being worked on in a different project, I'd stick with this approach especially to make the mobile E2E tests more stable. |
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.
LGTM 🎊 !
All CI jobs succeeded 🟢 🎉 .
Related PRs:
What?
This PR splits the only E2E test we have in this repo into three.
Why?
In the past, we've had issues when incrementing the content of the
initial-HTML
file for testing. I can't remember the goal for this test but I think it's mostly to check all blocks render correctly, it could also be to stress test the editor by adding a lot of content but I don't think this is the case.After the React Native upgrade I believe we've started to have more flakiness on the iOS tests, I think this is because the rendering of the block list is a bit different, where it starts rendering content as batches and before it blocked the UI until It finished rendering the blocks.
For the
gutenberg-editor-initial-html.test.js
on iOS, we were expecting to get the last block right after setting the content. On Android, we scroll down up to the very end to find the block.How?
First, we split the
gutenberg-editor-initial-html.test.js
into three for this repo consisting on:All of those are in separate tests, for all of them, it would use the Android approach to scroll down to the end to get the
Add Paragraph block
placeholder. It's worth noting that for iOS sometimes scrolling down won't be needed as it would find the block right away.There's a new helper
scrollAndReturnElementByAccessibilityId
which is similar toandroidScrollAndReturnElement
but it's for both platforms and it looks for an accessibility ID instead.For this repo we will only run those tests, we are updating the filter to take into account tests that have
rendering
as part of the names.The initial HTML test will only run on Gutenberg Mobile, the reasoning for this is that there we have more powerful machines, whereas here I think we are using the most basic ones limiting the performance of the simulators.
Testing Instructions
CI Checks should pass on both Gutenberg and Gutenberg mobile. Try re-running the E2E tests to see if they succeed again.
Testing Instructions for Keyboard
N/A
Screenshots or screencast
N/A