test: Mitigate media block test flakiness - #21639
Merged
Merged
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.
Contributor
|
| App Name | WordPress Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr21639-d0a0f2a | |
| Version | 23.3 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | d0a0f2a | |
| App Center Build | WPiOS - One-Offs #7225 |
Contributor
|
| App Name | Jetpack Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr21639-d0a0f2a | |
| Version | 23.3 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | d0a0f2a | |
| App Center Build | jetpack-installable-builds #6267 |
jostnes
reviewed
Sep 27, 2023
jostnes
left a comment
Contributor
There was a problem hiding this comment.
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!
Asserting the block position in addition to the media attachment increases the robustness of the test.
Generated by 🚫 dangerJS |
jostnes
approved these changes
Sep 28, 2023
jostnes
left a comment
Contributor
There was a problem hiding this comment.
Thank you for considering the feedback and making the changes! ![]()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


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.txtif necessary.UI Changes testing checklist: