diff --git a/.travis.yml b/.travis.yml index 4c16107db..365aa1616 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,10 +9,6 @@ cache: script: ./Scripts/build.sh -branches: - only: - - master - env: # Builds - ACTION=build TARGET=runner SDK=sim diff --git a/Cartfile b/Cartfile index 02e6a2e23..f96df7698 100644 --- a/Cartfile +++ b/Cartfile @@ -1,8 +1,8 @@ # Used for HTTP routing -github "marekcirkos/RoutingHTTPServer" +github "appium/RoutingHTTPServer" # Used by the element cache github "appium/YYCache" # Used by screenshots broadcaster -github "robbiehanson/CocoaAsyncSocket" \ No newline at end of file +github "robbiehanson/CocoaAsyncSocket" diff --git a/Cartfile.resolved b/Cartfile.resolved index 16fae125a..cab9c36e5 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,3 +1,3 @@ github "appium/YYCache" "1.0.5" -github "marekcirkos/RoutingHTTPServer" "v1.0.1" +github "appium/RoutingHTTPServer" "v1.0.2" github "robbiehanson/CocoaAsyncSocket" "7.6.3" diff --git a/Configurations/ProjectSettings.xcconfig b/Configurations/ProjectSettings.xcconfig index fb84bcae7..95d1a06ee 100644 --- a/Configurations/ProjectSettings.xcconfig +++ b/Configurations/ProjectSettings.xcconfig @@ -11,6 +11,7 @@ GCC_WARN_UNUSED_PARAMETER = YES GCC_WARN_UNUSED_VALUE = YES GCC_WARN_UNUSED_VARIABLE = YES GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES +CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES CLANG_ANALYZER_NONNULL = YES CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES diff --git a/PrivateHeaders/XCTest/XCEventGenerator.h b/PrivateHeaders/XCTest/XCEventGenerator.h index ce28481fc..cc67fc1ba 100644 --- a/PrivateHeaders/XCTest/XCEventGenerator.h +++ b/PrivateHeaders/XCTest/XCEventGenerator.h @@ -25,7 +25,9 @@ typedef void (^XCEventGeneratorHandler)(XCSynthesizedEventRecord *record, NSErro @property unsigned long long generation; // @synthesize generation=_generation; //@property(readonly) NSObject *eventQueue; // @synthesize eventQueue=_eventQueue; -#if TARGET_OS_IPHONE +#if TARGET_OS_TV +// TODO: tvOS-specific headers +#elif TARGET_OS_IPHONE - (double)rotateInRect:(CGRect)arg1 withRotation:(double)arg2 velocity:(double)arg3 orientation:(UIInterfaceOrientation)arg4 handler:(XCEventGeneratorHandler)arg5; - (double)pinchInRect:(CGRect)arg1 withScale:(double)arg2 velocity:(double)arg3 orientation:(UIInterfaceOrientation)arg4 handler:(XCEventGeneratorHandler)arg5; - (double)pressAtPoint:(CGPoint)arg1 forDuration:(double)arg2 liftAtPoint:(CGPoint)arg3 velocity:(double)arg4 orientation:(UIInterfaceOrientation)arg5 name:(NSString *)arg6 handler:(XCEventGeneratorHandler)arg7; diff --git a/PrivateHeaders/XCTest/XCSynthesizedEventRecord.h b/PrivateHeaders/XCTest/XCSynthesizedEventRecord.h index 529ff95f3..597072e37 100644 --- a/PrivateHeaders/XCTest/XCSynthesizedEventRecord.h +++ b/PrivateHeaders/XCTest/XCSynthesizedEventRecord.h @@ -10,15 +10,21 @@ { NSMutableArray *_eventPaths; NSString *_name; +#if TARGET_OS_IOS UIInterfaceOrientation _interfaceOrientation; +#endif } +#if TARGET_OS_IOS @property(readonly) UIInterfaceOrientation interfaceOrientation; // @synthesize interfaceOrientation=_interfaceOrientation; +#endif @property(readonly, copy) NSString *name; // @synthesize name=_name; @property(readonly) double maximumOffset; @property(readonly) NSArray *eventPaths; - (void)addPointerEventPath:(XCPointerEventPath *)arg1; +#if TARGET_OS_IOS - (id)initWithName:(NSString *)arg1 interfaceOrientation:(UIInterfaceOrientation)arg2; +#endif - (id)init; - (BOOL)synthesizeWithError:(NSError **)arg1; diff --git a/PrivateHeaders/XCTest/XCUIApplication.h b/PrivateHeaders/XCTest/XCUIApplication.h index 8234f392c..271819e8f 100644 --- a/PrivateHeaders/XCTest/XCUIApplication.h +++ b/PrivateHeaders/XCTest/XCUIApplication.h @@ -31,7 +31,9 @@ @property(getter=isIdleAnimationWaitEnabled) BOOL idleAnimationWaitEnabled; // @synthesize idleAnimationWaitEnabled=_idleAnimationWaitEnabled; @property(nonatomic) BOOL doesNotHandleUIInterruptions; // @synthesize doesNotHandleUIInterruptions=_doesNotHandleUIInterruptions; @property(readonly) BOOL fauxCollectionViewCellsEnabled; -@property(readonly, nonatomic) UIInterfaceOrientation interfaceOrientation; //TODO tvos +#if !TARGET_OS_TV +@property(readonly, nonatomic) UIInterfaceOrientation interfaceOrientation; +#endif @property(readonly, nonatomic) BOOL running; @property(nonatomic) pid_t processID; // @synthesize processID=_processID; @property(readonly) XCAccessibilityElement *accessibilityElement; diff --git a/PrivateHeaders/XCTest/XCUIElement.h b/PrivateHeaders/XCTest/XCUIElement.h index 8826420eb..2aaecd7aa 100644 --- a/PrivateHeaders/XCTest/XCUIElement.h +++ b/PrivateHeaders/XCTest/XCUIElement.h @@ -18,7 +18,9 @@ @property BOOL safeQueryResolutionEnabled; // @synthesize safeQueryResolutionEnabled=_safeQueryResolutionEnabled; @property(retain) XCElementSnapshot *lastSnapshot; // @synthesize lastSnapshot=_lastSnapshot; @property(readonly) XCUIElementQuery *query; // @synthesize query=_query; +#if TARGET_OS_IOS @property(readonly, nonatomic) UIInterfaceOrientation interfaceOrientation; +#endif @property(readonly, copy) XCUICoordinate *hitPointCoordinate; @property(readonly) BOOL isTopLevelTouchBarElement; @property(readonly) BOOL isTouchBarElement; diff --git a/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentRunner-nodebug.xcscheme b/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationApp.xcscheme similarity index 64% rename from WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentRunner-nodebug.xcscheme rename to WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationApp.xcscheme index c1714a533..41ca13369 100644 --- a/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentRunner-nodebug.xcscheme +++ b/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/IntegrationApp.xcscheme @@ -14,9 +14,9 @@ buildForAnalyzing = "YES"> @@ -24,23 +24,20 @@ - - - - + + + + @@ -48,22 +45,22 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> - + - + @@ -73,15 +70,16 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> - + - + diff --git a/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentLib.xcscheme b/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentLib.xcscheme index a46c97e3d..223ff0fd1 100644 --- a/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentLib.xcscheme +++ b/WebDriverAgent.xcodeproj/xcshareddata/xcschemes/WebDriverAgentLib.xcscheme @@ -26,7 +26,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" shouldUseLaunchSchemeArgsEnv = "YES"> @@ -48,7 +47,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/WebDriverAgentTests/IntegrationTests/FBAppiumMultiTouchActionsIntegrationTests.m b/WebDriverAgentTests/IntegrationTests/FBAppiumMultiTouchActionsIntegrationTests.m index 93d90e227..b3ed7ac08 100644 --- a/WebDriverAgentTests/IntegrationTests/FBAppiumMultiTouchActionsIntegrationTests.m +++ b/WebDriverAgentTests/IntegrationTests/FBAppiumMultiTouchActionsIntegrationTests.m @@ -28,9 +28,9 @@ - (void)verifyGesture:(NSArray *> *> *)gest { [[XCUIDevice sharedDevice] fb_setDeviceInterfaceOrientation:orientation]; NSError *error; - XCTAssertTrue(self.testedApplication.alerts.count == 0); + NSInteger initialCount = self.testedApplication.alerts.count; XCTAssertTrue([self.testedApplication fb_performAppiumTouchActions:gesture elementCache:nil error:&error]); - FBAssertWaitTillBecomesTrue(self.testedApplication.alerts.count > 0); + FBAssertWaitTillBecomesTrue(self.testedApplication.alerts.count > initialCount); } - (void)setUp @@ -63,9 +63,9 @@ - (void)testErroneousGestures } ], ], - + ]; - + for (NSArray *> *> *invalidGesture in invalidGestures) { NSError *error; XCTAssertFalse([self.testedApplication fb_performAppiumTouchActions:invalidGesture elementCache:nil error:&error]); @@ -93,7 +93,7 @@ - (void)testSymmetricTwoFingersTap } ], ]; - + [self verifyGesture:gesture orientation:UIDeviceOrientationPortrait]; } diff --git a/WebDriverAgentTests/IntegrationTests/FBAppiumTouchActionsIntegrationTests.m b/WebDriverAgentTests/IntegrationTests/FBAppiumTouchActionsIntegrationTests.m index 7e5dedd95..c1f873851 100644 --- a/WebDriverAgentTests/IntegrationTests/FBAppiumTouchActionsIntegrationTests.m +++ b/WebDriverAgentTests/IntegrationTests/FBAppiumTouchActionsIntegrationTests.m @@ -33,9 +33,10 @@ - (void)verifyGesture:(NSArray *> *)gesture orienta { [[XCUIDevice sharedDevice] fb_setDeviceInterfaceOrientation:orientation]; NSError *error; - XCTAssertTrue(self.testedApplication.alerts.count == 0); + NSInteger initialCount = self.testedApplication.alerts.count; XCTAssertTrue([self.testedApplication fb_performAppiumTouchActions:gesture elementCache:nil error:&error]); - FBAssertWaitTillBecomesTrue(self.testedApplication.alerts.count > 0); + XCTAssertNil(error); + FBAssertWaitTillBecomesTrue(self.testedApplication.alerts.count > initialCount); } - (void)setUp @@ -57,12 +58,12 @@ - (void)tearDown - (void)testErroneousGestures { XCUIElement *dstButton = self.testedApplication.buttons[FBShowAlertButtonName]; - + NSArray *> *> *invalidGestures = @[ // Empty chain @[], - + // Chain element without 'action' key @[@{ @"options": @{ @@ -70,7 +71,7 @@ - (void)testErroneousGestures } }, ], - + // Empty chain because of cancel @[@{ @"action": @"moveTo", @@ -82,7 +83,7 @@ - (void)testErroneousGestures @"action": @"cancel" }, ], - + // Chain with unknown action @[@{ @"action": @"tapP", @@ -91,7 +92,7 @@ - (void)testErroneousGestures } }, ], - + // Wait without preceeding coordinate @[@{ @"action": @"wait" @@ -141,7 +142,7 @@ - (void)testErroneousGestures } }, ], - + // longPress with negative duration @[@{ @"action": @"longPress", @@ -152,9 +153,9 @@ - (void)testErroneousGestures } }, ], - + ]; - + for (NSArray *> *invalidGesture in invalidGestures) { NSError *error; XCTAssertFalse([self.testedApplication fb_performAppiumTouchActions:invalidGesture elementCache:nil error:&error]); @@ -423,4 +424,3 @@ - (void)testSwipePickerWheelWithAbsoluteCoordinates } @end - diff --git a/WebDriverAgentTests/IntegrationTests/FBAutoAlertsHandlerTests.m b/WebDriverAgentTests/IntegrationTests/FBAutoAlertsHandlerTests.m index fb83c3704..a265ba3f3 100644 --- a/WebDriverAgentTests/IntegrationTests/FBAutoAlertsHandlerTests.m +++ b/WebDriverAgentTests/IntegrationTests/FBAutoAlertsHandlerTests.m @@ -27,7 +27,6 @@ @implementation FBAutoAlertsHandlerTests - (void)setUp { [super setUp]; - [self launchApplication]; [self goToAlertsPage]; } @@ -48,7 +47,7 @@ - (void)testAutoAcceptingOfAlerts if (SYSTEM_VERSION_LESS_THAN(@"11.0")) { return; } - + self.session = [FBSession sessionWithApplication:FBApplication.fb_activeApplication defaultAlertAction:@"accept"]; diff --git a/WebDriverAgentTests/IntegrationTests/FBForceTouchTests.m b/WebDriverAgentTests/IntegrationTests/FBForceTouchTests.m index 39b808f17..dc90fb9da 100644 --- a/WebDriverAgentTests/IntegrationTests/FBForceTouchTests.m +++ b/WebDriverAgentTests/IntegrationTests/FBForceTouchTests.m @@ -29,9 +29,9 @@ - (void)verifyForceTapWithOrientation:(UIDeviceOrientation)orientation { [[XCUIDevice sharedDevice] fb_setDeviceInterfaceOrientation:orientation]; NSError *error; - XCTAssertTrue(self.testedApplication.alerts.count == 0); + NSInteger initialCount = self.testedApplication.alerts.count; [self.testedApplication.buttons[FBShowAlertForceTouchButtonName] fb_forceTouchWithPressure:1.0 duration:1.0 error:&error]; - FBAssertWaitTillBecomesTrue(self.testedApplication.alerts.count > 0); + FBAssertWaitTillBecomesTrue(self.testedApplication.alerts.count > initialCount); } - (void)setUp diff --git a/WebDriverAgentTests/IntegrationTests/FBTapTest.m b/WebDriverAgentTests/IntegrationTests/FBTapTest.m index 5e5457d38..fd7cfb927 100644 --- a/WebDriverAgentTests/IntegrationTests/FBTapTest.m +++ b/WebDriverAgentTests/IntegrationTests/FBTapTest.m @@ -29,9 +29,10 @@ - (void)verifyTapWithOrientation:(UIDeviceOrientation)orientation { [[XCUIDevice sharedDevice] fb_setDeviceInterfaceOrientation:orientation]; NSError *error; - XCTAssertTrue(self.testedApplication.alerts.count == 0); + NSInteger initialCount = self.testedApplication.alerts.count; [self.testedApplication.buttons[FBShowAlertButtonName] fb_tapWithError:&error]; - FBAssertWaitTillBecomesTrue(self.testedApplication.alerts.count > 0); + XCTAssertNil(error); + FBAssertWaitTillBecomesTrue(self.testedApplication.alerts.count > initialCount); } - (void)setUp @@ -77,10 +78,10 @@ - (void)verifyTapByCoordinatesWithOrientation:(UIDeviceOrientation)orientation { [[XCUIDevice sharedDevice] fb_setDeviceInterfaceOrientation:orientation]; NSError *error; - XCTAssertTrue(self.testedApplication.alerts.count == 0); + NSInteger initialCount = self.testedApplication.alerts.count; XCUIElement *dstButton = self.testedApplication.buttons[FBShowAlertButtonName]; [dstButton fb_tapCoordinate:CGPointMake(dstButton.frame.size.width / 2, dstButton.frame.size.height / 2) error:&error]; - FBAssertWaitTillBecomesTrue(self.testedApplication.alerts.count > 0); + FBAssertWaitTillBecomesTrue(self.testedApplication.alerts.count > initialCount); } - (void)testTapCoordinates diff --git a/WebDriverAgentTests/IntegrationTests/FBW3CMultiTouchActionsIntegrationTests.m b/WebDriverAgentTests/IntegrationTests/FBW3CMultiTouchActionsIntegrationTests.m index 33aa3e068..eae4f9999 100644 --- a/WebDriverAgentTests/IntegrationTests/FBW3CMultiTouchActionsIntegrationTests.m +++ b/WebDriverAgentTests/IntegrationTests/FBW3CMultiTouchActionsIntegrationTests.m @@ -29,9 +29,9 @@ - (void)verifyGesture:(NSArray *> *)gesture orienta { [[XCUIDevice sharedDevice] fb_setDeviceInterfaceOrientation:orientation]; NSError *error; - XCTAssertTrue(self.testedApplication.alerts.count == 0); + NSInteger initialCount = self.testedApplication.alerts.count; XCTAssertTrue([self.testedApplication fb_performW3CTouchActions:gesture elementCache:nil error:&error]); - FBAssertWaitTillBecomesTrue(self.testedApplication.alerts.count > 0); + FBAssertWaitTillBecomesTrue(self.testedApplication.alerts.count > initialCount); } - (void)setUp @@ -79,9 +79,9 @@ - (void)testErroneousGestures ], }, ], - + ]; - + for (NSArray *> *invalidGesture in invalidGestures) { NSError *error; XCTAssertFalse([self.testedApplication fb_performW3CTouchActions:invalidGesture elementCache:nil error:&error]); @@ -117,9 +117,8 @@ - (void)testSymmetricTwoFingersTap ], }, ]; - + [self verifyGesture:gesture orientation:UIDeviceOrientationPortrait]; } @end - diff --git a/WebDriverAgentTests/IntegrationTests/FBW3CTouchActionsIntegrationTests.m b/WebDriverAgentTests/IntegrationTests/FBW3CTouchActionsIntegrationTests.m index ab231db12..802282de3 100644 --- a/WebDriverAgentTests/IntegrationTests/FBW3CTouchActionsIntegrationTests.m +++ b/WebDriverAgentTests/IntegrationTests/FBW3CTouchActionsIntegrationTests.m @@ -33,9 +33,10 @@ - (void)verifyGesture:(NSArray *> *)gesture orienta { [[XCUIDevice sharedDevice] fb_setDeviceInterfaceOrientation:orientation]; NSError *error; - XCTAssertTrue(self.testedApplication.alerts.count == 0); + NSInteger initialCount = self.testedApplication.alerts.count; XCTAssertTrue([self.testedApplication fb_performW3CTouchActions:gesture elementCache:nil error:&error]); - FBAssertWaitTillBecomesTrue(self.testedApplication.alerts.count > 0); + XCTAssertNil(error); + FBAssertWaitTillBecomesTrue(self.testedApplication.alerts.count > initialCount); } - (void)setUp @@ -60,7 +61,7 @@ - (void)testErroneousGestures @[ // Empty chain @[], - + // Chain element without 'actions' key @[@{ @"type": @"pointer", @@ -68,7 +69,7 @@ - (void)testErroneousGestures @"parameters": @{@"pointerType": @"touch"}, }, ], - + // Chain element with empty 'actions' @[@{ @"type": @"pointer", @@ -77,7 +78,7 @@ - (void)testErroneousGestures @"actions": @[], }, ], - + // Chain element without type @[@{ @"id": @"finger1", @@ -87,7 +88,7 @@ - (void)testErroneousGestures ], }, ], - + // Chain element without id @[@{ @"type": @"pointer", @@ -97,7 +98,7 @@ - (void)testErroneousGestures ], }, ], - + // Chain element with empty id @[@{ @"type": @"pointer", @@ -108,7 +109,7 @@ - (void)testErroneousGestures ], }, ], - + // Chain element with unsupported type @[@{ @"type": @"key", @@ -119,7 +120,7 @@ - (void)testErroneousGestures ], }, ], - + // Chain element with unsupported pointerType (default) @[@{ @"type": @"pointer", @@ -129,7 +130,7 @@ - (void)testErroneousGestures ], }, ], - + // Chain element with unsupported pointerType (non-default) @[@{ @"type": @"pointer", @@ -140,7 +141,7 @@ - (void)testErroneousGestures ], }, ], - + // Chain element without action item type @[@{ @"type": @"pointer", @@ -154,7 +155,7 @@ - (void)testErroneousGestures ], }, ], - + // Chain element containing action item without y coordinate @[@{ @"type": @"pointer", @@ -168,7 +169,7 @@ - (void)testErroneousGestures ], }, ], - + // Chain element containing action item with an unknown type @[@{ @"type": @"pointer", @@ -182,7 +183,7 @@ - (void)testErroneousGestures ], }, ], - + // Chain element where action items start with an incorrect item @[@{ @"type": @"pointer", @@ -197,7 +198,7 @@ - (void)testErroneousGestures ], }, ], - + // Chain element where pointerMove action item does not contain coordinates @[@{ @"type": @"pointer", @@ -211,7 +212,7 @@ - (void)testErroneousGestures ], }, ], - + // Chain element where pointerMove action item cannot use coordinates of the previous item @[@{ @"type": @"pointer", @@ -225,7 +226,7 @@ - (void)testErroneousGestures ], }, ], - + // Chain element where action items contains negative duration @[@{ @"type": @"pointer", @@ -239,7 +240,7 @@ - (void)testErroneousGestures ], }, ], - + // Chain element where action items start with an incorrect one, because the correct one is canceled @[@{ @"type": @"pointer", @@ -254,9 +255,9 @@ - (void)testErroneousGestures ], }, ], - + ]; - + for (NSArray *> *invalidGesture in invalidGestures) { NSError *error; XCTAssertFalse([self.testedApplication fb_performW3CTouchActions:invalidGesture elementCache:nil error:&error]); @@ -444,5 +445,3 @@ - (void)testSwipePickerWheelWithAbsoluteCoordinates } @end - - diff --git a/WebDriverAgentTests/IntegrationTests/FBXPathIntegrationTests.m b/WebDriverAgentTests/IntegrationTests/FBXPathIntegrationTests.m index 4864cc2a2..2c33de136 100644 --- a/WebDriverAgentTests/IntegrationTests/FBXPathIntegrationTests.m +++ b/WebDriverAgentTests/IntegrationTests/FBXPathIntegrationTests.m @@ -39,6 +39,7 @@ - (void)testSingleDescendantXMLRepresentation NSString *expectedType = @"XCUIElementTypeButton"; XCUIElement *matchingElement = [[self.testedView fb_descendantsMatchingXPathQuery:[NSString stringWithFormat:@"//%@", expectedType] shouldReturnAfterFirstMatch:YES] firstObject]; XCElementSnapshot *matchingSnapshot = matchingElement.fb_lastSnapshot; + XCTAssertNotNil(matchingSnapshot); NSString *xmlStr = [FBXPath xmlStringWithRootElement:matchingSnapshot]; XCTAssertNotNil(xmlStr); diff --git a/WebDriverAgentTests/IntegrationTests/XCUIElementHelperIntegrationTests.m b/WebDriverAgentTests/IntegrationTests/XCUIElementHelperIntegrationTests.m index 6fbdcd718..09fd9e3d7 100644 --- a/WebDriverAgentTests/IntegrationTests/XCUIElementHelperIntegrationTests.m +++ b/WebDriverAgentTests/IntegrationTests/XCUIElementHelperIntegrationTests.m @@ -60,14 +60,14 @@ - (void)testDescendantsFiltering XCTAssertTrue(buttons.count > 0); NSArray *windows = self.testedApplication.windows.allElementsBoundByAccessibilityElement; XCTAssertTrue(windows.count > 0); - + NSMutableArray *allElements = [NSMutableArray array]; [allElements addObjectsFromArray:buttons]; [allElements addObjectsFromArray:windows]; - + NSMutableArray *buttonSnapshots = [NSMutableArray array]; [buttonSnapshots addObject:[buttons.firstObject fb_lastSnapshot]]; - + NSArray *result = [self.testedApplication fb_filterDescendantsWithSnapshots:buttonSnapshots]; XCTAssertEqual(1, result.count); XCTAssertEqual([result.firstObject elementType], XCUIElementTypeButton);