-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[video_player] Fix XCUITest based on the new tooltip accessibility label #5426
Conversation
Interesting, the test is still failing on master. It passed on my local. |
@chunhtai this failure was caused by flutter/flutter#87684, is the swapping of label text like this expected? @cyanglaz looks like this needs to be included in a manual framework->plugin roll so the tests pass, on top of a roll like #5425 |
Just to add to @jmagman's comment, the "Playback speed" is the tooltip name, and "1.0x" is the tooltip current value. |
yes, previously the tooltips are appended to the label before multiple semantics node merges, but now tooltips are appended after multiple semantics node merges. It looks like the change surface an accessibility issue, too. tooltip should be announced after the label not before. |
@@ -30,15 +30,15 @@ - (void)testPlayVideo { | |||
XCTAssertTrue([playButton waitForExistenceWithTimeout:30.0]); | |||
[playButton tap]; | |||
|
|||
XCUIElement *playbackSpeed1x = app.staticTexts[@"Playback speed\n1.0x"]; | |||
XCUIElement *playbackSpeed1x = app.staticTexts[@"1.0x\nPlayback speed"]; |
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.
You'll need to have both the old and new version, and wait for either one to show up, because the tests run on both stable and master.
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.
Yep, will do that
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.
Alternatively you could just look for 1.0x
which is the spirit of this check.
( I don't think app.staticTexts[@"1.0x"]
will work since the string needs to exactly match, but you could check if any contains that).
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 missed this comment earlier. I like this better. Updated the PR with only looking for 1.0x and 5.0x
87b00ba
to
72d4b90
Compare
packages/video_player/video_player_avfoundation/example/ios/RunnerUITests/VideoPlayerUITests.m
Show resolved
Hide resolved
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.
Really small nit, you can also just land ASAP to unblock the tree
XCUIElement *playbackSpeed5x = app.staticTexts[@"Playback speed\n5.0x"]; | ||
XCTAssertTrue([playbackSpeed5x waitForExistenceWithTimeout:30.0]); | ||
NSPredicate *find5xButton = [NSPredicate predicateWithFormat:@"label CONTAINS '5.0x'"]; | ||
XCUIElement *playbackSpeed5x = [app.staticTexts containingPredicate:find5xButton].element; |
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.
You could use `[app.staticTexts elementMatchingPredicate:userAgentPredicate];
XCUIElement *playbackSpeed5x = [app.staticTexts containingPredicate:find5xButton].element; | |
XCUIElement *playbackSpeed5x = [app.staticTexts elementMatchingPredicate:find5xButton]; |
* c09ef582e [flutter_plugin_tools] Remove UWP (flutter/plugins#5432) * 3876f54bf [ci.yaml] Remove explicit caches (flutter/plugins#5434) * 0605d876d [webview_flutter_android] Updates `pigeon` version to support null safety (flutter/plugins#5395) * 4b687c9fa [video_player] Fix XCUITest based on the new tooltip accessibility label (flutter/plugins#5426) * e777e515b Roll Flutter from 1b58a59 to 4cea9af (147 revisions) (flutter/plugins#5437) * 656e8c443 Roll Flutter from 4cea9af to 5b71314 (4 revisions) (flutter/plugins#5441) * f689280bf [flutter_plugin_tools] Validate code blocks in readme-check (flutter/plugins#5436) * 9c41c6895 Roll Flutter from 5b71314 to 7a74222 (1 revision) (flutter/plugins#5442) * 160c714e7 Roll Flutter from 7a74222 to 2eed8cb (1 revision) (flutter/plugins#5443)
…#102824) * c09ef582e [flutter_plugin_tools] Remove UWP (flutter/plugins#5432) * 3876f54bf [ci.yaml] Remove explicit caches (flutter/plugins#5434) * 0605d876d [webview_flutter_android] Updates `pigeon` version to support null safety (flutter/plugins#5395) * 4b687c9fa [video_player] Fix XCUITest based on the new tooltip accessibility label (flutter/plugins#5426) * e777e515b Roll Flutter from 1b58a59 to 4cea9af (147 revisions) (flutter/plugins#5437) * 656e8c443 Roll Flutter from 4cea9af to 5b71314 (4 revisions) (flutter/plugins#5441) * f689280bf [flutter_plugin_tools] Validate code blocks in readme-check (flutter/plugins#5436) * 9c41c6895 Roll Flutter from 5b71314 to 7a74222 (1 revision) (flutter/plugins#5442) * 160c714e7 Roll Flutter from 7a74222 to 2eed8cb (1 revision) (flutter/plugins#5443)
…bel (flutter#5426) The accessibility label for tool tip seems change in one of the recent flutter updates(flutter/flutter#87684), which results failure in this particular XCUITest. This is blocking the flutter to plugins roll. Fixes: flutter/flutter#102698
The accessibility label for tool tip seems change in one of the recent flutter updates(flutter/flutter#87684), which results failure in this particular XCUITest. This is blocking the flutter to plugins roll.
Fixes: flutter/flutter#102698
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.