Skip to content

Commit 29554ad

Browse files
Chris Yangmauricioluz
authored andcommitted
[video_player] Fix XCUITest based on the new tooltip accessibility label (flutter-team-archive#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
1 parent 5afacfc commit 29554ad

3 files changed

Lines changed: 14 additions & 5 deletions

File tree

‎packages/video_player/video_player_avfoundation/CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.3.3
2+
3+
* Fix XCUITest based on the new voice over announcement for tooltips.
4+
See: https://github.com/flutter/flutter/pull/87684
5+
16
## 2.3.2
27

38
* Applies the standardized transform for videos with different orientations.

‎packages/video_player/video_player_avfoundation/example/ios/RunnerUITests/VideoPlayerUITests.m‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,20 @@ - (void)testPlayVideo {
3030
XCTAssertTrue([playButton waitForExistenceWithTimeout:30.0]);
3131
[playButton tap];
3232

33-
XCUIElement *playbackSpeed1x = app.staticTexts[@"Playback speed\n1.0x"];
34-
XCTAssertTrue([playbackSpeed1x waitForExistenceWithTimeout:30.0]);
33+
NSPredicate *find1xButton = [NSPredicate predicateWithFormat:@"label CONTAINS '1.0x'"];
34+
XCUIElement *playbackSpeed1x = [app.staticTexts elementMatchingPredicate:find1xButton];
35+
BOOL foundPlaybackSpeed1x = [playbackSpeed1x waitForExistenceWithTimeout:30.0];
36+
XCTAssertTrue(foundPlaybackSpeed1x);
3537
[playbackSpeed1x tap];
3638

3739
XCUIElement *playbackSpeed5xButton = app.buttons[@"5.0x"];
3840
XCTAssertTrue([playbackSpeed5xButton waitForExistenceWithTimeout:30.0]);
3941
[playbackSpeed5xButton tap];
4042

41-
XCUIElement *playbackSpeed5x = app.staticTexts[@"Playback speed\n5.0x"];
42-
XCTAssertTrue([playbackSpeed5x waitForExistenceWithTimeout:30.0]);
43+
NSPredicate *find5xButton = [NSPredicate predicateWithFormat:@"label CONTAINS '5.0x'"];
44+
XCUIElement *playbackSpeed5x = [app.staticTexts elementMatchingPredicate:find5xButton];
45+
BOOL foundPlaybackSpeed5x = [playbackSpeed5x waitForExistenceWithTimeout:30.0];
46+
XCTAssertTrue(foundPlaybackSpeed5x);
4347

4448
// Cycle through tabs.
4549
for (NSString *tabName in @[ @"Asset", @"Remote" ]) {

‎packages/video_player/video_player_avfoundation/pubspec.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: video_player_avfoundation
22
description: iOS implementation of the video_player plugin.
33
repository: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player_avfoundation
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
5-
version: 2.3.2
5+
version: 2.3.3
66

77
environment:
88
sdk: ">=2.14.0 <3.0.0"

0 commit comments

Comments
 (0)