-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
test: Mitigate media block test flakiness #21639
Conversation
The rapid typing within XCTest occasionally results in dropped characters in the "Insert from URL" text field. This means a valid URL of `https://wordpress.org/video.mp4` ends up captured as `h://wordpress.org/video.mp4`. Addressing the underlying performance issue might be ideal, but pasting the entire URL instead of typing is a reasonable workaround for now.
The previous predicates passed after merely adding a block, as it asserted aspects that do not verify the act of attaching media. The new predicates are only present if attaching media to the blocks succeeds. This increases the coverage for the tests.
The other changes in this branch appear to resolve the issues causing iPhone failures.
|
App Name | ![]() |
|
Configuration | Release-Alpha | |
Build Number | pr21639-d0a0f2a | |
Version | 23.3 | |
Bundle ID | org.wordpress.alpha | |
Commit | d0a0f2a | |
App Center Build | WPiOS - One-Offs #7225 |
|
App Name | ![]() |
|
Configuration | Release-Alpha | |
Build Number | pr21639-d0a0f2a | |
Version | 23.3 | |
Bundle ID | com.jetpack.alpha | |
Commit | d0a0f2a | |
App Center Build | jetpack-installable-builds #6267 |
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.
Thanks for updating the test! And good catch finding out the reason of failure. Changes related to adding URL looks good and CI is 🟢 but I added one question related to the updated assertion that I'd like to understand before approving. Thanks!
WordPress/UITestsFoundation/Screens/Editor/BlockEditorScreen.swift
Outdated
Show resolved
Hide resolved
Asserting the block position in addition to the media attachment increases the robustness of the test.
Generated by 🚫 dangerJS |
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.
Thank you for considering the feedback and making the changes!
Relates to wordpress-mobile/gutenberg-mobile#6233. Partially reverts #21582.
Mitigate media block test flakiness by pasting URLs rather than typing them. The
rapid rate at which XCTests type resulted in dropped URL characters leading to
invalid media URLs. This is undoubtedly a performance issue that could be
addressed directly, but pasting the URL feels like an appropriate solution for
resolving the test issue for now.
To test: ensure the CI tasks succeed.
Regression Notes
Other automated tests could begin failing.
Verifying CI tasks succeed.
Improved the robustness of media block tests.
PR submission checklist:
RELEASE-NOTES.txt
if necessary.UI Changes testing checklist: