Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 72d4b90

Browse files
author
Chris Yang
committed
fix test
update changelog add debug info revert also check for old accessiblity value
1 parent ac3167f commit 72d4b90

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

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: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,35 @@ - (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+
XCUIElement *playbackSpeed1x = app.staticTexts[@"1.0x\nPlayback speed"];
34+
BOOL foundPlaybackSpeed1x = [playbackSpeed1x waitForExistenceWithTimeout:30.0];
35+
if (!foundPlaybackSpeed1x) {
36+
// Some old flutter version uses a different accessibility value for tooltips.
37+
// We try to find the button if the old accessibility value is used.
38+
// TODO(cyanglaz): Remove this when the new accessibility value is supported on flutter/stable
39+
// https://github.com/flutter/flutter/issues/102771
40+
playbackSpeed1x = app.staticTexts[@"Playback speed\n1.0x\n"];
41+
foundPlaybackSpeed1x = [playbackSpeed1x waitForExistenceWithTimeout:30.0];
42+
}
43+
XCTAssertTrue(foundPlaybackSpeed1x);
3544
[playbackSpeed1x tap];
3645

3746
XCUIElement *playbackSpeed5xButton = app.buttons[@"5.0x"];
3847
XCTAssertTrue([playbackSpeed5xButton waitForExistenceWithTimeout:30.0]);
3948
[playbackSpeed5xButton tap];
4049

41-
XCUIElement *playbackSpeed5x = app.staticTexts[@"Playback speed\n5.0x"];
42-
XCTAssertTrue([playbackSpeed5x waitForExistenceWithTimeout:30.0]);
50+
XCUIElement *playbackSpeed5x = app.staticTexts[@"5.0x\nPlayback speed"];
51+
BOOL foundPlaybackSpeed5x = [playbackSpeed5x waitForExistenceWithTimeout:30.0];
52+
if (!foundPlaybackSpeed5x) {
53+
// Some old flutter version uses a different accessibility value for tooltips.
54+
// We try to find the button if the old accessibility value is used.
55+
// TODO(cyanglaz): Remove this when the new accessibility value is supported on flutter/stable
56+
// https://github.com/flutter/flutter/issues/102771
57+
playbackSpeed5x = app.staticTexts[@"Playback speed\n5.0x\n"];
58+
foundPlaybackSpeed5x = [playbackSpeed5x waitForExistenceWithTimeout:30.0];
59+
}
60+
XCTAssertTrue(foundPlaybackSpeed5x);
61+
[playbackSpeed5x tap];
4362

4463
// Cycle through tabs.
4564
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)