File tree Expand file tree Collapse file tree
WebDriverAgentTests/IntegrationTests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -621,23 +621,17 @@ + (BOOL)fb_switchToSystemApplicationWithError:(NSError **)error
621621{
622622 XCUIApplication *systemApp = self.fb_systemApplication ;
623623 @try {
624- if (!systemApp.running ) {
625- [systemApp launch ];
626- } else {
624+ if (systemApp.running ) {
627625 [systemApp activate ];
626+ } else {
627+ [systemApp launch ];
628628 }
629629 } @catch (NSException *e) {
630630 return [[[FBErrorBuilder alloc ]
631631 withDescription: nil == e ? @" Cannot open the home screen" : e.reason]
632632 buildError: error];
633633 }
634- return [[[[FBRunLoopSpinner new ]
635- timeout: 5 ]
636- timeoutErrorMessage: @" Timeout waiting until the home screen is visible" ]
637- spinUntilTrue: ^BOOL {
638- return [systemApp fb_isSameAppAs: self .fb_activeApplication];
639- }
640- error: error];
634+ return YES ;
641635}
642636
643637- (BOOL )fb_isSameAppAs : (nullable XCUIApplication *)otherApp
Original file line number Diff line number Diff line change 2828
2929NSString *formatTimeInterval (NSTimeInterval interval) {
3030 NSUInteger milliseconds = (NSUInteger )(interval * 1000 );
31- return [NSString stringWithFormat: @" %ld ms" , milliseconds];
31+ return [NSString stringWithFormat: @" %lu ms" , milliseconds];
3232}
3333
3434@implementation FBScreenshot
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ - (void)testGoToHomeScreen
102102 NSError *error;
103103 XCTAssertTrue ([[XCUIDevice sharedDevice ] fb_goToHomescreenWithError: &error]);
104104 XCTAssertNil (error);
105- XCTAssertTrue ([XCUIApplication fb_activeApplication ].icons [@" Safari" ].exists );
105+ FBAssertWaitTillBecomesTrue ([XCUIApplication fb_activeApplication ].icons [@" Safari" ].exists );
106106}
107107
108108- (void )testLockUnlockScreen
You can’t perform that action at this time.
0 commit comments