[video_player] Fix XCUITest based on the new tooltip accessibility label (#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
diff --git a/packages/video_player/video_player_avfoundation/CHANGELOG.md b/packages/video_player/video_player_avfoundation/CHANGELOG.md
index a1f23eb..3916503 100644
--- a/packages/video_player/video_player_avfoundation/CHANGELOG.md
+++ b/packages/video_player/video_player_avfoundation/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 2.3.3
+
+* Fix XCUITest based on the new voice over announcement for tooltips.
+ See: https://github.com/flutter/flutter/pull/87684
+
## 2.3.2
* Applies the standardized transform for videos with different orientations.
diff --git a/packages/video_player/video_player_avfoundation/example/ios/RunnerUITests/VideoPlayerUITests.m b/packages/video_player/video_player_avfoundation/example/ios/RunnerUITests/VideoPlayerUITests.m
index 2933cf3..b9f0f16 100644
--- a/packages/video_player/video_player_avfoundation/example/ios/RunnerUITests/VideoPlayerUITests.m
+++ b/packages/video_player/video_player_avfoundation/example/ios/RunnerUITests/VideoPlayerUITests.m
@@ -30,16 +30,20 @@
XCTAssertTrue([playButton waitForExistenceWithTimeout:30.0]);
[playButton tap];
- XCUIElement *playbackSpeed1x = app.staticTexts[@"Playback speed\n1.0x"];
- XCTAssertTrue([playbackSpeed1x waitForExistenceWithTimeout:30.0]);
+ NSPredicate *find1xButton = [NSPredicate predicateWithFormat:@"label CONTAINS '1.0x'"];
+ XCUIElement *playbackSpeed1x = [app.staticTexts elementMatchingPredicate:find1xButton];
+ BOOL foundPlaybackSpeed1x = [playbackSpeed1x waitForExistenceWithTimeout:30.0];
+ XCTAssertTrue(foundPlaybackSpeed1x);
[playbackSpeed1x tap];
XCUIElement *playbackSpeed5xButton = app.buttons[@"5.0x"];
XCTAssertTrue([playbackSpeed5xButton waitForExistenceWithTimeout:30.0]);
[playbackSpeed5xButton tap];
- 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 elementMatchingPredicate:find5xButton];
+ BOOL foundPlaybackSpeed5x = [playbackSpeed5x waitForExistenceWithTimeout:30.0];
+ XCTAssertTrue(foundPlaybackSpeed5x);
// Cycle through tabs.
for (NSString *tabName in @[ @"Asset", @"Remote" ]) {
diff --git a/packages/video_player/video_player_avfoundation/pubspec.yaml b/packages/video_player/video_player_avfoundation/pubspec.yaml
index 5874b52..b3cc69e 100644
--- a/packages/video_player/video_player_avfoundation/pubspec.yaml
+++ b/packages/video_player/video_player_avfoundation/pubspec.yaml
@@ -2,7 +2,7 @@
description: iOS implementation of the video_player plugin.
repository: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player_avfoundation
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
-version: 2.3.2
+version: 2.3.3
environment:
sdk: ">=2.14.0 <3.0.0"