@@ -15,31 +15,27 @@ @interface AccessibilityIdentifierPullToRefreshTests : KIFTestCase
15
15
16
16
@implementation AccessibilityIdentifierPullToRefreshTests
17
17
18
- -(void ) testPullToRefreshByAccessibilityIdentifier
18
+ - (void )afterEach
19
19
{
20
- UITableView *tableView;
21
- [tester waitForAccessibilityElement: NULL view: &tableView withIdentifier: @" Test Suite TableView" tappable: NO ];
22
-
23
- [tester tapViewWithAccessibilityLabel: @" Reset Refresh Control" ];
24
- [tester pullToRefreshViewWithAccessibilityIdentifier: @" Test Suite TableView" ];
25
- [tester waitForViewWithAccessibilityLabel: @" Bingo!" ];
26
- [tester waitForAbsenceOfViewWithAccessibilityLabel: @" Bingo!" ];
20
+ // Once #1296 is landed, use that on the `waitForView...` calls below.
21
+ // The issue is that implicit scrolling the table view when searching for label is causing "Bingo!" to immediately disappear.
22
+ [tester waitForTimeInterval: 3.0 ];
27
23
}
28
24
29
- -(void ) testPullToRefreshByAccessibilityIdentifierWithDuration
25
+ - (void )testPullToRefreshByAccessibilityIdentifier
30
26
{
31
- UITableView *tableView;
32
- [tester waitForAccessibilityElement: NULL view: &tableView withIdentifier: @" Test Suite TableView" tappable: NO ];
33
-
34
- [tester tapViewWithAccessibilityLabel: @" Reset Refresh Control" ];
35
- [tester pullToRefreshViewWithAccessibilityIdentifier: @" Test Suite TableView" pullDownDuration: KIFPullToRefreshInAboutThreeSeconds];
36
- [tester waitForViewWithAccessibilityLabel: @" Bingo!" ];
37
- [tester waitForAbsenceOfViewWithAccessibilityLabel: @" Bingo!" ];
27
+ [tester waitForViewWithAccessibilityIdentifier: @" Test Suite TableView" ];
28
+ [tester pullToRefreshViewWithAccessibilityIdentifier: @" Test Suite TableView" ];
29
+ [tester waitForViewWithAccessibilityLabel: @" Bingo!" ];
30
+ [tester waitForAbsenceOfViewWithAccessibilityLabel: @" Bingo!" ];
38
31
}
39
32
40
- - (void )afterEach
33
+ - (void )testPullToRefreshByAccessibilityIdentifierWithDuration
41
34
{
42
- [tester waitForAnimationsToFinish ];
35
+ [tester waitForViewWithAccessibilityIdentifier: @" Test Suite TableView" ];
36
+ [tester pullToRefreshViewWithAccessibilityIdentifier: @" Test Suite TableView" pullDownDuration: KIFPullToRefreshInAboutAHalfSecond];
37
+ [tester waitForViewWithAccessibilityLabel: @" Bingo!" ];
38
+ [tester waitForAbsenceOfViewWithAccessibilityLabel: @" Bingo!" ];
43
39
}
44
40
45
41
@end
0 commit comments