@@ -31,15 +31,34 @@ - (void)testPlayVideo {
31
31
[playButton tap ];
32
32
33
33
XCUIElement *playbackSpeed1x = app.staticTexts [@" 1.0x\n Playback speed" ];
34
- XCTAssertTrue ([playbackSpeed1x waitForExistenceWithTimeout: 30.0 ]);
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\n 1.0x\n " ];
41
+ foundPlaybackSpeed1x = [playbackSpeed1x waitForExistenceWithTimeout: 30.0 ];
42
+ }
43
+ XCTAssertTrue (foundPlaybackSpeed1x);
35
44
[playbackSpeed1x tap ];
36
45
37
46
XCUIElement *playbackSpeed5xButton = app.buttons [@" 5.0x" ];
38
47
XCTAssertTrue ([playbackSpeed5xButton waitForExistenceWithTimeout: 30.0 ]);
39
48
[playbackSpeed5xButton tap ];
40
49
41
50
XCUIElement *playbackSpeed5x = app.staticTexts [@" 5.0x\n Playback speed" ];
42
- XCTAssertTrue ([playbackSpeed5x waitForExistenceWithTimeout: 30.0 ]);
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\n 5.0x\n " ];
58
+ foundPlaybackSpeed5x = [playbackSpeed5x waitForExistenceWithTimeout: 30.0 ];
59
+ }
60
+ XCTAssertTrue (foundPlaybackSpeed5x);
61
+ [playbackSpeed5x tap ];
43
62
44
63
// Cycle through tabs.
45
64
for (NSString *tabName in @[ @" Asset" , @" Remote" ]) {
0 commit comments