From 567218ee6a33000e5d30a3381e74e8126e82e52d Mon Sep 17 00:00:00 2001 From: Sergey Plevako Date: Mon, 21 Oct 2019 17:29:13 +0100 Subject: [PATCH 01/53] added updating the hardcoded server port from the environment variable --port --- Server/CBXCUITestServer.h | 2 ++ Server/CBXCUITestServer.m | 22 ++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Server/CBXCUITestServer.h b/Server/CBXCUITestServer.h index 2685b1cc..495e3fd4 100644 --- a/Server/CBXCUITestServer.h +++ b/Server/CBXCUITestServer.h @@ -17,4 +17,6 @@ Stops the server */ + (void)stop; //Come to a complete (non-rolling) stop. + ++ (NSString* _Nullable)valueFromArguments: (NSArray *_Nullable)arguments forKey: (NSString *_Nullable)key; @end diff --git a/Server/CBXCUITestServer.m b/Server/CBXCUITestServer.m index 14bd6449..c8ff7eb7 100644 --- a/Server/CBXCUITestServer.m +++ b/Server/CBXCUITestServer.m @@ -21,6 +21,15 @@ - (id)init_private; @implementation CBXCUITestServer ++ (NSString*)valueFromArguments: (NSArray *)arguments forKey: (NSString*)key +{ + NSUInteger index = [arguments indexOfObject:key]; + if (index == NSNotFound || index == arguments.count - 1) { + return nil; + } + return arguments[index + 1]; +} + static NSString *serverName = @"CalabashXCUITestServer"; - (id)init { @@ -79,8 +88,17 @@ + (void)start { - (void)start { NSError *error; BOOL serverStarted = NO; - - [self.server setPort:CBX_DEFAULT_SERVER_PORT]; + + NSString *portNumberString = [CBXCUITestServer valueFromArguments: NSProcessInfo.processInfo.arguments + forKey: @"--port"]; + NSUInteger port = (NSUInteger)[portNumberString integerValue]; + + if (port == 0) { + [self.server setPort:CBX_DEFAULT_SERVER_PORT]; + } else { + [self.server setPort:port]; + } + DDLogDebug(@"Attempting to start the DeviceAgent server"); serverStarted = [self attemptToStartWithError:&error]; From d3de4d92c0a1383f7c2d1764b411410fc3113d82 Mon Sep 17 00:00:00 2001 From: Sergey Plevako Date: Mon, 16 Mar 2020 18:30:26 +0000 Subject: [PATCH 02/53] added support for xCode 11.4 beta 3 --- DeviceAgent.xcodeproj/project.pbxproj | 16 +++ DeviceAgent/FBFailureProofTestCase.h | 15 +-- DeviceAgent/FBFailureProofTestCase.m | 39 ++------ ...estCaseImplementationFailureHoldingProxy.h | 29 ++++++ ...estCaseImplementationFailureHoldingProxy.m | 38 +++++++ Server/Application/Application.h | 1 + Server/PrivateHeaders/CBX-XCTest-Umbrella.h | 29 +++--- .../XCTAutomationSupport/XCDeviceEvent.h | 2 +- .../XCTAutomationSupport/XCElementSnapshot.h | 6 +- .../XCTAccessibilityFramework-Protocol.h | 3 +- .../XCTAccessibilityFramework.h | 9 +- .../XCTAutomationSession.h | 11 ++- .../XCTCapabilitiesBuilder.h | 1 + .../XCTElementBlockFilteringTransformer.h | 1 - .../XCTElementBlockSortingTransformer.h | 1 - .../XCTElementContainingTransformer.h | 1 - .../XCTElementDisclosedChildRowsTransformer.h | 1 - .../XCTElementFilteringTransformer.h | 1 - .../XCTElementIndexingTransformer.h | 1 - .../XCTAutomationSupport/XCTElementQuery.h | 2 +- .../XCTElementSetCodableTransformer.h | 1 - ...mentSnapshotAttributeDataSource-Protocol.h | 5 +- .../XCTElementSnapshotRequest.h | 10 +- .../XCTElementSortingTransformer.h | 1 - .../XCTIndexingTransformerIterator.h | 4 +- .../XCTMacCatalystStatusProviding-Protocol.h | 12 +++ ...Implementation.h => NSThread-XCTContext.h} | 14 +-- Server/PrivateHeaders/XCTest/XCAXClient_iOS.h | 4 +- .../PrivateHeaders/XCTest/XCActivityRecord.h | 9 +- .../XCTest/XCElementSnapshot-Hitpoint.h | 1 + .../XCTest/XCSourceCodeTreeNodeEnumerator.h | 2 + .../XCTest/XCTActivityRecordStack.h | 4 +- .../XCTAggregateSuiteRunStatisticsRecord.h | 4 +- Server/PrivateHeaders/XCTest/XCTAttachment.h | 14 ++- .../XCTest/XCTAttachmentManager.h | 2 +- .../XCTest/XCTCompoundExpectation.h | 6 +- Server/PrivateHeaders/XCTest/XCTContext.h | 26 +++-- .../XCTest/XCTDarwinNotificationExpectation.h | 14 ++- ...mentSnapshotAttributeDataSource-Protocol.h | 5 +- .../XCTest/XCTFixedPriorityTestScheduler.h | 8 +- Server/PrivateHeaders/XCTest/XCTImage.h | 11 ++- .../PrivateHeaders/XCTest/XCTKVOExpectation.h | 15 ++- .../XCTMacCatalystStatusProviding-Protocol.h | 12 +++ .../PrivateHeaders/XCTest/XCTMeasureOptions.h | 11 ++- Server/PrivateHeaders/XCTest/XCTMeasurement.h | 2 +- .../PrivateHeaders/XCTest/XCTMemoryChecker.h | 2 +- .../XCTest/XCTNSNotificationExpectation.h | 14 ++- .../XCTest/XCTNSPredicateExpectation.h | 29 +++++- .../XCTest/XCTRunnerAutomationSession.h | 2 + .../XCTest/XCTRunnerDaemonSession.h | 7 +- .../XCTest/XCTRunnerIDESession.h | 17 ++-- .../XCTest/XCTSkippedTestContext.h | 41 ++++++++ ...mentation.h => XCTSwiftErrorObservation.h} | 0 .../PrivateHeaders/XCTest/XCTTestIdentifier.h | 2 + .../PrivateHeaders/XCTest/XCTTestRunSession.h | 2 +- Server/PrivateHeaders/XCTest/XCTWaiter.h | 29 ++++-- Server/PrivateHeaders/XCTest/XCTest.h | 4 +- Server/PrivateHeaders/XCTest/XCTestCase.h | 92 ++++++++++++++--- Server/PrivateHeaders/XCTest/XCTestCaseRun.h | 1 + .../PrivateHeaders/XCTest/XCTestCaseSuite.h | 2 + .../XCTest/XCTestConfiguration.h | 6 ++ Server/PrivateHeaders/XCTest/XCTestDriver.h | 4 +- .../PrivateHeaders/XCTest/XCTestExpectation.h | 19 +++- Server/PrivateHeaders/XCTest/XCTestLog.h | 4 +- .../XCTestManager_IDEInterface-Protocol.h | 6 +- .../XCTestManager_ManagerInterface-Protocol.h | 8 +- ...CTestManager_ProtectedResources-Protocol.h | 12 +++ .../XCTest/XCTestObservationCenter.h | 14 ++- Server/PrivateHeaders/XCTest/XCTestRun.h | 31 ++++-- Server/PrivateHeaders/XCTest/XCTestSuite.h | 10 +- Server/PrivateHeaders/XCTest/XCTestSuiteRun.h | 4 +- .../XCUIAccessibilityInterface-Protocol.h | 3 +- .../PrivateHeaders/XCTest/XCUIApplication.h | 14 +++ .../XCTest/XCUIApplicationImpl.h | 1 + .../XCTest/XCUIApplicationProcess.h | 4 + Server/PrivateHeaders/XCTest/XCUICoordinate.h | 1 + Server/PrivateHeaders/XCTest/XCUIDevice.h | 11 ++- Server/PrivateHeaders/XCTest/XCUIElement.h | 9 +- ...lerWrapper.h => XCUIInterruptionHandler.h} | 11 ++- .../XCTest/XCUIInterruptionMonitor.h | 37 +++++++ ... => XCUIInterruptionMonitoring-Protocol.h} | 20 ++-- ...CUIRemoteAccessibilityInterface-Protocol.h | 2 +- ...usOfProtectedResourcesInterface-Protocol.h | 13 +++ .../PrivateHeaders/XCTest/XCUITestContext.h | 36 ------- .../XCTest/XCUITestContextScope.h | 31 ------ .../XCTest/_XCInternalTestRun.h | 54 ---------- .../XCTest/_XCKVOExpectationImplementation.h | 43 -------- .../XCTest/_XCTAttachmentImplementation.h | 44 --------- .../_XCTCompoundExpectationImplementation.h | 32 ------ ...winNotificationExpectationImplementation.h | 38 ------- .../XCTest/_XCTImageImplementation.h | 34 ------- ...TNSNotificationExpectationImplementation.h | 41 -------- ..._XCTNSPredicateExpectationImplementation.h | 49 --------- ...CTRunnerDaemonSessionDummyExportedObject.h | 28 ++++++ .../_XCTSkipFailureException.h} | 7 +- Server/PrivateHeaders/XCTest/_XCTWaiterImpl.h | 52 ---------- .../XCTest/_XCTestCaseImplementation.h | 99 ++++++++----------- .../XCTest/_XCTestExpectationImplementation.h | 54 ---------- .../_XCTestObservationPrivate-Protocol.h | 6 +- .../XCTest/_XCTestSuiteImplementation.h | 35 ------- 100 files changed, 742 insertions(+), 833 deletions(-) create mode 100644 DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h create mode 100644 DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m create mode 100644 Server/PrivateHeaders/XCTAutomationSupport/XCTMacCatalystStatusProviding-Protocol.h rename Server/PrivateHeaders/XCTest/{_XCTestObservationCenterImplementation.h => NSThread-XCTContext.h} (65%) create mode 100644 Server/PrivateHeaders/XCTest/XCTMacCatalystStatusProviding-Protocol.h create mode 100644 Server/PrivateHeaders/XCTest/XCTSkippedTestContext.h rename Server/PrivateHeaders/XCTest/{_XCTestImplementation.h => XCTSwiftErrorObservation.h} (100%) create mode 100644 Server/PrivateHeaders/XCTest/XCTestManager_ProtectedResources-Protocol.h rename Server/PrivateHeaders/XCTest/{XCUIElementAsynchronousHandlerWrapper.h => XCUIInterruptionHandler.h} (63%) create mode 100644 Server/PrivateHeaders/XCTest/XCUIInterruptionMonitor.h rename Server/PrivateHeaders/XCTest/{_XCTContextImplementation.h => XCUIInterruptionMonitoring-Protocol.h} (54%) create mode 100644 Server/PrivateHeaders/XCTest/XCUIResetAuthorizationStatusOfProtectedResourcesInterface-Protocol.h delete mode 100644 Server/PrivateHeaders/XCTest/XCUITestContext.h delete mode 100644 Server/PrivateHeaders/XCTest/XCUITestContextScope.h delete mode 100644 Server/PrivateHeaders/XCTest/_XCInternalTestRun.h delete mode 100644 Server/PrivateHeaders/XCTest/_XCKVOExpectationImplementation.h delete mode 100644 Server/PrivateHeaders/XCTest/_XCTAttachmentImplementation.h delete mode 100644 Server/PrivateHeaders/XCTest/_XCTCompoundExpectationImplementation.h delete mode 100644 Server/PrivateHeaders/XCTest/_XCTDarwinNotificationExpectationImplementation.h delete mode 100644 Server/PrivateHeaders/XCTest/_XCTImageImplementation.h delete mode 100644 Server/PrivateHeaders/XCTest/_XCTNSNotificationExpectationImplementation.h delete mode 100644 Server/PrivateHeaders/XCTest/_XCTNSPredicateExpectationImplementation.h create mode 100644 Server/PrivateHeaders/XCTest/_XCTRunnerDaemonSessionDummyExportedObject.h rename Server/PrivateHeaders/{XCTAutomationSupport/XCTAccessibilityInterface.h => XCTest/_XCTSkipFailureException.h} (73%) delete mode 100644 Server/PrivateHeaders/XCTest/_XCTWaiterImpl.h delete mode 100644 Server/PrivateHeaders/XCTest/_XCTestExpectationImplementation.h delete mode 100644 Server/PrivateHeaders/XCTest/_XCTestSuiteImplementation.h diff --git a/DeviceAgent.xcodeproj/project.pbxproj b/DeviceAgent.xcodeproj/project.pbxproj index 691f55dd..80ed4895 100644 --- a/DeviceAgent.xcodeproj/project.pbxproj +++ b/DeviceAgent.xcodeproj/project.pbxproj @@ -50,6 +50,10 @@ 4107F8FE231D7298003961AF /* Resources.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4107F8FC231D7262003961AF /* Resources.xcassets */; }; 41188FEA22E9958D0012886A /* XCWebViews.m in Sources */ = {isa = PBXBuildFile; fileRef = 4166C9AE22E7009800C8BEBF /* XCWebViews.m */; }; 419BE54B231E46D800DF0ABD /* Resources.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4107F8FC231D7262003961AF /* Resources.xcassets */; }; + 7DEAAE74241FA80D009894BA /* FBXCTestCaseImplementationFailureHoldingProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DEAAE72241FA80D009894BA /* FBXCTestCaseImplementationFailureHoldingProxy.m */; }; + 7DEAAE75241FA80D009894BA /* FBXCTestCaseImplementationFailureHoldingProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 7DEAAE73241FA80D009894BA /* FBXCTestCaseImplementationFailureHoldingProxy.h */; }; + 7DEAAE77241FA8B5009894BA /* XCTestCase.h in Headers */ = {isa = PBXBuildFile; fileRef = 7DEAAE76241FA8B4009894BA /* XCTestCase.h */; }; + 7DEAAE79241FEEF8009894BA /* _XCTestCaseImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 7DEAAE78241FEEF7009894BA /* _XCTestCaseImplementation.h */; }; 89331CCE1CC00E82003C2E59 /* RotatePinchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89331CCD1CC00E82003C2E59 /* RotatePinchViewController.m */; }; 89331D301CC50447003C2E59 /* ThreadUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 89331D2E1CC50447003C2E59 /* ThreadUtils.h */; }; 89331D321CC50447003C2E59 /* ThreadUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 89331D2F1CC50447003C2E59 /* ThreadUtils.m */; }; @@ -755,6 +759,10 @@ 634244EC948D56732C2565E5 /* SpringBoardAlerts.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = SpringBoardAlerts.m; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; 6342494C7C23506565D2B802 /* SpringBoardAlerts.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = SpringBoardAlerts.h; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; 63424E46759C6B27C2BEC337 /* SpringBoardAlertsTest.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = SpringBoardAlertsTest.m; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; + 7DEAAE72241FA80D009894BA /* FBXCTestCaseImplementationFailureHoldingProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBXCTestCaseImplementationFailureHoldingProxy.m; sourceTree = ""; }; + 7DEAAE73241FA80D009894BA /* FBXCTestCaseImplementationFailureHoldingProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBXCTestCaseImplementationFailureHoldingProxy.h; sourceTree = ""; }; + 7DEAAE76241FA8B4009894BA /* XCTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XCTestCase.h; path = ../../../../WebDriverAgent/PrivateHeaders/XCTest/XCTestCase.h; sourceTree = ""; }; + 7DEAAE78241FEEF7009894BA /* _XCTestCaseImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _XCTestCaseImplementation.h; sourceTree = ""; }; 89331CCC1CC00E82003C2E59 /* RotatePinchViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RotatePinchViewController.h; sourceTree = ""; }; 89331CCD1CC00E82003C2E59 /* RotatePinchViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RotatePinchViewController.m; sourceTree = ""; }; 89331D2E1CC50447003C2E59 /* ThreadUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadUtils.h; sourceTree = ""; }; @@ -1636,6 +1644,7 @@ isa = PBXGroup; children = ( F54C01C32043F0EF00FD8DDE /* _XCInternalTestRun.h */, + 7DEAAE78241FEEF7009894BA /* _XCTestCaseImplementation.h */, F54C01802043F0EF00FD8DDE /* _XCKVOExpectationImplementation.h */, F54C019D2043F0EF00FD8DDE /* _XCTAttachmentImplementation.h */, F5449D1C21216FD400E11642 /* _XCTCompoundExpectationImplementation.h */, @@ -1711,6 +1720,7 @@ F54C01C52043F0EF00FD8DDE /* XCTestProbe.h */, F54C01BE2043F0EF00FD8DDE /* XCTestRun.h */, F54C01972043F0EF00FD8DDE /* XCTestSuite.h */, + 7DEAAE76241FA8B4009894BA /* XCTestCase.h */, F54C01942043F0EF00FD8DDE /* XCTestSuiteRun.h */, F54C01D42043F0EF00FD8DDE /* XCTestWaiter.h */, F54C014D2043F0EF00FD8DDE /* XCTFailure.h */, @@ -1969,6 +1979,8 @@ F55F83541C6DD99900A945C8 /* DeviceAgent */ = { isa = PBXGroup; children = ( + 7DEAAE73241FA80D009894BA /* FBXCTestCaseImplementationFailureHoldingProxy.h */, + 7DEAAE72241FA80D009894BA /* FBXCTestCaseImplementationFailureHoldingProxy.m */, F58935F91E93F16D00BDF39D /* DeviceAgent-device.xctestrun */, F58935FA1E93F16D00BDF39D /* DeviceAgent-simulator-template.xctestrun */, F58935F71E93F09A00BDF39D /* CBX.xctestconfiguration */, @@ -2513,6 +2525,7 @@ F54C029F2043F0EF00FD8DDE /* NSError-XCTAutomationSupportErrors.h in Headers */, F54C02092043F0EF00FD8DDE /* XCUITestContextScope.h in Headers */, F54C026F2043F0EF00FD8DDE /* XCTRunnerAutomationSession.h in Headers */, + 7DEAAE75241FA80D009894BA /* FBXCTestCaseImplementationFailureHoldingProxy.h in Headers */, F54C026E2043F0EF00FD8DDE /* XCUIApplicationMonitor.h in Headers */, F54C021D2043F0EF00FD8DDE /* XCUIElement.h in Headers */, F55F819D1C6DD07500A945C8 /* HTTPDataResponse.h in Headers */, @@ -2558,6 +2571,7 @@ F54C02BC2043F0EF00FD8DDE /* XCTContainingTransformerIterator.h in Headers */, F54C02A42043F0EF00FD8DDE /* XCTAccessibilityFramework-Protocol.h in Headers */, F54C020B2043F0EF00FD8DDE /* XCUIAXNotificationHandling-Protocol.h in Headers */, + 7DEAAE77241FA8B5009894BA /* XCTestCase.h in Headers */, F55F81801C6DD07500A945C8 /* GCDAsyncSocket.h in Headers */, F54C02332043F0EF00FD8DDE /* XCUICoordinate.h in Headers */, F54C02322043F0EF00FD8DDE /* _XCTNSPredicateExpectationImplementation.h in Headers */, @@ -2717,6 +2731,7 @@ F54C02462043F0EF00FD8DDE /* XCTASDebugLogDelegate-Protocol.h in Headers */, F54C029C2043F0EF00FD8DDE /* XCTElementSortingTransformer.h in Headers */, F54C025E2043F0EF00FD8DDE /* XCTAutomationTarget-Protocol.h in Headers */, + 7DEAAE79241FEEF8009894BA /* _XCTestCaseImplementation.h in Headers */, 89C5F3501C9A60E70093A018 /* Testmanagerd.h in Headers */, F54C02992043F0EF00FD8DDE /* NSArray-XCTElementQueryAdditions.h in Headers */, F55F819B1C6DD07500A945C8 /* HTTPAsyncFileResponse.h in Headers */, @@ -3331,6 +3346,7 @@ 899696C51CB3360900BB42E2 /* Pinch.m in Sources */, F55F82531C6DD07500A945C8 /* RouteRequest.m in Sources */, F55F84101C6E437A00A945C8 /* JSONUtils.m in Sources */, + 7DEAAE74241FA80D009894BA /* FBXCTestCaseImplementationFailureHoldingProxy.m in Sources */, F5E663211D74958200068CE9 /* SpringBoard.m in Sources */, F5870B431CF0BEFF00B3376C /* TouchPath.m in Sources */, 89512BDC1C9EEC3C0027D61E /* Drag.m in Sources */, diff --git a/DeviceAgent/FBFailureProofTestCase.h b/DeviceAgent/FBFailureProofTestCase.h index e4cf5603..e6e08790 100644 --- a/DeviceAgent/FBFailureProofTestCase.h +++ b/DeviceAgent/FBFailureProofTestCase.h @@ -19,7 +19,7 @@ // Licensed under the MIT license. #import -#import +#import "XCTestCase.h" @class _XCTestCaseImplementation; @@ -38,17 +38,4 @@ NS_ASSUME_NONNULL_BEGIN @interface FBFailureProofTestCase : XCTestCase @end -/** - Class that can be used to proxy existing _XCTestCaseImplementation and - prevent currently running test from being terminated on any XCTest failure - */ -@interface FBXCTestCaseImplementationFailureHoldingProxy : NSProxy - -/** - Constructor for given existing _XCTestCaseImplementation instance - */ -+ (instancetype)proxyWithXCTestCaseImplementation:(_XCTestCaseImplementation *)internalImplementation; - -@end - NS_ASSUME_NONNULL_END diff --git a/DeviceAgent/FBFailureProofTestCase.m b/DeviceAgent/FBFailureProofTestCase.m index 710bca36..56611825 100644 --- a/DeviceAgent/FBFailureProofTestCase.m +++ b/DeviceAgent/FBFailureProofTestCase.m @@ -16,7 +16,7 @@ */ #import "FBFailureProofTestCase.h" -#import "_XCTestCaseImplementation.h" +#import "FBXCTestCaseImplementationFailureHoldingProxy.h" @interface FBFailureProofTestCase () @property (nonatomic, assign) BOOL didRegisterAXTestFailure; @@ -27,8 +27,15 @@ @implementation FBFailureProofTestCase - (void)setUp { [super setUp]; self.continueAfterFailure = YES; - self.internalImplementation = (_XCTestCaseImplementation *)[FBXCTestCaseImplementationFailureHoldingProxy - proxyWithXCTestCaseImplementation:self.internalImplementation]; + if ([self respondsToSelector:@selector(internalImplementation)]) { + // The `internalImplementation` API has been removed since Xcode 11.4 + self.internalImplementation = + (_XCTestCaseImplementation *)[FBXCTestCaseImplementationFailureHoldingProxy + proxyWithXCTestCaseImplementation:self.internalImplementation]; + } else { + self.shouldSetShouldHaltWhenReceivesControl = NO; + self.shouldHaltWhenReceivesControl = NO; + } } /** @@ -53,29 +60,3 @@ - (void)_enqueueFailureWithDescription:(NSString *)description } @end - -@interface FBXCTestCaseImplementationFailureHoldingProxy () -@property (nonatomic, strong) _XCTestCaseImplementation *internalImplementation; -@end - -@implementation FBXCTestCaseImplementationFailureHoldingProxy - -+ (instancetype)proxyWithXCTestCaseImplementation:(_XCTestCaseImplementation *)internalImplementation -{ - FBXCTestCaseImplementationFailureHoldingProxy *proxy = [super alloc]; - proxy.internalImplementation = internalImplementation; - return proxy; -} - -- (id)forwardingTargetForSelector:(SEL)aSelector -{ - return self.internalImplementation; -} - -// This will prevent test from quiting on app crash or any other test failure -- (BOOL)shouldHaltWhenReceivesControl -{ - return NO; -} - -@end diff --git a/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h b/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h new file mode 100644 index 00000000..8bf06b2a --- /dev/null +++ b/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h @@ -0,0 +1,29 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +@class _XCTestCaseImplementation; + +NS_ASSUME_NONNULL_BEGIN + +/** + Class that can be used to proxy existing _XCTestCaseImplementation and + prevent currently running test from being terminated on any XCTest failure + */ +@interface FBXCTestCaseImplementationFailureHoldingProxy : NSProxy + +/** + Constructor for given existing _XCTestCaseImplementation instance + */ ++ (instancetype)proxyWithXCTestCaseImplementation:(_XCTestCaseImplementation *)internalImplementation; + +@end + +NS_ASSUME_NONNULL_END diff --git a/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m b/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m new file mode 100644 index 00000000..25d8feee --- /dev/null +++ b/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m @@ -0,0 +1,38 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "FBXCTestCaseImplementationFailureHoldingProxy.h" + +#import "_XCTestCaseImplementation.h" + +@interface FBXCTestCaseImplementationFailureHoldingProxy () +@property (nonatomic, strong) _XCTestCaseImplementation *internalImplementation; +@end + +@implementation FBXCTestCaseImplementationFailureHoldingProxy + ++ (instancetype)proxyWithXCTestCaseImplementation:(_XCTestCaseImplementation *)internalImplementation +{ + FBXCTestCaseImplementationFailureHoldingProxy *proxy = [super alloc]; + proxy.internalImplementation = internalImplementation; + return proxy; +} + +- (id)forwardingTargetForSelector:(SEL)aSelector +{ + return self.internalImplementation; +} + +// This will prevent test from quiting on app crash or any other test failure +- (BOOL)shouldHaltWhenReceivesControl +{ + return NO; +} + +@end diff --git a/Server/Application/Application.h b/Server/Application/Application.h index b14a5a83..51470e57 100644 --- a/Server/Application/Application.h +++ b/Server/Application/Application.h @@ -5,6 +5,7 @@ #import #import #import "XCTest+CBXAdditions.h" +#import "CBX-XCTest-Umbrella.h" @class XCUIApplication; diff --git a/Server/PrivateHeaders/CBX-XCTest-Umbrella.h b/Server/PrivateHeaders/CBX-XCTest-Umbrella.h index 6845e3e5..0a934058 100644 --- a/Server/PrivateHeaders/CBX-XCTest-Umbrella.h +++ b/Server/PrivateHeaders/CBX-XCTest-Umbrella.h @@ -11,6 +11,7 @@ #import "XCTest/NSMutableArray-XCTestAdditions.h" #import "XCTest/NSSet-XCTestAdditions.h" #import "XCTest/NSString-XCTAdditions.h" +#import "XCTest/NSThread-XCTContext.h" #import "XCTest/NSValue-XCTestAdditions.h" #import "XCTest/UIGestureRecognizer-RecordingAdditions.h" #import "XCTest/UILongPressGestureRecognizer-RecordingAdditions.h" @@ -53,6 +54,7 @@ #import "XCTest/XCTFuture.h" #import "XCTest/XCTImage.h" #import "XCTest/XCTKVOExpectation.h" +#import "XCTest/XCTMacCatalystStatusProviding-Protocol.h" #import "XCTest/XCTMeasureOptions.h" #import "XCTest/XCTMeasurement.h" #import "XCTest/XCTMemoryChecker.h" @@ -78,7 +80,9 @@ #import "XCTest/XCTRunnerIDESession.h" #import "XCTest/XCTRunnerIDESessionDelegate-Protocol.h" #import "XCTest/XCTSerializedTransportWrapper.h" +#import "XCTest/XCTSkippedTestContext.h" #import "XCTest/XCTStorageMetric.h" +#import "XCTest/XCTSwiftErrorObservation.h" #import "XCTest/XCTTestIdentifier.h" #import "XCTest/XCTTestRunSession.h" #import "XCTest/XCTTestRunSessionDelegate-Protocol.h" @@ -103,6 +107,7 @@ #import "XCTest/XCTestLog.h" #import "XCTest/XCTestManager_IDEInterface-Protocol.h" #import "XCTest/XCTestManager_ManagerInterface-Protocol.h" +#import "XCTest/XCTestManager_ProtectedResources-Protocol.h" #import "XCTest/XCTestManager_TestsInterface-Protocol.h" #import "XCTest/XCTestMisuseObserver.h" #import "XCTest/XCTestObservation-Protocol.h" @@ -135,7 +140,6 @@ #import "XCTest/XCUIDevice.h" #import "XCTest/XCUIDeviceEventAndStateInterface-Protocol.h" #import "XCTest/XCUIElement.h" -#import "XCTest/XCUIElementAsynchronousHandlerWrapper.h" #import "XCTest/XCUIElementAttributes-Protocol.h" #import "XCTest/XCUIElementAttributesPrivate-Protocol.h" #import "XCTest/XCUIElementHitPointCoordinate.h" @@ -146,6 +150,9 @@ #import "XCTest/XCUIEventSynthesisRequest-Protocol.h" #import "XCTest/XCUIEventSynthesizing-Protocol.h" #import "XCTest/XCUIHitPointResult.h" +#import "XCTest/XCUIInterruptionHandler.h" +#import "XCTest/XCUIInterruptionMonitor.h" +#import "XCTest/XCUIInterruptionMonitoring-Protocol.h" #import "XCTest/XCUILocalDeviceScreenDataSource.h" #import "XCTest/XCUIPlatformApplicationManager.h" #import "XCTest/XCUIPlatformApplicationServicesProviding-Protocol.h" @@ -159,31 +166,17 @@ #import "XCTest/XCUIRectTransformationRequest.h" #import "XCTest/XCUIRemoteAccessibilityInterface-Protocol.h" #import "XCTest/XCUIRemoteSiriInterface-Protocol.h" +#import "XCTest/XCUIResetAuthorizationStatusOfProtectedResourcesInterface-Protocol.h" #import "XCTest/XCUIScreen.h" #import "XCTest/XCUIScreenDataSource-Protocol.h" #import "XCTest/XCUIScreenshot.h" #import "XCTest/XCUIScreenshotProviding-Protocol.h" #import "XCTest/XCUISiriService.h" #import "XCTest/XCUISnapshotGenerationTracker.h" -#import "XCTest/XCUITestContext.h" -#import "XCTest/XCUITestContextScope.h" #import "XCTest/XCUITransformParameters.h" #import "XCTest/XCUIXcodeApplicationManaging-Protocol.h" -#import "XCTest/_XCInternalTestRun.h" -#import "XCTest/_XCKVOExpectationImplementation.h" -#import "XCTest/_XCTAttachmentImplementation.h" -#import "XCTest/_XCTCompoundExpectationImplementation.h" -#import "XCTest/_XCTContextImplementation.h" -#import "XCTest/_XCTDarwinNotificationExpectationImplementation.h" -#import "XCTest/_XCTImageImplementation.h" -#import "XCTest/_XCTNSNotificationExpectationImplementation.h" -#import "XCTest/_XCTNSPredicateExpectationImplementation.h" -#import "XCTest/_XCTWaiterImpl.h" -#import "XCTest/_XCTestCaseImplementation.h" +#import "XCTest/_XCTRunnerDaemonSessionDummyExportedObject.h" +#import "XCTest/_XCTSkipFailureException.h" #import "XCTest/_XCTestCaseInterruptionException.h" -#import "XCTest/_XCTestExpectationImplementation.h" -#import "XCTest/_XCTestImplementation.h" -#import "XCTest/_XCTestObservationCenterImplementation.h" #import "XCTest/_XCTestObservationPrivate-Protocol.h" -#import "XCTest/_XCTestSuiteImplementation.h" #endif diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCDeviceEvent.h b/Server/PrivateHeaders/XCTAutomationSupport/XCDeviceEvent.h index bf5c7217..8c2e9e48 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCDeviceEvent.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCDeviceEvent.h @@ -20,8 +20,8 @@ NSUInteger _eventPage; NSUInteger _usage; double _duration; - NSUInteger _type; double _rotation; + NSUInteger _type; } @property double duration; diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCElementSnapshot.h b/Server/PrivateHeaders/XCTAutomationSupport/XCElementSnapshot.h index ccb77cbb..66e2d43d 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCElementSnapshot.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCElementSnapshot.h @@ -23,13 +23,13 @@ @interface XCElementSnapshot : NSObject { - NSUInteger _faultedInProperties; BOOL _isMainWindow; BOOL _enabled; BOOL _selected; BOOL _hasFocus; BOOL _hasKeyboardFocus; BOOL _isTruncatedValue; + NSUInteger _faultedInProperties; id _application; NSUInteger _generation; id _dataSource; @@ -68,6 +68,7 @@ @property(copy) NSSet *disclosedChildRowAXElements; @property(readonly) NSArray *disclosedChildRows; @property NSUInteger elementType; +@property NSUInteger faultedInProperties; @property CGRect frame; @property(nonatomic) NSUInteger generation; @property BOOL hasFocus; @@ -114,7 +115,7 @@ + (id)axAttributesForFaultingPropertiesOnMacOS:(BOOL)arg1; + (id)axAttributesForSnapshotAttributes:(id)arg1 isMacOS:(BOOL)arg2; + (NSUInteger)elementTypeForAccessibilityElement:(id)arg1 usingAXAttributes_iOS:(id)arg2 useLegacyElementType:(BOOL)arg3; -+ (NSUInteger)elementTypeForAccessibilityElement:(id)arg1 usingAXAttributes_macOS:(id)arg2 useLegacyElementType:(BOOL)arg3; ++ (NSUInteger)elementTypeForAccessibilityElement:(id)arg1 usingAXAttributes_macOS:(id)arg2 macCatalystStatusProvider:(id)arg3 useLegacyElementType:(BOOL)arg4; + (id)elementWithAccessibilityElement:(id)arg1; + (id)requiredAXAttributesForElementSnapshotHierarchyOnMacOS:(BOOL)arg1; + (id)sanitizedElementSnapshotHierarchyAttributesForAttributes:(id)arg1 isMacOS:(BOOL)arg2; @@ -126,6 +127,7 @@ - (BOOL)_fetchBoolForKey:(id)arg1; - (id)_fetchSimpleValueForKey:(id)arg1; - (BOOL)_frameFuzzyMatchesElement:(id)arg1; +- (BOOL)_frameFuzzyMatchesElement:(id)arg1 tolerance:(double)arg2; - (BOOL)_fuzzyMatchesElement:(id)arg1; - (BOOL)_isAncestorOfElement:(id)arg1; - (BOOL)_isDescendantOfElement:(id)arg1; diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTAccessibilityFramework-Protocol.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTAccessibilityFramework-Protocol.h index f0456835..80a83a03 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTAccessibilityFramework-Protocol.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTAccessibilityFramework-Protocol.h @@ -13,11 +13,12 @@ @protocol OS_dispatch_queue; @protocol OS_xpc_object; -@class NSArray, NSDictionary; +@class NSArray, NSDictionary, XCAccessibilityElement; @protocol XCTAccessibilityFramework - (NSInteger)appOrientationForElement:(const struct __AXUIElement *)arg1 error:(id *)arg2; - (NSArray *)attributes:(NSArray *)arg1 forElement:(const struct __AXUIElement *)arg2 error:(id *)arg3; +- (NSDictionary *)attributesForElement:(XCAccessibilityElement *)arg1 attributes:(NSArray *)arg2 error:(id *)arg3; - (CGRect)frameForElement:(const struct __AXUIElement *)arg1 error:(id *)arg2; - (const struct __AXUIElement *)mainWindowForElement:(const struct __AXUIElement *)arg1 error:(id *)arg2; - (void)performWithAXTimeout:(double)arg1 block:(void (^)(void))arg2; diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTAccessibilityFramework.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTAccessibilityFramework.h index 8d162778..c687fa70 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTAccessibilityFramework.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTAccessibilityFramework.h @@ -20,16 +20,23 @@ @interface XCTAccessibilityFramework : NSObject { BOOL _allowsRemoteAccess; + NSInteger _processID; struct __AXUIElement *_systemWideElement; } -@property BOOL allowsRemoteAccess; +@property(readonly) BOOL allowsRemoteAccess; +@property(readonly) NSInteger processID; @property struct __AXUIElement *systemWideElement; + (void)_startAXServer; +- (BOOL)_canAccessElement:(struct __AXUIElement *)arg1 withError:(id *)arg2; - (NSInteger)appOrientationForElement:(struct __AXUIElement *)arg1 error:(id *)arg2; - (id)attributes:(id)arg1 forElement:(struct __AXUIElement *)arg2 error:(id *)arg3; +- (id)attributesForElement:(id)arg1 attributes:(id)arg2 error:(id *)arg3; - (CGRect)frameForElement:(struct __AXUIElement *)arg1 error:(id *)arg2; +- (id)initAllowingRemoteAccess:(BOOL)arg1 processID:(NSInteger)arg2; +- (id)initForLocalAccess; +- (id)initForRemoteAccess; - (const struct __AXUIElement *)mainWindowForElement:(struct __AXUIElement *)arg1 error:(id *)arg2; - (void)performWithAXTimeout:(double)arg1 block:(CDUnknownBlockType)arg2; - (id)userTestingSnapshotForElement:(struct __AXUIElement *)arg1 options:(id)arg2 error:(id *)arg3; diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTAutomationSession.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTAutomationSession.h index ff1e682e..0f3d530c 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTAutomationSession.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTAutomationSession.h @@ -18,16 +18,18 @@ #import "XCTConnectionAccepting-Protocol.h" #import "XCTElementSnapshotAttributeDataSource-Protocol.h" #import "XCTElementSnapshotProvider-Protocol.h" +#import "XCTMacCatalystStatusProviding-Protocol.h" #import "XCTRemoteApplicationAutomationTarget-Protocol.h" @class DTXConnection, DTXProxyChannel, NSMutableArray, NSString, XCTAnimationsIdleNotifier, XCTCapabilities, XCTElementQueryProcessor, XCTMainRunLoopIdleNotifier; -@protocol OS_dispatch_queue, XCTElementSnapshotProvider> +@interface XCTAutomationSession : NSObject { + id _accessibilityFramework; id _dataSource; NSMutableArray *_connections; XCTElementQueryProcessor *_queryProcessor; @@ -39,6 +41,7 @@ XCTCapabilities *_remoteInterfaceCapabilities; } +@property(readonly) id accessibilityFramework; @property(readonly) BOOL allowsRemoteAccess; @property(readonly) XCTAnimationsIdleNotifier *animationIdleNotifier; @property(readonly) NSMutableArray *connections; @@ -63,7 +66,9 @@ - (void)attributesForElement:(id)arg1 attributes:(id)arg2 reply:(CDUnknownBlockType)arg3; - (void)exchangeCapabilities:(id)arg1 reply:(CDUnknownBlockType)arg2; - (void)fetchMatchesForQuery:(id)arg1 reply:(CDUnknownBlockType)arg2; -- (id)initWithDataSource:(id)arg1; +- (id)initWithAccessibilityFramework:(id)arg1; +- (id)initWithAccessibilityFramework:(id)arg1 dataSource:(id)arg2; +- (BOOL)isMacCatalystForPID:(NSInteger)arg1; - (void)listenForRemoteConnectionViaSerializedTransportWrapper:(id)arg1 completion:(CDUnknownBlockType)arg2; - (void)notifyWhenAnimationsAreIdle:(CDUnknownBlockType)arg1; - (void)notifyWhenMainRunLoopIsIdle:(CDUnknownBlockType)arg1; diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTCapabilitiesBuilder.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTCapabilitiesBuilder.h index 1ef4bb19..dfd87a33 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTCapabilitiesBuilder.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTCapabilitiesBuilder.h @@ -24,6 +24,7 @@ @property(readonly, copy) XCTCapabilities *capabilities; @property(readonly, copy) NSMutableDictionary *capabilitiesDictionary; ++ (id)capabilitiesFromProvider:(Class)arg1; - (void)registerCapability:(id)arg1; - (void)registerCapability:(id)arg1 version:(NSUInteger)arg2; - (void)upgradeCapability:(id)arg1 toVersion:(NSUInteger)arg2; diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementBlockFilteringTransformer.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementBlockFilteringTransformer.h index 111a7e8f..d6809aaa 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementBlockFilteringTransformer.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementBlockFilteringTransformer.h @@ -28,7 +28,6 @@ @property BOOL stopsOnFirstMatch; @property(copy) NSString *transformationDescription; @property(readonly) BOOL supportsAttributeKeyPathAnalysis; -@property(readonly) BOOL supportsRemoteEvaluation; + (void)provideCapabilitiesToBuilder:(id)arg1; - (BOOL)canBeRemotelyEvaluatedWithCapabilities:(id)arg1; diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementBlockSortingTransformer.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementBlockSortingTransformer.h index 9c08eb26..68247830 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementBlockSortingTransformer.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementBlockSortingTransformer.h @@ -28,7 +28,6 @@ @property BOOL stopsOnFirstMatch; @property(copy) NSString *transformationDescription; @property(readonly) BOOL supportsAttributeKeyPathAnalysis; -@property(readonly) BOOL supportsRemoteEvaluation; + (void)provideCapabilitiesToBuilder:(id)arg1; - (BOOL)canBeRemotelyEvaluatedWithCapabilities:(id)arg1; diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementContainingTransformer.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementContainingTransformer.h index 628239e8..4f964797 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementContainingTransformer.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementContainingTransformer.h @@ -30,7 +30,6 @@ - (id)iteratorForInput:(id)arg1; - (id)requiredKeyPathsOrError:(id *)arg1; - (BOOL)supportsAttributeKeyPathAnalysis; -- (BOOL)supportsRemoteEvaluation; - (id)transform:(id)arg1 relatedElements:(id *)arg2; @end diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementDisclosedChildRowsTransformer.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementDisclosedChildRowsTransformer.h index e923c1d7..19a299a5 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementDisclosedChildRowsTransformer.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementDisclosedChildRowsTransformer.h @@ -31,7 +31,6 @@ - (void)setTransformationDescription:(id)arg1; - (BOOL)stopsOnFirstMatch; - (BOOL)supportsAttributeKeyPathAnalysis; -- (BOOL)supportsRemoteEvaluation; - (id)transform:(id)arg1 relatedElements:(id *)arg2; - (id)transformationDescription; diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementFilteringTransformer.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementFilteringTransformer.h index 169e44c2..e98b1f38 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementFilteringTransformer.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementFilteringTransformer.h @@ -31,7 +31,6 @@ - (id)iteratorForInput:(id)arg1; - (id)requiredKeyPathsOrError:(id *)arg1; - (BOOL)supportsAttributeKeyPathAnalysis; -- (BOOL)supportsRemoteEvaluation; - (id)transform:(id)arg1 relatedElements:(id *)arg2; @end diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementIndexingTransformer.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementIndexingTransformer.h index f11d69bf..2f364c40 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementIndexingTransformer.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementIndexingTransformer.h @@ -31,7 +31,6 @@ - (id)iteratorForInput:(id)arg1; - (id)requiredKeyPathsOrError:(id *)arg1; - (BOOL)supportsAttributeKeyPathAnalysis; -- (BOOL)supportsRemoteEvaluation; - (id)transform:(id)arg1 relatedElements:(id *)arg2; @end diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementQuery.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementQuery.h index e7d38fe8..7e01d18d 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementQuery.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementQuery.h @@ -51,9 +51,9 @@ @property(readonly, copy) NSArray *snapshotAttributes; @property(readonly, copy) NSDictionary *snapshotParameters; @property(readonly) BOOL supportsAttributeKeyPathAnalysis; -@property(readonly) BOOL supportsRemoteEvaluation; @property(readonly, copy) NSArray *transformers; ++ (id)_descriptionForTransformerArray:(id)arg1; + (id)_firstMatchTransformerSubarraysFromArray:(id)arg1 trailingMatchAllTransformers:(id *)arg2; + (void)provideCapabilitiesToBuilder:(id)arg1; - (id)_allMatchingSnapshotsForInput:(id)arg1 transformers:(id)arg2 relatedElements:(id *)arg3 noMatchesMessage:(id *)arg4 error:(id *)arg5; diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSetCodableTransformer.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSetCodableTransformer.h index 606f88ea..9fc573ed 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSetCodableTransformer.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSetCodableTransformer.h @@ -26,7 +26,6 @@ @property BOOL stopsOnFirstMatch; @property(copy) NSString *transformationDescription; @property(readonly) BOOL supportsAttributeKeyPathAnalysis; -@property(readonly) BOOL supportsRemoteEvaluation; + (void)provideCapabilitiesToBuilder:(id)arg1; - (BOOL)canBeRemotelyEvaluatedWithCapabilities:(id)arg1; diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSnapshotAttributeDataSource-Protocol.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSnapshotAttributeDataSource-Protocol.h index 783a23f7..d1697956 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSnapshotAttributeDataSource-Protocol.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSnapshotAttributeDataSource-Protocol.h @@ -5,7 +5,6 @@ // Copyright (C) 1997-2019 Steve Nygard. // - #import #import #import @@ -13,9 +12,11 @@ @protocol OS_dispatch_queue; @protocol OS_xpc_object; +#import "XCTMacCatalystStatusProviding-Protocol.h" + @class NSArray, NSDictionary, NSString, XCAccessibilityElement; -@protocol XCTElementSnapshotAttributeDataSource +@protocol XCTElementSnapshotAttributeDataSource - (NSDictionary *)attributesForElement:(XCAccessibilityElement *)arg1 attributes:(NSArray *)arg2 error:(id *)arg3; - (id)parameterizedAttribute:(NSString *)arg1 forElement:(XCAccessibilityElement *)arg2 parameter:(id)arg3 error:(id *)arg4; @end diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSnapshotRequest.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSnapshotRequest.h index b6cd1c56..d69936c2 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSnapshotRequest.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSnapshotRequest.h @@ -15,13 +15,14 @@ #import @class NSArray, NSDictionary, NSError, XCAXCycleDetector, XCAccessibilityElement, XCElementSnapshot, XCTAccessibilitySnapshot_iOS, XCTTimeoutControls; -@protocol NSCopying, OS_dispatch_queue; +@protocol NSCopying, OS_dispatch_queue, XCTAccessibilityFramework, XCTMacCatalystStatusProviding; @interface XCTElementSnapshotRequest : NSObject { BOOL _preserveRemoteElementPlaceholders; BOOL _loadResult; BOOL _hasLoaded; + id _accessibilityFramework; XCAccessibilityElement *_element; NSArray *_attributes; NSDictionary *_parameters; @@ -29,10 +30,12 @@ id _accessibilitySnapshot; XCTTimeoutControls *_timeoutControls; XCAXCycleDetector *_cycleDetector; + id _macCatalystStatusProvider; NSObject *_queue; NSError *_loadError; } +@property(readonly) id accessibilityFramework; @property(copy) id accessibilitySnapshot; @property(readonly) XCTAccessibilitySnapshot_iOS *accessibilitySnapshot_iOS; @property(readonly) NSArray *attributes; @@ -42,6 +45,7 @@ @property BOOL hasLoaded; @property(retain) NSError *loadError; @property BOOL loadResult; +@property(retain) id macCatalystStatusProvider; @property(copy) NSDictionary *parameters; @property BOOL preserveRemoteElementPlaceholders; @property(readonly) NSObject *queue; @@ -52,8 +56,8 @@ - (id)_snapshotFromUserTestingSnapshot:(id)arg1 frameTransformer:(CDUnknownBlockType)arg2 error:(id *)arg3; - (id)accessibilitySnapshotOrError:(id *)arg1; - (id)elementSnapshotOrError:(id *)arg1; -- (id)initWithElement:(id)arg1 attributes:(id)arg2 parameters:(id)arg3; -- (id)initWithElement:(id)arg1 attributes:(id)arg2 parameters:(id)arg3 timeoutControls:(id)arg4; +- (id)initWithAccessibilityFramework:(id)arg1 element:(id)arg2 attributes:(id)arg3 parameters:(id)arg4; +- (id)initWithAccessibilityFramework:(id)arg1 element:(id)arg2 attributes:(id)arg3 parameters:(id)arg4 timeoutControls:(id)arg5; - (BOOL)loadSnapshotAndReturnError:(id *)arg1; - (id)safeParametersForParameters:(id)arg1; diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSortingTransformer.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSortingTransformer.h index 91bc1ea6..815052ea 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSortingTransformer.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTElementSortingTransformer.h @@ -31,7 +31,6 @@ - (id)iteratorForInput:(id)arg1; - (id)requiredKeyPathsOrError:(id *)arg1; - (BOOL)supportsAttributeKeyPathAnalysis; -- (BOOL)supportsRemoteEvaluation; - (id)transform:(id)arg1 relatedElements:(id *)arg2; diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTIndexingTransformerIterator.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTIndexingTransformerIterator.h index 4e3eaed5..1d8992bc 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTIndexingTransformerIterator.h +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTIndexingTransformerIterator.h @@ -16,7 +16,7 @@ #import "XCTMatchingElementIterator-Protocol.h" -@class NSSet, NSString, XCElementSnapshot, XCTElementIndexingTransformer; +@class NSMutableSet, NSSet, NSString, XCElementSnapshot, XCTElementIndexingTransformer; @protocol XCTElementSetTransformer; __attribute__((visibility("hidden"))) @@ -31,6 +31,7 @@ __attribute__((visibility("hidden"))) XCElementSnapshot *_currentMatch; XCTElementIndexingTransformer *_indexingTransformer; NSUInteger _count; + NSMutableSet *_mutableRelatedElements; } @property NSUInteger count; @@ -39,6 +40,7 @@ __attribute__((visibility("hidden"))) @property(readonly) BOOL hasMatched; @property(readonly) XCTElementIndexingTransformer *indexingTransformer; @property(retain) XCElementSnapshot *input; +@property(readonly) NSMutableSet *mutableRelatedElements; @property(readonly) id transformer; - (id)initWithInput:(id)arg1 filteringTransformer:(id)arg2; diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTMacCatalystStatusProviding-Protocol.h b/Server/PrivateHeaders/XCTAutomationSupport/XCTMacCatalystStatusProviding-Protocol.h new file mode 100644 index 00000000..f9d89bb0 --- /dev/null +++ b/Server/PrivateHeaders/XCTAutomationSupport/XCTMacCatalystStatusProviding-Protocol.h @@ -0,0 +1,12 @@ +// class-dump results processed by bin/class-dump/dump.rb +// +// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). +// +// Copyright (C) 1997-2019 Steve Nygard. +// + + +@protocol XCTMacCatalystStatusProviding +- (BOOL)isMacCatalystForPID:(NSInteger)arg1; +@end + diff --git a/Server/PrivateHeaders/XCTest/_XCTestObservationCenterImplementation.h b/Server/PrivateHeaders/XCTest/NSThread-XCTContext.h similarity index 65% rename from Server/PrivateHeaders/XCTest/_XCTestObservationCenterImplementation.h rename to Server/PrivateHeaders/XCTest/NSThread-XCTContext.h index 6dbb414d..1d0c7d77 100644 --- a/Server/PrivateHeaders/XCTest/_XCTestObservationCenterImplementation.h +++ b/Server/PrivateHeaders/XCTest/NSThread-XCTContext.h @@ -5,6 +5,7 @@ // Copyright (C) 1997-2019 Steve Nygard. // + #import #import #import @@ -12,19 +13,8 @@ @protocol OS_dispatch_queue; @protocol OS_xpc_object; -#import - @class NSMutableArray; -@interface _XCTestObservationCenterImplementation : NSObject -{ - NSMutableArray *_observers; - BOOL _suspended; -} - -@property(retain) NSMutableArray *observers; -@property BOOL suspended; - - +@interface NSThread (XCTContext) @end diff --git a/Server/PrivateHeaders/XCTest/XCAXClient_iOS.h b/Server/PrivateHeaders/XCTest/XCAXClient_iOS.h index e62b63f8..e1d2dd74 100644 --- a/Server/PrivateHeaders/XCTest/XCAXClient_iOS.h +++ b/Server/PrivateHeaders/XCTest/XCAXClient_iOS.h @@ -58,6 +58,7 @@ - (id)hitTestElement:(id)arg1 withPoint:(CGPoint)arg2 error:(id *)arg3; - (id)initWithApplicationProcessTracker:(id)arg1 remoteAccessibilityInterface:(id)arg2; - (id)interruptingUIElementsAffectingSnapshot:(id)arg1 checkForHandledElement:(id)arg2 containsHandledElement:(BOOL *)arg3; +- (BOOL)isMacCatalystForPID:(NSInteger)arg1; - (BOOL)loadAccessibility:(id *)arg1; - (id)localizableStringsDataForActiveApplications; - (void)notifyOnNextOccurrenceOfUserTestingEvent:(id)arg1 handler:(CDUnknownBlockType)arg2; @@ -68,11 +69,12 @@ - (id)parameterizedAttribute:(id)arg1 forElement:(id)arg2 parameter:(id)arg3 error:(id *)arg4; - (BOOL)performAction:(id)arg1 onElement:(id)arg2 value:(id)arg3 error:(id *)arg4; - (void)performWhenMenuOpens:(id)arg1 block:(CDUnknownBlockType)arg2; -- (void)registerForAXNotificationsForApplicationWithPID:(NSInteger)arg1 completion:(CDUnknownBlockType)arg2; +- (void)registerForAXNotificationsForApplicationWithPID:(NSInteger)arg1 timeout:(double)arg2 completion:(CDUnknownBlockType)arg3; - (void)removeObserver:(id)arg1 forAXNotification:(id)arg2; - (id)requestSnapshotForElement:(id)arg1 attributes:(id)arg2 parameters:(id)arg3 error:(id *)arg4; - (BOOL)setAttribute:(id)arg1 value:(id)arg2 element:(id)arg3 outError:(id *)arg4; - (id)systemApplication; +- (void)unregisterForAXNotificationsForApplicationWithPID:(NSInteger)arg1; @end diff --git a/Server/PrivateHeaders/XCTest/XCActivityRecord.h b/Server/PrivateHeaders/XCTest/XCActivityRecord.h index b60f32e8..2cb710ae 100644 --- a/Server/PrivateHeaders/XCTest/XCActivityRecord.h +++ b/Server/PrivateHeaders/XCTest/XCActivityRecord.h @@ -20,17 +20,17 @@ @interface XCActivityRecord : NSObject { + BOOL _valid; + BOOL _isTopLevel; + BOOL _useLegacySerializationFormat; NSString *_title; NSString *_activityType; NSUUID *_uuid; NSDate *_start; NSDate *_finish; - NSMutableArray *_attachments; - BOOL _valid; - BOOL _useLegacySerializationFormat; NSString *_aggregationIdentifier; double _subactivitiesDuration; - BOOL _isTopLevel; + NSMutableArray *_mutableAttachments; } @property(copy) NSString *activityType; @@ -40,6 +40,7 @@ @property(copy) NSDate *finish; @property BOOL isTopLevel; @property(readonly, getter=isValid) BOOL valid; +@property(readonly) NSMutableArray *mutableAttachments; @property(readonly, copy) NSString *name; @property(copy) NSDate *start; @property(copy) NSString *title; diff --git a/Server/PrivateHeaders/XCTest/XCElementSnapshot-Hitpoint.h b/Server/PrivateHeaders/XCTest/XCElementSnapshot-Hitpoint.h index e879cd03..d6c43dcb 100644 --- a/Server/PrivateHeaders/XCTest/XCElementSnapshot-Hitpoint.h +++ b/Server/PrivateHeaders/XCTest/XCElementSnapshot-Hitpoint.h @@ -21,6 +21,7 @@ @interface XCElementSnapshot (Hitpoint) - (BOOL)_canTransformPoint:(CGPoint)arg1; +- (BOOL)_elementIsContainerSubviewWithMatchingFrame:(id)arg1; - (id)_hitPointTransformationRequestOrError:(id *)arg1; - (id)_snapshotForAccessibilityElement:(id)arg1 error:(id *)arg2; - (id)_transformParametersFromDictionary:(id)arg1 error:(id *)arg2; diff --git a/Server/PrivateHeaders/XCTest/XCSourceCodeTreeNodeEnumerator.h b/Server/PrivateHeaders/XCTest/XCSourceCodeTreeNodeEnumerator.h index bc2ddd77..8b1a0abe 100644 --- a/Server/PrivateHeaders/XCTest/XCSourceCodeTreeNodeEnumerator.h +++ b/Server/PrivateHeaders/XCTest/XCSourceCodeTreeNodeEnumerator.h @@ -21,6 +21,8 @@ NSMutableArray *_remainingNodes; } +@property(retain, nonatomic) NSMutableArray *remainingNodes; + - (id)initWithNode:(id)arg1; - (id)nextObject; diff --git a/Server/PrivateHeaders/XCTest/XCTActivityRecordStack.h b/Server/PrivateHeaders/XCTest/XCTActivityRecordStack.h index d8f04fcb..750a9298 100644 --- a/Server/PrivateHeaders/XCTest/XCTActivityRecordStack.h +++ b/Server/PrivateHeaders/XCTest/XCTActivityRecordStack.h @@ -19,10 +19,12 @@ @interface XCTActivityRecordStack : NSObject { NSMutableArray *_storage; - NSMutableDictionary *_aggregationRecords; + NSMutableDictionary *_mutableAggregationRecords; } @property(readonly) NSDictionary *aggregationRecords; +@property(readonly) NSMutableDictionary *mutableAggregationRecords; +@property(readonly) NSMutableArray *storage; - (NSInteger)depth; - (void)didFinishActivity:(id)arg1 testCase:(id)arg2 observationCenter:(id)arg3; diff --git a/Server/PrivateHeaders/XCTest/XCTAggregateSuiteRunStatisticsRecord.h b/Server/PrivateHeaders/XCTest/XCTAggregateSuiteRunStatisticsRecord.h index 422ecb4b..c8aceb8e 100644 --- a/Server/PrivateHeaders/XCTest/XCTAggregateSuiteRunStatisticsRecord.h +++ b/Server/PrivateHeaders/XCTest/XCTAggregateSuiteRunStatisticsRecord.h @@ -20,16 +20,18 @@ { NSString *_suiteName; NSUInteger _executionCount; + NSUInteger _skipCount; NSUInteger _failureCount; NSUInteger _unexpectedExceptionCount; } @property(readonly) NSUInteger executionCount; @property(readonly) NSUInteger failureCount; +@property(readonly) NSUInteger skipCount; @property(readonly) NSString *suiteName; @property(readonly) NSUInteger unexpectedExceptionCount; -- (id)initWithSuiteName:(id)arg1 executionCount:(NSUInteger)arg2 failureCount:(NSUInteger)arg3 unexpectedExceptionCount:(NSUInteger)arg4; +- (id)initWithSuiteName:(id)arg1 executionCount:(NSUInteger)arg2 skipCount:(NSUInteger)arg3 failureCount:(NSUInteger)arg4 unexpectedExceptionCount:(NSUInteger)arg5; - (BOOL)isEqualToStatisticsRecord:(id)arg1; @end diff --git a/Server/PrivateHeaders/XCTest/XCTAttachment.h b/Server/PrivateHeaders/XCTest/XCTAttachment.h index 37fab725..e07fe1ab 100644 --- a/Server/PrivateHeaders/XCTest/XCTAttachment.h +++ b/Server/PrivateHeaders/XCTest/XCTAttachment.h @@ -15,20 +15,28 @@ #import -@class NSData, NSDate, NSDictionary, NSString, _XCTAttachmentImplementation; +@class NSData, NSDate, NSDictionary, NSString; @interface XCTAttachment : NSObject { - id _internalImplementation; + BOOL _hasPayload; + NSString *_uniformTypeIdentifier; + NSString *_name; + NSDictionary *_userInfo; + CDUnknownBlockType _serializationBlock; + NSInteger _internalLifetime; + NSDate *_timestamp; + NSString *_fileNameOverride; + NSData *_payload; } @property(copy) NSString *fileNameOverride; @property(readonly) BOOL hasPayload; -@property(readonly) _XCTAttachmentImplementation *internalImplementation; @property NSInteger internalLifetime; @property NSInteger lifetime; @property(copy) NSString *name; @property(readonly, copy) NSData *payload; +@property(copy) CDUnknownBlockType serializationBlock; @property(copy) NSDate *timestamp; @property(copy) NSDictionary *userInfo; @property(readonly, copy) NSString *uniformTypeIdentifier; diff --git a/Server/PrivateHeaders/XCTest/XCTAttachmentManager.h b/Server/PrivateHeaders/XCTest/XCTAttachmentManager.h index 924264f8..f9b7dbb4 100644 --- a/Server/PrivateHeaders/XCTest/XCTAttachmentManager.h +++ b/Server/PrivateHeaders/XCTest/XCTAttachmentManager.h @@ -19,8 +19,8 @@ @interface XCTAttachmentManager : NSObject { BOOL _isValid; - NSMutableArray *_attachments; XCTestCase *_testCase; + NSMutableArray *_attachments; } @property(readonly) NSMutableArray *attachments; diff --git a/Server/PrivateHeaders/XCTest/XCTCompoundExpectation.h b/Server/PrivateHeaders/XCTest/XCTCompoundExpectation.h index ebba5360..1c8330ac 100644 --- a/Server/PrivateHeaders/XCTest/XCTCompoundExpectation.h +++ b/Server/PrivateHeaders/XCTest/XCTCompoundExpectation.h @@ -16,14 +16,14 @@ #import "XCTestExpectationDelegate-Protocol.h" -@class NSArray, NSString, _XCTCompoundExpectationImplementation; +@class NSArray, NSString; @interface XCTCompoundExpectation : XCTestExpectation { - id _internalCompoundExpectation; + NSUInteger _logicalType; + NSArray *_subexpectations; } -@property(readonly) _XCTCompoundExpectationImplementation *internalCompoundExpectation; @property(readonly) NSUInteger logicalType; @property(readonly, copy) NSArray *subexpectations; diff --git a/Server/PrivateHeaders/XCTest/XCTContext.h b/Server/PrivateHeaders/XCTest/XCTContext.h index d508ff90..bde29d6f 100644 --- a/Server/PrivateHeaders/XCTest/XCTContext.h +++ b/Server/PrivateHeaders/XCTest/XCTContext.h @@ -14,15 +14,26 @@ #import -@class NSDictionary, _XCTContextImplementation; +@class NSDictionary, NSMutableArray, NSMutableDictionary, XCTActivityRecordStack, XCTestCase; @interface XCTContext : NSObject { - id _internalImplementation; + BOOL _valid; + NSMutableDictionary *_associatedObjects; + NSMutableArray *_tearDownBlocks; + XCTContext *_parent; + XCTestCase *_testCase; + XCTActivityRecordStack *_activityRecordStack; } +@property(readonly) XCTActivityRecordStack *activityRecordStack; @property(readonly) NSDictionary *aggregationRecords; -@property(retain) _XCTContextImplementation *internalImplementation; +@property(readonly) NSMutableDictionary *associatedObjects; +@property(readonly) NSMutableArray *interruptionHandlers; +@property(readonly, getter=isValid) BOOL valid; +@property(readonly) XCTContext *parent; +@property(readonly) NSMutableArray *tearDownBlocks; +@property(readonly) __weak XCTestCase *testCase; + (id)_currentContextInThread:(id)arg1; + (void)_runActivityNamed:(id)arg1 block:(CDUnknownBlockType)arg2; @@ -30,16 +41,19 @@ + (id)currentContext; + (id)currentContextInThread:(id)arg1; + (BOOL)hasContextInThread:(id)arg1; -+ (void)popCurrentContextInThread:(id)arg1; -+ (void)pushCurrentContext:(id)arg1 inThread:(id)arg2; + (void)runActivityNamed:(id)arg1 block:(CDUnknownBlockType)arg2; + (void)runInContextForTestCase:(id)arg1 block:(CDUnknownBlockType)arg2; + (BOOL)shouldReportActivityWithType:(id)arg1 inTestMode:(NSInteger)arg2; +- (void)_reportEmptyActivityWithType:(id)arg1 format:(id)arg2; - (void)_runActivityNamed:(id)arg1 block:(CDUnknownBlockType)arg2; - (void)_runActivityNamed:(id)arg1 type:(id)arg2 block:(CDUnknownBlockType)arg3; - (NSInteger)activityRecordStackDepth; +- (void)addTearDownBlock:(CDUnknownBlockType)arg1; +- (id)associatedObjectForKey:(id)arg1; - (void)didFinishActivity:(id)arg1; -- (id)initInternally; +- (id)initWithParent:(id)arg1 testCase:(id)arg2; +- (void)invalidate; +- (void)setAssociatedObject:(id)arg1 forKey:(id)arg2; - (id)topActivity; - (void)unwindRemainingActivities; - (id)willStartActivityWithTitle:(id)arg1 type:(id)arg2; diff --git a/Server/PrivateHeaders/XCTest/XCTDarwinNotificationExpectation.h b/Server/PrivateHeaders/XCTest/XCTDarwinNotificationExpectation.h index a2d5d3d1..bd16bb07 100644 --- a/Server/PrivateHeaders/XCTest/XCTDarwinNotificationExpectation.h +++ b/Server/PrivateHeaders/XCTest/XCTDarwinNotificationExpectation.h @@ -14,17 +14,25 @@ #import "XCTestExpectation.h" -@class NSString, _XCTDarwinNotificationExpectationImplementation; +@class NSObject, NSString; +@protocol OS_dispatch_queue; @interface XCTDarwinNotificationExpectation : XCTestExpectation { - _XCTDarwinNotificationExpectationImplementation *_internal; + BOOL _hasCleanedUp; + NSInteger _notifyToken; + CDUnknownBlockType _handler; + NSString *_notificationName; + NSObject *_queue; } @property(copy) CDUnknownBlockType handler; -@property(retain) _XCTDarwinNotificationExpectationImplementation *internal; +@property BOOL hasCleanedUp; @property(readonly, copy) NSString *notificationName; +@property NSInteger notifyToken; +@property(readonly) NSObject *queue; +- (void)_handleNotification; - (void)cleanup; - (id)initWithNotificationName:(id)arg1; diff --git a/Server/PrivateHeaders/XCTest/XCTElementSnapshotAttributeDataSource-Protocol.h b/Server/PrivateHeaders/XCTest/XCTElementSnapshotAttributeDataSource-Protocol.h index 783a23f7..d1697956 100644 --- a/Server/PrivateHeaders/XCTest/XCTElementSnapshotAttributeDataSource-Protocol.h +++ b/Server/PrivateHeaders/XCTest/XCTElementSnapshotAttributeDataSource-Protocol.h @@ -5,7 +5,6 @@ // Copyright (C) 1997-2019 Steve Nygard. // - #import #import #import @@ -13,9 +12,11 @@ @protocol OS_dispatch_queue; @protocol OS_xpc_object; +#import "XCTMacCatalystStatusProviding-Protocol.h" + @class NSArray, NSDictionary, NSString, XCAccessibilityElement; -@protocol XCTElementSnapshotAttributeDataSource +@protocol XCTElementSnapshotAttributeDataSource - (NSDictionary *)attributesForElement:(XCAccessibilityElement *)arg1 attributes:(NSArray *)arg2 error:(id *)arg3; - (id)parameterizedAttribute:(NSString *)arg1 forElement:(XCAccessibilityElement *)arg2 parameter:(id)arg3 error:(id *)arg4; @end diff --git a/Server/PrivateHeaders/XCTest/XCTFixedPriorityTestScheduler.h b/Server/PrivateHeaders/XCTest/XCTFixedPriorityTestScheduler.h index 89e76155..07d3d0a3 100644 --- a/Server/PrivateHeaders/XCTest/XCTFixedPriorityTestScheduler.h +++ b/Server/PrivateHeaders/XCTest/XCTFixedPriorityTestScheduler.h @@ -21,16 +21,16 @@ @interface XCTFixedPriorityTestScheduler : NSObject { - NSObject *_queue; + BOOL _hasStarted; NSObject *_workerQueue; + id _delegate; + NSObject *_delegateQueue; + NSObject *_queue; NSMutableArray *_undispatchedTestIdentifierGroups; NSSet *_testIdentifiersToSkip; NSMutableSet *_inFlightWorkers; CDUnknownBlockType _prioritizer; - BOOL _hasStarted; NSMutableSet *_queuedWorkers; - id _delegate; - NSObject *_delegateQueue; } @property __weak id delegate; diff --git a/Server/PrivateHeaders/XCTest/XCTImage.h b/Server/PrivateHeaders/XCTest/XCTImage.h index 53dcf838..4740e135 100644 --- a/Server/PrivateHeaders/XCTest/XCTImage.h +++ b/Server/PrivateHeaders/XCTest/XCTImage.h @@ -15,17 +15,21 @@ #import -@class NSData, NSString, UIImage, _XCTImageImplementation; +@class NSData, NSString, UIImage; @interface XCTImage : NSObject { - _XCTImageImplementation *_internalImplementation; + UIImage *_platformImage; + NSData *_originalData; + NSString *_name; + double _scale; } @property(readonly, copy) NSData *data; @property(readonly, copy) UIImage *image; -@property(retain) _XCTImageImplementation *internalImplementation; @property(copy) NSString *name; +@property(copy) NSData *originalData; +@property(copy) UIImage *platformImage; @property(readonly) double scale; + (id)UTIForQuality:(NSInteger)arg1; @@ -34,7 +38,6 @@ + (double)compressionQualityForQuality:(NSInteger)arg1; + (id)emptyImageWithSize:(struct CGSize)arg1; - (void)_ensureImage; -- (id)_init; - (id)attachment; - (id)dataWithQuality:(NSInteger)arg1; - (id)debugQuickLookObject; diff --git a/Server/PrivateHeaders/XCTest/XCTKVOExpectation.h b/Server/PrivateHeaders/XCTest/XCTKVOExpectation.h index 6078ab09..7fd1df02 100644 --- a/Server/PrivateHeaders/XCTest/XCTKVOExpectation.h +++ b/Server/PrivateHeaders/XCTest/XCTKVOExpectation.h @@ -14,24 +14,33 @@ #import "XCTestExpectation.h" -@class NSString, _XCKVOExpectationImplementation; +@class NSObject, NSString; +@protocol OS_dispatch_queue; @interface XCTKVOExpectation : XCTestExpectation { - _XCKVOExpectationImplementation *_internal; + BOOL _hasCleanedUp; + CDUnknownBlockType _handler; + NSString *_keyPath; + id _observedObject; + id _expectedValue; + NSUInteger _options; + NSObject *_queue; } @property(readonly) id expectedValue; @property(copy) CDUnknownBlockType handler; -@property(retain) _XCKVOExpectationImplementation *internal; +@property BOOL hasCleanedUp; @property(readonly, copy) NSString *keyPath; @property(readonly) id observedObject; @property(readonly) NSUInteger options; +@property(readonly) NSObject *queue; - (void)cleanup; - (id)initWithKeyPath:(id)arg1 object:(id)arg2; - (id)initWithKeyPath:(id)arg1 object:(id)arg2 expectedValue:(id)arg3; - (id)initWithKeyPath:(id)arg1 object:(id)arg2 expectedValue:(id)arg3 options:(NSUInteger)arg4; +- (void)observeValueForKeyPath:(id)arg1 ofObject:(id)arg2 change:(id)arg3 context:(void *)arg4; @end diff --git a/Server/PrivateHeaders/XCTest/XCTMacCatalystStatusProviding-Protocol.h b/Server/PrivateHeaders/XCTest/XCTMacCatalystStatusProviding-Protocol.h new file mode 100644 index 00000000..f9d89bb0 --- /dev/null +++ b/Server/PrivateHeaders/XCTest/XCTMacCatalystStatusProviding-Protocol.h @@ -0,0 +1,12 @@ +// class-dump results processed by bin/class-dump/dump.rb +// +// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). +// +// Copyright (C) 1997-2019 Steve Nygard. +// + + +@protocol XCTMacCatalystStatusProviding +- (BOOL)isMacCatalystForPID:(NSInteger)arg1; +@end + diff --git a/Server/PrivateHeaders/XCTest/XCTMeasureOptions.h b/Server/PrivateHeaders/XCTest/XCTMeasureOptions.h index a98f07ee..ac0690f0 100644 --- a/Server/PrivateHeaders/XCTest/XCTMeasureOptions.h +++ b/Server/PrivateHeaders/XCTest/XCTMeasureOptions.h @@ -14,14 +14,16 @@ #import -@class NSDictionary, NSMutableDictionary; +@class NSDictionary; @interface XCTMeasureOptions : NSObject { - NSMutableDictionary *_instrumentOptions; + BOOL _enableParallelizedSampling; + BOOL _scheduleKickOffOnNewThread; + BOOL _allowContinuousSampling; BOOL _discardFirstIteration; - NSUInteger _instrumentAutomatic; - NSUInteger _metricPerferredSampleMode; + NSUInteger _invocationOptions; + NSUInteger _iterationCount; } @property(nonatomic) BOOL allowConcurrentIterations; @@ -31,7 +33,6 @@ @property(readonly, nonatomic) NSDictionary *instrumentOptions; @property(nonatomic) NSUInteger invocationOptions; @property(nonatomic) NSUInteger iterationCount; -@property(readonly, nonatomic) NSUInteger metricPerferredSampleMode; + (id)defaultOptions; - (id)initWithInstrumentOptionsDictionary:(id)arg1; diff --git a/Server/PrivateHeaders/XCTest/XCTMeasurement.h b/Server/PrivateHeaders/XCTest/XCTMeasurement.h index 0b3ca3b7..0e964313 100644 --- a/Server/PrivateHeaders/XCTest/XCTMeasurement.h +++ b/Server/PrivateHeaders/XCTest/XCTMeasurement.h @@ -19,8 +19,8 @@ @interface XCTMeasurement : NSObject { NSString *_identifier; - NSString *_name; NSString *_units; + NSString *_name; NSDictionary *_baseline; NSDictionary *_defaultBaseline; NSArray *_measurements; diff --git a/Server/PrivateHeaders/XCTest/XCTMemoryChecker.h b/Server/PrivateHeaders/XCTest/XCTMemoryChecker.h index f08348fa..45e41a99 100644 --- a/Server/PrivateHeaders/XCTest/XCTMemoryChecker.h +++ b/Server/PrivateHeaders/XCTest/XCTMemoryChecker.h @@ -27,7 +27,7 @@ DTXConnection *_dtxConnection; } -@property id delegate; +@property __weak id delegate; @property(retain, nonatomic) DTXConnection *dtxConnection; @property(retain) NSMutableSet *markedAddresses; diff --git a/Server/PrivateHeaders/XCTest/XCTNSNotificationExpectation.h b/Server/PrivateHeaders/XCTest/XCTNSNotificationExpectation.h index 03c626b6..d6a55fbf 100644 --- a/Server/PrivateHeaders/XCTest/XCTNSNotificationExpectation.h +++ b/Server/PrivateHeaders/XCTest/XCTNSNotificationExpectation.h @@ -14,19 +14,27 @@ #import "XCTestExpectation.h" -@class NSNotificationCenter, NSString, _XCTNSNotificationExpectationImplementation; +@class NSNotificationCenter, NSObject, NSString; +@protocol OS_dispatch_queue; @interface XCTNSNotificationExpectation : XCTestExpectation { - _XCTNSNotificationExpectationImplementation *_internal; + BOOL _hasCleanedUp; + CDUnknownBlockType _handler; + NSString *_notificationName; + id _observedObject; + NSNotificationCenter *_notificationCenter; + NSObject *_queue; } @property(copy) CDUnknownBlockType handler; -@property(retain) _XCTNSNotificationExpectationImplementation *internal; +@property BOOL hasCleanedUp; @property(readonly) NSNotificationCenter *notificationCenter; @property(readonly, copy) NSString *notificationName; @property(readonly) id observedObject; +@property(readonly) NSObject *queue; +- (void)_observeExpectedNotification:(id)arg1; - (void)cleanup; - (id)initWithName:(id)arg1; - (id)initWithName:(id)arg1 object:(id)arg2; diff --git a/Server/PrivateHeaders/XCTest/XCTNSPredicateExpectation.h b/Server/PrivateHeaders/XCTest/XCTNSPredicateExpectation.h index 1f5470c3..7a958a37 100644 --- a/Server/PrivateHeaders/XCTest/XCTNSPredicateExpectation.h +++ b/Server/PrivateHeaders/XCTest/XCTNSPredicateExpectation.h @@ -14,26 +14,45 @@ #import "XCTestExpectation.h" -@class NSPredicate, _XCTNSPredicateExpectationImplementation; +@class NSObject, NSPredicate, NSRunLoop, NSString, NSTimer; +@protocol OS_dispatch_queue; @interface XCTNSPredicateExpectation : XCTestExpectation { - _XCTNSPredicateExpectationImplementation *_internal; + BOOL _hasCleanedUp; + BOOL _isEvaluating; + BOOL _shouldEvaluate; + CDUnknownBlockType _handler; + NSString *_debugDescription; + NSPredicate *_predicate; + id _object; + NSObject *_queue; + NSRunLoop *_timerRunLoop; + NSTimer *_timer; + double _pollingInterval; } +@property(copy) NSString *debugDescription; @property(copy) CDUnknownBlockType handler; -@property(retain) _XCTNSPredicateExpectationImplementation *internal; +@property BOOL hasCleanedUp; +@property BOOL isEvaluating; @property(readonly) id object; @property double pollingInterval; @property(readonly, copy) NSPredicate *predicate; +@property(readonly) NSObject *queue; +@property BOOL shouldEvaluate; +@property(retain) NSTimer *timer; +@property(retain) NSRunLoop *timerRunLoop; @property(nonatomic) NSUInteger expectedFulfillmentCount; // @dynamic expectedFulfillmentCount; +- (void)_considerFulfilling; +- (void)_scheduleTimer; +- (BOOL)_shouldFulfillForObject:(id)arg1 handler:(CDUnknownBlockType)arg2; - (void)cleanup; -- (void)considerFulfilling; -- (id)debugDescription; - (void)fulfill; - (id)initWithPredicate:(id)arg1 object:(id)arg2; - (void)on_queue_setHasBeenWaitedOn:(BOOL)arg1; +- (void)startPolling; @end diff --git a/Server/PrivateHeaders/XCTest/XCTRunnerAutomationSession.h b/Server/PrivateHeaders/XCTest/XCTRunnerAutomationSession.h index 0e817194..bbfddc18 100644 --- a/Server/PrivateHeaders/XCTest/XCTRunnerAutomationSession.h +++ b/Server/PrivateHeaders/XCTest/XCTRunnerAutomationSession.h @@ -28,6 +28,7 @@ @property(readonly) BOOL allowsRemoteAccess; @property(readonly) NSXPCConnection *connection; @property(readonly) NSInteger connectionPid; +@property(readonly) BOOL isMacCatalyst; @property(retain) XCTCapabilities *remoteInterfaceCapabilities; @property(readonly) BOOL supportsAnimationsIdleNotifications; @property(readonly) BOOL supportsFetchingAttributesForElement; @@ -40,6 +41,7 @@ + (void)requestSessionWithEndpoint:(id)arg1 pid:(NSInteger)arg2 completion:(CDUnknownBlockType)arg3; - (id)attributesForElement:(id)arg1 attributes:(id)arg2 error:(id *)arg3; - (id)initWithConnection:(id)arg1 pid:(NSInteger)arg2 remoteInterfaceCapabilities:(id)arg3; +- (BOOL)isMacCatalystForPID:(NSInteger)arg1; - (id)matchesForQuery:(id)arg1 error:(id *)arg2; - (void)notifyWhenAnimationsAreIdle:(CDUnknownBlockType)arg1; - (void)notifyWhenMainRunLoopIsIdle:(CDUnknownBlockType)arg1; diff --git a/Server/PrivateHeaders/XCTest/XCTRunnerDaemonSession.h b/Server/PrivateHeaders/XCTest/XCTRunnerDaemonSession.h index a00182f9..82d6071d 100644 --- a/Server/PrivateHeaders/XCTest/XCTRunnerDaemonSession.h +++ b/Server/PrivateHeaders/XCTest/XCTRunnerDaemonSession.h @@ -21,6 +21,7 @@ #import "XCUIPlatformApplicationServicesProviding-Protocol.h" #import "XCUIRemoteAccessibilityInterface-Protocol.h" #import "XCUIRemoteSiriInterface-Protocol.h" +#import "XCUIResetAuthorizationStatusOfProtectedResourcesInterface-Protocol.h" @class NSMutableDictionary, NSString, NSXPCConnection, XCTCapabilities; @protocol OS_dispatch_queue, XCTestManager_ManagerInterface, XCUIAXNotificationHandling, XCUIApplicationPlatformServicesProviderDelegate; @@ -29,8 +30,9 @@ @protocol XCUIAXNotificationHandling; @protocol XCTestManager_ManagerInterface; -@interface XCTRunnerDaemonSession : NSObject +@interface XCTRunnerDaemonSession : NSObject { + double _implicitEventConfirmationIntervalForCurrentContext; NSXPCConnection *_connection; XCTCapabilities *_remoteInterfaceCapabilities; id _platformApplicationServicesProviderDelegate; @@ -44,6 +46,7 @@ @property(readonly) BOOL axNotificationsIncludeElement; @property(readonly) NSXPCConnection *connection; @property(readonly) id daemonProxy; +@property double implicitEventConfirmationIntervalForCurrentContext; @property(retain) NSMutableDictionary *invalidationHandlers; @property __weak id platformApplicationServicesProviderDelegate; @property(readonly) NSObject *queue; @@ -59,6 +62,7 @@ + (id)capabilities; + (id)capabilitiesForDaemonConnection:(id)arg1 error:(id *)arg2; + (id)daemonCapabilitiesForProtocolVersion:(NSUInteger)arg1 platform:(NSUInteger)arg2 error:(id *)arg3; ++ (id)sessionWithConnection:(id)arg1; + (id)sharedSession; - (void)_XCT_applicationWithBundleID:(id)arg1 didUpdatePID:(NSInteger)arg2 andState:(NSUInteger)arg3; - (void)_XCT_receivedAccessibilityNotification:(NSInteger)arg1 fromElement:(id)arg2 payload:(id)arg3; @@ -92,6 +96,7 @@ - (void)requestSiriEnabledStatus:(CDUnknownBlockType)arg1; - (void)requestSnapshotForElement:(id)arg1 attributes:(id)arg2 parameters:(id)arg3 reply:(CDUnknownBlockType)arg4; - (void)requestSpindumpWithSpecification:(id)arg1 completion:(CDUnknownBlockType)arg2; +- (BOOL)resetAuthorizationStatusForBundleIdentifier:(id)arg1 resourceIdentifier:(id)arg2 error:(id *)arg3; - (void)setAXTimeout:(double)arg1 reply:(CDUnknownBlockType)arg2; - (void)setAttribute:(id)arg1 value:(id)arg2 element:(id)arg3 reply:(CDUnknownBlockType)arg4; - (void)setLocalizableStringsDataGatheringEnabled:(BOOL)arg1 reply:(CDUnknownBlockType)arg2; diff --git a/Server/PrivateHeaders/XCTest/XCTRunnerIDESession.h b/Server/PrivateHeaders/XCTest/XCTRunnerIDESession.h index 9b4b1fe7..94ff7008 100644 --- a/Server/PrivateHeaders/XCTest/XCTRunnerIDESession.h +++ b/Server/PrivateHeaders/XCTest/XCTRunnerIDESession.h @@ -16,26 +16,26 @@ #import "XCTTestRunSessionDelegate-Protocol.h" #import "XCTestDriverInterface-Protocol.h" -#import "XCTestObservation-Protocol.h" #import "XCUIXcodeApplicationManaging-Protocol.h" +#import "_XCTestObservationPrivate-Protocol.h" @class DTXConnection, NSString, XCTestRun; @protocol OS_dispatch_queue, XCTRunnerIDESessionDelegate, XCTTestWorker, XCTestManager_IDEInterface, XCUIApplicationMonitor; -@protocol XCTestManager_IDEInterface; @protocol XCTRunnerIDESessionDelegate; @protocol XCTTestWorker; +@protocol XCTestManager_IDEInterface; -@interface XCTRunnerIDESession : NSObject +@interface XCTRunnerIDESession : NSObject <_XCTestObservationPrivate, XCTestDriverInterface, XCTTestRunSessionDelegate, XCUIXcodeApplicationManaging> { - NSObject *_queue; - DTXConnection *_IDEConnection; - id _IDEProxy; NSInteger _IDEProtocolVersion; id _delegate; id _applicationMonitor; id _testWorker; + NSObject *_queue; + DTXConnection *_IDEConnection; + id _IDEProxy; XCTestRun *_currentTestRun; CDUnknownBlockType _readinessReply; } @@ -44,8 +44,9 @@ @property NSInteger IDEProtocolVersion; @property(retain) id IDEProxy; @property __weak id applicationMonitor; +@property(retain) XCTestRun *currentTestRun; @property __weak id delegate; -@property(retain) NSObject *queue; +@property(readonly) NSObject *queue; @property(copy) CDUnknownBlockType readinessReply; @property(readonly) BOOL reportsCrashes; @property __weak id testWorker; @@ -72,12 +73,14 @@ - (void)reportBootstrappingFailure:(id)arg1 completion:(CDUnknownBlockType)arg2; - (void)reportSelfDiagnosisIssue:(id)arg1 description:(id)arg2; - (void)reportStallOnMainThreadInTestCase:(id)arg1 method:(id)arg2 file:(id)arg3 line:(NSUInteger)arg4; +- (void)reportTestWithIdentifier:(id)arg1 didExceedExecutionTimeAllowance:(double)arg2; - (void)requestLaunchProgressForProcessWithToken:(id)arg1 completion:(CDUnknownBlockType)arg2; - (void)requestReadinessForTesting:(CDUnknownBlockType)arg1; - (void)terminateProcessWithToken:(id)arg1 completion:(CDUnknownBlockType)arg2; - (void)testBundleDidFinish:(id)arg1; - (void)testBundleWillStart:(id)arg1; - (void)testCase:(id)arg1 didFailWithDescription:(id)arg2 inFile:(id)arg3 atLine:(NSUInteger)arg4; +- (void)testCase:(id)arg1 wasSkippedWithDescription:(id)arg2 inFile:(id)arg3 atLine:(NSUInteger)arg4; - (void)testCaseDidFinish:(id)arg1; - (void)testCaseWillStart:(id)arg1; - (void)testRunSession:(id)arg1 initializationForUITestingDidFailWithError:(id)arg2; diff --git a/Server/PrivateHeaders/XCTest/XCTSkippedTestContext.h b/Server/PrivateHeaders/XCTest/XCTSkippedTestContext.h new file mode 100644 index 00000000..7e95f277 --- /dev/null +++ b/Server/PrivateHeaders/XCTest/XCTSkippedTestContext.h @@ -0,0 +1,41 @@ +// class-dump results processed by bin/class-dump/dump.rb +// +// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). +// +// Copyright (C) 1997-2019 Steve Nygard. +// + +#import +#import +#import +#import "CDStructures.h" +@protocol OS_dispatch_queue; +@protocol OS_xpc_object; + +#import + + +@interface XCTSkippedTestContext : NSObject +{ + NSString *_summary; + NSString *_explanation; + NSString *_evaluatedExpression; + NSString *_message; + NSString *_filePath; + NSUInteger _lineNumber; +} + +@property(readonly, copy) NSString *evaluatedExpression; +@property(readonly, copy) NSString *explanation; +@property(readonly, copy) NSString *filePath; +@property(readonly) NSUInteger lineNumber; +@property(readonly, copy) NSString *message; +@property(readonly, copy) NSString *summary; + +- (id)initWithError:(id)arg1 evaluatedExpression:(id)arg2 message:(id)arg3 filePath:(id)arg4 lineNumber:(NSUInteger)arg5; +- (id)initWithException:(id)arg1 evaluatedExpression:(id)arg2 message:(id)arg3 filePath:(id)arg4 lineNumber:(NSUInteger)arg5; +- (id)initWithExpectedValue:(BOOL)arg1 evaluatedExpression:(id)arg2 message:(id)arg3 filePath:(id)arg4 lineNumber:(NSUInteger)arg5; +- (id)initWithExplanation:(id)arg1 evaluatedExpression:(id)arg2 message:(id)arg3 filePath:(id)arg4 lineNumber:(NSUInteger)arg5; + +@end + diff --git a/Server/PrivateHeaders/XCTest/_XCTestImplementation.h b/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation.h similarity index 100% rename from Server/PrivateHeaders/XCTest/_XCTestImplementation.h rename to Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation.h diff --git a/Server/PrivateHeaders/XCTest/XCTTestIdentifier.h b/Server/PrivateHeaders/XCTest/XCTTestIdentifier.h index 79892106..1e474f74 100644 --- a/Server/PrivateHeaders/XCTest/XCTTestIdentifier.h +++ b/Server/PrivateHeaders/XCTest/XCTTestIdentifier.h @@ -34,7 +34,9 @@ @property(readonly) NSString *stringRepresentation; @property(readonly) NSUInteger type; ++ (id)bundleNameForClass:(Class)arg1; + (id)identifierForClass:(Class)arg1; ++ (id)identifierForTestCase:(id)arg1; + (id)identifiersGroupedByClass:(id)arg1; + (id)minimumEquivalentIdentifiers:(id)arg1; + (id)testIdentifiersForStringIdentifiers:(id)arg1 inBundleWithName:(id)arg2; diff --git a/Server/PrivateHeaders/XCTest/XCTTestRunSession.h b/Server/PrivateHeaders/XCTest/XCTTestRunSession.h index 6e46cef5..309c2d43 100644 --- a/Server/PrivateHeaders/XCTest/XCTTestRunSession.h +++ b/Server/PrivateHeaders/XCTest/XCTTestRunSession.h @@ -24,8 +24,8 @@ @interface XCTTestRunSession : NSObject { - XCTestConfiguration *_testConfiguration; id _delegate; + XCTestConfiguration *_testConfiguration; XCTBlockingQueue *_workQueue; } diff --git a/Server/PrivateHeaders/XCTest/XCTWaiter.h b/Server/PrivateHeaders/XCTest/XCTWaiter.h index e6a3f137..49d06e84 100644 --- a/Server/PrivateHeaders/XCTest/XCTWaiter.h +++ b/Server/PrivateHeaders/XCTest/XCTWaiter.h @@ -17,7 +17,7 @@ #import "XCTWaiterManagement-Protocol.h" #import "XCTestExpectationDelegate-Protocol.h" -@class NSArray, NSString, _XCTWaiterImpl; +@class NSArray, NSMutableArray, NSString, XCTWaiterManager; @protocol OS_dispatch_queue, XCTWaiterDelegate; @@ -25,18 +25,33 @@ @interface XCTWaiter : NSObject { - _XCTWaiterImpl *_internalImplementation; + BOOL _enforceOrderOfFulfillment; + id _delegate; + NSObject *_delegateQueue; + NSInteger _state; + NSInteger _result; + double _timeout; + NSArray *_waitCallStackReturnAddresses; + NSArray *_expectations; + NSMutableArray *_mutableFulfilledExpectations; + struct __CFRunLoop *_waitingRunLoop; + XCTWaiterManager *_manager; } @property(readonly) BOOL currentContextIsNested; @property __weak id delegate; @property(readonly, nonatomic) NSObject *delegateQueue; +@property BOOL enforceOrderOfFulfillment; +@property(copy, nonatomic) NSArray *expectations; @property(readonly) NSArray *fulfilledExpectations; -@property(readonly) _XCTWaiterImpl *internalImplementation; @property(readonly, getter=isInProgress) BOOL inProgress; +@property __weak XCTWaiterManager *manager; +@property(readonly, nonatomic) NSMutableArray *mutableFulfilledExpectations; +@property NSInteger result; +@property NSInteger state; +@property double timeout; +@property(copy) NSArray *waitCallStackReturnAddresses; @property struct __CFRunLoop *waitingRunLoop; -@property(readonly) double timeout; -@property(readonly, copy) NSArray *waitCallStackReturnAddresses; + (void)handleStalledWaiter:(id)arg1; + (CDUnknownBlockType)installWatchdogForWaiter:(id)arg1 timeout:(double)arg2; @@ -58,10 +73,6 @@ - (id)initWithDelegate:(id)arg1; - (void)interruptForWaiter:(id)arg1; - (void)primitiveWait:(double)arg1; -- (NSInteger)result; -- (void)setState:(NSInteger)arg1; -- (void)setWaitCallStackReturnAddresses:(id)arg1; -- (NSInteger)state; - (NSInteger)waitForExpectations:(id)arg1 timeout:(double)arg2; - (NSInteger)waitForExpectations:(id)arg1 timeout:(double)arg2 enforceOrder:(BOOL)arg3; diff --git a/Server/PrivateHeaders/XCTest/XCTest.h b/Server/PrivateHeaders/XCTest/XCTest.h index 8f7f0bb0..5b55d53a 100644 --- a/Server/PrivateHeaders/XCTest/XCTest.h +++ b/Server/PrivateHeaders/XCTest/XCTest.h @@ -18,7 +18,7 @@ @interface XCTest : NSObject { - id _internal; + XCTestRun *_testRun; } @property(readonly) NSString *_classNameForReporting; @@ -38,7 +38,9 @@ - (void)removeTestsWithNames:(id)arg1; - (void)runTest; - (void)setUp; +- (BOOL)setUpWithError:(id *)arg1; - (void)tearDown; +- (BOOL)tearDownWithError:(id *)arg1; @end diff --git a/Server/PrivateHeaders/XCTest/XCTestCase.h b/Server/PrivateHeaders/XCTest/XCTestCase.h index 9c52b798..1da4e667 100644 --- a/Server/PrivateHeaders/XCTest/XCTestCase.h +++ b/Server/PrivateHeaders/XCTest/XCTestCase.h @@ -18,23 +18,89 @@ #import "XCTMemoryCheckerDelegate-Protocol.h" #import "XCTWaiterDelegate-Protocol.h" -@class NSDictionary, NSInvocation, NSString, XCTMemoryChecker, XCTestCaseRun, _XCTestCaseImplementation; +@class MXMInstrument, NSArray, NSDictionary, NSInvocation, NSMutableArray, NSMutableDictionary, NSObject, NSString, NSThread, XCTAttachmentManager, XCTMemoryChecker, XCTSkippedTestContext, XCTTestIdentifier, XCTWaiter, XCTestCaseRun; +@protocol OS_dispatch_source; @interface XCTestCase : XCTest { - id _internalImplementation; + BOOL __preciseTimeoutsEnabled; + BOOL _continueAfterFailure; + BOOL __isMeasuringMetrics; + BOOL __didMeasureMetrics; + BOOL __didStartMeasuring; + BOOL __didStopMeasuring; + BOOL _hasDequeuedTeardownBlocks; + BOOL _shouldHaltWhenReceivesControl; + BOOL _shouldSetShouldHaltWhenReceivesControl; + BOOL _shouldIgnoreSubsequentFailures; + BOOL _hasAttemptedToCaptureScreenshotOnFailure; + NSInvocation *_invocation; + NSMutableArray *_expectations; + NSMutableArray *_teardownBlocks; + double _executionTimeAllowance; + XCTTestIdentifier *_identifier; + NSUInteger _signpostID; + NSArray *__activePerformanceMetricIDs; + NSUInteger __startWallClockTime; + struct time_value __startUserTime; + struct time_value __startSystemTime; + NSUInteger __measuringIteration; + MXMInstrument *__instrument; + NSString *_filePathForNestedFailure; + NSUInteger _lineNumberForNestedFailure; + NSInteger _runLoopNestingCount; + XCTAttachmentManager *_attachmentManager; + NSDictionary *_activityAggregateStatistics; + NSObject *__timeoutSource; + NSThread *_primaryThread; + XCTWaiter *__currentWaiter; + NSMutableArray *_failureRecords; + XCTSkippedTestContext *_skippedTestContext; + XCTestCaseRun *_testCaseRun; XCTMemoryChecker *_defaultMemoryChecker; + NSMutableDictionary *__perfMetricsForID; } -@property(readonly) NSDictionary *activityAggregateStatistics; +@property(copy) NSArray *_activePerformanceMetricIDs; +@property(retain, nonatomic) XCTWaiter *_currentWaiter; +@property BOOL _didMeasureMetrics; +@property BOOL _didStartMeasuring; +@property BOOL _didStopMeasuring; +@property(readonly) double _effectiveExecutionTimeAllowance; +@property(retain, nonatomic) NSMutableArray *_expectations; +@property(readonly) XCTTestIdentifier *_identifier; +@property(retain) MXMInstrument *_instrument; +@property BOOL _isMeasuringMetrics; +@property NSUInteger _measuringIteration; +@property(readonly, getter=_needsErrorHandling) BOOL needsErrorHandling; +@property(retain) NSMutableDictionary *_perfMetricsForID; +@property(nonatomic) BOOL _preciseTimeoutsEnabled; +@property NSUInteger _signpostID; +@property struct time_value _startSystemTime; +@property struct time_value _startUserTime; +@property NSUInteger _startWallClockTime; +@property(readonly) NSMutableArray *_teardownBlocks; +@property(retain) NSObject *_timeoutSource; +@property(copy) NSDictionary *activityAggregateStatistics; @property(readonly) NSUInteger activityRecordStackDepth; +@property(retain) XCTAttachmentManager *attachmentManager; @property BOOL continueAfterFailure; @property(retain, nonatomic) XCTMemoryChecker *defaultMemoryChecker; -@property(retain) _XCTestCaseImplementation *internalImplementation; +@property double executionTimeAllowance; +@property(readonly, nonatomic) NSMutableArray *failureRecords; +@property(copy) NSString *filePathForNestedFailure; +@property(nonatomic) BOOL hasAttemptedToCaptureScreenshotOnFailure; +@property BOOL hasDequeuedTeardownBlocks; @property(retain) NSInvocation *invocation; +@property NSUInteger lineNumberForNestedFailure; +@property NSUInteger maxDurationInMinutes; @property(readonly, copy) NSString *name; +@property(retain) NSThread *primaryThread; +@property NSInteger runLoopNestingCount; @property(nonatomic) BOOL shouldHaltWhenReceivesControl; +@property(nonatomic) BOOL shouldIgnoreSubsequentFailures; @property(nonatomic) BOOL shouldSetShouldHaltWhenReceivesControl; +@property(retain, nonatomic) XCTSkippedTestContext *skippedTestContext; @property(retain) XCTestCaseRun *testCaseRun; + (id)_allSubclasses; @@ -44,6 +110,7 @@ + (BOOL)_meetsMinimumOperatingSystemVersion; + (BOOL)_reportPerformanceFailuresForLargeImprovements; + (id)_testStartActvityDateFormatter; ++ (id)_timeoutQueue; + (BOOL)_treatMissingBaselinesAsTestFailures; + (id)allSubclasses; + (id)allSubclassesOutsideXCTest; @@ -57,6 +124,7 @@ + (id)knownMemoryMetrics; + (id)measurementFormatter; + (CDStruct_2ec95fd7)minimumOperatingSystemVersion; ++ (id)performFailableBlock:(CDUnknownBlockType)arg1 testCase:(id)arg2 testCaseRun:(id)arg3 shouldInterruptTest:(BOOL *)arg4; + (void)setUp; + (void)tearDown; + (id)testCaseWithInvocation:(id)arg1; @@ -68,30 +136,34 @@ - (void)_dequeueAndReportBackgroundAttachments; - (void)_dequeueFailures; - (id)_dequeueTeardownBlocks; -- (BOOL)_didMeasureMetrics; -- (BOOL)_didStartMeasuring; -- (BOOL)_didStopMeasuring; - (void)_enqueueFailureWithDescription:(id)arg1 inFile:(id)arg2 atLine:(NSUInteger)arg3 expected:(BOOL)arg4 interruptTest:(BOOL)arg5 breakWhenDequeued:(BOOL)arg6; +- (void)_exceededExecutionTimeAllowance; - (id)_expectationForDarwinNotification:(id)arg1; - (id)_expectationForDistributedNotification:(id)arg1 object:(id)arg2 handler:(CDUnknownBlockType)arg3; - (void)_interruptTest; -- (BOOL)_isMeasuringMetrics; - (void)_logAndReportPerformanceMetrics:(id)arg1 perfMetricResultsForIDs:(id)arg2 withBaselinesForTest:(id)arg3; - (void)_logAndReportPerformanceMetrics:(id)arg1 perfMetricResultsForIDs:(id)arg2 withBaselinesForTest:(id)arg3 defaultBaselinesForPerfMetricID:(id)arg4; - (void)_logMemoryGraphData:(id)arg1 withTitle:(id)arg2; - (void)_logMemoryGraphDataFromFilePath:(id)arg1 withTitle:(id)arg2; -- (id)_perfMetricsForID; +- (void)_performSetUpSequenceWithSelector:(SEL)arg1; - (void)_performTearDownSequenceWithSelector:(SEL)arg1; - (void)_performTurningExceptionsIntoFailuresInterruptAfterHandling:(BOOL)arg1 block:(CDUnknownBlockType)arg2; - (void)_purgeTeardownBlocks; - (void)_recordActivityWithFailure:(id)arg1; - (void)_recordFailure:(id)arg1; +- (void)_recordFailureForCaughtError:(id)arg1 usingContextFromIssue:(id)arg2; - (void)_recordFailureWithDescription:(id)arg1 inFile:(id)arg2 atLine:(NSUInteger)arg3 expected:(BOOL)arg4; +- (void)_recordSkipWithContext:(id)arg1; - (void)_recordValues:(id)arg1 forPerformanceMetricID:(id)arg2 name:(id)arg3 unitsOfMeasurement:(id)arg4 baselineName:(id)arg5 baselineAverage:(id)arg6 maxPercentRegression:(id)arg7 maxPercentRelativeStandardDeviation:(id)arg8 maxRegression:(id)arg9 maxStandardDeviation:(id)arg10 file:(id)arg11 line:(NSUInteger)arg12; - (void)_reportFailuresAtFile:(id)arg1 line:(NSUInteger)arg2 forTestAssertionsInScope:(CDUnknownBlockType)arg3; - (void)_reportFailuresForUnwaitedExpectations; - (Class)_requiredTestRunBaseClass; +- (void)_resetExpectations; +- (void)_resetExpectationsInArray:(id)arg1; +- (void)_resetTimer; - (void)_runTeardownBlocks; +- (void)_startTimeoutTimer; +- (void)_stopTimeoutTimer; - (id)_symbolicationRecordForAddress:(NSUInteger)arg1; - (id)_symbolicationRecordForTestCodeInAddressStack:(id)arg1; - (void)addAttachment:(id)arg1; @@ -129,7 +201,6 @@ - (id)nameForLegacyLogging; - (void)nestedWaiter:(id)arg1 wasInterruptedByTimedOutWaiter:(id)arg2; - (NSUInteger)numberOfTestIterationsForTestWithSelector:(SEL)arg1; -- (id)performFailableBlock:(CDUnknownBlockType)arg1 testCaseRun:(id)arg2 shouldInterruptTest:(BOOL *)arg3; - (void)performTest:(id)arg1; - (void)recordActivityWithFormat:(id)arg1; - (void)recordFailureWithDescription:(id)arg1 inFile:(id)arg2 atLine:(NSUInteger)arg3 expected:(BOOL)arg4; @@ -147,7 +218,6 @@ - (void)stopMeasuring; - (void)tearDownTestWithSelector:(SEL)arg1; - (NSUInteger)testCaseCount; -- (void)testContextPerformInScope:(CDUnknownBlockType)arg1; - (Class)testRunClass; - (void)waitForExpectations:(id)arg1 timeout:(double)arg2; - (void)waitForExpectations:(id)arg1 timeout:(double)arg2 enforceOrder:(BOOL)arg3; diff --git a/Server/PrivateHeaders/XCTest/XCTestCaseRun.h b/Server/PrivateHeaders/XCTest/XCTestCaseRun.h index ec5fccb6..4d4aa359 100644 --- a/Server/PrivateHeaders/XCTest/XCTestCaseRun.h +++ b/Server/PrivateHeaders/XCTest/XCTestCaseRun.h @@ -21,6 +21,7 @@ - (void)_recordValues:(id)arg1 forPerformanceMetricID:(id)arg2 name:(id)arg3 unitsOfMeasurement:(id)arg4 baselineName:(id)arg5 baselineAverage:(id)arg6 maxPercentRegression:(id)arg7 maxPercentRelativeStandardDeviation:(id)arg8 maxRegression:(id)arg9 maxStandardDeviation:(id)arg10 file:(id)arg11 line:(NSUInteger)arg12; - (void)recordFailureInTest:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(NSUInteger)arg4 expected:(BOOL)arg5; - (void)recordFailureWithDescription:(id)arg1 inFile:(id)arg2 atLine:(NSUInteger)arg3 expected:(BOOL)arg4; +- (void)recordSkipWithDescription:(id)arg1 inFile:(id)arg2 atLine:(NSUInteger)arg3; - (void)start; - (void)stop; diff --git a/Server/PrivateHeaders/XCTest/XCTestCaseSuite.h b/Server/PrivateHeaders/XCTest/XCTestCaseSuite.h index 2e59a6ca..c07b54c5 100644 --- a/Server/PrivateHeaders/XCTest/XCTestCaseSuite.h +++ b/Server/PrivateHeaders/XCTest/XCTestCaseSuite.h @@ -19,6 +19,8 @@ Class _testCaseClass; } +@property(readonly) Class testCaseClass; + + (id)emptyTestSuiteForTestCaseClass:(Class)arg1; - (id)initWithTestCaseClass:(Class)arg1; - (void)setUp; diff --git a/Server/PrivateHeaders/XCTest/XCTestConfiguration.h b/Server/PrivateHeaders/XCTest/XCTestConfiguration.h index f6b2ee7e..3c5fef1e 100644 --- a/Server/PrivateHeaders/XCTest/XCTestConfiguration.h +++ b/Server/PrivateHeaders/XCTest/XCTestConfiguration.h @@ -28,6 +28,7 @@ BOOL _initializeForUITesting; BOOL _gatherLocalizableStringsData; BOOL _emitOSLogs; + BOOL _testTimeoutsEnabled; NSString *_absolutePath; NSString *_testBundleRelativePath; NSURL *_testBundleURL; @@ -49,6 +50,8 @@ NSInteger _userAttachmentLifetime; NSInteger _testExecutionOrdering; NSNumber *_randomExecutionOrderingSeed; + NSNumber *_defaultTestExecutionTimeAllowance; + NSNumber *_maximumTestExecutionTimeAllowance; } @property(copy) NSString *absolutePath; @@ -56,10 +59,12 @@ @property(copy) NSString *automationFrameworkPath; @property(copy) NSString *baselineFileRelativePath; @property(copy, nonatomic) NSURL *baselineFileURL; +@property(copy, nonatomic) NSNumber *defaultTestExecutionTimeAllowance; @property BOOL disablePerformanceMetrics; @property BOOL emitOSLogs; @property BOOL gatherLocalizableStringsData; @property BOOL initializeForUITesting; +@property(copy, nonatomic) NSNumber *maximumTestExecutionTimeAllowance; @property(copy) NSString *productModuleName; @property(retain) NSNumber *randomExecutionOrderingSeed; @property BOOL reportActivities; @@ -75,6 +80,7 @@ @property(copy) NSString *testBundleRelativePath; @property(copy, nonatomic) NSURL *testBundleURL; @property NSInteger testExecutionOrdering; +@property BOOL testTimeoutsEnabled; @property BOOL testsDrivenByIDE; @property BOOL testsMustRunOnMainThread; @property(copy) NSSet *testsToRun; diff --git a/Server/PrivateHeaders/XCTest/XCTestDriver.h b/Server/PrivateHeaders/XCTest/XCTestDriver.h index cf632d71..888359c1 100644 --- a/Server/PrivateHeaders/XCTest/XCTestDriver.h +++ b/Server/PrivateHeaders/XCTest/XCTestDriver.h @@ -23,15 +23,15 @@ @interface XCTestDriver : NSObject { + NSInteger _debugMessageBufferOverflow; XCTestConfiguration *_testConfiguration; NSObject *_queue; NSMutableArray *_debugMessageBuffer; - NSInteger _debugMessageBufferOverflow; } @property(retain) NSMutableArray *debugMessageBuffer; @property NSInteger debugMessageBufferOverflow; -@property(retain) NSObject *queue; +@property(readonly) NSObject *queue; @property(readonly) XCTestConfiguration *testConfiguration; + (id)sharedTestDriver; diff --git a/Server/PrivateHeaders/XCTest/XCTestExpectation.h b/Server/PrivateHeaders/XCTest/XCTestExpectation.h index 550c91be..6f357a00 100644 --- a/Server/PrivateHeaders/XCTest/XCTestExpectation.h +++ b/Server/PrivateHeaders/XCTest/XCTestExpectation.h @@ -14,7 +14,7 @@ #import -@class NSArray, NSString, _XCTestExpectationImplementation; +@class NSArray, NSString; @protocol XCTestExpectationDelegate; @@ -22,13 +22,24 @@ @interface XCTestExpectation : NSObject { - id _internalImplementation; + BOOL _fulfilled; + BOOL _hasBeenWaitedOn; + BOOL _inverted; + BOOL _assertForOverFulfill; + id _delegate; + NSUInteger _fulfillmentToken; + NSArray *_fulfillCallStackReturnAddresses; + NSUInteger _expectedFulfillmentCount; + NSString *_expectationDescription; + NSUInteger _numberOfFulfillments; + NSUInteger _creationToken; + NSArray *_creationCallStackReturnAddresses; } @property(nonatomic) BOOL assertForOverFulfill; @property(readonly, copy) NSArray *creationCallStackReturnAddresses; @property(readonly) NSUInteger creationToken; -@property id delegate; +@property __weak id delegate; @property(copy) NSString *expectationDescription; @property(nonatomic) NSUInteger expectedFulfillmentCount; @property(readonly, copy) NSArray *fulfillCallStackReturnAddresses; @@ -37,8 +48,8 @@ @property(readonly) NSUInteger fulfillmentToken; @property BOOL hasBeenWaitedOn; @property BOOL hasInverseBehavior; -@property(readonly) _XCTestExpectationImplementation *internalImplementation; @property(getter=isInverted) BOOL inverted; +@property NSUInteger numberOfFulfillments; @property(readonly) BOOL on_queue_fulfilled; @property(readonly) NSUInteger on_queue_fulfillmentToken; @property(readonly) BOOL on_queue_isInverted; diff --git a/Server/PrivateHeaders/XCTest/XCTestLog.h b/Server/PrivateHeaders/XCTest/XCTestLog.h index 4cb33768..6a6de884 100644 --- a/Server/PrivateHeaders/XCTest/XCTestLog.h +++ b/Server/PrivateHeaders/XCTest/XCTestLog.h @@ -14,12 +14,11 @@ #import "XCTestObserver.h" -#import "XCTestObservation-Protocol.h" #import "_XCTestObservationPrivate-Protocol.h" @class NSFileHandle, NSString; -@interface XCTestLog : XCTestObserver +@interface XCTestLog : XCTestObserver <_XCTestObservationPrivate> { } @@ -32,6 +31,7 @@ - (void)_testDidFail:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(NSUInteger)arg4; - (id)dateFormatter; - (void)testCase:(id)arg1 didFailWithDescription:(id)arg2 inFile:(id)arg3 atLine:(NSUInteger)arg4; +- (void)testCase:(id)arg1 wasSkippedWithDescription:(id)arg2 inFile:(id)arg3 atLine:(NSUInteger)arg4; - (void)testCaseDidFinish:(id)arg1; - (void)testCaseWillStart:(id)arg1; - (void)testLogWithFormat:(id)arg1; diff --git a/Server/PrivateHeaders/XCTest/XCTestManager_IDEInterface-Protocol.h b/Server/PrivateHeaders/XCTest/XCTestManager_IDEInterface-Protocol.h index 434d7486..5eb5623d 100644 --- a/Server/PrivateHeaders/XCTest/XCTestManager_IDEInterface-Protocol.h +++ b/Server/PrivateHeaders/XCTest/XCTestManager_IDEInterface-Protocol.h @@ -12,7 +12,7 @@ @protocol OS_dispatch_queue; @protocol OS_xpc_object; -@class NSArray, NSData, NSDictionary, NSError, NSNumber, NSString, XCActivityRecord, XCElementSnapshot; +@class NSArray, NSData, NSDictionary, NSError, NSNumber, NSString, XCActivityRecord, XCElementSnapshot, XCTTestIdentifier; @protocol XCTestManager_IDEInterface - (id)_XCT_didBeginExecutingTestPlan; @@ -32,6 +32,8 @@ - (id)_XCT_recordedKeyEventsWithApplicationSnapshot:(XCElementSnapshot *)arg1 characters:(NSString *)arg2 charactersIgnoringModifiers:(NSString *)arg3 modifierFlags:(NSNumber *)arg4; - (id)_XCT_recordedOrientationChange:(NSString *)arg1; - (id)_XCT_reportSelfDiagnosisIssue:(NSString *)arg1 description:(NSString *)arg2; +- (id)_XCT_reportTestWithIdentifier:(XCTTestIdentifier *)arg1 didExceedExecutionTimeAllowance:(NSNumber *)arg2; +- (id)_XCT_reportTestWithIdentifier:(XCTTestIdentifier *)arg1 didExceedMaxDuration:(NSNumber *)arg2; - (id)_XCT_terminateProcess:(id)arg1; - (id)_XCT_testBundleReadyWithProtocolVersion:(NSNumber *)arg1 minimumVersion:(NSNumber *)arg2; - (id)_XCT_testCase:(NSString *)arg1 method:(NSString *)arg2 didFinishActivity:(XCActivityRecord *)arg3; @@ -40,7 +42,9 @@ - (id)_XCT_testCaseDidFailForTestClass:(NSString *)arg1 method:(NSString *)arg2 withMessage:(NSString *)arg3 file:(NSString *)arg4 line:(NSNumber *)arg5; - (id)_XCT_testCaseDidFinishForTestClass:(NSString *)arg1 method:(NSString *)arg2 withStatus:(NSString *)arg3 duration:(NSNumber *)arg4; - (id)_XCT_testCaseDidStartForTestClass:(NSString *)arg1 method:(NSString *)arg2; +- (id)_XCT_testCaseWasSkippedForTestClass:(NSString *)arg1 method:(NSString *)arg2 withMessage:(NSString *)arg3 file:(NSString *)arg4 line:(NSNumber *)arg5; - (id)_XCT_testMethod:(NSString *)arg1 ofClass:(NSString *)arg2 didMeasureMetric:(NSDictionary *)arg3 file:(NSString *)arg4 line:(NSNumber *)arg5; +- (id)_XCT_testSuite:(NSString *)arg1 didFinishAt:(NSString *)arg2 runCount:(NSNumber *)arg3 skipCount:(NSNumber *)arg4 failureCount:(NSNumber *)arg5 unexpectedFailureCount:(NSNumber *)arg6 testDuration:(NSNumber *)arg7 totalDuration:(NSNumber *)arg8; - (id)_XCT_testSuite:(NSString *)arg1 didFinishAt:(NSString *)arg2 runCount:(NSNumber *)arg3 withFailures:(NSNumber *)arg4 unexpected:(NSNumber *)arg5 testDuration:(NSNumber *)arg6 totalDuration:(NSNumber *)arg7; - (id)_XCT_testSuite:(NSString *)arg1 didStartAt:(NSString *)arg2; @end diff --git a/Server/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h b/Server/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h index 083e5245..4a44e423 100644 --- a/Server/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h +++ b/Server/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h @@ -9,17 +9,18 @@ #import #import #import "CDStructures.h" -#import "../XCTAutomationSupport/XCUIElementSnapshotRequestResult.h" @protocol OS_dispatch_queue; @protocol OS_xpc_object; +#import "XCTestManager_ProtectedResources-Protocol.h" + @class NSArray, NSDictionary, NSNumber, NSString, NSURL, NSUUID, XCAccessibilityElement, XCDeviceEvent, XCSynthesizedEventRecord, XCTCapabilities, XCTSpindumpRequestSpecification; @class XCTSerializedTransportWrapper; @class XCElementSnapshot; @class NSXPCListenerEndpoint; -@protocol XCTestManager_ManagerInterface +@protocol XCTestManager_ManagerInterface - (void)_XCT_enableFauxCollectionViewCells:(void (^)(BOOL, NSError *))arg1; - (void)_XCT_exchangeCapabilities:(XCTCapabilities *)arg1 reply:(void (^)(XCTCapabilities *))arg2; - (void)_XCT_exchangeProtocolVersion:(NSUInteger)arg1 reply:(void (^)(NSUInteger))arg2; @@ -27,7 +28,7 @@ - (void)_XCT_fetchAttributesForElement:(XCAccessibilityElement *)arg1 attributes:(NSArray *)arg2 reply:(void (^)(NSDictionary *, NSError *))arg3; - (void)_XCT_fetchParameterizedAttribute:(NSString *)arg1 forElement:(XCAccessibilityElement *)arg2 parameter:(id)arg3 reply:(void (^)(id, NSError *))arg4; - (void)_XCT_fetchParameterizedAttributeForElement:(XCAccessibilityElement *)arg1 attributes:(NSNumber *)arg2 parameter:(id)arg3 reply:(void (^)(id, NSError *))arg4; -- (void)_XCT_fetchSnapshotForElement:(XCAccessibilityElement *)arg1 attributes:(NSArray *)arg2 parameters:(NSDictionary *)arg3 reply:(void (^)(XCUIElementSnapshotRequestResult *, NSError *))arg4; +- (void)_XCT_fetchSnapshotForElement:(XCAccessibilityElement *)arg1 attributes:(NSArray *)arg2 parameters:(NSDictionary *)arg3 reply:(void (^)(NSDictionary *, NSError *))arg4; - (void)_XCT_getDeviceOrientationWithCompletion:(void (^)(NSNumber *, NSError *))arg1; - (void)_XCT_injectAssistantRecognitionStrings:(NSArray *)arg1 completion:(void (^)(BOOL, NSError *))arg2; - (void)_XCT_injectVoiceRecognitionAudioInputPaths:(NSArray *)arg1 completion:(void (^)(BOOL, NSError *))arg2; @@ -60,6 +61,7 @@ - (void)_XCT_startSiriUIRequestWithAudioFileURL:(NSURL *)arg1 completion:(void (^)(BOOL, NSError *))arg2; - (void)_XCT_startSiriUIRequestWithText:(NSString *)arg1 completion:(void (^)(BOOL, NSError *))arg2; - (void)_XCT_synthesizeEvent:(XCSynthesizedEventRecord *)arg1 completion:(void (^)(NSError *))arg2; +- (void)_XCT_synthesizeEvent:(XCSynthesizedEventRecord *)arg1 implicitConfirmationInterval:(double)arg2 completion:(void (^)(NSError *))arg3; - (void)_XCT_terminateApplicationWithBundleID:(NSString *)arg1 completion:(void (^)(NSError *))arg2; - (void)_XCT_unregisterForAccessibilityNotification:(NSInteger)arg1 withRegistrationToken:(NSNumber *)arg2 reply:(void (^)(NSError *))arg3; - (void)_XCT_updateDeviceOrientation:(NSInteger)arg1 completion:(void (^)(NSError *))arg2; diff --git a/Server/PrivateHeaders/XCTest/XCTestManager_ProtectedResources-Protocol.h b/Server/PrivateHeaders/XCTest/XCTestManager_ProtectedResources-Protocol.h new file mode 100644 index 00000000..f9c5373c --- /dev/null +++ b/Server/PrivateHeaders/XCTest/XCTestManager_ProtectedResources-Protocol.h @@ -0,0 +1,12 @@ +// class-dump results processed by bin/class-dump/dump.rb +// +// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). +// +// Copyright (C) 1997-2019 Steve Nygard. +// + + +@protocol XCTestManager_ProtectedResources +- (void)_XCT_resetAuthorizationStatusForBundleIdentifier:(NSString *)arg1 resourceIdentifier:(NSString *)arg2 reply:(void (^)(BOOL, NSError *))arg3; +@end + diff --git a/Server/PrivateHeaders/XCTest/XCTestObservationCenter.h b/Server/PrivateHeaders/XCTest/XCTestObservationCenter.h index 780777d5..0b25939e 100644 --- a/Server/PrivateHeaders/XCTest/XCTestObservationCenter.h +++ b/Server/PrivateHeaders/XCTest/XCTestObservationCenter.h @@ -15,17 +15,26 @@ #import @class NSMutableArray; +@protocol XCTestObservation; @interface XCTestObservationCenter : NSObject { - id _internalImplementation; + BOOL _suspended; + NSMutableArray *_observers; + CDUnknownBlockType _exceptionHandler; + id _throwingTestObserver; + SEL _throwingTestObserverMethod; } +@property(readonly, copy) CDUnknownBlockType exceptionHandler; @property(readonly) NSMutableArray *observers; @property BOOL suspended; +@property(retain) id throwingTestObserver; +@property SEL throwingTestObserverMethod; + (void)setSharedTestObservationCenter:(id)arg1; + (id)sharedTestObservationCenter; +- (void)_handleException:(id)arg1 thrownBy:(id)arg2 inMethod:(SEL)arg3; - (void)_observeTestExecutionForBlock:(CDUnknownBlockType)arg1; - (void)_resumeObservation; - (void)_suspendObservation; @@ -36,11 +45,12 @@ - (void)_testCaseDidFail:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(NSUInteger)arg4; - (void)_testCaseDidStart:(id)arg1; - (void)_testCaseDidStop:(id)arg1; +- (void)_testCaseWasSkipped:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(NSUInteger)arg4; - (void)_testSuiteDidFail:(id)arg1 withDescription:(id)arg2 inFile:(id)arg3 atLine:(NSUInteger)arg4; - (void)_testSuiteDidStart:(id)arg1; - (void)_testSuiteDidStop:(id)arg1; - (void)addTestObserver:(id)arg1; -- (id)initBasicCenter; +- (id)initWithObservers:(id)arg1 exceptionHandler:(CDUnknownBlockType)arg2; - (void)removeTestObserver:(id)arg1; @end diff --git a/Server/PrivateHeaders/XCTest/XCTestRun.h b/Server/PrivateHeaders/XCTest/XCTestRun.h index b1ce8349..04519704 100644 --- a/Server/PrivateHeaders/XCTest/XCTestRun.h +++ b/Server/PrivateHeaders/XCTest/XCTestRun.h @@ -14,20 +14,39 @@ #import -@class NSDate, XCTest, _XCInternalTestRun; +@class NSDate, XCTest; @interface XCTestRun : NSObject { - id _internalTestRun; + BOOL _hasBeenSkipped; + BOOL _hasStarted; + BOOL _hasStopped; + XCTest *_test; + NSUInteger _executionCount; + NSUInteger _failureCount; + NSUInteger _unexpectedExceptionCount; + double _startTimeInterval; + double _stopTimeInterval; + NSUInteger _executionCountBeforeCrash; + NSUInteger _skipCountBeforeCrash; + NSUInteger _failureCountBeforeCrash; + NSUInteger _unexpectedExceptionCountBeforeCrash; } -@property(readonly) NSUInteger executionCount; +@property NSUInteger executionCount; @property NSUInteger executionCountBeforeCrash; -@property(readonly) NSUInteger failureCount; +@property NSUInteger failureCount; @property NSUInteger failureCountBeforeCrash; +@property BOOL hasBeenSkipped; +@property BOOL hasStarted; +@property BOOL hasStopped; @property(readonly) BOOL hasSucceeded; -@property(readonly) _XCInternalTestRun *implementation; +@property NSUInteger skipCountBeforeCrash; +@property double startTimeInterval; +@property double stopTimeInterval; +@property NSUInteger unexpectedExceptionCount; @property NSUInteger unexpectedExceptionCountBeforeCrash; +@property(readonly) NSUInteger skipCount; @property(readonly, copy) NSDate *startDate; @property(readonly, copy) NSDate *stopDate; @property(readonly) XCTest *test; @@ -35,11 +54,11 @@ @property(readonly) double testDuration; @property(readonly) double totalDuration; @property(readonly) NSUInteger totalFailureCount; -@property(readonly) NSUInteger unexpectedExceptionCount; + (id)testRunWithTest:(id)arg1; - (id)initWithTest:(id)arg1; - (void)recordFailureWithDescription:(id)arg1 inFile:(id)arg2 atLine:(NSUInteger)arg3 expected:(BOOL)arg4; +- (void)recordSkipWithDescription:(id)arg1 inFile:(id)arg2 atLine:(NSUInteger)arg3; - (void)start; - (void)stop; diff --git a/Server/PrivateHeaders/XCTest/XCTestSuite.h b/Server/PrivateHeaders/XCTest/XCTestSuite.h index 10182632..88578594 100644 --- a/Server/PrivateHeaders/XCTest/XCTestSuite.h +++ b/Server/PrivateHeaders/XCTest/XCTestSuite.h @@ -14,15 +14,21 @@ #import "XCTest.h" -@class NSArray, NSDictionary, NSString; +@class NSArray, NSDictionary, NSMutableArray, NSMutableDictionary, NSString, XCTestConfiguration; @interface XCTestSuite : XCTest { - id _internalImplementation; + NSString *_name; + NSMutableArray *_mutableTests; + XCTestConfiguration *_testConfiguration; + NSMutableDictionary *_mutableActivityAggregateStatistics; } @property(readonly) NSDictionary *activityAggregateStatistics; +@property(readonly) NSMutableDictionary *mutableActivityAggregateStatistics; +@property(retain) NSMutableArray *mutableTests; @property(copy) NSString *name; +@property(retain) XCTestConfiguration *testConfiguration; @property(readonly, copy) NSArray *tests; + (void)_applyRandomExecutionOrderingSeed:(id)arg1; diff --git a/Server/PrivateHeaders/XCTest/XCTestSuiteRun.h b/Server/PrivateHeaders/XCTest/XCTestSuiteRun.h index b1927f19..62b820f0 100644 --- a/Server/PrivateHeaders/XCTest/XCTestSuiteRun.h +++ b/Server/PrivateHeaders/XCTest/XCTestSuiteRun.h @@ -18,9 +18,10 @@ @interface XCTestSuiteRun : XCTestRun { - NSMutableArray *_testRuns; + NSMutableArray *_mutableTestRuns; } +@property(readonly) NSMutableArray *mutableTestRuns; @property(readonly, copy) NSArray *testRuns; - (void)addTestRun:(id)arg1; @@ -28,6 +29,7 @@ - (NSUInteger)failureCount; - (id)initWithTest:(id)arg1; - (void)recordFailureWithDescription:(id)arg1 inFile:(id)arg2 atLine:(NSUInteger)arg3 expected:(BOOL)arg4; +- (NSUInteger)skipCount; - (void)start; - (void)stop; - (double)testDuration; diff --git a/Server/PrivateHeaders/XCTest/XCUIAccessibilityInterface-Protocol.h b/Server/PrivateHeaders/XCTest/XCUIAccessibilityInterface-Protocol.h index 6549ab85..fe5a1d29 100644 --- a/Server/PrivateHeaders/XCTest/XCUIAccessibilityInterface-Protocol.h +++ b/Server/PrivateHeaders/XCTest/XCUIAccessibilityInterface-Protocol.h @@ -34,9 +34,10 @@ - (id)parameterizedAttribute:(NSString *)arg1 forElement:(XCAccessibilityElement *)arg2 parameter:(id)arg3 error:(id *)arg4; - (BOOL)performAction:(XCUIAccessibilityAction *)arg1 onElement:(XCAccessibilityElement *)arg2 value:(id)arg3 error:(id *)arg4; - (void)performWhenMenuOpens:(XCAccessibilityElement *)arg1 block:(void (^)(void))arg2; -- (void)registerForAXNotificationsForApplicationWithPID:(NSInteger)arg1 completion:(void (^)(BOOL, NSError *))arg2; +- (void)registerForAXNotificationsForApplicationWithPID:(NSInteger)arg1 timeout:(double)arg2 completion:(void (^)(BOOL, NSError *))arg3; - (void)removeObserver:(id)arg1 forAXNotification:(NSString *)arg2; - (XCUIElementSnapshotRequestResult *)requestSnapshotForElement:(XCAccessibilityElement *)arg1 attributes:(NSArray *)arg2 parameters:(NSDictionary *)arg3 error:(id *)arg4; - (BOOL)setAttribute:(NSString *)arg1 value:(id)arg2 element:(XCAccessibilityElement *)arg3 outError:(id *)arg4; +- (void)unregisterForAXNotificationsForApplicationWithPID:(NSInteger)arg1; @end diff --git a/Server/PrivateHeaders/XCTest/XCUIApplication.h b/Server/PrivateHeaders/XCTest/XCUIApplication.h index 2d249e63..2816cca9 100644 --- a/Server/PrivateHeaders/XCTest/XCUIApplication.h +++ b/Server/PrivateHeaders/XCTest/XCUIApplication.h @@ -14,6 +14,19 @@ #import "XCUIElement.h" +#if XCT_UI_TESTING_AVAILABLE + +typedef NS_ENUM(NSUInteger, XCUIApplicationState) { + XCUIApplicationStateUnknown = 0, + XCUIApplicationStateNotRunning = 1, +#if !TARGET_OS_OSX + XCUIApplicationStateRunningBackgroundSuspended = 2, +#endif + XCUIApplicationStateRunningBackground = 3, + XCUIApplicationStateRunningForeground = 4 +}; +#endif + @class NSArray, NSDictionary, NSString, XCAccessibilityElement, XCApplicationQuery, XCUIApplicationImpl, XCUIApplicationOpenRequest; @protocol XCTRunnerAutomationSession, XCUIDevice; @@ -98,6 +111,7 @@ - (void)launch; - (id)query; - (void)resetAlertCount; +- (void)resetAuthorizationStatusForResource:(NSInteger)arg1; - (BOOL)resolveOrRaiseTestFailure:(BOOL)arg1 error:(id *)arg2; - (BOOL)setFauxCollectionViewCellsEnabled:(BOOL)arg1 error:(id *)arg2; - (void)terminate; diff --git a/Server/PrivateHeaders/XCTest/XCUIApplicationImpl.h b/Server/PrivateHeaders/XCTest/XCUIApplicationImpl.h index 2590d07c..a2ea9e14 100644 --- a/Server/PrivateHeaders/XCTest/XCUIApplicationImpl.h +++ b/Server/PrivateHeaders/XCTest/XCUIApplicationImpl.h @@ -71,6 +71,7 @@ - (id)initWithPath:(id)arg1 bundleID:(id)arg2; - (id)initWithPath:(id)arg1 bundleID:(id)arg2 device:(id)arg3; - (void)resetAlertCount; +- (void)resetAuthorizationStatusForResource:(NSInteger)arg1; - (void)serviceOpenRequest:(id)arg1; - (BOOL)shouldWaitForAutomationSessionWhenUsingPlatformLauncher:(BOOL)arg1; - (void)terminate; diff --git a/Server/PrivateHeaders/XCTest/XCUIApplicationProcess.h b/Server/PrivateHeaders/XCTest/XCUIApplicationProcess.h index 057e9ee2..9fa8843d 100644 --- a/Server/PrivateHeaders/XCTest/XCUIApplicationProcess.h +++ b/Server/PrivateHeaders/XCTest/XCUIApplicationProcess.h @@ -37,6 +37,7 @@ NSUInteger _alertCount; id _automationSession; XCTFuture *_automationSessionFuture; + NSString *_path; NSString *_bundleID; XCElementSnapshot *_lastSnapshot; id _device; @@ -62,6 +63,7 @@ @property BOOL hasExitCode; @property(readonly, getter=isProcessIDValid) BOOL processIDValid; @property(retain) XCElementSnapshot *lastSnapshot; +@property(readonly, copy, nonatomic) NSString *path; @property(nonatomic) NSInteger processID; @property(readonly) BOOL running; @property(retain) id token; @@ -91,7 +93,9 @@ - (id)attributesForElement:(id)arg1 attributes:(id)arg2 error:(id *)arg3; - (void)incrementAlertCount; - (id)initWithBundleID:(id)arg1 device:(id)arg2 delegate:(id)arg3; +- (id)initWithPath:(id)arg1 bundleID:(id)arg2 device:(id)arg3 delegate:(id)arg4; - (BOOL)isApplicationStateKnown; +- (BOOL)isMacCatalystForPID:(NSInteger)arg1; - (BOOL)isQuiescent; - (id)parameterizedAttribute:(id)arg1 forElement:(id)arg2 parameter:(id)arg3 error:(id *)arg4; - (void)resetAlertCount; diff --git a/Server/PrivateHeaders/XCTest/XCUICoordinate.h b/Server/PrivateHeaders/XCTest/XCUICoordinate.h index caad44ae..ee4b5257 100644 --- a/Server/PrivateHeaders/XCTest/XCUICoordinate.h +++ b/Server/PrivateHeaders/XCTest/XCUICoordinate.h @@ -42,6 +42,7 @@ - (id)initWithElement:(id)arg1 normalizedOffset:(CGVector)arg2; - (void)pressForDuration:(double)arg1; - (void)pressForDuration:(double)arg1 thenDragToCoordinate:(id)arg2; +- (void)pressForDuration:(double)arg1 thenDragToCoordinate:(id)arg2 withVelocity:(double)arg3 thenHoldForDuration:(double)arg4; - (void)pressWithPressure:(double)arg1 duration:(double)arg2; - (void)tap; diff --git a/Server/PrivateHeaders/XCTest/XCUIDevice.h b/Server/PrivateHeaders/XCTest/XCUIDevice.h index 560697bf..862a59ea 100644 --- a/Server/PrivateHeaders/XCTest/XCUIDevice.h +++ b/Server/PrivateHeaders/XCTest/XCUIDevice.h @@ -16,8 +16,8 @@ #import -@class NSString, XCUIRemote, XCUISiriService, XCUITestContext; -@protocol XCUIAccessibilityInterface, XCUIApplicationAutomationSessionProviding, XCUIApplicationManaging, XCUIApplicationMonitor, XCUIDeviceEventAndStateInterface, XCUIEventSynthesizing, XCUIScreenDataSource, XCUIXcodeApplicationManaging; +@class NSString, XCUIRemote, XCUISiriService; +@protocol XCUIAccessibilityInterface, XCUIApplicationAutomationSessionProviding, XCUIApplicationManaging, XCUIApplicationMonitor, XCUIDeviceEventAndStateInterface, XCUIEventSynthesizing, XCUIInterruptionMonitoring, XCUIResetAuthorizationStatusOfProtectedResourcesInterface, XCUIScreenDataSource, XCUIXcodeApplicationManaging; @protocol XCUIAccessibilityInterface; @@ -38,14 +38,16 @@ XCUISiriService *_siriService; id _screenDataSource; NSString *_uniqueIdentifier; - XCUITestContext *_testContext; XCUIRemote *_remote; + id _interruptionMonitor; + id _resetAuthorizationStatusInterface; } @property(nonatomic) UIDeviceOrientation orientation; @property(readonly) XCUISiriService *siriService; + (id)localDevice; ++ (void)setLocalDevice:(id)arg1; + (XCUIDevice *)sharedDevice; - (void)_setOrientation:(NSInteger)arg1; - (void)_silentPressButton:(NSInteger)arg1; @@ -57,6 +59,7 @@ - (id)eventSynthesizer; - (void)holdHomeButtonForDuration:(double)arg1; - (id)initLocalDeviceWithPlatform:(NSInteger)arg1; +- (id)interruptionMonitor; - (BOOL)isLocal; - (BOOL)isSimulatorDevice; - (id)mainScreen; @@ -68,12 +71,12 @@ - (void)pressLockButton; - (id)remote; - (void)remoteAutomationSessionDidDisconnect:(id)arg1; +- (id)resetAuthorizationStatusInterface; - (void)rotateDigitalCrown:(double)arg1 velocity:(double)arg2; - (id)screenDataSource; - (id)screens; - (id)screensOrError:(id *)arg1; - (BOOL)supportsPressureInteraction; -- (id)testContext; - (id)uniqueIdentifier; - (id)xcodeApplicationManager; diff --git a/Server/PrivateHeaders/XCTest/XCUIElement.h b/Server/PrivateHeaders/XCTest/XCUIElement.h index 3443cd5e..a6cfc143 100644 --- a/Server/PrivateHeaders/XCTest/XCUIElement.h +++ b/Server/PrivateHeaders/XCTest/XCUIElement.h @@ -162,9 +162,10 @@ - (id)_pointsInFrame:(CGRect)arg1 numberOfTouches:(NSUInteger)arg2; - (void)_pressWithPressure:(double)arg1 pressDuration:(double)arg2 holdDuration:(double)arg3 releaseDuration:(double)arg4 activityTitle:(id)arg5; - (BOOL)_shouldDispatchEvent:(id *)arg1; -- (void)_swipe:(NSUInteger)arg1; +- (void)_swipe:(NSUInteger)arg1 withVelocity:(double)arg2; - (void)_tapWithNumberOfTaps:(NSUInteger)arg1 numberOfTouches:(NSUInteger)arg2 activityTitle:(id)arg3; - (BOOL)_waitForExistenceWithTimeout:(double)arg1; +- (BOOL)_waitForNonExistenceWithTimeout:(double)arg1; - (void)adjustToNormalizedSliderPosition:(double)arg1; - (void)adjustToPickerWheelValue:(id)arg1; - (id)childrenMatchingType:(NSUInteger)arg1; @@ -178,6 +179,7 @@ - (void)pinchWithScale:(double)arg1 velocity:(double)arg2; - (void)pressForDuration:(double)arg1; - (void)pressForDuration:(double)arg1 thenDragToElement:(id)arg2; +- (void)pressForDuration:(double)arg1 thenDragToElement:(id)arg2 withVelocity:(double)arg3 thenHoldForDuration:(double)arg4; - (void)pressWithPressure:(double)arg1 duration:(double)arg2; - (void)resolveOrRaiseTestFailure; - (BOOL)resolveOrRaiseTestFailure:(BOOL)arg1 error:(id *)arg2; @@ -185,9 +187,13 @@ - (id)screenshot; - (id)snapshotWithError:(id *)arg1; - (void)swipeDown; +- (void)swipeDownWithVelocity:(double)arg1; - (void)swipeLeft; +- (void)swipeLeftWithVelocity:(double)arg1; - (void)swipeRight; +- (void)swipeRightWithVelocity:(double)arg1; - (void)swipeUp; +- (void)swipeUpWithVelocity:(double)arg1; - (void)tap; - (void)tapOrClick; - (void)tapWithNumberOfTaps:(NSUInteger)arg1 numberOfTouches:(NSUInteger)arg2; @@ -197,7 +203,6 @@ - (id)valueForAccessibilityAttribute:(id)arg1 error:(id *)arg2; - (id)valuesForAccessibilityAttributes:(id)arg1 error:(id *)arg2; - (BOOL)waitForExistenceWithTimeout:(double)arg1; -- (BOOL)waitForNonExistenceWithTimeout:(double)arg1; @end diff --git a/Server/PrivateHeaders/XCTest/XCUIElementAsynchronousHandlerWrapper.h b/Server/PrivateHeaders/XCTest/XCUIInterruptionHandler.h similarity index 63% rename from Server/PrivateHeaders/XCTest/XCUIElementAsynchronousHandlerWrapper.h rename to Server/PrivateHeaders/XCTest/XCUIInterruptionHandler.h index e80c4223..0059f884 100644 --- a/Server/PrivateHeaders/XCTest/XCUIElementAsynchronousHandlerWrapper.h +++ b/Server/PrivateHeaders/XCTest/XCUIInterruptionHandler.h @@ -16,17 +16,18 @@ @class NSString, NSUUID; -@interface XCUIElementAsynchronousHandlerWrapper : NSObject +@interface XCUIInterruptionHandler : NSObject { - CDUnknownBlockType _handler; + CDUnknownBlockType _block; NSString *_handlerDescription; NSUUID *_identifier; } -@property(copy) CDUnknownBlockType handler; -@property(copy) NSString *handlerDescription; -@property(copy) NSUUID *identifier; +@property(readonly, copy) CDUnknownBlockType block; +@property(readonly, copy) NSString *handlerDescription; +@property(readonly, copy) NSUUID *identifier; +- (id)initWithBlock:(CDUnknownBlockType)arg1 description:(id)arg2; @end diff --git a/Server/PrivateHeaders/XCTest/XCUIInterruptionMonitor.h b/Server/PrivateHeaders/XCTest/XCUIInterruptionMonitor.h new file mode 100644 index 00000000..1aaa4ffa --- /dev/null +++ b/Server/PrivateHeaders/XCTest/XCUIInterruptionMonitor.h @@ -0,0 +1,37 @@ +// class-dump results processed by bin/class-dump/dump.rb +// +// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). +// +// Copyright (C) 1997-2019 Steve Nygard. +// + +#import +#import +#import +#import "CDStructures.h" +@protocol OS_dispatch_queue; +@protocol OS_xpc_object; + +#import + +#import "XCUIInterruptionMonitoring-Protocol.h" + + +@interface XCUIInterruptionMonitor : NSObject +{ + BOOL _didHandleUIInterruption; + NSInteger _platform; +} + +@property BOOL didHandleUIInterruption; +@property(readonly) NSInteger platform; + ++ (CDUnknownBlockType)defaultInterruptionHandler_iOS; +- (id)addInterruptionHandlerWithDescription:(id)arg1 block:(CDUnknownBlockType)arg2; +- (BOOL)handleInterruptingElement:(id)arg1; +- (id)initWithPlatform:(NSInteger)arg1; +- (void)removeInterruptionHandlerWithIdentifier:(id)arg1; + + +@end + diff --git a/Server/PrivateHeaders/XCTest/_XCTContextImplementation.h b/Server/PrivateHeaders/XCTest/XCUIInterruptionMonitoring-Protocol.h similarity index 54% rename from Server/PrivateHeaders/XCTest/_XCTContextImplementation.h rename to Server/PrivateHeaders/XCTest/XCUIInterruptionMonitoring-Protocol.h index a6ff7b2a..5d8b2c85 100644 --- a/Server/PrivateHeaders/XCTest/_XCTContextImplementation.h +++ b/Server/PrivateHeaders/XCTest/XCUIInterruptionMonitoring-Protocol.h @@ -5,6 +5,7 @@ // Copyright (C) 1997-2019 Steve Nygard. // + #import #import #import @@ -12,19 +13,12 @@ @protocol OS_dispatch_queue; @protocol OS_xpc_object; -#import - -@class XCTActivityRecordStack, XCTestCase; - -@interface _XCTContextImplementation : NSObject -{ - XCTActivityRecordStack *_activityRecordStack; - XCTestCase *_testCase; -} - -@property(readonly) XCTActivityRecordStack *activityRecordStack; -@property __weak XCTestCase *testCase; - +@class NSString, XCUIElement; +@protocol NSObject; +@protocol XCUIInterruptionMonitoring +- (id )addInterruptionHandlerWithDescription:(NSString *)arg1 block:(BOOL (^)(XCUIElement *))arg2; +- (BOOL)handleInterruptingElement:(XCUIElement *)arg1; +- (void)removeInterruptionHandlerWithIdentifier:(id )arg1; @end diff --git a/Server/PrivateHeaders/XCTest/XCUIRemoteAccessibilityInterface-Protocol.h b/Server/PrivateHeaders/XCTest/XCUIRemoteAccessibilityInterface-Protocol.h index b7074cdc..a9d15f7f 100644 --- a/Server/PrivateHeaders/XCTest/XCUIRemoteAccessibilityInterface-Protocol.h +++ b/Server/PrivateHeaders/XCTest/XCUIRemoteAccessibilityInterface-Protocol.h @@ -19,7 +19,7 @@ - (void)enableFauxCollectionViewCells:(void (^)(BOOL, NSError *))arg1; - (void)fetchAttributes:(NSArray *)arg1 forElement:(XCAccessibilityElement *)arg2 reply:(void (^)(NSDictionary *, NSError *))arg3; - (void)fetchParameterizedAttribute:(NSString *)arg1 forElement:(XCAccessibilityElement *)arg2 parameter:(id)arg3 reply:(void (^)(id, NSError *))arg4; -- (void)fetchSnapshotForElement:(XCAccessibilityElement *)arg1 attributes:(NSArray *)arg2 parameters:(NSDictionary *)arg3 reply:(void (^)(XCUIElementSnapshotRequestResult *, NSError *))arg4; +- (void)fetchSnapshotForElement:(XCAccessibilityElement *)arg1 attributes:(NSArray *)arg2 parameters:(NSDictionary *)arg3 reply:(void (^)(NSDictionary *, NSError *))arg4; - (void)loadAccessibilityWithTimeout:(double)arg1 reply:(void (^)(BOOL, NSError *))arg2; - (void)performAccessibilityAction:(XCUIAccessibilityAction *)arg1 onElement:(XCAccessibilityElement *)arg2 value:(id)arg3 reply:(void (^)(NSError *))arg4; - (void)registerForAccessibilityNotification:(NSInteger)arg1 reply:(void (^)(NSNumber *, NSError *))arg2; diff --git a/Server/PrivateHeaders/XCTest/XCUIResetAuthorizationStatusOfProtectedResourcesInterface-Protocol.h b/Server/PrivateHeaders/XCTest/XCUIResetAuthorizationStatusOfProtectedResourcesInterface-Protocol.h new file mode 100644 index 00000000..f453a11e --- /dev/null +++ b/Server/PrivateHeaders/XCTest/XCUIResetAuthorizationStatusOfProtectedResourcesInterface-Protocol.h @@ -0,0 +1,13 @@ +// class-dump results processed by bin/class-dump/dump.rb +// +// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). +// +// Copyright (C) 1997-2019 Steve Nygard. +// + + + +@protocol XCUIResetAuthorizationStatusOfProtectedResourcesInterface +- (BOOL)resetAuthorizationStatusForBundleIdentifier:(NSString *)arg1 resourceIdentifier:(NSString *)arg2 error:(id *)arg3; +@end + diff --git a/Server/PrivateHeaders/XCTest/XCUITestContext.h b/Server/PrivateHeaders/XCTest/XCUITestContext.h deleted file mode 100644 index e00b7fb3..00000000 --- a/Server/PrivateHeaders/XCTest/XCUITestContext.h +++ /dev/null @@ -1,36 +0,0 @@ -// class-dump results processed by bin/class-dump/dump.rb -// -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). -// -// Copyright (C) 1997-2019 Steve Nygard. -// - -#import -#import -#import -#import "CDStructures.h" -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; - -#import - -@class NSArray, XCUITestContextScope; - -@interface XCUITestContext : NSObject -{ - BOOL _didHandleUIInterruption; - XCUITestContextScope *_currentScope; -} - -@property(retain, nonatomic) XCUITestContextScope *currentScope; -@property BOOL didHandleUIInterruption; -@property(readonly, copy) NSArray *handlers; - -+ (CDUnknownBlockType)defaultUIInterruptionMonitor_iOS; -- (id)addUIInterruptionMonitorWithDescription:(id)arg1 handler:(CDUnknownBlockType)arg2; -- (BOOL)handleAsynchronousUIElement:(id)arg1; -- (void)performInScope:(CDUnknownBlockType)arg1; -- (void)removeUIInterruptionMonitor:(id)arg1; - -@end - diff --git a/Server/PrivateHeaders/XCTest/XCUITestContextScope.h b/Server/PrivateHeaders/XCTest/XCUITestContextScope.h deleted file mode 100644 index 6ad5c600..00000000 --- a/Server/PrivateHeaders/XCTest/XCUITestContextScope.h +++ /dev/null @@ -1,31 +0,0 @@ -// class-dump results processed by bin/class-dump/dump.rb -// -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). -// -// Copyright (C) 1997-2019 Steve Nygard. -// - -#import -#import -#import -#import "CDStructures.h" -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; - -#import - -@class NSMutableArray; - -@interface XCUITestContextScope : NSObject -{ - XCUITestContextScope *_parentScope; - NSMutableArray *_handlers; -} - -@property(readonly, copy) NSMutableArray *handlers; -@property(readonly) XCUITestContextScope *parentScope; - -- (id)initWithParentScope:(id)arg1; - -@end - diff --git a/Server/PrivateHeaders/XCTest/_XCInternalTestRun.h b/Server/PrivateHeaders/XCTest/_XCInternalTestRun.h deleted file mode 100644 index 19f63747..00000000 --- a/Server/PrivateHeaders/XCTest/_XCInternalTestRun.h +++ /dev/null @@ -1,54 +0,0 @@ -// class-dump results processed by bin/class-dump/dump.rb -// -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). -// -// Copyright (C) 1997-2019 Steve Nygard. -// - -#import -#import -#import -#import "CDStructures.h" -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; - -#import - -@class NSDate, XCTest; - -@interface _XCInternalTestRun : NSObject -{ - XCTest *_test; - double _startTimeInterval; - double _stopTimeInterval; - NSUInteger _executionCount; - NSUInteger _failureCount; - NSUInteger _unexpectedExceptionCount; - BOOL _hasStarted; - BOOL _hasStopped; - NSUInteger _executionCountBeforeCrash; - NSUInteger _failureCountBeforeCrash; - NSUInteger _unexpectedExceptionCountBeforeCrash; -} - -@property(readonly) NSUInteger executionCount; -@property NSUInteger executionCountBeforeCrash; -@property(readonly) NSUInteger failureCount; -@property NSUInteger failureCountBeforeCrash; -@property(readonly) BOOL hasStopped; -@property NSUInteger unexpectedExceptionCountBeforeCrash; -@property(readonly, copy) NSDate *startDate; -@property(readonly, copy) NSDate *stopDate; -@property(readonly) XCTest *test; -@property(readonly) NSUInteger testCaseCount; -@property(readonly) double testDuration; -@property(readonly) double totalDuration; -@property(readonly) NSUInteger unexpectedExceptionCount; - -- (id)initWithTest:(id)arg1; -- (void)recordFailureWithDescription:(id)arg1 inFile:(id)arg2 atLine:(NSUInteger)arg3 expected:(BOOL)arg4; -- (void)start; -- (void)stop; - -@end - diff --git a/Server/PrivateHeaders/XCTest/_XCKVOExpectationImplementation.h b/Server/PrivateHeaders/XCTest/_XCKVOExpectationImplementation.h deleted file mode 100644 index c80088ba..00000000 --- a/Server/PrivateHeaders/XCTest/_XCKVOExpectationImplementation.h +++ /dev/null @@ -1,43 +0,0 @@ -// class-dump results processed by bin/class-dump/dump.rb -// -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). -// -// Copyright (C) 1997-2019 Steve Nygard. -// - -#import -#import -#import -#import "CDStructures.h" -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; - -#import - -@class NSString, XCTKVOExpectation; -@protocol OS_dispatch_queue; - -@interface _XCKVOExpectationImplementation : NSObject -{ - XCTKVOExpectation *_expectation; - id _observedObject; - NSString *_keyPath; - id _expectedValue; - NSUInteger _options; - CDUnknownBlockType _handler; - NSObject *_queue; - BOOL _hasCleanedUp; -} - -@property(readonly) id expectedValue; -@property(copy) CDUnknownBlockType handler; -@property(readonly, copy) NSString *keyPath; -@property(readonly) id observedObject; -@property(readonly) NSUInteger options; - -- (void)cleanup; -- (id)initWithKeyPath:(id)arg1 object:(id)arg2 expectedValue:(id)arg3 expectation:(id)arg4 options:(NSUInteger)arg5; -- (void)observeValueForKeyPath:(id)arg1 ofObject:(id)arg2 change:(id)arg3 context:(void *)arg4; - -@end - diff --git a/Server/PrivateHeaders/XCTest/_XCTAttachmentImplementation.h b/Server/PrivateHeaders/XCTest/_XCTAttachmentImplementation.h deleted file mode 100644 index 975f0b49..00000000 --- a/Server/PrivateHeaders/XCTest/_XCTAttachmentImplementation.h +++ /dev/null @@ -1,44 +0,0 @@ -// class-dump results processed by bin/class-dump/dump.rb -// -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). -// -// Copyright (C) 1997-2019 Steve Nygard. -// - -#import -#import -#import -#import "CDStructures.h" -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; - -#import - -@class NSData, NSDate, NSDictionary, NSString; - -@interface _XCTAttachmentImplementation : NSObject -{ - NSString *_uniformTypeIdentifier; - NSInteger _lifetime; - NSString *_name; - NSDate *_timestamp; - NSDictionary *_userInfo; - NSData *_payload; - NSString *_fileNameOverride; - CDUnknownBlockType _serializationBlock; - BOOL _hasPayload; -} - -@property(copy) NSString *fileNameOverride; -@property BOOL hasPayload; -@property NSInteger lifetime; -@property(copy) NSString *name; -@property(copy) NSData *payload; -@property(copy) CDUnknownBlockType serializationBlock; -@property(copy) NSDate *timestamp; -@property(copy) NSString *uniformTypeIdentifier; -@property(copy) NSDictionary *userInfo; - - -@end - diff --git a/Server/PrivateHeaders/XCTest/_XCTCompoundExpectationImplementation.h b/Server/PrivateHeaders/XCTest/_XCTCompoundExpectationImplementation.h deleted file mode 100644 index 92bce8ad..00000000 --- a/Server/PrivateHeaders/XCTest/_XCTCompoundExpectationImplementation.h +++ /dev/null @@ -1,32 +0,0 @@ -// class-dump results processed by bin/class-dump/dump.rb -// -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). -// -// Copyright (C) 1997-2019 Steve Nygard. -// - -#import -#import -#import -#import "CDStructures.h" -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; - -#import - -@class NSArray; - -@interface _XCTCompoundExpectationImplementation : NSObject -{ - NSUInteger _logicalType; - NSArray *_subexpectations; -} - -@property(readonly, nonatomic) NSUInteger logicalType; -@property(readonly, copy, nonatomic) NSArray *subexpectations; - -- (void)cleanup; -- (id)initWithLogicalType:(NSUInteger)arg1 subexpectations:(id)arg2; - -@end - diff --git a/Server/PrivateHeaders/XCTest/_XCTDarwinNotificationExpectationImplementation.h b/Server/PrivateHeaders/XCTest/_XCTDarwinNotificationExpectationImplementation.h deleted file mode 100644 index bd3bce64..00000000 --- a/Server/PrivateHeaders/XCTest/_XCTDarwinNotificationExpectationImplementation.h +++ /dev/null @@ -1,38 +0,0 @@ -// class-dump results processed by bin/class-dump/dump.rb -// -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). -// -// Copyright (C) 1997-2019 Steve Nygard. -// - -#import -#import -#import -#import "CDStructures.h" -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; - -#import - -@class NSString, XCTDarwinNotificationExpectation; -@protocol OS_dispatch_queue; - -@interface _XCTDarwinNotificationExpectationImplementation : NSObject -{ - XCTDarwinNotificationExpectation *_expectation; - NSString *_notificationName; - NSInteger _notifyToken; - CDUnknownBlockType _handler; - NSObject *_queue; - BOOL _hasCleanedUp; -} - -@property(copy) CDUnknownBlockType handler; -@property(readonly, copy) NSString *notificationName; - -- (void)_handleNotification; -- (void)cleanup; -- (id)initWithNotificationName:(id)arg1 expectation:(id)arg2; - -@end - diff --git a/Server/PrivateHeaders/XCTest/_XCTImageImplementation.h b/Server/PrivateHeaders/XCTest/_XCTImageImplementation.h deleted file mode 100644 index df8a5358..00000000 --- a/Server/PrivateHeaders/XCTest/_XCTImageImplementation.h +++ /dev/null @@ -1,34 +0,0 @@ -// class-dump results processed by bin/class-dump/dump.rb -// -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). -// -// Copyright (C) 1997-2019 Steve Nygard. -// - -#import -#import -#import -#import "CDStructures.h" -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; - -#import - -@class NSData, NSString, UIImage; - -@interface _XCTImageImplementation : NSObject -{ - UIImage *_platformImage; - NSData *_originalData; - NSString *_name; - double _scale; -} - -@property(copy) NSString *name; -@property(copy) NSData *originalData; -@property(copy) UIImage *platformImage; -@property double scale; - - -@end - diff --git a/Server/PrivateHeaders/XCTest/_XCTNSNotificationExpectationImplementation.h b/Server/PrivateHeaders/XCTest/_XCTNSNotificationExpectationImplementation.h deleted file mode 100644 index 66254d32..00000000 --- a/Server/PrivateHeaders/XCTest/_XCTNSNotificationExpectationImplementation.h +++ /dev/null @@ -1,41 +0,0 @@ -// class-dump results processed by bin/class-dump/dump.rb -// -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). -// -// Copyright (C) 1997-2019 Steve Nygard. -// - -#import -#import -#import -#import "CDStructures.h" -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; - -#import - -@class NSNotificationCenter, NSString, XCTNSNotificationExpectation; -@protocol OS_dispatch_queue; - -@interface _XCTNSNotificationExpectationImplementation : NSObject -{ - XCTNSNotificationExpectation *_expectation; - id _observedObject; - NSString *_notificationName; - NSNotificationCenter *_notificationCenter; - CDUnknownBlockType _handler; - NSObject *_queue; - BOOL _hasCleanedUp; -} - -@property(copy) CDUnknownBlockType handler; -@property(readonly) NSNotificationCenter *notificationCenter; -@property(readonly, copy) NSString *notificationName; -@property(readonly) id observedObject; - -- (void)_observeExpectedNotification:(id)arg1; -- (void)cleanup; -- (id)initWithName:(id)arg1 object:(id)arg2 notificationCenter:(id)arg3 expectation:(id)arg4; - -@end - diff --git a/Server/PrivateHeaders/XCTest/_XCTNSPredicateExpectationImplementation.h b/Server/PrivateHeaders/XCTest/_XCTNSPredicateExpectationImplementation.h deleted file mode 100644 index e406847e..00000000 --- a/Server/PrivateHeaders/XCTest/_XCTNSPredicateExpectationImplementation.h +++ /dev/null @@ -1,49 +0,0 @@ -// class-dump results processed by bin/class-dump/dump.rb -// -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). -// -// Copyright (C) 1997-2019 Steve Nygard. -// - -#import -#import -#import -#import "CDStructures.h" -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; - -#import - -@class NSPredicate, NSRunLoop, NSString, NSTimer, XCTNSPredicateExpectation; -@protocol OS_dispatch_queue, XCTNSPredicateExpectationObject; - -@interface _XCTNSPredicateExpectationImplementation : NSObject -{ - XCTNSPredicateExpectation *_expectation; - id _object; - NSPredicate *_predicate; - CDUnknownBlockType _handler; - NSRunLoop *_timerRunLoop; - NSTimer *_timer; - double _pollingInterval; - NSString *_debugDescription; - NSObject *_queue; - BOOL _hasCleanedUp; - BOOL _isEvaluating; -} - -@property(copy) NSString *debugDescription; -@property(copy) CDUnknownBlockType handler; -@property(readonly) id object; -@property double pollingInterval; -@property(readonly, copy) NSPredicate *predicate; - -- (void)_considerFulfilling; -- (void)_scheduleTimer; -- (BOOL)_shouldFulfillForExpectation:(id)arg1 object:(id)arg2 handler:(CDUnknownBlockType)arg3; -- (void)cleanup; -- (id)initWithPredicate:(id)arg1 object:(id)arg2 expectation:(id)arg3; -- (void)startPolling; - -@end - diff --git a/Server/PrivateHeaders/XCTest/_XCTRunnerDaemonSessionDummyExportedObject.h b/Server/PrivateHeaders/XCTest/_XCTRunnerDaemonSessionDummyExportedObject.h new file mode 100644 index 00000000..50f7cbfd --- /dev/null +++ b/Server/PrivateHeaders/XCTest/_XCTRunnerDaemonSessionDummyExportedObject.h @@ -0,0 +1,28 @@ +// class-dump results processed by bin/class-dump/dump.rb +// +// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). +// +// Copyright (C) 1997-2019 Steve Nygard. +// + +#import +#import +#import +#import "CDStructures.h" +@protocol OS_dispatch_queue; +@protocol OS_xpc_object; + +#import + +#import "XCTestManager_TestsInterface-Protocol.h" + +@interface _XCTRunnerDaemonSessionDummyExportedObject : NSObject +{ +} + +- (void)_XCT_applicationWithBundleID:(id)arg1 didUpdatePID:(NSInteger)arg2 andState:(NSUInteger)arg3; +- (void)_XCT_receivedAccessibilityNotification:(NSInteger)arg1 fromElement:(id)arg2 payload:(id)arg3; +- (void)_XCT_receivedAccessibilityNotification:(NSInteger)arg1 withPayload:(id)arg2; + +@end + diff --git a/Server/PrivateHeaders/XCTAutomationSupport/XCTAccessibilityInterface.h b/Server/PrivateHeaders/XCTest/_XCTSkipFailureException.h similarity index 73% rename from Server/PrivateHeaders/XCTAutomationSupport/XCTAccessibilityInterface.h rename to Server/PrivateHeaders/XCTest/_XCTSkipFailureException.h index 70bb65af..2f466a7e 100644 --- a/Server/PrivateHeaders/XCTAutomationSupport/XCTAccessibilityInterface.h +++ b/Server/PrivateHeaders/XCTest/_XCTSkipFailureException.h @@ -5,6 +5,7 @@ // Copyright (C) 1997-2019 Steve Nygard. // + #import #import #import @@ -12,13 +13,11 @@ @protocol OS_dispatch_queue; @protocol OS_xpc_object; -#import - -@interface XCTAccessibilityInterface : NSObject +@interface _XCTSkipFailureException : NSException { } -+ (id)attributesForElement:(id)arg1 attributes:(id)arg2 error:(id *)arg3; ++ (void)raiseWithContext:(id)arg1; @end diff --git a/Server/PrivateHeaders/XCTest/_XCTWaiterImpl.h b/Server/PrivateHeaders/XCTest/_XCTWaiterImpl.h deleted file mode 100644 index 95649817..00000000 --- a/Server/PrivateHeaders/XCTest/_XCTWaiterImpl.h +++ /dev/null @@ -1,52 +0,0 @@ -// class-dump results processed by bin/class-dump/dump.rb -// -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). -// -// Copyright (C) 1997-2019 Steve Nygard. -// - -#import -#import -#import -#import "CDStructures.h" -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; - -#import - -@class NSArray, NSMutableArray, XCTWaiterManager; -@protocol OS_dispatch_queue, XCTWaiterDelegate; - - -@protocol XCTWaiterDelegate; - -@interface _XCTWaiterImpl : NSObject -{ - id _delegate; - XCTWaiterManager *_manager; - NSArray *_waitCallStackReturnAddresses; - NSObject *_delegateQueue; - NSArray *_expectations; - NSMutableArray *_fulfilledExpectations; - struct __CFRunLoop *_waitingRunLoop; - NSInteger _state; - double _timeout; - NSInteger _result; - BOOL _enforceOrderOfFulfillment; -} - -@property id delegate; -@property(readonly, nonatomic) NSObject *delegateQueue; -@property BOOL enforceOrderOfFulfillment; -@property(copy, nonatomic) NSArray *expectations; -@property(readonly, nonatomic) NSMutableArray *fulfilledExpectations; -@property XCTWaiterManager *manager; -@property NSInteger result; -@property NSInteger state; -@property double timeout; -@property(copy) NSArray *waitCallStackReturnAddresses; -@property struct __CFRunLoop *waitingRunLoop; - - -@end - diff --git a/Server/PrivateHeaders/XCTest/_XCTestCaseImplementation.h b/Server/PrivateHeaders/XCTest/_XCTestCaseImplementation.h index 613b4e11..7fba6e85 100644 --- a/Server/PrivateHeaders/XCTest/_XCTestCaseImplementation.h +++ b/Server/PrivateHeaders/XCTest/_XCTestCaseImplementation.h @@ -1,87 +1,70 @@ -// class-dump results processed by bin/class-dump/dump.rb // -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). +// Generated by class-dump 3.5 (64 bit). // -// Copyright (C) 1997-2019 Steve Nygard. +// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // -#import -#import -#import -#import "CDStructures.h" -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; - -#import +@class NSArray, NSInvocation, NSMutableArray, NSMutableDictionary, NSMutableSet, NSString, XCTestCaseRun, XCTestContext, XCTestExpectationWaiter, XCTWaiter; -@class MXMInstrument, NSArray, NSDictionary, NSInvocation, NSMutableArray, NSMutableDictionary, NSString, NSThread, XCTAttachmentManager, XCTWaiter, XCTestCaseRun; +#import "CDStructures.h" @interface _XCTestCaseImplementation : NSObject { NSInvocation *_invocation; - NSThread *_primaryThread; XCTestCaseRun *_testCaseRun; BOOL _continueAfterFailure; - NSMutableArray *_expectations; + NSMutableSet *_expectations; NSArray *_activePerformanceMetricIDs; NSMutableDictionary *_perfMetricsForID; - NSUInteger _startWallClockTime; + unsigned long long _startWallClockTime; struct time_value _startUserTime; struct time_value _startSystemTime; - NSUInteger _measuringIteration; + unsigned long long _measuringIteration; BOOL _isMeasuringMetrics; BOOL _didMeasureMetrics; BOOL _didStartMeasuring; BOOL _didStopMeasuring; - MXMInstrument *_instrument; - NSString *_filePathForNestedFailure; - NSUInteger _lineNumberForNestedFailure; - NSInteger _runLoopNestingCount; + NSString *_filePathForUnexpectedFailure; + unsigned long long _lineNumberForUnexpectedFailure; + unsigned long long _callAddressForCurrentWait; + NSArray *_callAddressesForLastCreatedExpectation; + long long _runLoopNestingCount; XCTWaiter *_currentWaiter; NSMutableArray *_failureRecords; BOOL _shouldHaltWhenReceivesControl; - BOOL _shouldSetShouldHaltWhenReceivesControl; BOOL _shouldIgnoreSubsequentFailures; - NSMutableArray *_teardownBlocks; - BOOL _hasDequeuedTeardownBlocks; - BOOL _hasAttemptedToCaptureScreenshotOnFailure; - XCTAttachmentManager *_attachmentManager; - NSDictionary *_activityAggregateStatistics; + NSMutableArray *_activityRecordStack; + XCTestContext *_testContext; } -@property(copy) NSArray *activePerformanceMetricIDs; -@property(copy) NSDictionary *activityAggregateStatistics; -@property(retain) XCTAttachmentManager *attachmentManager; -@property BOOL continueAfterFailure; -@property(retain, nonatomic) XCTWaiter *currentWaiter; -@property BOOL didMeasureMetrics; -@property BOOL didStartMeasuring; -@property BOOL didStopMeasuring; -@property(retain, nonatomic) NSMutableArray *expectations; -@property(retain, nonatomic) NSMutableArray *failureRecords; -@property(copy) NSString *filePathForNestedFailure; -@property BOOL hasAttemptedToCaptureScreenshotOnFailure; -@property BOOL hasDequeuedTeardownBlocks; -@property(retain) MXMInstrument *instrument; -@property(retain) NSInvocation *invocation; -@property BOOL isMeasuringMetrics; -@property NSUInteger lineNumberForNestedFailure; -@property NSUInteger measuringIteration; -@property(retain) NSMutableDictionary *perfMetricsForID; -@property(retain) NSThread *primaryThread; -@property NSInteger runLoopNestingCount; -@property BOOL shouldHaltWhenReceivesControl; -@property BOOL shouldIgnoreSubsequentFailures; -@property BOOL shouldSetShouldHaltWhenReceivesControl; -@property struct time_value startSystemTime; -@property struct time_value startUserTime; -@property NSUInteger startWallClockTime; -@property(retain) XCTestCaseRun *testCaseRun; -@property(readonly) NSMutableArray *teardownBlocks; +@property(readonly) XCTestContext *testContext; // @synthesize testContext=_testContext; +@property(retain, nonatomic) XCTWaiter *currentWaiter; // @synthesize currentWaiter=_currentWaiter; +@property(retain, nonatomic) NSMutableArray *activityRecordStack; // @synthesize activityRecordStack=_activityRecordStack; +@property BOOL shouldIgnoreSubsequentFailures; // @synthesize shouldIgnoreSubsequentFailures=_shouldIgnoreSubsequentFailures; +@property BOOL shouldHaltWhenReceivesControl; // @synthesize shouldHaltWhenReceivesControl=_shouldHaltWhenReceivesControl; +@property(retain, nonatomic) NSMutableArray *failureRecords; // @synthesize failureRecords=_failureRecords; +@property long long runLoopNestingCount; // @synthesize runLoopNestingCount=_runLoopNestingCount; +@property(copy) NSArray *callAddressesForLastCreatedExpectation; // @synthesize callAddressesForLastCreatedExpectation=_callAddressesForLastCreatedExpectation; +@property unsigned long long callAddressForCurrentWait; // @synthesize callAddressForCurrentWait=_callAddressForCurrentWait; +@property unsigned long long lineNumberForUnexpectedFailure; // @synthesize lineNumberForUnexpectedFailure=_lineNumberForUnexpectedFailure; +@property(copy) NSString *filePathForUnexpectedFailure; // @synthesize filePathForUnexpectedFailure=_filePathForUnexpectedFailure; +@property(retain, nonatomic) NSMutableSet *expectations; // @synthesize expectations=_expectations; +@property BOOL didStopMeasuring; // @synthesize didStopMeasuring=_didStopMeasuring; +@property BOOL didStartMeasuring; // @synthesize didStartMeasuring=_didStartMeasuring; +@property BOOL didMeasureMetrics; // @synthesize didMeasureMetrics=_didMeasureMetrics; +@property BOOL isMeasuringMetrics; // @synthesize isMeasuringMetrics=_isMeasuringMetrics; +@property unsigned long long measuringIteration; // @synthesize measuringIteration=_measuringIteration; +@property struct time_value startUserTime; // @synthesize startUserTime=_startUserTime; +@property struct time_value startSystemTime; // @synthesize startSystemTime=_startSystemTime; +@property unsigned long long startWallClockTime; // @synthesize startWallClockTime=_startWallClockTime; +@property(retain) NSMutableDictionary *perfMetricsForID; // @synthesize perfMetricsForID=_perfMetricsForID; +@property(copy) NSArray *activePerformanceMetricIDs; // @synthesize activePerformanceMetricIDs=_activePerformanceMetricIDs; +@property BOOL continueAfterFailure; // @synthesize continueAfterFailure=_continueAfterFailure; +@property(retain) XCTestCaseRun *testCaseRun; // @synthesize testCaseRun=_testCaseRun; +@property(retain) NSInvocation *invocation; // @synthesize invocation=_invocation; -- (void)addExpectation:(id)arg1; - (void)resetExpectations; -- (void)resetExpectationsInArray:(id)arg1; +- (void)addExpectation:(id)arg1; +- (id)init; @end - diff --git a/Server/PrivateHeaders/XCTest/_XCTestExpectationImplementation.h b/Server/PrivateHeaders/XCTest/_XCTestExpectationImplementation.h deleted file mode 100644 index c39b7a6c..00000000 --- a/Server/PrivateHeaders/XCTest/_XCTestExpectationImplementation.h +++ /dev/null @@ -1,54 +0,0 @@ -// class-dump results processed by bin/class-dump/dump.rb -// -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). -// -// Copyright (C) 1997-2019 Steve Nygard. -// - -#import -#import -#import -#import "CDStructures.h" -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; - -#import - -@class NSArray, NSString; -@protocol XCTestExpectationDelegate; - - -@protocol XCTestExpectationDelegate; - -@interface _XCTestExpectationImplementation : NSObject -{ - BOOL _fulfilled; - NSString *_expectationDescription; - id _delegate; - BOOL _hasBeenWaitedOn; - NSUInteger _expectedFulfillmentCount; - NSUInteger _numberOfFulfillments; - NSUInteger _creationToken; - NSUInteger _fulfillmentToken; - NSArray *_creationCallStackReturnAddresses; - NSArray *_fulfillCallStackReturnAddresses; - BOOL _inverted; - BOOL _assertForOverFulfill; -} - -@property BOOL assertForOverFulfill; -@property(copy) NSArray *creationCallStackReturnAddresses; -@property NSUInteger creationToken; -@property(retain) id delegate; -@property(copy) NSString *expectationDescription; -@property(nonatomic) NSUInteger expectedFulfillmentCount; -@property(copy) NSArray *fulfillCallStackReturnAddresses; -@property BOOL fulfilled; -@property NSUInteger fulfillmentToken; -@property BOOL hasBeenWaitedOn; -@property BOOL inverted; -@property(nonatomic) NSUInteger numberOfFulfillments; - - -@end - diff --git a/Server/PrivateHeaders/XCTest/_XCTestObservationPrivate-Protocol.h b/Server/PrivateHeaders/XCTest/_XCTestObservationPrivate-Protocol.h index c9ce80ad..75d19be9 100644 --- a/Server/PrivateHeaders/XCTest/_XCTestObservationPrivate-Protocol.h +++ b/Server/PrivateHeaders/XCTest/_XCTestObservationPrivate-Protocol.h @@ -5,7 +5,6 @@ // Copyright (C) 1997-2019 Steve Nygard. // - #import #import #import @@ -13,13 +12,16 @@ @protocol OS_dispatch_queue; @protocol OS_xpc_object; +#import "XCTestObservation-Protocol.h" + @class NSArray, NSNumber, NSString, XCActivityRecord, XCTestCase, XCTestRun; -@protocol _XCTestObservationPrivate +@protocol _XCTestObservationPrivate @optional - (void)_testCase:(XCTestCase *)arg1 didFinishActivity:(XCActivityRecord *)arg2; - (void)_testCase:(XCTestRun *)arg1 didMeasureValues:(NSArray *)arg2 forPerformanceMetricID:(NSString *)arg3 name:(NSString *)arg4 unitsOfMeasurement:(NSString *)arg5 baselineName:(NSString *)arg6 baselineAverage:(NSNumber *)arg7 maxPercentRegression:(NSNumber *)arg8 maxPercentRelativeStandardDeviation:(NSNumber *)arg9 maxRegression:(NSNumber *)arg10 maxStandardDeviation:(NSNumber *)arg11 file:(NSString *)arg12 line:(NSUInteger)arg13; - (void)_testCase:(XCTestCase *)arg1 willStartActivity:(XCActivityRecord *)arg2; +- (void)testCase:(XCTestCase *)arg1 wasSkippedWithDescription:(NSString *)arg2 inFile:(NSString *)arg3 atLine:(NSUInteger)arg4; @end diff --git a/Server/PrivateHeaders/XCTest/_XCTestSuiteImplementation.h b/Server/PrivateHeaders/XCTest/_XCTestSuiteImplementation.h deleted file mode 100644 index ccbed9bb..00000000 --- a/Server/PrivateHeaders/XCTest/_XCTestSuiteImplementation.h +++ /dev/null @@ -1,35 +0,0 @@ -// class-dump results processed by bin/class-dump/dump.rb -// -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). -// -// Copyright (C) 1997-2019 Steve Nygard. -// - -#import -#import -#import -#import "CDStructures.h" -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; - -#import "XCTest.h" - -@class NSMutableArray, NSMutableDictionary, NSString, XCTestConfiguration; - -@interface _XCTestSuiteImplementation : XCTest -{ - NSString *_name; - NSMutableArray *_tests; - XCTestConfiguration *_testConfiguration; - NSMutableDictionary *_activityAggregateStatistics; -} - -@property(readonly) NSMutableDictionary *activityAggregateStatistics; -@property(copy) NSString *name; -@property(retain) XCTestConfiguration *testConfiguration; -@property(retain) NSMutableArray *tests; - -- (id)initWithName:(id)arg1; - -@end - From 928e9af81164b40ac14194eff4bdc0a736753d2e Mon Sep 17 00:00:00 2001 From: sergey-plevako-badoo Date: Thu, 19 Mar 2020 21:08:22 +0000 Subject: [PATCH 03/53] Update DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h Co-Authored-By: Joshua Moody --- DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h b/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h index 8bf06b2a..1fa72416 100644 --- a/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h +++ b/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h @@ -6,7 +6,8 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ - +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. #import @class _XCTestCaseImplementation; From 398af29f1d1fcd39cafa3ae99b7b97512bbd43bb Mon Sep 17 00:00:00 2001 From: sergey-plevako-badoo Date: Thu, 19 Mar 2020 21:08:35 +0000 Subject: [PATCH 04/53] Update DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m Co-Authored-By: Joshua Moody --- DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m b/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m index 25d8feee..8488aee8 100644 --- a/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m +++ b/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m @@ -6,7 +6,8 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ - +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. #import "FBXCTestCaseImplementationFailureHoldingProxy.h" #import "_XCTestCaseImplementation.h" From 3a187f197b9a7133c96ecc6053b9e00bc818c506 Mon Sep 17 00:00:00 2001 From: Sergey Plevako Date: Thu, 19 Mar 2020 21:15:21 +0000 Subject: [PATCH 05/53] fixed the code review comments --- DeviceAgent/FBFailureProofTestCase.h | 5 +++-- DeviceAgent/FBFailureProofTestCase.m | 5 ++++- DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h | 3 +++ DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m | 3 +++ Server/Application/Application.h | 1 - 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/DeviceAgent/FBFailureProofTestCase.h b/DeviceAgent/FBFailureProofTestCase.h index e6e08790..e842b976 100644 --- a/DeviceAgent/FBFailureProofTestCase.h +++ b/DeviceAgent/FBFailureProofTestCase.h @@ -19,7 +19,7 @@ // Licensed under the MIT license. #import -#import "XCTestCase.h" +#import "XCTest/XCTestCase.h" @class _XCTestCaseImplementation; @@ -29,7 +29,8 @@ NS_ASSUME_NONNULL_BEGIN - (_XCTestCaseImplementation *)internalImplementation; - (void)setInternalImplementation:(_XCTestCaseImplementation *)implementation; - +@property(nonatomic) BOOL shouldHaltWhenReceivesControl; +@property(nonatomic) BOOL shouldSetShouldHaltWhenReceivesControl; @end /** diff --git a/DeviceAgent/FBFailureProofTestCase.m b/DeviceAgent/FBFailureProofTestCase.m index 56611825..d8d4db5f 100644 --- a/DeviceAgent/FBFailureProofTestCase.m +++ b/DeviceAgent/FBFailureProofTestCase.m @@ -15,6 +15,9 @@ * source tree under Licenses/. */ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + #import "FBFailureProofTestCase.h" #import "FBXCTestCaseImplementationFailureHoldingProxy.h" @@ -37,7 +40,7 @@ - (void)setUp { self.shouldHaltWhenReceivesControl = NO; } } - + /** Private XCTestCase method used to block and tunnel failure messages */ diff --git a/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h b/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h index 8bf06b2a..915c7280 100644 --- a/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h +++ b/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.h @@ -7,6 +7,9 @@ * of patent rights can be found in the PATENTS file in the same directory. */ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + #import @class _XCTestCaseImplementation; diff --git a/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m b/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m index 25d8feee..69775676 100644 --- a/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m +++ b/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m @@ -7,6 +7,9 @@ * of patent rights can be found in the PATENTS file in the same directory. */ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + #import "FBXCTestCaseImplementationFailureHoldingProxy.h" #import "_XCTestCaseImplementation.h" diff --git a/Server/Application/Application.h b/Server/Application/Application.h index 51470e57..b14a5a83 100644 --- a/Server/Application/Application.h +++ b/Server/Application/Application.h @@ -5,7 +5,6 @@ #import #import #import "XCTest+CBXAdditions.h" -#import "CBX-XCTest-Umbrella.h" @class XCUIApplication; From 59fbe0dd3b48d12c97ceaa25b9771bcf4dc8489b Mon Sep 17 00:00:00 2001 From: Joshua Moody Date: Fri, 20 Mar 2020 09:51:17 +0100 Subject: [PATCH 06/53] docs: requires at least Xcode 10.3.1 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c04263fe..8fd0d0f7 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ### Requirements -* Xcode >= 10.2.1 +* Xcode >= 10.3.1 * ruby >= 2.3 ### Code Signing From de58e0e4dae8039860fe9d6934b6fe554398ec6f Mon Sep 17 00:00:00 2001 From: Joshua Moody Date: Fri, 20 Mar 2020 09:51:49 +0100 Subject: [PATCH 07/53] docs: requires at least macOS Mojave --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8fd0d0f7..3ed69f51 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ ### Requirements * Xcode >= 10.3.1 +* macOS Mojave or higher * ruby >= 2.3 ### Code Signing From 96e0c697106fe3eb073115d16636f5bce5b2e042 Mon Sep 17 00:00:00 2001 From: Joshua Moody Date: Fri, 20 Mar 2020 09:55:56 +0100 Subject: [PATCH 08/53] docs: add Xcode 11.4 attribution to changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a51e6392..2f15f606 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### ??? + +* Add support for Xcode 11.4 beta 3 #377 Thanks @sergey-plevako-badoo + ### 2.1.0 Fixes various problems in dismiss-SpringBoard-alert system. From d004ca287c02b4eecdcb989d537ea4978b0ff69e Mon Sep 17 00:00:00 2001 From: Joshua Moody Date: Fri, 20 Mar 2020 10:20:54 +0100 Subject: [PATCH 09/53] ado: run most tests against Catalina --- azure-pipelines.yml | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 206be5a8..33852615 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,16 +1,7 @@ variables: # When Agent.JobName matches this value (and the git ref is a tag), then # built artifacts will be published to Azure Blob Storage. - # - # We cannot build with Xcode 11 because of this bug: - # REGRESSION: Xcode 11 (xcodebuild) fails to perform gestures during UI - # Tests on iPhones/iPads with iOS versions 11.0.x - 11.3.x - - # "unable to fetch parameterized attribute" - # FB7315854 - # - # Apple has fixed this bug in Xcode 11.2. When that is released, we should - # change this to 'Mojave-Xcode-11.2" - AzurePublishWhen: "Mojave-Xcode-11.2" + AzurePublishWhen: "Catalina-Xcode-11.3" trigger: tags: @@ -33,16 +24,19 @@ jobs: matrix: Mojave-Xcode-10.3: IMAGE_POOL: 'macOS-10.14' - XCODE_VERSION: '10.3' - Mojave-Xcode-11.0: - IMAGE_POOL: 'macOS-10.14' + XCODE_VERSION: '11.3' + Catalina-Xcode-11.0: + IMAGE_POOL: 'macOS-10.15' XCODE_VERSION: '11' - Mojave-Xcode-11.1: - IMAGE_POOL: 'macOS-10.14' + Catalina-Xcode-11.1: + IMAGE_POOL: 'macOS-10.15' XCODE_VERSION: '11.1' - Mojave-Xcode-11.2: - IMAGE_POOL: 'macOS-10.14' + Catalina-Xcode-11.2: + IMAGE_POOL: 'macOS-10.15' XCODE_VERSION: '11.2' + Catalina-Xcode-11.3: + IMAGE_POOL: 'macOS-10.15' + XCODE_VERSION: '11.3' pool: vmImage: $(IMAGE_POOL) variables: @@ -58,7 +52,6 @@ jobs: echo "Xcode select path: $(xcode-select --print-path)" displayName: "Select Xcode $(XCODE_VERSION)" - - script: | set -e ruby -v From c7354698c7800c072b7f59b66c607bc65eff17b3 Mon Sep 17 00:00:00 2001 From: Joshua Moody Date: Fri, 20 Mar 2020 10:21:56 +0100 Subject: [PATCH 10/53] ci/cucumber: use 'bundle info' - 'show' is deprecated --- bin/ci/cucumber.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/ci/cucumber.rb b/bin/ci/cucumber.rb index 9cc871e1..db08d939 100755 --- a/bin/ci/cucumber.rb +++ b/bin/ci/cucumber.rb @@ -13,10 +13,11 @@ require "run_loop" require "fileutils" - hash = RunLoop::Shell.run_shell_command(["bundle", "show", "run_loop"], + hash = RunLoop::Shell.run_shell_command(["bundle", "info", "--path", "run_loop"], {log_cmd: true}) - - target = File.join(hash[:out].strip, + lines = File.join(hash[:out].strip) + last_line = lines.split("\n")[-1] + target = File.join(last_line, "lib", "run_loop", "device_agent", "app", "DeviceAgent-Runner.app") source = File.join("..", "Products", "app", "DeviceAgent", From eacd1a227605be1aefa20eee1db0c13b88b65e6e Mon Sep 17 00:00:00 2001 From: Joshua Moody Date: Mon, 23 Mar 2020 11:04:33 +0100 Subject: [PATCH 11/53] ado: use Bundler.with_unbundled_env with_clean_env is deprecated --- bin/ci/cucumber.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ci/cucumber.rb b/bin/ci/cucumber.rb index db08d939..e348fb2a 100755 --- a/bin/ci/cucumber.rb +++ b/bin/ci/cucumber.rb @@ -5,7 +5,7 @@ require "bundler" -Bundler.with_clean_env do +Bundler.with_unbundled_env do Dir.chdir(working_directory) do system("bundle update") From b9d90bd3c7e73c8f4c5f6a9982028d8d7f305a6d Mon Sep 17 00:00:00 2001 From: Brad Milne Date: Wed, 8 Apr 2020 11:36:09 +1200 Subject: [PATCH 12/53] Add alerts new in Xcode 11.4 --- .../springboard-alerts-ar.dataset/alerts.json | 23 +++++++++ .../springboard-alerts-ca.dataset/alerts.json | 23 +++++++++ .../springboard-alerts-cs.dataset/alerts.json | 14 +++++ .../springboard-alerts-de.dataset/alerts.json | 30 +++++++++++ .../springboard-alerts-el.dataset/alerts.json | 23 +++++++++ .../springboard-alerts-en.dataset/alerts.json | 23 +++++++++ .../alerts.json | 23 +++++++++ .../alerts.json | 23 +++++++++ .../alerts.json | 9 ++++ .../springboard-alerts-es.dataset/alerts.json | 16 ++++++ .../alerts.json | 23 +++++++++ .../springboard-alerts-fr.dataset/alerts.json | 30 +++++++++++ .../alerts.json | 23 +++++++++ .../springboard-alerts-he.dataset/alerts.json | 23 +++++++++ .../springboard-alerts-hi.dataset/alerts.json | 9 ++++ .../springboard-alerts-hr.dataset/alerts.json | 16 ++++++ .../springboard-alerts-hu.dataset/alerts.json | 16 ++++++ .../springboard-alerts-id.dataset/alerts.json | 23 +++++++++ .../springboard-alerts-it.dataset/alerts.json | 16 ++++++ .../springboard-alerts-ja.dataset/alerts.json | 16 ++++++ .../springboard-alerts-ko.dataset/alerts.json | 23 +++++++++ .../springboard-alerts-ms.dataset/alerts.json | 23 +++++++++ .../springboard-alerts-nl.dataset/alerts.json | 23 +++++++++ .../springboard-alerts-no.dataset/alerts.json | 30 +++++++++++ .../springboard-alerts-pl.dataset/alerts.json | 16 ++++++ .../springboard-alerts-pt.dataset/alerts.json | 30 +++++++++++ .../alerts.json | 23 +++++++++ .../springboard-alerts-ro.dataset/alerts.json | 23 +++++++++ .../springboard-alerts-ru.dataset/alerts.json | 23 +++++++++ .../springboard-alerts-sk.dataset/alerts.json | 51 +++++++++++++++++++ .../springboard-alerts-sv.dataset/alerts.json | 23 +++++++++ .../springboard-alerts-th.dataset/alerts.json | 23 +++++++++ .../springboard-alerts-tr.dataset/alerts.json | 23 +++++++++ .../springboard-alerts-uk.dataset/alerts.json | 23 +++++++++ .../springboard-alerts-vi.dataset/alerts.json | 23 +++++++++ .../alerts.json | 16 ++++++ .../alerts.json | 30 +++++++++++ .../alerts.json | 23 +++++++++ 38 files changed, 851 insertions(+) create mode 100644 Server/Resources.xcassets/springboard-alerts/springboard-alerts-en_IN.dataset/alerts.json diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ar.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ar.dataset/alerts.json index 75a45291..e2204056 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ar.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ar.dataset/alerts.json @@ -402,5 +402,28 @@ "السماح لمرة واحدة" ], "shouldAccept": true + }, + { + "title": "هل تريد السماح لتطبيق \"%@\" باستخدام موقعك؟", + "buttons": [ + "السماح دائمًا", + "السماح", + "السماح أثناء استخدام التطبيق" + ], + "shouldAccept": true + }, + { + "title": "السماح لتطبيق \"%@\" بالوصول إلى موقعك حتى عند عدم استخدامك للتطبيق؟", + "buttons": [ + "السماح" + ], + "shouldAccept": true + }, + { + "title": "هل ترغب بالسماح لتطبيق \"%@\" بالوصول إلى موقعك حتى عند عدم استخدامك للتطبيق؟", + "buttons": [ + "السماح" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ca.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ca.dataset/alerts.json index ead590bd..40541cf6 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ca.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ca.dataset/alerts.json @@ -426,5 +426,28 @@ "OK" ], "shouldAccept": true + }, + { + "title": "Permets que “%@” utilitzi la teva ubicació?", + "buttons": [ + "Permetre-ho sempre", + "Permetre", + "Permetre amb l’app en ús" + ], + "shouldAccept": true + }, + { + "title": "Permets que “%@” utilitzi la teva ubicació encara que no estiguis utilitzant l’app?", + "buttons": [ + "Permetre" + ], + "shouldAccept": true + }, + { + "title": "Permets que “%@” també utilitzi la teva ubicació encara que no estiguis utilitzant l’app?", + "buttons": [ + "Permetre" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-cs.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-cs.dataset/alerts.json index 272459fb..91699d5f 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-cs.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-cs.dataset/alerts.json @@ -481,5 +481,19 @@ "OK" ], "shouldAccept": true + }, + { + "title": "Aplikace „%@“ žádá o povolení ke sdílení dat s Bluetooth zařízeními v okolí i v čase, kdy ji právě nepoužíváte", + "buttons": [ + "OK" + ], + "shouldAccept": true + }, + { + "title": "„%@“ chce přidat konfigurace DNS proxy", + "buttons": [ + "Povolit" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-de.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-de.dataset/alerts.json index 36a54482..ba8f09e4 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-de.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-de.dataset/alerts.json @@ -654,5 +654,35 @@ "OK" ], "shouldAccept": true + }, + { + "title": "Darf „%@“ deinen Standort verwenden?", + "buttons": [ + "Immer erlauben", + "Erlauben", + "Beim Verwenden der App erlauben" + ], + "shouldAccept": true + }, + { + "title": "Darf „%@“ deinen Standort verwenden, wenn du die App nicht benutzt?", + "buttons": [ + "Erlauben" + ], + "shouldAccept": true + }, + { + "title": "Darf „%@“ deinen Standort auch verwenden, wenn du die App nicht benutzt?", + "buttons": [ + "Erlauben" + ], + "shouldAccept": true + }, + { + "title": "„%@“ möchte Fotos hinzufügen", + "buttons": [ + "OK" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-el.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-el.dataset/alerts.json index 8654118c..46c57164 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-el.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-el.dataset/alerts.json @@ -493,5 +493,28 @@ "Να επιτραπεί μία φορά" ], "shouldAccept": true + }, + { + "title": "Να επιτραπεί στην εφαρμογή «%@» η χρήση της τοποθεσίας σας;", + "buttons": [ + "Να επιτρέπεται πάντα", + "Να επιτρέπεται", + "Κατά τη χρήση της εφαρμογής" + ], + "shouldAccept": true + }, + { + "title": "Να επιτραπεί σε «%@» η χρήση της τοποθεσίας σας ακόμη κι όταν δεν χρησιμοποιείτε την εφαρμογή;", + "buttons": [ + "Να επιτρέπεται" + ], + "shouldAccept": true + }, + { + "title": "Να επιτραπεί επίσης στην εφαρμογή «%@» η χρήση της τοποθεσίας σας ακόμη κι όταν δεν χρησιμοποιείτε την εφαρμογή;", + "buttons": [ + "Να επιτρέπεται" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en.dataset/alerts.json index 28cd1461..fd4c720b 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en.dataset/alerts.json @@ -425,5 +425,28 @@ "OK" ], "shouldAccept": true + }, + { + "title": "Allow “%@” to use your location?", + "buttons": [ + "Always Allow", + "Allow", + "Allow While Using App" + ], + "shouldAccept": true + }, + { + "title": "Allow “%@” to use your location even when you are not using the app?", + "buttons": [ + "Allow" + ], + "shouldAccept": true + }, + { + "title": "Allow “%@” to also use your location even when you are not using the app?", + "buttons": [ + "Allow" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en_AU.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en_AU.dataset/alerts.json index c02e84c0..4a51f5d9 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en_AU.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en_AU.dataset/alerts.json @@ -404,5 +404,28 @@ "OK" ], "shouldAccept": true + }, + { + "title": "Allow “%@” to use your location?", + "buttons": [ + "Always Allow", + "Allow", + "Allow While Using App" + ], + "shouldAccept": true + }, + { + "title": "Allow “%@” to use your location even when you are not using the app?", + "buttons": [ + "Allow" + ], + "shouldAccept": true + }, + { + "title": "Allow “%@” to also use your location even when you are not using the app?", + "buttons": [ + "Allow" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en_GB.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en_GB.dataset/alerts.json index a0b713d3..02660c7f 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en_GB.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en_GB.dataset/alerts.json @@ -404,5 +404,28 @@ "OK" ], "shouldAccept": true + }, + { + "title": "Allow “%@” to use your location?", + "buttons": [ + "Always Allow", + "Allow", + "Allow While Using App" + ], + "shouldAccept": true + }, + { + "title": "Allow “%@” to use your location even when you are not using the app?", + "buttons": [ + "Allow" + ], + "shouldAccept": true + }, + { + "title": "Allow “%@” to also use your location even when you are not using the app?", + "buttons": [ + "Allow" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en_IN.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en_IN.dataset/alerts.json new file mode 100644 index 00000000..90fd9bad --- /dev/null +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-en_IN.dataset/alerts.json @@ -0,0 +1,9 @@ +[ + { + "title": "Allow “%@” to access your location while you are using the app?", + "buttons": [ + "Allow Once" + ], + "shouldAccept": true + } +] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-es.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-es.dataset/alerts.json index a07b39b4..144521da 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-es.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-es.dataset/alerts.json @@ -426,5 +426,21 @@ "OK" ], "shouldAccept": true + }, + { + "title": "¿Permitir que “%@” use tu ubicación?", + "buttons": [ + "Permitir siempre", + "Permitir", + "Permitir al usarse la app" + ], + "shouldAccept": true + }, + { + "title": "¿Permitir que “%@” también use tu ubicación aunque no estés utilizando la app?", + "buttons": [ + "Permitir" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-es_419.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-es_419.dataset/alerts.json index f0133fbe..befb56e4 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-es_419.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-es_419.dataset/alerts.json @@ -381,5 +381,28 @@ "Permitir una vez" ], "shouldAccept": true + }, + { + "title": "¿Permitir a “%@” utilizar tu ubicación?", + "buttons": [ + "Permitir siempre", + "Permitir", + "Permitir al usar la app" + ], + "shouldAccept": true + }, + { + "title": "¿Permitir a “%@” utilizar tu ubicación incluso cuando la app no está en uso?", + "buttons": [ + "Permitir" + ], + "shouldAccept": true + }, + { + "title": "¿Permitir que “%@” también utilice tu ubicación incluso cuando la app no está en uso?", + "buttons": [ + "Permitir" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-fr.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-fr.dataset/alerts.json index bfab9dd0..a81113c5 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-fr.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-fr.dataset/alerts.json @@ -381,5 +381,35 @@ "Autoriser une fois" ], "shouldAccept": true + }, + { + "title": "Autoriser « %@ » à utiliser votre position ?", + "buttons": [ + "Toujours autoriser", + "Autoriser", + "Autoriser lorsque l’app est active" + ], + "shouldAccept": true + }, + { + "title": "Autoriser « %@ » à utiliser votre position même lorsque vous n’utilisez pas l’app ?", + "buttons": [ + "Autoriser" + ], + "shouldAccept": true + }, + { + "title": "« %@ » a utilisé votre position en arrière-plan au cours des 3 derniers jours. Voulez-vous maintenir cette autorisation d’utiliser votre position en arrière-plan ?", + "buttons": [ + "Autoriser" + ], + "shouldAccept": true + }, + { + "title": "« %@ » a utilisé votre position une fois en arrière-plan au cours des 3 derniers jours. Voulez-vous maintenir cette autorisation d’utiliser votre position en arrière-plan ?", + "buttons": [ + "Autoriser" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-fr_CA.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-fr_CA.dataset/alerts.json index 4ae18577..b773f0cc 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-fr_CA.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-fr_CA.dataset/alerts.json @@ -374,5 +374,28 @@ "Autoriser une fois" ], "shouldAccept": true + }, + { + "title": "Autoriser « %@ » à utiliser vos données de localisation?", + "buttons": [ + "Toujours autoriser", + "Autoriser", + "Autoriser lorsque l’app est active" + ], + "shouldAccept": true + }, + { + "title": "Autoriser « %@ » à utiliser vos données de localisation même si vous n’utilisez pas l’app?", + "buttons": [ + "Autoriser" + ], + "shouldAccept": true + }, + { + "title": "Autoriser « %@ » à utiliser aussi vos données de localisation même si vous n’utilisez pas l’app?", + "buttons": [ + "Autoriser" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-he.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-he.dataset/alerts.json index acddb656..1fdb2b10 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-he.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-he.dataset/alerts.json @@ -420,5 +420,28 @@ "אפשר פעם אחת" ], "shouldAccept": true + }, + { + "title": "לאפשר ל-״%@״ להשתמש במיקום שלך?", + "buttons": [ + "אפשר תמיד", + "אפשר", + "אפשר בעת השימוש ביישום" + ], + "shouldAccept": true + }, + { + "title": "לאפשר ליישום ״%@״ להשתמש בפרטי מיקומך גם לא בעת השימוש?", + "buttons": [ + "אפשר" + ], + "shouldAccept": true + }, + { + "title": "לאפשר גם ל-״%@״ להשתמש בפרטי מיקומך גם לא בעת השימוש ביישום?", + "buttons": [ + "אפשר" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-hi.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-hi.dataset/alerts.json index bc114006..f5bd3b66 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-hi.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-hi.dataset/alerts.json @@ -564,5 +564,14 @@ "एक बार अनुमति दें" ], "shouldAccept": true + }, + { + "title": "“%@” को अपने स्थान का उपयोग करने की अनुमति दें?", + "buttons": [ + "हमेशा अनुमति दें", + "अनुमति दें", + "ऐप उपयोग के दौरान अनुमति दें" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-hr.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-hr.dataset/alerts.json index 68791781..a6b3007c 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-hr.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-hr.dataset/alerts.json @@ -404,5 +404,21 @@ "OK" ], "shouldAccept": true + }, + { + "title": "Dozvoliti aplikaciji “%@” uporabu vaše lokacije?", + "buttons": [ + "Uvijek dozvoli", + "Dozvoli", + "Dozvoli tijekom uporabe aplikacije" + ], + "shouldAccept": true + }, + { + "title": "Dozvoliti aplikaciji “%@” uporabu vaše lokacije čak i kad ne koristite aplikaciju?", + "buttons": [ + "Dozvoli" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-hu.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-hu.dataset/alerts.json index 8ce384c8..6462c032 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-hu.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-hu.dataset/alerts.json @@ -472,5 +472,21 @@ "Engedélyezés egyszer" ], "shouldAccept": true + }, + { + "title": "Engedélyezi a(z) „%@” számára, hogy használja az Ön helyzetét?", + "buttons": [ + "Engedélyezés mindig", + "Engedélyezés", + "Az alkalmazás használata közben" + ], + "shouldAccept": true + }, + { + "title": "Engedélyezi, hogy a(z) „%@” használja az Ön helyzetét akkor is, ha nem használja az alkalmazást?", + "buttons": [ + "Engedélyezés" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-id.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-id.dataset/alerts.json index 928bd26a..e5242680 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-id.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-id.dataset/alerts.json @@ -399,5 +399,28 @@ "Izinkan Sekali" ], "shouldAccept": true + }, + { + "title": "Izinkan “%@” untuk menggunakan lokasi Anda?", + "buttons": [ + "Selalu Izinkan", + "Izinkan", + "Izinkan Saat Menggunakan App" + ], + "shouldAccept": true + }, + { + "title": "Izinkan “%@” untuk menggunakan lokasi Anda bahkan saat Anda tidak menggunakan app?", + "buttons": [ + "Izinkan" + ], + "shouldAccept": true + }, + { + "title": "Izinkan juga “%@” untuk menggunakan lokasi Anda bahkan saat Anda tidak menggunakan app?", + "buttons": [ + "Izinkan" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-it.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-it.dataset/alerts.json index b12f51cc..f35b65c9 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-it.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-it.dataset/alerts.json @@ -436,5 +436,21 @@ "Consenti una volta" ], "shouldAccept": true + }, + { + "title": "Vuoi consentire a “%@” di utilizzare la tua posizione?", + "buttons": [ + "Consenti sempre", + "Consenti", + "Consenti quando utilizzi l'app" + ], + "shouldAccept": true + }, + { + "title": "Vuoi consentire a “%@” di accedere alla tua posizione anche quando non stai utilizzando l'app?", + "buttons": [ + "Consenti" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ja.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ja.dataset/alerts.json index a0c9599e..3c494d8d 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ja.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ja.dataset/alerts.json @@ -395,5 +395,21 @@ "開く" ], "shouldAccept": true + }, + { + "title": "“%@”に位置情報の使用を許可しますか?", + "buttons": [ + "常に許可", + "許可", + "Appの使用中は許可" + ], + "shouldAccept": true + }, + { + "title": "“%@”を使用していないときでも位置情報の使用を許可しますか?", + "buttons": [ + "許可" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ko.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ko.dataset/alerts.json index 194bcd75..b2913016 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ko.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ko.dataset/alerts.json @@ -487,5 +487,28 @@ "확인" ], "shouldAccept": true + }, + { + "title": "‘%@’이(가) 사용자의 위치를 사용하도록 허용하겠습니까?", + "buttons": [ + "항상 허용", + "허용", + "앱을 사용하는 동안 허용" + ], + "shouldAccept": true + }, + { + "title": "‘%@’을(를) 사용하지 않을 때 해당 앱이 사용자의 위치를 사용하도록 허용하겠습니까?", + "buttons": [ + "허용" + ], + "shouldAccept": true + }, + { + "title": "‘%@’을(를) 사용하지 않을 때도 해당 앱이 사용자의 위치를 사용하도록 허용하겠습니까?", + "buttons": [ + "허용" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ms.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ms.dataset/alerts.json index 41d7ac9b..fa7bb225 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ms.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ms.dataset/alerts.json @@ -459,5 +459,28 @@ "Benarkan" ], "shouldAccept": true + }, + { + "title": "Benarkan “%@” menggunakan lokasi anda?", + "buttons": [ + "Sentiasa Benarkan", + "Benarkan", + "Benarkan Semasa Menggunakan App" + ], + "shouldAccept": true + }, + { + "title": "Benarkan “%@” menggunakan lokasi anda walaupun anda tidak menggunakan app?", + "buttons": [ + "Benarkan" + ], + "shouldAccept": true + }, + { + "title": "Benarkan “%@” turut menggunakan lokasi anda walaupun anda tidak menggunakan app?", + "buttons": [ + "Benarkan" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-nl.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-nl.dataset/alerts.json index e5aa441a..26c73332 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-nl.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-nl.dataset/alerts.json @@ -457,5 +457,28 @@ "Open" ], "shouldAccept": true + }, + { + "title": "Toestaan dat %@ je locatie gebruikt?", + "buttons": [ + "Sta altijd toe", + "Sta toe", + "Bij gebruik van app" + ], + "shouldAccept": true + }, + { + "title": "Toestaan dat %@ je locatie gebruikt, ook als je de app niet gebruikt?", + "buttons": [ + "Sta toe" + ], + "shouldAccept": true + }, + { + "title": "Toestaan dat %@ ook je locatie gebruikt als je de app niet gebruikt?", + "buttons": [ + "Sta toe" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-no.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-no.dataset/alerts.json index dd2ea5f3..967fec81 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-no.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-no.dataset/alerts.json @@ -515,5 +515,35 @@ "OK" ], "shouldAccept": true + }, + { + "title": "Vil du tillate at %@ bruker posisjonen din?", + "buttons": [ + "Tillat alltid", + "Tillat", + "Tillat mens appen er i bruk" + ], + "shouldAccept": true + }, + { + "title": "Vil du tillate at «%@» bruker posisjonen din selv når du ikke bruker appen?", + "buttons": [ + "Tillat" + ], + "shouldAccept": true + }, + { + "title": "Vil du også tillate at «%@» bruker posisjonen din selv når du ikke bruker appen?", + "buttons": [ + "Tillat" + ], + "shouldAccept": true + }, + { + "title": "Dette tillater at %@ kan søke etter og koble til Bluetooth-tilbehør. Appen kan også bruke Bluetooth til å finne ut når du er i nærheten.", + "buttons": [ + "OK" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-pl.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-pl.dataset/alerts.json index 83869b95..7685bd9d 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-pl.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-pl.dataset/alerts.json @@ -423,5 +423,21 @@ "Pozwól raz" ], "shouldAccept": true + }, + { + "title": "Pozwalać aplikacji „%@” na używanie Twojego położenia?", + "buttons": [ + "Zawsze pozwalaj", + "Pozwalaj", + "Pozwalaj, gdy używam aplikacji" + ], + "shouldAccept": true + }, + { + "title": "Pozwalać aplikacji „%@” na używanie Twojego położenia także, gdy jej nie używasz?", + "buttons": [ + "Pozwalaj" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-pt.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-pt.dataset/alerts.json index 35e89849..bc94dcf9 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-pt.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-pt.dataset/alerts.json @@ -450,5 +450,35 @@ "Permitir Uma Vez" ], "shouldAccept": true + }, + { + "title": "Permitir que “%@” use a sua localização?", + "buttons": [ + "Permitir Sempre", + "Permitir", + "Permitir Durante o Uso do App" + ], + "shouldAccept": true + }, + { + "title": "Permitir que “%@” use sua localização mesmo quando você não estiver usando o aplicativo?", + "buttons": [ + "Permitir" + ], + "shouldAccept": true + }, + { + "title": "Permitir que “%@” também use sua localização mesmo quando você não estiver usando o aplicativo?", + "buttons": [ + "Permitir" + ], + "shouldAccept": true + }, + { + "title": "“%@” Deseja Ter Acesso ao Reconhecimento de Fala", + "buttons": [ + "OK" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-pt_PT.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-pt_PT.dataset/alerts.json index 6469c96d..0fe0816c 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-pt_PT.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-pt_PT.dataset/alerts.json @@ -395,5 +395,28 @@ "Permitir uma vez" ], "shouldAccept": true + }, + { + "title": "Permitir que “%@” use a sua localização?", + "buttons": [ + "Permitir sempre", + "Permitir", + "Permitir durante utilização" + ], + "shouldAccept": true + }, + { + "title": "Permitir que “%@” use a sua localização mesmo que não esteja a usar a aplicação?", + "buttons": [ + "Permitir" + ], + "shouldAccept": true + }, + { + "title": "Permitir que “%@” também use a sua localização quando não está a usar a aplicação?", + "buttons": [ + "Permitir" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ro.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ro.dataset/alerts.json index 7e9237cd..050d419a 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ro.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ro.dataset/alerts.json @@ -382,5 +382,28 @@ "OK" ], "shouldAccept": true + }, + { + "title": "Permiteți ca aplicația “%@” să utilizeze localizarea dvs.?", + "buttons": [ + "Permiteți întotdeauna", + "Permiteți", + "Permiteți în timpul utilizării aplicației" + ], + "shouldAccept": true + }, + { + "title": "Permiteți ca aplicația “%@” să utilizeze localizarea dvs. chiar și atunci când nu o utilizați?", + "buttons": [ + "Permiteți" + ], + "shouldAccept": true + }, + { + "title": "Permiteți ca aplicația “%@” să utilizeze, de asemenea, localizarea dvs. chiar și atunci când nu o utilizați?", + "buttons": [ + "Permiteți" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ru.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ru.dataset/alerts.json index ba6f879a..4666ff72 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ru.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-ru.dataset/alerts.json @@ -544,5 +544,28 @@ "Продолжить" ], "shouldAccept": true + }, + { + "title": "Разрешить приложению «%@» использовать Вашу геопозицию?", + "buttons": [ + "Разрешать всегда", + "Разрешить", + "При использовании" + ], + "shouldAccept": true + }, + { + "title": "Разрешить приложению «%@» использовать Вашу геопозицию, даже когда Вы не работаете с ним?", + "buttons": [ + "Разрешить" + ], + "shouldAccept": true + }, + { + "title": "Разрешить приложению «%@» также использовать Вашу геопозицию, даже когда Вы не работаете с ним?", + "buttons": [ + "Разрешить" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-sk.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-sk.dataset/alerts.json index 9147adef..09e22a92 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-sk.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-sk.dataset/alerts.json @@ -501,5 +501,56 @@ "OK" ], "shouldAccept": true + }, + { + "title": "Povoliť apke %@ používať vašu polohu?", + "buttons": [ + "Vždy povoliť", + "Povoliť", + "Povoliť len pri používaní apky" + ], + "shouldAccept": true + }, + { + "title": "Chcete povoliť apke %@ používať vašu polohu aj v čase, keď ju nepoužívate?", + "buttons": [ + "Povoliť" + ], + "shouldAccept": true + }, + { + "title": "Apka %@ počas posledných 3 dní použila vašu polohu na pozadí. Chcete jej to umožniť aj naďalej?", + "buttons": [ + "Povoliť" + ], + "shouldAccept": true + }, + { + "title": "Apka %@ použila vašu polohu na pozadí 1-krát za posledné 3 dni. Chcete jej to umožniť aj naďalej?", + "buttons": [ + "Povoliť" + ], + "shouldAccept": true + }, + { + "title": "Zapnúť Diktovanie?", + "buttons": [ + "Teraz nie" + ], + "shouldAccept": true + }, + { + "title": "Zapnúť Diktovanie", + "buttons": [ + "Teraz nie" + ], + "shouldAccept": true + }, + { + "title": "Povoliť aktualizáciu zdravotných dát pre „%@“.", + "buttons": [ + "OK" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-sv.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-sv.dataset/alerts.json index b8f30a44..ae950900 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-sv.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-sv.dataset/alerts.json @@ -375,5 +375,28 @@ "OK" ], "shouldAccept": true + }, + { + "title": "Tillåter du att ”%@” använder din platsinformation?", + "buttons": [ + "Tillåt alltid", + "Tillåt", + "Tillåt medan appen används" + ], + "shouldAccept": true + }, + { + "title": "Vill du tillåta att ”%@” använder din platsinfo även när du inte använder appen?", + "buttons": [ + "Tillåt" + ], + "shouldAccept": true + }, + { + "title": "Vill du tillåta att ”%@” även använder din platsinfo när du inte använder appen?", + "buttons": [ + "Tillåt" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-th.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-th.dataset/alerts.json index 4485ae98..a9b26b8e 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-th.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-th.dataset/alerts.json @@ -437,5 +437,28 @@ "ตกลง" ], "shouldAccept": true + }, + { + "title": "อนุญาตให้ “%@” ใช้ตำแหน่งที่ตั้งของคุณหรือไม่", + "buttons": [ + "อนุญาตเสมอ", + "อนุญาต", + "อนุญาตในระหว่างใช้งานแอพ" + ], + "shouldAccept": true + }, + { + "title": "อนุญาตให้ “%@” ใช้ตำแหน่งที่ตั้งของคุณแม้ว่าคุณจะไม่ได้ใช้แอพอยู่หรือไม่", + "buttons": [ + "อนุญาต" + ], + "shouldAccept": true + }, + { + "title": "อนุญาตให้ “%@” ใช้ตำแหน่งที่ตั้งของคุณด้วยแม้ว่าคุณจะไม่ได้ใช้แอพอยู่หรือไม่", + "buttons": [ + "อนุญาต" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-tr.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-tr.dataset/alerts.json index 5ce6d392..c44e9834 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-tr.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-tr.dataset/alerts.json @@ -438,5 +438,28 @@ "Sürdür" ], "shouldAccept": true + }, + { + "title": "“%@”, konumunuzu kullanabilsin mi?", + "buttons": [ + "Her Zaman İzin Ver", + "İzin Ver", + "Uygulamayı Kullanırken İzin Ver" + ], + "shouldAccept": true + }, + { + "title": "“%@”, uygulamayı kullanmıyorken bile konumunuzu kullanabilsin mi?", + "buttons": [ + "İzin Ver" + ], + "shouldAccept": true + }, + { + "title": "“%@”, uygulamayı kullanmıyorken bile konumunuzu da kullanabilsin mi?", + "buttons": [ + "İzin Ver" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-uk.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-uk.dataset/alerts.json index 18bb8bab..8bb75b80 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-uk.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-uk.dataset/alerts.json @@ -493,5 +493,28 @@ "ОК" ], "shouldAccept": true + }, + { + "title": "Дозволити «%@» використовувати вашу локацію?", + "buttons": [ + "Завжди дозволяти", + "Дозволити", + "Дозволяти за використання" + ], + "shouldAccept": true + }, + { + "title": "Дозволити «%@» використовувати вашу локацію, навіть коли ви не використовуєте цю програму?", + "buttons": [ + "Дозволити" + ], + "shouldAccept": true + }, + { + "title": "Дозволити «%@» також використовувати вашу локацію, навіть коли ви не використовуєте цю програму?", + "buttons": [ + "Дозволити" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-vi.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-vi.dataset/alerts.json index 13ac4c23..e0d20830 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-vi.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-vi.dataset/alerts.json @@ -482,5 +482,28 @@ "OK" ], "shouldAccept": true + }, + { + "title": "Cho phép “%@” sử dụng vị trí của bạn?", + "buttons": [ + "Luôn cho phép", + "Cho phép", + "Cho phép khi dùng ứng dụng" + ], + "shouldAccept": true + }, + { + "title": "Cho phép “%@” sử dụng vị trí của bạn ngay cả khi bạn không dùng ứng dụng?", + "buttons": [ + "Cho phép" + ], + "shouldAccept": true + }, + { + "title": "Cũng cho phép “%@” sử dụng vị trí của bạn ngay cả khi bạn không dùng ứng dụng?", + "buttons": [ + "Cho phép" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-zh_CN.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-zh_CN.dataset/alerts.json index 8d952071..de282850 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-zh_CN.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-zh_CN.dataset/alerts.json @@ -457,5 +457,21 @@ "允许一次" ], "shouldAccept": true + }, + { + "title": "允许“%@”使用您的位置?", + "buttons": [ + "始终允许", + "允许", + "使用App时允许" + ], + "shouldAccept": true + }, + { + "title": "允许“%@”在您并未使用该App时使用您的位置吗?", + "buttons": [ + "允许" + ], + "shouldAccept": true } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-zh_HK.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-zh_HK.dataset/alerts.json index 9fab9f37..ee9d8429 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-zh_HK.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-zh_HK.dataset/alerts.json @@ -525,5 +525,35 @@ "允許一次" ], "shouldAccept": true + }, + { + "title": "允許「%@」使用你的位置嗎?", + "buttons": [ + "總是允許", + "允許", + "使用App時允許" + ], + "shouldAccept": true + }, + { + "title": "允許「%@」使用你的位置嗎(即使你並非正在使用App時亦會使用)?", + "buttons": [ + "允許" + ], + "shouldAccept": true + }, + { + "title": "也允許「%@」使用你的位置嗎(即使你並非正在使用App時亦會使用)?", + "buttons": [ + "允許" + ], + "shouldAccept": true + }, + { + "title": "「%@」想加入VPN設定", + "buttons": [ + "不允許" + ], + "shouldAccept": false } ] \ No newline at end of file diff --git a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-zh_TW.dataset/alerts.json b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-zh_TW.dataset/alerts.json index e13fb916..bb8f4282 100644 --- a/Server/Resources.xcassets/springboard-alerts/springboard-alerts-zh_TW.dataset/alerts.json +++ b/Server/Resources.xcassets/springboard-alerts/springboard-alerts-zh_TW.dataset/alerts.json @@ -455,5 +455,28 @@ "允許一次" ], "shouldAccept": true + }, + { + "title": "要允許「%@」使用您的位置嗎?", + "buttons": [ + "永遠允許", + "允許", + "使用App期間允許" + ], + "shouldAccept": true + }, + { + "title": "要允許「%@」在您未使用App時使用您的位置嗎?", + "buttons": [ + "允許" + ], + "shouldAccept": true + }, + { + "title": "要允許「%@」在您未使用App時也可使用您的位置嗎?", + "buttons": [ + "允許" + ], + "shouldAccept": true } ] \ No newline at end of file From 81efccd7436973689221a48c5fcea8c1d280f06e Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 08:27:30 +0200 Subject: [PATCH 13/53] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f15f606..9cadf4de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,11 @@ ### ??? * Add support for Xcode 11.4 beta 3 #377 Thanks @sergey-plevako-badoo +* Add alerts new in Xcode 11.4 #382 Thanks @humbled ### 2.1.0 -Fixes various problems in dismiss-SpringBoard-alert system. +* Fixes various problems in dismiss-SpringBoard-alert system. ### 2.0.2 From 83eb834cb35d578262f46c43e8e3f57bdc71e126 Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 08:59:22 +0200 Subject: [PATCH 14/53] Update versions --- AppStub/Info.plist | 2 +- CHANGELOG.md | 2 +- README.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AppStub/Info.plist b/AppStub/Info.plist index a7df09a6..150330f3 100644 --- a/AppStub/Info.plist +++ b/AppStub/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.1.0 + 2.2.0 CFBundleSignature ???? CFBundleVersion diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cadf4de..c591665b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### ??? +### 2.2.0 * Add support for Xcode 11.4 beta 3 #377 Thanks @sergey-plevako-badoo * Add alerts new in Xcode 11.4 #382 Thanks @humbled diff --git a/README.md b/README.md index 3ed69f51..54650168 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ | develop | master | [versioning](VERSIONING.md) | [license](LICENSE) | [contributing](CONTRIBUTING.md)| |---------|--------|-----------------------------|--------------------|--------------------------------| -|[![Build Status](https://msmobilecenter.visualstudio.com/Mobile-Center/_apis/build/status/test-cloud/xamarin-uitest/calabash.DeviceAgent.iOS?branchName=develop)](https://msmobilecenter.visualstudio.com/Mobile-Center/_build/latest?definitionId=3510&branchName=develop) | [![Build Status](https://msmobilecenter.visualstudio.com/Mobile-Center/_apis/build/status/test-cloud/xamarin-uitest/calabash.DeviceAgent.iOS?branchName=master)](https://msmobilecenter.visualstudio.com/Mobile-Center/_build/latest?definitionId=3510&branchName=master) | [![Version](https://img.shields.io/badge/version-2.1.0-green.svg)](https://img.shields.io/badge/version-2.1.0-green.svg) |[![License](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](LICENSE) | [![Contributing](https://img.shields.io/badge/contrib-gitflow-orange.svg)](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow/)| +|[![Build Status](https://msmobilecenter.visualstudio.com/Mobile-Center/_apis/build/status/test-cloud/xamarin-uitest/calabash.DeviceAgent.iOS?branchName=develop)](https://msmobilecenter.visualstudio.com/Mobile-Center/_build/latest?definitionId=3510&branchName=develop) | [![Build Status](https://msmobilecenter.visualstudio.com/Mobile-Center/_apis/build/status/test-cloud/xamarin-uitest/calabash.DeviceAgent.iOS?branchName=master)](https://msmobilecenter.visualstudio.com/Mobile-Center/_build/latest?definitionId=3510&branchName=master) | [![Version](https://img.shields.io/badge/version-2.2.0-green.svg)](https://img.shields.io/badge/version-2.2.0-green.svg) |[![License](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](LICENSE) | [![Contributing](https://img.shields.io/badge/contrib-gitflow-orange.svg)](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow/)| ## DeviceAgent.iOS ### Requirements -* Xcode >= 10.3.1 +* Xcode >= 10.4 * macOS Mojave or higher * ruby >= 2.3 From 5156d33c45f072219ce989dc6afb1db1697d809b Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 09:09:00 +0200 Subject: [PATCH 15/53] Run tests on 11.4 --- azure-pipelines.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33852615..ea09cfc5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,7 @@ variables: # When Agent.JobName matches this value (and the git ref is a tag), then # built artifacts will be published to Azure Blob Storage. - AzurePublishWhen: "Catalina-Xcode-11.3" + AzurePublishWhen: "Catalina-Xcode-11.4" trigger: tags: @@ -37,6 +37,9 @@ jobs: Catalina-Xcode-11.3: IMAGE_POOL: 'macOS-10.15' XCODE_VERSION: '11.3' + Catalina-Xcode-11.4: + IMAGE_POOL: 'macOS-10.15' + XCODE_VERSION: '11.4' pool: vmImage: $(IMAGE_POOL) variables: From dc1b55f67531818e28834b73dca8d6bb70a19cfe Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 09:11:02 +0200 Subject: [PATCH 16/53] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 54650168..183c5f57 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ### Requirements -* Xcode >= 10.4 +* Xcode >= 10.3.1 * macOS Mojave or higher * ruby >= 2.3 From 804122a43c5042e592da887049b1849be9a90445 Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 20:41:12 +0200 Subject: [PATCH 17/53] Try fixing unit tests --- bin/make/unit-tests.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/make/unit-tests.rb b/bin/make/unit-tests.rb index 63be8583..e3eb9748 100755 --- a/bin/make/unit-tests.rb +++ b/bin/make/unit-tests.rb @@ -31,7 +31,8 @@ "-sdk", "iphonesimulator", "-configuration", "Debug", "GCC_TREAT_WARNINGS_AS_ERRORS=YES", - "CLANG_ENABLE_CODE_COVERAGE=NO" + "CLANG_ENABLE_CODE_COVERAGE=NO", + "SWIFT_COMPILATION_MODE=wholemodule" ] env = { "COMMAND_LINE_BUILD" => "1", From fafddb816786046560f7e2b79090f3bd2d6c7ee6 Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 21:52:26 +0200 Subject: [PATCH 18/53] Fix unit tests --- Vendor/Fingertips/MBFingerTipWindow.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Vendor/Fingertips/MBFingerTipWindow.m b/Vendor/Fingertips/MBFingerTipWindow.m index a2104059..9c1a12ed 100644 --- a/Vendor/Fingertips/MBFingerTipWindow.m +++ b/Vendor/Fingertips/MBFingerTipWindow.m @@ -251,6 +251,12 @@ - (void)sendEvent:(UIEvent *)event [self removeFingerTipWithHash:touch.hash animated:YES]; break; } + case UITouchPhaseRegionEntered: + break; + case UITouchPhaseRegionMoved: + break; + case UITouchPhaseRegionExited: + break; } } } From 70af079cb660fc7260e73f7e21fe6df53cb21997 Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 21:53:10 +0200 Subject: [PATCH 19/53] Revert "Try fixing unit tests" This reverts commit 804122a43c5042e592da887049b1849be9a90445. --- bin/make/unit-tests.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/make/unit-tests.rb b/bin/make/unit-tests.rb index e3eb9748..63be8583 100755 --- a/bin/make/unit-tests.rb +++ b/bin/make/unit-tests.rb @@ -31,8 +31,7 @@ "-sdk", "iphonesimulator", "-configuration", "Debug", "GCC_TREAT_WARNINGS_AS_ERRORS=YES", - "CLANG_ENABLE_CODE_COVERAGE=NO", - "SWIFT_COMPILATION_MODE=wholemodule" + "CLANG_ENABLE_CODE_COVERAGE=NO" ] env = { "COMMAND_LINE_BUILD" => "1", From 3726d79d6aebb019d827755dc030285e2e8838ef Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 21:55:24 +0200 Subject: [PATCH 20/53] Update MBFingerTipWindow.m --- Vendor/Fingertips/MBFingerTipWindow.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vendor/Fingertips/MBFingerTipWindow.m b/Vendor/Fingertips/MBFingerTipWindow.m index 9c1a12ed..d39136be 100644 --- a/Vendor/Fingertips/MBFingerTipWindow.m +++ b/Vendor/Fingertips/MBFingerTipWindow.m @@ -251,7 +251,7 @@ - (void)sendEvent:(UIEvent *)event [self removeFingerTipWithHash:touch.hash animated:YES]; break; } - case UITouchPhaseRegionEntered: + case UITouchPhaseRegionEntered: break; case UITouchPhaseRegionMoved: break; From 0bd2c2840eee3227a461754876a15b40af650928 Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 21:57:15 +0200 Subject: [PATCH 21/53] Update MBFingerTipWindow.m --- Vendor/Fingertips/MBFingerTipWindow.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vendor/Fingertips/MBFingerTipWindow.m b/Vendor/Fingertips/MBFingerTipWindow.m index d39136be..9c1a12ed 100644 --- a/Vendor/Fingertips/MBFingerTipWindow.m +++ b/Vendor/Fingertips/MBFingerTipWindow.m @@ -251,7 +251,7 @@ - (void)sendEvent:(UIEvent *)event [self removeFingerTipWithHash:touch.hash animated:YES]; break; } - case UITouchPhaseRegionEntered: + case UITouchPhaseRegionEntered: break; case UITouchPhaseRegionMoved: break; From 33769047dd443eff5bcc510845fe0e5bb7b074cd Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 21:59:15 +0200 Subject: [PATCH 22/53] do it from xcode... --- Vendor/Fingertips/MBFingerTipWindow.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vendor/Fingertips/MBFingerTipWindow.m b/Vendor/Fingertips/MBFingerTipWindow.m index 9c1a12ed..304f5a71 100644 --- a/Vendor/Fingertips/MBFingerTipWindow.m +++ b/Vendor/Fingertips/MBFingerTipWindow.m @@ -251,7 +251,7 @@ - (void)sendEvent:(UIEvent *)event [self removeFingerTipWithHash:touch.hash animated:YES]; break; } - case UITouchPhaseRegionEntered: + case UITouchPhaseRegionEntered: break; case UITouchPhaseRegionMoved: break; From 351c630b905ebef68ee862ff98cbbd6b729406ec Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 22:30:06 +0200 Subject: [PATCH 23/53] Revert --- Vendor/Fingertips/MBFingerTipWindow.m | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Vendor/Fingertips/MBFingerTipWindow.m b/Vendor/Fingertips/MBFingerTipWindow.m index 304f5a71..a2104059 100644 --- a/Vendor/Fingertips/MBFingerTipWindow.m +++ b/Vendor/Fingertips/MBFingerTipWindow.m @@ -251,12 +251,6 @@ - (void)sendEvent:(UIEvent *)event [self removeFingerTipWithHash:touch.hash animated:YES]; break; } - case UITouchPhaseRegionEntered: - break; - case UITouchPhaseRegionMoved: - break; - case UITouchPhaseRegionExited: - break; } } } From 73463d4e6c0164d276c792b61a3dc93484cb845b Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 22:34:04 +0200 Subject: [PATCH 24/53] Skip switch check --- bin/make/unit-tests.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/make/unit-tests.rb b/bin/make/unit-tests.rb index 63be8583..72cf9dc0 100755 --- a/bin/make/unit-tests.rb +++ b/bin/make/unit-tests.rb @@ -31,7 +31,8 @@ "-sdk", "iphonesimulator", "-configuration", "Debug", "GCC_TREAT_WARNINGS_AS_ERRORS=YES", - "CLANG_ENABLE_CODE_COVERAGE=NO" + "CLANG_ENABLE_CODE_COVERAGE=NO", + "OTHER_CFLAGS='-Xclang -Wno-switch'" ] env = { "COMMAND_LINE_BUILD" => "1", From b2884dce8c570ad6e3329fa495cfbe37b5627c72 Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 22:52:16 +0200 Subject: [PATCH 25/53] Syntax --- bin/make/unit-tests.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/make/unit-tests.rb b/bin/make/unit-tests.rb index 72cf9dc0..9e6bd577 100755 --- a/bin/make/unit-tests.rb +++ b/bin/make/unit-tests.rb @@ -32,7 +32,7 @@ "-configuration", "Debug", "GCC_TREAT_WARNINGS_AS_ERRORS=YES", "CLANG_ENABLE_CODE_COVERAGE=NO", - "OTHER_CFLAGS='-Xclang -Wno-switch'" + "OTHER_CFLAGS=-Xclang -Wno-switch" ] env = { "COMMAND_LINE_BUILD" => "1", From cb436b8cfda2cbaf01ab8e647069ecd8b988bf18 Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 22:30:06 +0200 Subject: [PATCH 26/53] Revert --- Vendor/Fingertips/MBFingerTipWindow.m | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Vendor/Fingertips/MBFingerTipWindow.m b/Vendor/Fingertips/MBFingerTipWindow.m index 304f5a71..a2104059 100644 --- a/Vendor/Fingertips/MBFingerTipWindow.m +++ b/Vendor/Fingertips/MBFingerTipWindow.m @@ -251,12 +251,6 @@ - (void)sendEvent:(UIEvent *)event [self removeFingerTipWithHash:touch.hash animated:YES]; break; } - case UITouchPhaseRegionEntered: - break; - case UITouchPhaseRegionMoved: - break; - case UITouchPhaseRegionExited: - break; } } } From da697e7f17ee81363c8261c92d15e6b2599122b0 Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 22:34:04 +0200 Subject: [PATCH 27/53] Skip switch check --- bin/make/unit-tests.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/make/unit-tests.rb b/bin/make/unit-tests.rb index 63be8583..72cf9dc0 100755 --- a/bin/make/unit-tests.rb +++ b/bin/make/unit-tests.rb @@ -31,7 +31,8 @@ "-sdk", "iphonesimulator", "-configuration", "Debug", "GCC_TREAT_WARNINGS_AS_ERRORS=YES", - "CLANG_ENABLE_CODE_COVERAGE=NO" + "CLANG_ENABLE_CODE_COVERAGE=NO", + "OTHER_CFLAGS='-Xclang -Wno-switch'" ] env = { "COMMAND_LINE_BUILD" => "1", From 6dbb341e1dd7cf7327fb25952491c36775f6c73f Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Wed, 8 Apr 2020 22:52:16 +0200 Subject: [PATCH 28/53] Syntax --- bin/make/unit-tests.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/make/unit-tests.rb b/bin/make/unit-tests.rb index 72cf9dc0..9e6bd577 100755 --- a/bin/make/unit-tests.rb +++ b/bin/make/unit-tests.rb @@ -32,7 +32,7 @@ "-configuration", "Debug", "GCC_TREAT_WARNINGS_AS_ERRORS=YES", "CLANG_ENABLE_CODE_COVERAGE=NO", - "OTHER_CFLAGS='-Xclang -Wno-switch'" + "OTHER_CFLAGS=-Xclang -Wno-switch" ] env = { "COMMAND_LINE_BUILD" => "1", From 666b9e15c756532f94e93f8c4845fb48677db9cd Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Fri, 10 Apr 2020 12:45:58 +0200 Subject: [PATCH 29/53] Remove 11.4 from the test targets --- azure-pipelines.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ea09cfc5..33852615 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,7 @@ variables: # When Agent.JobName matches this value (and the git ref is a tag), then # built artifacts will be published to Azure Blob Storage. - AzurePublishWhen: "Catalina-Xcode-11.4" + AzurePublishWhen: "Catalina-Xcode-11.3" trigger: tags: @@ -37,9 +37,6 @@ jobs: Catalina-Xcode-11.3: IMAGE_POOL: 'macOS-10.15' XCODE_VERSION: '11.3' - Catalina-Xcode-11.4: - IMAGE_POOL: 'macOS-10.15' - XCODE_VERSION: '11.4' pool: vmImage: $(IMAGE_POOL) variables: From 32aaf06ca685495922aa9843441059f6c4550ca7 Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Fri, 10 Apr 2020 12:57:13 +0200 Subject: [PATCH 30/53] Remove no-switch from the xcrun arguments --- bin/make/unit-tests.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/make/unit-tests.rb b/bin/make/unit-tests.rb index 9e6bd577..ddfce4f3 100755 --- a/bin/make/unit-tests.rb +++ b/bin/make/unit-tests.rb @@ -31,8 +31,7 @@ "-sdk", "iphonesimulator", "-configuration", "Debug", "GCC_TREAT_WARNINGS_AS_ERRORS=YES", - "CLANG_ENABLE_CODE_COVERAGE=NO", - "OTHER_CFLAGS=-Xclang -Wno-switch" + "CLANG_ENABLE_CODE_COVERAGE=NO" ] env = { "COMMAND_LINE_BUILD" => "1", From ae6005b8d742a58f12046fac2c0ebd4f1bcc067e Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Fri, 10 Apr 2020 12:57:32 +0200 Subject: [PATCH 31/53] empty space --- bin/make/unit-tests.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/make/unit-tests.rb b/bin/make/unit-tests.rb index ddfce4f3..63be8583 100755 --- a/bin/make/unit-tests.rb +++ b/bin/make/unit-tests.rb @@ -31,7 +31,7 @@ "-sdk", "iphonesimulator", "-configuration", "Debug", "GCC_TREAT_WARNINGS_AS_ERRORS=YES", - "CLANG_ENABLE_CODE_COVERAGE=NO" + "CLANG_ENABLE_CODE_COVERAGE=NO" ] env = { "COMMAND_LINE_BUILD" => "1", From 3a20cc686f147ffb83cf029a4c67515fbf3f6dcc Mon Sep 17 00:00:00 2001 From: jenkins Date: Fri, 10 Apr 2020 12:58:27 +0200 Subject: [PATCH 32/53] Move clang option to xcode settings --- DeviceAgent.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DeviceAgent.xcodeproj/project.pbxproj b/DeviceAgent.xcodeproj/project.pbxproj index 80ed4895..04ad37aa 100644 --- a/DeviceAgent.xcodeproj/project.pbxproj +++ b/DeviceAgent.xcodeproj/project.pbxproj @@ -4246,6 +4246,8 @@ OTHER_LDFLAGS = ( "-framework", XCTAutomationSupport, + "-Xclang", + "-Wno-switch", ); PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.ServerUnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -4288,6 +4290,8 @@ OTHER_LDFLAGS = ( "-framework", XCTAutomationSupport, + "-Xclang", + "-Wno-switch", ); PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.ServerUnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; From a93615a3902e066248ebb9de5dc0c51468a0b76a Mon Sep 17 00:00:00 2001 From: Joshua Moody Date: Fri, 10 Apr 2020 13:23:27 +0200 Subject: [PATCH 33/53] Xcode: respond to Xcode 11.4 suggestions and make Xcode 10.0 the minimum Xcode version --- DeviceAgent.xcodeproj/project.pbxproj | 8 +++---- .../xcshareddata/WorkspaceSettings.xcsettings | 2 ++ .../xcshareddata/xcschemes/AppStub.xcscheme | 2 +- .../xcschemes/AppStubBuildNumber.xcscheme | 2 +- .../xcschemes/DeviceAgent.xcscheme | 2 +- .../xcschemes/DeviceAgentUnitTests.xcscheme | 2 +- .../xcshareddata/xcschemes/Dismiss.xcscheme | 2 +- .../xcschemes/GemuseBouche.xcscheme | 2 +- .../xcschemes/Permissions.xcscheme | 2 +- .../xcschemes/StandAloneUITests.xcscheme | 2 +- .../xcshareddata/xcschemes/TestApp.xcscheme | 24 ++++++++----------- .../xcschemes/TestAppBuildNumber.xcscheme | 2 +- .../xcshareddata/xcschemes/UITest.xcscheme | 2 +- .../alerts.json | 9 ------- 14 files changed, 25 insertions(+), 38 deletions(-) delete mode 100644 Server/Resources.xcassets/springboard-alerts/springboard-alerts-en_IN.dataset/alerts.json diff --git a/DeviceAgent.xcodeproj/project.pbxproj b/DeviceAgent.xcodeproj/project.pbxproj index 04ad37aa..1466a18c 100644 --- a/DeviceAgent.xcodeproj/project.pbxproj +++ b/DeviceAgent.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 51; objects = { /* Begin PBXAggregateTarget section */ @@ -53,7 +53,6 @@ 7DEAAE74241FA80D009894BA /* FBXCTestCaseImplementationFailureHoldingProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DEAAE72241FA80D009894BA /* FBXCTestCaseImplementationFailureHoldingProxy.m */; }; 7DEAAE75241FA80D009894BA /* FBXCTestCaseImplementationFailureHoldingProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 7DEAAE73241FA80D009894BA /* FBXCTestCaseImplementationFailureHoldingProxy.h */; }; 7DEAAE77241FA8B5009894BA /* XCTestCase.h in Headers */ = {isa = PBXBuildFile; fileRef = 7DEAAE76241FA8B4009894BA /* XCTestCase.h */; }; - 7DEAAE79241FEEF8009894BA /* _XCTestCaseImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 7DEAAE78241FEEF7009894BA /* _XCTestCaseImplementation.h */; }; 89331CCE1CC00E82003C2E59 /* RotatePinchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 89331CCD1CC00E82003C2E59 /* RotatePinchViewController.m */; }; 89331D301CC50447003C2E59 /* ThreadUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 89331D2E1CC50447003C2E59 /* ThreadUtils.h */; }; 89331D321CC50447003C2E59 /* ThreadUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 89331D2F1CC50447003C2E59 /* ThreadUtils.m */; }; @@ -2731,7 +2730,6 @@ F54C02462043F0EF00FD8DDE /* XCTASDebugLogDelegate-Protocol.h in Headers */, F54C029C2043F0EF00FD8DDE /* XCTElementSortingTransformer.h in Headers */, F54C025E2043F0EF00FD8DDE /* XCTAutomationTarget-Protocol.h in Headers */, - 7DEAAE79241FEEF8009894BA /* _XCTestCaseImplementation.h in Headers */, 89C5F3501C9A60E70093A018 /* Testmanagerd.h in Headers */, F54C02992043F0EF00FD8DDE /* NSArray-XCTElementQueryAdditions.h in Headers */, F55F819B1C6DD07500A945C8 /* HTTPAsyncFileResponse.h in Headers */, @@ -2971,7 +2969,7 @@ 898743B41C5847B30084FD93 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1100; + LastUpgradeCheck = 1140; ORGANIZATIONNAME = Calabash; TargetAttributes = { 898743BB1C5847B30084FD93 = { @@ -3058,7 +3056,7 @@ }; }; buildConfigurationList = 898743B71C5847B30084FD93 /* Build configuration list for PBXProject "DeviceAgent" */; - compatibilityVersion = "Xcode 9.3"; + compatibilityVersion = "Xcode 10.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( diff --git a/DeviceAgent.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/DeviceAgent.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings index 3ddf867a..530b8335 100644 --- a/DeviceAgent.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ b/DeviceAgent.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -4,5 +4,7 @@ BuildSystemType Latest + PreviewsEnabled + diff --git a/DeviceAgent.xcworkspace/xcshareddata/xcschemes/AppStub.xcscheme b/DeviceAgent.xcworkspace/xcshareddata/xcschemes/AppStub.xcscheme index 85b00230..9a695a20 100644 --- a/DeviceAgent.xcworkspace/xcshareddata/xcschemes/AppStub.xcscheme +++ b/DeviceAgent.xcworkspace/xcshareddata/xcschemes/AppStub.xcscheme @@ -1,6 +1,6 @@ + + + + @@ -53,17 +62,6 @@ - - - - - - - - Date: Fri, 10 Apr 2020 15:55:19 +0200 Subject: [PATCH 34/53] FingerTips: add default case to suppress build warnings/errors --- Vendor/Fingertips/MBFingerTipWindow.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Vendor/Fingertips/MBFingerTipWindow.m b/Vendor/Fingertips/MBFingerTipWindow.m index a2104059..b87a0164 100644 --- a/Vendor/Fingertips/MBFingerTipWindow.m +++ b/Vendor/Fingertips/MBFingerTipWindow.m @@ -251,6 +251,8 @@ - (void)sendEvent:(UIEvent *)event [self removeFingerTipWithHash:touch.hash animated:YES]; break; } + + default: { } } } } From 4455c1825e39852cbeb8b442acf309caa95df94c Mon Sep 17 00:00:00 2001 From: Serghei Moret Date: Fri, 10 Apr 2020 17:53:40 +0200 Subject: [PATCH 35/53] Revert "Move clang option to xcode settings" This reverts commit 3a20cc686f147ffb83cf029a4c67515fbf3f6dcc. --- DeviceAgent.xcodeproj/project.pbxproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/DeviceAgent.xcodeproj/project.pbxproj b/DeviceAgent.xcodeproj/project.pbxproj index 1466a18c..d1342a2e 100644 --- a/DeviceAgent.xcodeproj/project.pbxproj +++ b/DeviceAgent.xcodeproj/project.pbxproj @@ -4244,8 +4244,6 @@ OTHER_LDFLAGS = ( "-framework", XCTAutomationSupport, - "-Xclang", - "-Wno-switch", ); PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.ServerUnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -4288,8 +4286,6 @@ OTHER_LDFLAGS = ( "-framework", XCTAutomationSupport, - "-Xclang", - "-Wno-switch", ); PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.ServerUnitTests; PRODUCT_NAME = "$(TARGET_NAME)"; From b9cd4eb9d9627a645e8eaa5d00d0eeb80fe4101d Mon Sep 17 00:00:00 2001 From: Joshua Moody Date: Tue, 14 Apr 2020 08:49:21 +0200 Subject: [PATCH 36/53] Update version to 2.2.1 --- AppStub/Info.plist | 2 +- CHANGELOG.md | 11 ++++++++++- README.md | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/AppStub/Info.plist b/AppStub/Info.plist index 150330f3..131ab95b 100644 --- a/AppStub/Info.plist +++ b/AppStub/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.2.0 + 2.2.1 CFBundleSignature ???? CFBundleVersion diff --git a/CHANGELOG.md b/CHANGELOG.md index c591665b..f72c0f5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,13 @@ -### 2.2.0 +### 2.2.1 + +The 2.2.0 release was cancelled. + +We discovered a problem with running tests against a DeviceAgent built with +Xcode 11.4. Xamarin.UITest, run-loop, and Test Cloud will use a DeviceAgent +built with Xcode 11.3.1 until we sort out the problem. Tracking here (private +link): + +DeviceAgent built with Xcode 11.4 crashes after launching the AUT [ADO](https://msmobilecenter.visualstudio.com/Mobile-Center/_workitems/edit/79012) * Add support for Xcode 11.4 beta 3 #377 Thanks @sergey-plevako-badoo * Add alerts new in Xcode 11.4 #382 Thanks @humbled diff --git a/README.md b/README.md index 183c5f57..e4aefd9b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ | develop | master | [versioning](VERSIONING.md) | [license](LICENSE) | [contributing](CONTRIBUTING.md)| |---------|--------|-----------------------------|--------------------|--------------------------------| -|[![Build Status](https://msmobilecenter.visualstudio.com/Mobile-Center/_apis/build/status/test-cloud/xamarin-uitest/calabash.DeviceAgent.iOS?branchName=develop)](https://msmobilecenter.visualstudio.com/Mobile-Center/_build/latest?definitionId=3510&branchName=develop) | [![Build Status](https://msmobilecenter.visualstudio.com/Mobile-Center/_apis/build/status/test-cloud/xamarin-uitest/calabash.DeviceAgent.iOS?branchName=master)](https://msmobilecenter.visualstudio.com/Mobile-Center/_build/latest?definitionId=3510&branchName=master) | [![Version](https://img.shields.io/badge/version-2.2.0-green.svg)](https://img.shields.io/badge/version-2.2.0-green.svg) |[![License](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](LICENSE) | [![Contributing](https://img.shields.io/badge/contrib-gitflow-orange.svg)](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow/)| +|[![Build Status](https://msmobilecenter.visualstudio.com/Mobile-Center/_apis/build/status/test-cloud/xamarin-uitest/calabash.DeviceAgent.iOS?branchName=develop)](https://msmobilecenter.visualstudio.com/Mobile-Center/_build/latest?definitionId=3510&branchName=develop) | [![Build Status](https://msmobilecenter.visualstudio.com/Mobile-Center/_apis/build/status/test-cloud/xamarin-uitest/calabash.DeviceAgent.iOS?branchName=master)](https://msmobilecenter.visualstudio.com/Mobile-Center/_build/latest?definitionId=3510&branchName=master) | [![Version](https://img.shields.io/badge/version-2.2.1-green.svg)](https://img.shields.io/badge/version-2.2.1-green.svg) |[![License](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](LICENSE) | [![Contributing](https://img.shields.io/badge/contrib-gitflow-orange.svg)](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow/)| ## DeviceAgent.iOS From 0efc59f32549a9c96435ce8c4b77313477eddc70 Mon Sep 17 00:00:00 2001 From: Vyacheslav Frolov Date: Wed, 15 Apr 2020 13:07:41 +0100 Subject: [PATCH 37/53] Allow Cross-Origin resource sharing --- Server/CBXCUITestServer.m | 4 ++++ Server/Routes/CBXRoute.h | 7 +++++++ Server/Routes/CBXRoute.m | 3 +++ Server/Routes/UndefinedRoutes.m | 6 ++++++ 4 files changed, 20 insertions(+) diff --git a/Server/CBXCUITestServer.m b/Server/CBXCUITestServer.m index 14bd6449..32124cf4 100644 --- a/Server/CBXCUITestServer.m +++ b/Server/CBXCUITestServer.m @@ -37,6 +37,10 @@ - (instancetype)init_private { [_server setRouteQueue:dispatch_get_main_queue()]; [_server setDefaultHeader:@"CalabusDriver" value:@"CalabashXCUITestServer/1.0"]; + [_server setDefaultHeader:@"Access-Control-Allow-Origin" + value:@"*"]; + [_server setDefaultHeader:@"Access-Control-Allow-Headers" + value:@"Content-Type, X-Requested-With"]; [_server setConnectionClass:[RoutingConnection self]]; [_server setType:@"_calabus._tcp."]; diff --git a/Server/Routes/CBXRoute.h b/Server/Routes/CBXRoute.h index 5a4b3ece..ab861264 100644 --- a/Server/Routes/CBXRoute.h +++ b/Server/Routes/CBXRoute.h @@ -54,5 +54,12 @@ Object containing logic for an HTTP route. @param block Block to execude when requests are matched to this route */ + (instancetype)delete:(NSString *)path withBlock:(RequestHandler)block; + +/** + Convenience constructor for an OPTIONS route + @param path Route path regex + @param block Block to execute when requests are matched to this route + */ ++ (instancetype)options:(NSString *)path withBlock:(RequestHandler)block; @end diff --git a/Server/Routes/CBXRoute.m b/Server/Routes/CBXRoute.m index e5c8f8b6..19b2046e 100644 --- a/Server/Routes/CBXRoute.m +++ b/Server/Routes/CBXRoute.m @@ -51,6 +51,9 @@ + (instancetype)put:(NSString *)path withBlock:(RequestHandler)block { + (instancetype)delete:(NSString *)path withBlock:(RequestHandler)block { return [self http:@"DELETE" path:path withBlock:block]; } ++ (instancetype)options:(NSString *)path withBlock:(RequestHandler)block { + return [self http:@"OPTIONS" path:path withBlock:block]; +} - (NSString *)description { return [NSString stringWithFormat:@"%@ %@", self.HTTPVerb, self.path]; diff --git a/Server/Routes/UndefinedRoutes.m b/Server/Routes/UndefinedRoutes.m index 281733fc..e458be80 100644 --- a/Server/Routes/UndefinedRoutes.m +++ b/Server/Routes/UndefinedRoutes.m @@ -30,11 +30,17 @@ @implementation UndefinedRoutes @"requestBody" : body ?: @{} }]; }; + + RequestHandler pingBlock = ^(RouteRequest *request, NSDictionary *body, RouteResponse *response) { + [response setStatusCode:200]; + }; + return @[ [CBXRoute get:@"/*" withBlock:unhandledBlock].dontAutoregister, [CBXRoute post:@"/*" withBlock:unhandledBlock].dontAutoregister, [CBXRoute put:@"/*" withBlock:unhandledBlock].dontAutoregister, [CBXRoute delete:@"/*" withBlock:unhandledBlock].dontAutoregister, + [CBXRoute options:@"/*" withBlock:pingBlock].dontAutoregister, ]; } @end From 128d5bc0fb13a3d2c5d725e2cc5e66cc6c39d3d7 Mon Sep 17 00:00:00 2001 From: AndreyMaslennikov Date: Wed, 13 May 2020 21:44:51 +0300 Subject: [PATCH 38/53] Add iPhone SE 2 to the formFactorMap --- Server/Utilities/CBXDevice.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Server/Utilities/CBXDevice.m b/Server/Utilities/CBXDevice.m index f881aa9f..96a3d828 100644 --- a/Server/Utilities/CBXDevice.m +++ b/Server/Utilities/CBXDevice.m @@ -263,6 +263,9 @@ - (NSDictionary *)formFactorMap { @"iPhone12,3" : @"iphone 10", @"iPhone12,5" : @"iphone 10s max", + // iPhone SE 2020 + @"iPhone12,8" : @"iPhone 6", + // iPad Pro 13in @"iPad6,7" : @"ipad pro", @"iPad6,8" : @"ipad pro", From 076e283388c87d06c8ee1795eb395fc061e41a9f Mon Sep 17 00:00:00 2001 From: AndreyMaslennikov Date: Tue, 19 May 2020 20:07:58 +0300 Subject: [PATCH 39/53] Headers updated --- Server/PrivateHeaders/CBX-XCTest-Umbrella.h | 1 + .../XCTest/XCTSwiftErrorObservation.h | 9 ++- ...CTSwiftErrorObservation_Overlay-Protocol.h | 14 ++++ .../XCTestManager_ManagerInterface-Protocol.h | 2 +- .../PrivateHeaders/XCTest/XCUIApplication.h | 13 ---- ...CUIRemoteAccessibilityInterface-Protocol.h | 2 +- .../XCTest/_XCTestCaseImplementation.h | 70 ------------------- 7 files changed, 21 insertions(+), 90 deletions(-) create mode 100644 Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h delete mode 100644 Server/PrivateHeaders/XCTest/_XCTestCaseImplementation.h diff --git a/Server/PrivateHeaders/CBX-XCTest-Umbrella.h b/Server/PrivateHeaders/CBX-XCTest-Umbrella.h index 0a934058..bd2ed608 100644 --- a/Server/PrivateHeaders/CBX-XCTest-Umbrella.h +++ b/Server/PrivateHeaders/CBX-XCTest-Umbrella.h @@ -83,6 +83,7 @@ #import "XCTest/XCTSkippedTestContext.h" #import "XCTest/XCTStorageMetric.h" #import "XCTest/XCTSwiftErrorObservation.h" +#import "XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h" #import "XCTest/XCTTestIdentifier.h" #import "XCTest/XCTTestRunSession.h" #import "XCTest/XCTTestRunSessionDelegate-Protocol.h" diff --git a/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation.h b/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation.h index 2a821d5c..f7b3eb65 100644 --- a/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation.h +++ b/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation.h @@ -14,15 +14,14 @@ #import -@class XCTestRun; +#import "XCTSwiftErrorObservation_Overlay-Protocol.h" -@interface _XCTestImplementation : NSObject +@interface XCTSwiftErrorObservation : NSObject { - XCTestRun *_testRun; } -@property(retain) XCTestRun *testRun; - ++ (void)installSwiftErrorObserverIfPossible; ++ (id)observeErrorsInBlock:(CDUnknownBlockType)arg1; @end diff --git a/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h b/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h new file mode 100644 index 00000000..3c7f8865 --- /dev/null +++ b/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h @@ -0,0 +1,14 @@ +// class-dump results processed by bin/class-dump/dump.rb +// +// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). +// +// Copyright (C) 1997-2019 Steve Nygard. +// + +@protocol XCTSwiftErrorObservation_Overlay + +@optional ++ (BOOL)_installErrorObserver; ++ (id (^)(void))_observeErrors; +@end + diff --git a/Server/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h b/Server/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h index 4a44e423..a746036a 100644 --- a/Server/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h +++ b/Server/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h @@ -28,7 +28,7 @@ - (void)_XCT_fetchAttributesForElement:(XCAccessibilityElement *)arg1 attributes:(NSArray *)arg2 reply:(void (^)(NSDictionary *, NSError *))arg3; - (void)_XCT_fetchParameterizedAttribute:(NSString *)arg1 forElement:(XCAccessibilityElement *)arg2 parameter:(id)arg3 reply:(void (^)(id, NSError *))arg4; - (void)_XCT_fetchParameterizedAttributeForElement:(XCAccessibilityElement *)arg1 attributes:(NSNumber *)arg2 parameter:(id)arg3 reply:(void (^)(id, NSError *))arg4; -- (void)_XCT_fetchSnapshotForElement:(XCAccessibilityElement *)arg1 attributes:(NSArray *)arg2 parameters:(NSDictionary *)arg3 reply:(void (^)(NSDictionary *, NSError *))arg4; +- (void)_XCT_fetchSnapshotForElement:(XCAccessibilityElement *)arg1 attributes:(NSArray *)arg2 parameters:(NSDictionary *)arg3 reply:(void (^)(XCUIElementSnapshotRequestResult *, NSError *))arg4; - (void)_XCT_getDeviceOrientationWithCompletion:(void (^)(NSNumber *, NSError *))arg1; - (void)_XCT_injectAssistantRecognitionStrings:(NSArray *)arg1 completion:(void (^)(BOOL, NSError *))arg2; - (void)_XCT_injectVoiceRecognitionAudioInputPaths:(NSArray *)arg1 completion:(void (^)(BOOL, NSError *))arg2; diff --git a/Server/PrivateHeaders/XCTest/XCUIApplication.h b/Server/PrivateHeaders/XCTest/XCUIApplication.h index 2816cca9..839ee86c 100644 --- a/Server/PrivateHeaders/XCTest/XCUIApplication.h +++ b/Server/PrivateHeaders/XCTest/XCUIApplication.h @@ -14,19 +14,6 @@ #import "XCUIElement.h" -#if XCT_UI_TESTING_AVAILABLE - -typedef NS_ENUM(NSUInteger, XCUIApplicationState) { - XCUIApplicationStateUnknown = 0, - XCUIApplicationStateNotRunning = 1, -#if !TARGET_OS_OSX - XCUIApplicationStateRunningBackgroundSuspended = 2, -#endif - XCUIApplicationStateRunningBackground = 3, - XCUIApplicationStateRunningForeground = 4 -}; -#endif - @class NSArray, NSDictionary, NSString, XCAccessibilityElement, XCApplicationQuery, XCUIApplicationImpl, XCUIApplicationOpenRequest; @protocol XCTRunnerAutomationSession, XCUIDevice; diff --git a/Server/PrivateHeaders/XCTest/XCUIRemoteAccessibilityInterface-Protocol.h b/Server/PrivateHeaders/XCTest/XCUIRemoteAccessibilityInterface-Protocol.h index a9d15f7f..b7074cdc 100644 --- a/Server/PrivateHeaders/XCTest/XCUIRemoteAccessibilityInterface-Protocol.h +++ b/Server/PrivateHeaders/XCTest/XCUIRemoteAccessibilityInterface-Protocol.h @@ -19,7 +19,7 @@ - (void)enableFauxCollectionViewCells:(void (^)(BOOL, NSError *))arg1; - (void)fetchAttributes:(NSArray *)arg1 forElement:(XCAccessibilityElement *)arg2 reply:(void (^)(NSDictionary *, NSError *))arg3; - (void)fetchParameterizedAttribute:(NSString *)arg1 forElement:(XCAccessibilityElement *)arg2 parameter:(id)arg3 reply:(void (^)(id, NSError *))arg4; -- (void)fetchSnapshotForElement:(XCAccessibilityElement *)arg1 attributes:(NSArray *)arg2 parameters:(NSDictionary *)arg3 reply:(void (^)(NSDictionary *, NSError *))arg4; +- (void)fetchSnapshotForElement:(XCAccessibilityElement *)arg1 attributes:(NSArray *)arg2 parameters:(NSDictionary *)arg3 reply:(void (^)(XCUIElementSnapshotRequestResult *, NSError *))arg4; - (void)loadAccessibilityWithTimeout:(double)arg1 reply:(void (^)(BOOL, NSError *))arg2; - (void)performAccessibilityAction:(XCUIAccessibilityAction *)arg1 onElement:(XCAccessibilityElement *)arg2 value:(id)arg3 reply:(void (^)(NSError *))arg4; - (void)registerForAccessibilityNotification:(NSInteger)arg1 reply:(void (^)(NSNumber *, NSError *))arg2; diff --git a/Server/PrivateHeaders/XCTest/_XCTestCaseImplementation.h b/Server/PrivateHeaders/XCTest/_XCTestCaseImplementation.h deleted file mode 100644 index 7fba6e85..00000000 --- a/Server/PrivateHeaders/XCTest/_XCTestCaseImplementation.h +++ /dev/null @@ -1,70 +0,0 @@ -// -// Generated by class-dump 3.5 (64 bit). -// -// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. -// - -@class NSArray, NSInvocation, NSMutableArray, NSMutableDictionary, NSMutableSet, NSString, XCTestCaseRun, XCTestContext, XCTestExpectationWaiter, XCTWaiter; - -#import "CDStructures.h" - -@interface _XCTestCaseImplementation : NSObject -{ - NSInvocation *_invocation; - XCTestCaseRun *_testCaseRun; - BOOL _continueAfterFailure; - NSMutableSet *_expectations; - NSArray *_activePerformanceMetricIDs; - NSMutableDictionary *_perfMetricsForID; - unsigned long long _startWallClockTime; - struct time_value _startUserTime; - struct time_value _startSystemTime; - unsigned long long _measuringIteration; - BOOL _isMeasuringMetrics; - BOOL _didMeasureMetrics; - BOOL _didStartMeasuring; - BOOL _didStopMeasuring; - NSString *_filePathForUnexpectedFailure; - unsigned long long _lineNumberForUnexpectedFailure; - unsigned long long _callAddressForCurrentWait; - NSArray *_callAddressesForLastCreatedExpectation; - long long _runLoopNestingCount; - XCTWaiter *_currentWaiter; - NSMutableArray *_failureRecords; - BOOL _shouldHaltWhenReceivesControl; - BOOL _shouldIgnoreSubsequentFailures; - NSMutableArray *_activityRecordStack; - XCTestContext *_testContext; -} - -@property(readonly) XCTestContext *testContext; // @synthesize testContext=_testContext; -@property(retain, nonatomic) XCTWaiter *currentWaiter; // @synthesize currentWaiter=_currentWaiter; -@property(retain, nonatomic) NSMutableArray *activityRecordStack; // @synthesize activityRecordStack=_activityRecordStack; -@property BOOL shouldIgnoreSubsequentFailures; // @synthesize shouldIgnoreSubsequentFailures=_shouldIgnoreSubsequentFailures; -@property BOOL shouldHaltWhenReceivesControl; // @synthesize shouldHaltWhenReceivesControl=_shouldHaltWhenReceivesControl; -@property(retain, nonatomic) NSMutableArray *failureRecords; // @synthesize failureRecords=_failureRecords; -@property long long runLoopNestingCount; // @synthesize runLoopNestingCount=_runLoopNestingCount; -@property(copy) NSArray *callAddressesForLastCreatedExpectation; // @synthesize callAddressesForLastCreatedExpectation=_callAddressesForLastCreatedExpectation; -@property unsigned long long callAddressForCurrentWait; // @synthesize callAddressForCurrentWait=_callAddressForCurrentWait; -@property unsigned long long lineNumberForUnexpectedFailure; // @synthesize lineNumberForUnexpectedFailure=_lineNumberForUnexpectedFailure; -@property(copy) NSString *filePathForUnexpectedFailure; // @synthesize filePathForUnexpectedFailure=_filePathForUnexpectedFailure; -@property(retain, nonatomic) NSMutableSet *expectations; // @synthesize expectations=_expectations; -@property BOOL didStopMeasuring; // @synthesize didStopMeasuring=_didStopMeasuring; -@property BOOL didStartMeasuring; // @synthesize didStartMeasuring=_didStartMeasuring; -@property BOOL didMeasureMetrics; // @synthesize didMeasureMetrics=_didMeasureMetrics; -@property BOOL isMeasuringMetrics; // @synthesize isMeasuringMetrics=_isMeasuringMetrics; -@property unsigned long long measuringIteration; // @synthesize measuringIteration=_measuringIteration; -@property struct time_value startUserTime; // @synthesize startUserTime=_startUserTime; -@property struct time_value startSystemTime; // @synthesize startSystemTime=_startSystemTime; -@property unsigned long long startWallClockTime; // @synthesize startWallClockTime=_startWallClockTime; -@property(retain) NSMutableDictionary *perfMetricsForID; // @synthesize perfMetricsForID=_perfMetricsForID; -@property(copy) NSArray *activePerformanceMetricIDs; // @synthesize activePerformanceMetricIDs=_activePerformanceMetricIDs; -@property BOOL continueAfterFailure; // @synthesize continueAfterFailure=_continueAfterFailure; -@property(retain) XCTestCaseRun *testCaseRun; // @synthesize testCaseRun=_testCaseRun; -@property(retain) NSInvocation *invocation; // @synthesize invocation=_invocation; - -- (void)resetExpectations; -- (void)addExpectation:(id)arg1; -- (id)init; - -@end From 77b1c1e59b360d898cfc9fb374cb3b19e25e7ab1 Mon Sep 17 00:00:00 2001 From: AndreyMaslennikov Date: Wed, 20 May 2020 15:36:24 +0300 Subject: [PATCH 40/53] Fix the XCUIApplicationState and the XCUIElementSnapshotRequestResult errors --- .../XCTest/XCTestManager_ManagerInterface-Protocol.h | 2 +- Server/XCUIApplicationStateTypedef.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Server/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h b/Server/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h index a746036a..86328b9f 100644 --- a/Server/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h +++ b/Server/PrivateHeaders/XCTest/XCTestManager_ManagerInterface-Protocol.h @@ -14,7 +14,7 @@ #import "XCTestManager_ProtectedResources-Protocol.h" -@class NSArray, NSDictionary, NSNumber, NSString, NSURL, NSUUID, XCAccessibilityElement, XCDeviceEvent, XCSynthesizedEventRecord, XCTCapabilities, XCTSpindumpRequestSpecification; +@class NSArray, NSDictionary, NSNumber, NSString, NSURL, NSUUID, XCAccessibilityElement, XCDeviceEvent, XCSynthesizedEventRecord, XCTCapabilities, XCTSpindumpRequestSpecification, XCUIElementSnapshotRequestResult; @class XCTSerializedTransportWrapper; @class XCElementSnapshot; diff --git a/Server/XCUIApplicationStateTypedef.h b/Server/XCUIApplicationStateTypedef.h index 33d07831..a8b025e0 100644 --- a/Server/XCUIApplicationStateTypedef.h +++ b/Server/XCUIApplicationStateTypedef.h @@ -2,7 +2,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. -#ifndef XCT_UI_TESTING_AVAILABLE typedef NS_ENUM(NSUInteger, XCUIApplicationState) { XCUIApplicationStateUnknown = 0, XCUIApplicationStateNotRunning = 1, @@ -12,4 +11,3 @@ typedef NS_ENUM(NSUInteger, XCUIApplicationState) { XCUIApplicationStateRunningBackground = 3, XCUIApplicationStateRunningForeground = 4 }; -#endif From 766e03b7a9cf0fc2827d52e9ed73aa1724197e5f Mon Sep 17 00:00:00 2001 From: AndreyMaslennikov Date: Wed, 20 May 2020 16:17:33 +0300 Subject: [PATCH 41/53] Fix the XCTSwiftErrorIssue error --- .../FBXCTestCaseImplementationFailureHoldingProxy.m | 2 +- Server/PrivateHeaders/CBX-XCTest-Umbrella.h | 2 -- .../PrivateHeaders/XCTest/XCTSwiftErrorObservation.h | 5 ----- .../XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h | 10 +++++----- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m b/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m index 69775676..2accacc4 100644 --- a/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m +++ b/DeviceAgent/FBXCTestCaseImplementationFailureHoldingProxy.m @@ -12,7 +12,7 @@ #import "FBXCTestCaseImplementationFailureHoldingProxy.h" -#import "_XCTestCaseImplementation.h" +@class _XCTestCaseImplementation; @interface FBXCTestCaseImplementationFailureHoldingProxy () @property (nonatomic, strong) _XCTestCaseImplementation *internalImplementation; diff --git a/Server/PrivateHeaders/CBX-XCTest-Umbrella.h b/Server/PrivateHeaders/CBX-XCTest-Umbrella.h index bd2ed608..ed92c899 100644 --- a/Server/PrivateHeaders/CBX-XCTest-Umbrella.h +++ b/Server/PrivateHeaders/CBX-XCTest-Umbrella.h @@ -82,8 +82,6 @@ #import "XCTest/XCTSerializedTransportWrapper.h" #import "XCTest/XCTSkippedTestContext.h" #import "XCTest/XCTStorageMetric.h" -#import "XCTest/XCTSwiftErrorObservation.h" -#import "XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h" #import "XCTest/XCTTestIdentifier.h" #import "XCTest/XCTTestRunSession.h" #import "XCTest/XCTTestRunSessionDelegate-Protocol.h" diff --git a/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation.h b/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation.h index f7b3eb65..6d4ffc47 100644 --- a/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation.h +++ b/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation.h @@ -14,11 +14,6 @@ #import -#import "XCTSwiftErrorObservation_Overlay-Protocol.h" - -@interface XCTSwiftErrorObservation : NSObject -{ -} + (void)installSwiftErrorObserverIfPossible; + (id)observeErrorsInBlock:(CDUnknownBlockType)arg1; diff --git a/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h b/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h index 3c7f8865..81c7196d 100644 --- a/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h +++ b/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h @@ -5,10 +5,10 @@ // Copyright (C) 1997-2019 Steve Nygard. // -@protocol XCTSwiftErrorObservation_Overlay +// @protocol XCTSwiftErrorObservation_Overlay -@optional -+ (BOOL)_installErrorObserver; -+ (id (^)(void))_observeErrors; -@end +// @optional +// + (BOOL)_installErrorObserver; +// + (id (^)(void))_observeErrors; +// @end From 41a5fa1f8ceb5a12b2b8a1199c520ce82f74a263 Mon Sep 17 00:00:00 2001 From: AndreyMaslennikov Date: Wed, 20 May 2020 16:33:48 +0300 Subject: [PATCH 42/53] Remove unused header --- .../XCTSwiftErrorObservation_Overlay-Protocol.h | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h diff --git a/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h b/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h deleted file mode 100644 index 81c7196d..00000000 --- a/Server/PrivateHeaders/XCTest/XCTSwiftErrorObservation_Overlay-Protocol.h +++ /dev/null @@ -1,14 +0,0 @@ -// class-dump results processed by bin/class-dump/dump.rb -// -// Generated by class-dump 3.5 (64 bit) (Debug version compiled Apr 12 2019 07:16:25). -// -// Copyright (C) 1997-2019 Steve Nygard. -// - -// @protocol XCTSwiftErrorObservation_Overlay - -// @optional -// + (BOOL)_installErrorObserver; -// + (id (^)(void))_observeErrors; -// @end - From fe65662c6a236e27e88dda721962c19039e60e72 Mon Sep 17 00:00:00 2001 From: Viktar Karanevich Date: Thu, 4 Jun 2020 13:33:49 +0100 Subject: [PATCH 43/53] [Support] Fix identifier implicit assertion issue in debug log for not running app --- Server/Application/Application.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Server/Application/Application.m b/Server/Application/Application.m index 4f654cbf..2fe4246b 100644 --- a/Server/Application/Application.m +++ b/Server/Application/Application.m @@ -98,7 +98,7 @@ + (XCUIApplicationState)terminateCurrentApplication { + (XCUIApplicationState)terminateApplication:(XCUIApplication *)application { NSTimeInterval startTime = [[CBXMachClock sharedClock] absoluteTime]; if (application.state == XCUIApplicationStateNotRunning) { - DDLogDebug(@"Application %@ is not running", application.identifier); + DDLogDebug(@"Application %@ is not running", application.bundleID); return XCUIApplicationStateNotRunning; } From 28c8b6a0a2c04f4b8dd08a699c840d8dda0bb3be Mon Sep 17 00:00:00 2001 From: Viktar Karanevich Date: Tue, 3 Mar 2020 18:29:20 +0000 Subject: [PATCH 44/53] [Support] add descendant matching query specifier --- DeviceAgent.xcodeproj/project.pbxproj | 8 ++++++ .../QuerySpecifierByDescendantType.h | 16 ++++++++++++ .../QuerySpecifierByDescendantType.m | 25 +++++++++++++++++++ Server/CBXConstants.h | 2 ++ 4 files changed, 51 insertions(+) create mode 100644 Server/AutomationActions/Query/Specifiers/QuerySpecifierByDescendantType.h create mode 100644 Server/AutomationActions/Query/Specifiers/QuerySpecifierByDescendantType.m diff --git a/DeviceAgent.xcodeproj/project.pbxproj b/DeviceAgent.xcodeproj/project.pbxproj index d1342a2e..2789fa7d 100644 --- a/DeviceAgent.xcodeproj/project.pbxproj +++ b/DeviceAgent.xcodeproj/project.pbxproj @@ -47,6 +47,8 @@ /* Begin PBXBuildFile section */ 0AA3924F23279A68000E799B /* SpringBoardAlertsCurrentLanguageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AA3924D23279A68000E799B /* SpringBoardAlertsCurrentLanguageTests.m */; }; 1A020FC02338BEB600D79E57 /* XCTest+CBXAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = F547174D204939DA0024AA0B /* XCTest+CBXAdditions.h */; }; + 3B81F695240E952F00825603 /* QuerySpecifierByDescendantType.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B81F694240E952F00825603 /* QuerySpecifierByDescendantType.m */; }; + 3B81F696240E952F00825603 /* QuerySpecifierByDescendantType.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B81F694240E952F00825603 /* QuerySpecifierByDescendantType.m */; }; 4107F8FE231D7298003961AF /* Resources.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4107F8FC231D7262003961AF /* Resources.xcassets */; }; 41188FEA22E9958D0012886A /* XCWebViews.m in Sources */ = {isa = PBXBuildFile; fileRef = 4166C9AE22E7009800C8BEBF /* XCWebViews.m */; }; 419BE54B231E46D800DF0ABD /* Resources.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4107F8FC231D7262003961AF /* Resources.xcassets */; }; @@ -753,6 +755,8 @@ /* Begin PBXFileReference section */ 0AA3924D23279A68000E799B /* SpringBoardAlertsCurrentLanguageTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = SpringBoardAlertsCurrentLanguageTests.m; sourceTree = ""; }; + 3B81F693240E937F00825603 /* QuerySpecifierByDescendantType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QuerySpecifierByDescendantType.h; sourceTree = ""; }; + 3B81F694240E952F00825603 /* QuerySpecifierByDescendantType.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QuerySpecifierByDescendantType.m; sourceTree = ""; }; 4107F8FC231D7262003961AF /* Resources.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Resources.xcassets; sourceTree = ""; }; 4166C9AE22E7009800C8BEBF /* XCWebViews.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XCWebViews.m; sourceTree = ""; }; 634244EC948D56732C2565E5 /* SpringBoardAlerts.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = SpringBoardAlerts.m; sourceTree = ""; tabWidth = 4; usesTabs = 0; }; @@ -2153,6 +2157,8 @@ 89D5380F1CA34CBE00F62E09 /* QuerySpecifierByTextLike.m */, 899696FD1CB5C93400BB42E2 /* QuerySpecifierByCoordinate.h */, 899696FE1CB5C93400BB42E2 /* QuerySpecifierByCoordinate.m */, + 3B81F693240E937F00825603 /* QuerySpecifierByDescendantType.h */, + 3B81F694240E952F00825603 /* QuerySpecifierByDescendantType.m */, 89B9519F1CF5B297007FD0AB /* QuerySpecifierByType.h */, 89B951A01CF5B297007FD0AB /* QuerySpecifierByType.m */, F536799F1D7C324E009956D0 /* QuerySpecifierByMark.h */, @@ -3356,6 +3362,7 @@ F55F81A41C6DD07500A945C8 /* HTTPFileResponse.m in Sources */, 896586831CEB9B9800E8329C /* QueryFactory.m in Sources */, F55F81941C6DD07500A945C8 /* HTTPServer.m in Sources */, + 3B81F695240E952F00825603 /* QuerySpecifierByDescendantType.m in Sources */, 89D538161CA351F400F62E09 /* QuerySpecifierByIndex.m in Sources */, 89B951A21CF5B297007FD0AB /* QuerySpecifierByType.m in Sources */, F5870B401CF0BEFF00B3376C /* CBXTouchEvent.m in Sources */, @@ -3461,6 +3468,7 @@ F5061AAC2153B4EF00B85792 /* RouteRequest.m in Sources */, F5061A682153B15E00B85792 /* ElementNotFoundException.m in Sources */, F5061A4C2153B0FF00B85792 /* CBXDecimalRounderTest.m in Sources */, + 3B81F696240E952F00825603 /* QuerySpecifierByDescendantType.m in Sources */, F5061A642153B15E00B85792 /* SpringBoard.m in Sources */, F5061A4E2153B0FF00B85792 /* CBXDeviceTest.m in Sources */, F5061A522153B0FF00B85792 /* CBXOrientationTest.m in Sources */, diff --git a/Server/AutomationActions/Query/Specifiers/QuerySpecifierByDescendantType.h b/Server/AutomationActions/Query/Specifiers/QuerySpecifierByDescendantType.h new file mode 100644 index 00000000..d883f16b --- /dev/null +++ b/Server/AutomationActions/Query/Specifiers/QuerySpecifierByDescendantType.h @@ -0,0 +1,16 @@ + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +#import +#import "QuerySpecifier.h" + +/** + This specifier finds all descendants elements matching the descendant_type within the element matching the parent_type. + + ## Usage: + + { "descendant_element" : { "parent_type": "String", "descendant_type": "String" } } + */ +@interface QuerySpecifierByDescendantType : QuerySpecifier +@end diff --git a/Server/AutomationActions/Query/Specifiers/QuerySpecifierByDescendantType.m b/Server/AutomationActions/Query/Specifiers/QuerySpecifierByDescendantType.m new file mode 100644 index 00000000..da192059 --- /dev/null +++ b/Server/AutomationActions/Query/Specifiers/QuerySpecifierByDescendantType.m @@ -0,0 +1,25 @@ +#import "QuerySpecifierByDescendantType.h" +#import "JSONUtils.h" +#import "CBX-XCTest-Umbrella.h" +#import "InvalidArgumentException.h" + +@implementation QuerySpecifierByDescendantType ++ (NSString *)name { return @"descendant_element"; } + +- (XCUIElementQuery *)applyInternal:(XCUIElementQuery *)query { + NSAssert([self.value isKindOfClass:[NSDictionary class]], @"Malformed descendant_element value. Expected dictionary, for example: { 'descendant_type' = Button; 'parent_type' = Keyboard; }, but actual '%@'", self.value); + + NSDictionary *parameters = self.value; + + NSAssert(parameters.count == 2, @"Dictionary should have only 2 keys '%@' and '%@', but actual dictionary is '%@'", CBX_PARENT_TYPE_KEY, CBX_DESCENDANT_TYPE_KEY, parameters); + NSAssert(parameters[CBX_PARENT_TYPE_KEY] != nil, @"Value for key '%@' should not be nil. Actual dictionary: %@", CBX_PARENT_TYPE_KEY, parameters); + NSAssert(parameters[CBX_DESCENDANT_TYPE_KEY] != nil, @"Value for key '%@' should not be nil. Actual dictionary: %@", CBX_DESCENDANT_TYPE_KEY, parameters); + + XCUIElementType parentType = [JSONUtils elementTypeForString:parameters[CBX_PARENT_TYPE_KEY]]; + XCUIElementType descendantType = [JSONUtils elementTypeForString:parameters[CBX_DESCENDANT_TYPE_KEY]]; + + XCUIElementQuery *contextQuery = [query matchingType:parentType identifier:nil]; + + return [contextQuery descendantsMatchingType:descendantType];; +} +@end diff --git a/Server/CBXConstants.h b/Server/CBXConstants.h index 92865702..cdcc8d40 100644 --- a/Server/CBXConstants.h +++ b/Server/CBXConstants.h @@ -61,6 +61,8 @@ static NSString *const CBX_HAS_KEYBOARD_FOCUS_KEY = @"has_keyboard_focus"; static NSString *const CBX_HITABLE_KEY = @"hitable"; static NSString *const CBX_HIT_POINT_KEY = @"hit_point"; static NSString *const CBX_INDEX_KEY = @"index"; +static NSString *const CBX_PARENT_TYPE_KEY = @"parent_type"; +static NSString *const CBX_DESCENDANT_TYPE_KEY = @"descendant_type"; static NSString *const CBX_PROPERTY_KEY = @"property"; static NSString *const CBX_PROPERTY_LIKE_KEY = @"property_like"; static NSString *const CBX_TEST_ID = @"test_id"; From cddfea1fcef86bb20733a36691fb0b9716c9f43d Mon Sep 17 00:00:00 2001 From: Viktar Karanevich Date: Tue, 16 Jun 2020 15:18:07 +0100 Subject: [PATCH 45/53] [Support] add OCMock integration tests for descendant query specifier --- DeviceAgent.xcodeproj/project.pbxproj | 8 + .../QuerySpecifierByDescendantType.m | 30 ++-- .../Queries/QuerySpecifierTests.m | 170 ++++++++++++++++++ 3 files changed, 198 insertions(+), 10 deletions(-) create mode 100644 TestApp/DeviceAgentUnitTests/AutomationActions/Queries/QuerySpecifierTests.m diff --git a/DeviceAgent.xcodeproj/project.pbxproj b/DeviceAgent.xcodeproj/project.pbxproj index 2789fa7d..b8dbdd5e 100644 --- a/DeviceAgent.xcodeproj/project.pbxproj +++ b/DeviceAgent.xcodeproj/project.pbxproj @@ -47,8 +47,11 @@ /* Begin PBXBuildFile section */ 0AA3924F23279A68000E799B /* SpringBoardAlertsCurrentLanguageTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AA3924D23279A68000E799B /* SpringBoardAlertsCurrentLanguageTests.m */; }; 1A020FC02338BEB600D79E57 /* XCTest+CBXAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = F547174D204939DA0024AA0B /* XCTest+CBXAdditions.h */; }; + 3B5444E52498241500532AE0 /* QuerySpecifierByDescendantType.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B81F693240E937F00825603 /* QuerySpecifierByDescendantType.h */; }; + 3B5444EA249838AC00532AE0 /* QuerySpecifierTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B5444E02498216000532AE0 /* QuerySpecifierTests.m */; }; 3B81F695240E952F00825603 /* QuerySpecifierByDescendantType.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B81F694240E952F00825603 /* QuerySpecifierByDescendantType.m */; }; 3B81F696240E952F00825603 /* QuerySpecifierByDescendantType.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B81F694240E952F00825603 /* QuerySpecifierByDescendantType.m */; }; + 3BE3ED1E2498CF0700830B19 /* XCTest+CBXAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = F547174F20496A200024AA0B /* XCTest+CBXAdditions.m */; }; 4107F8FE231D7298003961AF /* Resources.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4107F8FC231D7262003961AF /* Resources.xcassets */; }; 41188FEA22E9958D0012886A /* XCWebViews.m in Sources */ = {isa = PBXBuildFile; fileRef = 4166C9AE22E7009800C8BEBF /* XCWebViews.m */; }; 419BE54B231E46D800DF0ABD /* Resources.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4107F8FC231D7262003961AF /* Resources.xcassets */; }; @@ -755,6 +758,7 @@ /* Begin PBXFileReference section */ 0AA3924D23279A68000E799B /* SpringBoardAlertsCurrentLanguageTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = SpringBoardAlertsCurrentLanguageTests.m; sourceTree = ""; }; + 3B5444E02498216000532AE0 /* QuerySpecifierTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QuerySpecifierTests.m; sourceTree = ""; }; 3B81F693240E937F00825603 /* QuerySpecifierByDescendantType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QuerySpecifierByDescendantType.h; sourceTree = ""; }; 3B81F694240E952F00825603 /* QuerySpecifierByDescendantType.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QuerySpecifierByDescendantType.m; sourceTree = ""; }; 4107F8FC231D7262003961AF /* Resources.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Resources.xcassets; sourceTree = ""; }; @@ -2273,6 +2277,7 @@ F58D27E81D4F947F000FF6C0 /* Queries */ = { isa = PBXGroup; children = ( + 3B5444E02498216000532AE0 /* QuerySpecifierTests.m */, F58D27EA1D4F947F000FF6C0 /* CoordinateQueryTests.m */, F58D27EB1D4F947F000FF6C0 /* Factory */, F58D27ED1D4F947F000FF6C0 /* QuerySelectors */, @@ -2507,6 +2512,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 3B5444E52498241500532AE0 /* QuerySpecifierByDescendantType.h in Headers */, F54C02B02043F0EF00FD8DDE /* XCTElementFilteringTransformer.h in Headers */, F54C027E2043F0EF00FD8DDE /* XCTKVOExpectation.h in Headers */, F54C02502043F0EF00FD8DDE /* XCUIApplicationProcess.h in Headers */, @@ -3441,6 +3447,7 @@ buildActionMask = 2147483647; files = ( F5061A8A2153B19900B85792 /* QueryConfigurationFactory.m in Sources */, + 3BE3ED1E2498CF0700830B19 /* XCTest+CBXAdditions.m in Sources */, F5061A742153B19900B85792 /* Testmanagerd.m in Sources */, F5061A512153B0FF00B85792 /* SpringBoardAlertsTest.m in Sources */, F5061A9C2153B4EF00B85792 /* HTTPAuthenticationRequest.m in Sources */, @@ -3511,6 +3518,7 @@ F5061A812153B19900B85792 /* QuerySpecifierByPropertyLike.m in Sources */, F5061A592153B14400B85792 /* ThreadUtils.m in Sources */, F5061A422153B0FF00B85792 /* QueryConfigurationFactoryTests.m in Sources */, + 3B5444EA249838AC00532AE0 /* QuerySpecifierTests.m in Sources */, F5061A502153B0FF00B85792 /* SpringBoardAlertTest.m in Sources */, F5061A582153B14400B85792 /* GeometryUtils.m in Sources */, F5061A782153B19900B85792 /* (null) in Sources */, diff --git a/Server/AutomationActions/Query/Specifiers/QuerySpecifierByDescendantType.m b/Server/AutomationActions/Query/Specifiers/QuerySpecifierByDescendantType.m index da192059..b2d35664 100644 --- a/Server/AutomationActions/Query/Specifiers/QuerySpecifierByDescendantType.m +++ b/Server/AutomationActions/Query/Specifiers/QuerySpecifierByDescendantType.m @@ -1,25 +1,35 @@ #import "QuerySpecifierByDescendantType.h" #import "JSONUtils.h" -#import "CBX-XCTest-Umbrella.h" -#import "InvalidArgumentException.h" @implementation QuerySpecifierByDescendantType + (NSString *)name { return @"descendant_element"; } - (XCUIElementQuery *)applyInternal:(XCUIElementQuery *)query { - NSAssert([self.value isKindOfClass:[NSDictionary class]], @"Malformed descendant_element value. Expected dictionary, for example: { 'descendant_type' = Button; 'parent_type' = Keyboard; }, but actual '%@'", self.value); + NSString *error_message = [NSString stringWithFormat:@"%@%@%@%@", + @"Malformed descendant_element value. ", + @"Expected dictionary like: ", + @"{ 'descendant_type' = Button; 'parent_type' = Keyboard; }", + [NSString stringWithFormat:@"but actual is '%@'", self.value]]; + NSAssert([self.value isKindOfClass:[NSDictionary class]], error_message); NSDictionary *parameters = self.value; - - NSAssert(parameters.count == 2, @"Dictionary should have only 2 keys '%@' and '%@', but actual dictionary is '%@'", CBX_PARENT_TYPE_KEY, CBX_DESCENDANT_TYPE_KEY, parameters); - NSAssert(parameters[CBX_PARENT_TYPE_KEY] != nil, @"Value for key '%@' should not be nil. Actual dictionary: %@", CBX_PARENT_TYPE_KEY, parameters); - NSAssert(parameters[CBX_DESCENDANT_TYPE_KEY] != nil, @"Value for key '%@' should not be nil. Actual dictionary: %@", CBX_DESCENDANT_TYPE_KEY, parameters); - XCUIElementType parentType = [JSONUtils elementTypeForString:parameters[CBX_PARENT_TYPE_KEY]]; - XCUIElementType descendantType = [JSONUtils elementTypeForString:parameters[CBX_DESCENDANT_TYPE_KEY]]; + NSAssert(parameters.count == 2, + @"Dictionary should have only 2 keys '%@' and '%@', but actual is '%@'", + CBX_PARENT_TYPE_KEY, CBX_DESCENDANT_TYPE_KEY, parameters); + NSAssert(parameters[CBX_PARENT_TYPE_KEY] != nil, + @"Value for key '%@' should not be nil. Actual dictionary: %@", + CBX_PARENT_TYPE_KEY, parameters); + NSAssert(parameters[CBX_DESCENDANT_TYPE_KEY] != nil, + @"Value for key '%@' should not be nil. Actual dictionary: %@", + CBX_DESCENDANT_TYPE_KEY, parameters); + XCUIElementType parentType = [JSONUtils elementTypeForString:parameters[CBX_PARENT_TYPE_KEY]]; XCUIElementQuery *contextQuery = [query matchingType:parentType identifier:nil]; - return [contextQuery descendantsMatchingType:descendantType];; + XCUIElementType descendantType = [JSONUtils elementTypeForString:parameters[CBX_DESCENDANT_TYPE_KEY]]; + XCUIElementQuery *resultQuery = [contextQuery descendantsMatchingType:descendantType]; + + return resultQuery; } @end diff --git a/TestApp/DeviceAgentUnitTests/AutomationActions/Queries/QuerySpecifierTests.m b/TestApp/DeviceAgentUnitTests/AutomationActions/Queries/QuerySpecifierTests.m new file mode 100644 index 00000000..1378b813 --- /dev/null +++ b/TestApp/DeviceAgentUnitTests/AutomationActions/Queries/QuerySpecifierTests.m @@ -0,0 +1,170 @@ +#import +#import "QueryConfiguration.h" +#import "QueryFactory.h" +#import "QuerySpecifier.h" +#import "Application.h" +#import "CBXConstants.h" +#import "XCTest+CBXAdditions.h" +#import "CBXServerUnitTestUmbrellaHeader.h" + +@interface QuerySpecifierTests : XCTestCase +@end + +@implementation QuerySpecifierTests + +- (void)setUp { + [super setUp]; +} + +- (void)tearDown { + [super tearDown]; +} + +- (void)testQuerySpecifierByDescendantTypeThrowsExceptionForInvalidMainKeyCase { + id invalidJson = @{@"descendantElement": @{@"parent_type" : @"Keyboard", + @"descendant_type" : @"Button"}}; + + expect(^{ + [QueryConfiguration withJSON:invalidJson validator:nil]; + }).to.raise(@"InvalidArgumentException"); +} + +- (void)testQuerySpecifierByDescendantTypeThrowsExceptionForInvalidParentKeyCase { + // [Set Up] Stage 0: prepare query with invalid config + id invalidJson = @{@"descendant_element": @{@"parent_typeeeee" : @"Keyboard", + @"descendant_type" : @"Button"}}; + QueryConfiguration *queryConfig = [QueryConfiguration withJSON:invalidJson validator:nil]; + + Query *query = [QueryFactory queryWithQueryConfiguration:queryConfig]; + + // [Preconditions] Stage 1: prepare mock objects for app and query + id appMock = OCMClassMock([Application class]); + id uiAppMock = OCMClassMock([XCUIApplication class]); + + id queryMock = OCMClassMock([XCUIElementQuery class]); + + // [Preconditions] Stage 1: mock methods called in [query execute] + OCMStub([uiAppMock cbxQueryForDescendantsOfAnyType]).andReturn(queryMock); + OCMStub([appMock currentApplication]).andReturn(uiAppMock); + + // [Check] Stage 2: throw Exception in case parent type key is malformed + expect(^{ + [query execute]; + }).to.raise(@"NSInternalInconsistencyException"); +} + +- (void)testQuerySpecifierByDescendantTypeThrowsExceptionForInvalidDescendantKeyCase { + // [Set Up] Stage 0: prepare query with invalid config + id invalidJson = @{@"descendant_element": @{@"parent_type" : @"Keyboard", + @"descendantType" : @"Button"}}; + QueryConfiguration *queryConfig = [QueryConfiguration withJSON:invalidJson validator:nil]; + + Query *query = [QueryFactory queryWithQueryConfiguration:queryConfig]; + + // [Preconditions] Stage 1: prepare mock objects for app and query + id appMock = OCMClassMock([Application class]); + id uiAppMock = OCMClassMock([XCUIApplication class]); + + id queryMock = OCMClassMock([XCUIElementQuery class]); + + // [Preconditions] Stage 1: mock methods called in [query execute] + OCMStub([uiAppMock cbxQueryForDescendantsOfAnyType]).andReturn(queryMock); + OCMStub([appMock currentApplication]).andReturn(uiAppMock); + + // [Check] Stage 2: throw Exception in case descendant type key is malformed + expect(^{ + [query execute]; + }).to.raise(@"NSInternalInconsistencyException"); +} + +- (void)testQuerySpecifierByDescendantTypeThrowsExceptionForInvalidMissingKeyCase { + // [Set Up] Stage 0: prepare query with invalid config + id invalidJson = @{@"descendant_element": @{@"parent_type" : @"Keyboard" }}; + QueryConfiguration *queryConfig = [QueryConfiguration withJSON:invalidJson validator:nil]; + + Query *query = [QueryFactory queryWithQueryConfiguration:queryConfig]; + + // [Preconditions] Stage 1: prepare mock objects for app and query + id appMock = OCMClassMock([Application class]); + id uiAppMock = OCMClassMock([XCUIApplication class]); + + id queryMock = OCMClassMock([XCUIElementQuery class]); + + // [Preconditions] Stage 1: mock methods called in [query execute] + OCMStub([uiAppMock cbxQueryForDescendantsOfAnyType]).andReturn(queryMock); + OCMStub([appMock currentApplication]).andReturn(uiAppMock); + + // [Check] Stage 2: throw Exception in case missed descendant_type key + expect(^{ + [query execute]; + }).to.raise(@"NSInternalInconsistencyException"); +} + +- (void)testQuerySpecifierByDescendantTypeThrowsExceptionForInvalidParentTypeValueCase { + // [Set Up] Stage 0: prepare query with invalid config + id invalidJson = @{@"descendant_element": @{@"parent_type" : @"UIKeyboard", + @"descendant_type" : @"Button"}}; + QueryConfiguration *queryConfig = [QueryConfiguration withJSON:invalidJson validator:nil]; + + Query *query = [QueryFactory queryWithQueryConfiguration:queryConfig]; + + // [Preconditions] Stage 1: prepare mock objects for app and query + id appMock = OCMClassMock([Application class]); + id uiAppMock = OCMClassMock([XCUIApplication class]); + + id queryMock = OCMClassMock([XCUIElementQuery class]); + + // [Preconditions] Stage 1: mock methods called in [query execute] + OCMStub([uiAppMock cbxQueryForDescendantsOfAnyType]).andReturn(queryMock); + OCMStub([appMock currentApplication]).andReturn(uiAppMock); + + // [Check] Stage 2: throw Exception in case UIElement type value is invalid + expect(^{ + [query execute]; + }).to.raise(@"CBXException"); +} + +- (void)testQuerySpecifierByDescendantTypeReturnsArrayOfElementsForValidCase { + // [Set Up] Stage 0: prepare query with valid config + id validJson = @{@"descendant_element": @{@"parent_type" : @"Keyboard", + @"descendant_type" : @"Button"}}; + QueryConfiguration *queryConfig = [QueryConfiguration withJSON:validJson validator:nil]; + + Query *query = [QueryFactory queryWithQueryConfiguration:queryConfig]; + + // [Preconditions] Stage 1: prepare mock objects for app and query + // (we want mock interactions with real app object and + // check specific implementation of applyInternal for QuerySpecifierByDescendantType) + id appMock = OCMClassMock([Application class]); + id uiAppMock = OCMClassMock([XCUIApplication class]); + id element = OCMClassMock([XCUIElement class]); + id arrayOfElements = [NSArray arrayWithObject:element]; + + id queryMock = OCMClassMock([XCUIElementQuery class]); + id contextQueryMock = OCMClassMock([XCUIElementQuery class]); + id resultQueryMock = OCMClassMock([XCUIElementQuery class]); + + // [Preconditions] Stage 1: mock methods called in [query execute] + OCMStub([uiAppMock cbxQueryForDescendantsOfAnyType]).andReturn(queryMock); + OCMStub([appMock currentApplication]).andReturn(uiAppMock); + + // [Expectations] Stage 2: set up expectations for [specifier applyInternal:query] + // where specifier is QuerySpecifierByDescendantType + XCUIElementType keyboard = XCUIElementTypeKeyboard; + XCUIElementType button = XCUIElementTypeButton; + OCMExpect([queryMock matchingType:keyboard identifier:nil]).andReturn(contextQueryMock); + OCMExpect([contextQueryMock descendantsMatchingType:button]).andReturn(resultQueryMock); + // [Expectations] Stage 2: set up expectations for [query execute] + OCMExpect([resultQueryMock allElementsBoundByIndex]).andReturn(arrayOfElements); + + // [Test Step] Stage 3: perform test step + [query execute]; + + // [Check] Stage 4: verify [specifier applyInternal:query] + OCMVerifyAll(queryMock); + OCMVerifyAll(contextQueryMock); + // [Check] Stage 4: verify [query execute] + OCMVerifyAll(resultQueryMock); +} + +@end From 2f0c2c51884af28bcc73d7ea244f8a9d2d291562 Mon Sep 17 00:00:00 2001 From: Viktar Karanevich Date: Wed, 17 Jun 2020 13:11:53 +0100 Subject: [PATCH 46/53] [Support] add cucumber test for descendant_element query --- cucumber/features/query.feature | 9 +++++++++ cucumber/features/steps/query.rb | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/cucumber/features/query.feature b/cucumber/features/query.feature index de656b77..9fddf261 100644 --- a/cucumber/features/query.feature +++ b/cucumber/features/query.feature @@ -78,3 +78,12 @@ Then I query the text field using "marked" with string "Schreib!" and see value Then I query the text field using "marked" with string "Hello!" and see value "Hello!" Then I query the text field using "text" with string "Schreib!" and see value "Hello!" Then I query the text field using "text" with string "Hello!" and see value "Hello!" + +@query +Scenario: Descendant query returns array of elements +Given I am looking at the Text Input with placeholder +And I touch the text field +When the keyboard is visible +Then I query the keyboard using "descendant_element" and see keyboard buttons + | parent_type | descendant_type | + | Keyboard | Button | diff --git a/cucumber/features/steps/query.rb b/cucumber/features/steps/query.rb index e0af34a7..73d874d7 100644 --- a/cucumber/features/steps/query.rb +++ b/cucumber/features/steps/query.rb @@ -316,3 +316,9 @@ def newlines_in_queries_supported? expect(actual["value"]).to be == value end + +Then(/^I query the keyboard using "descendant_element" and see keyboard buttons$/) do |table| + locator = {descendant_element: table.hashes.first} + actual_keyboard_buttons = wait_for_view(locator) + expect(actual_keyboard_buttons.count).to be > 1 +end From 85a5be270a0138f898a898589bfb2d423adad150 Mon Sep 17 00:00:00 2001 From: Sergey Plevako Date: Sun, 28 Jun 2020 21:08:29 +0100 Subject: [PATCH 47/53] Added passing the port --- DeviceAgent/DeviceAgent-simulator-template.xctestrun | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DeviceAgent/DeviceAgent-simulator-template.xctestrun b/DeviceAgent/DeviceAgent-simulator-template.xctestrun index 02a37e9e..77750e7e 100644 --- a/DeviceAgent/DeviceAgent-simulator-template.xctestrun +++ b/DeviceAgent/DeviceAgent-simulator-template.xctestrun @@ -19,6 +19,11 @@ XCODE_DBG_XPC_EXCLUSIONS com.apple.dt.xctestSymbolicator + EnvironmentVariables + + CbxServerPort + CBX_SERVER_PORT + UITargetAppPath /path/to/AUT.app UseUITargetAppProvidedByTests From 07c0142271c183e038fe7f277f826adc249a1af7 Mon Sep 17 00:00:00 2001 From: Sergey Plevako Date: Mon, 27 Jul 2020 09:38:24 +0100 Subject: [PATCH 48/53] Add passing a port from the env vars --- DeviceAgent/DeviceAgent-simulator-template.xctestrun | 4 +++- Server/CBXCUITestServer.m | 3 +-- cucumber/Gemfile | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/DeviceAgent/DeviceAgent-simulator-template.xctestrun b/DeviceAgent/DeviceAgent-simulator-template.xctestrun index 77750e7e..02c189b5 100644 --- a/DeviceAgent/DeviceAgent-simulator-template.xctestrun +++ b/DeviceAgent/DeviceAgent-simulator-template.xctestrun @@ -12,6 +12,8 @@ TEST_HOST_PATH TestingEnvironmentVariables + CbxServerPort + CBX_SERVER_PORT DYLD_FRAMEWORK_PATH DYLD_LIBRARY_PATH @@ -23,7 +25,7 @@ CbxServerPort CBX_SERVER_PORT - + UITargetAppPath /path/to/AUT.app UseUITargetAppProvidedByTests diff --git a/Server/CBXCUITestServer.m b/Server/CBXCUITestServer.m index c7d2d020..c2b4011e 100644 --- a/Server/CBXCUITestServer.m +++ b/Server/CBXCUITestServer.m @@ -93,8 +93,7 @@ - (void)start { NSError *error; BOOL serverStarted = NO; - NSString *portNumberString = [CBXCUITestServer valueFromArguments: NSProcessInfo.processInfo.arguments - forKey: @"--port"]; + NSString *portNumberString = [NSProcessInfo.processInfo.environment objectForKey: @"CbxServerPort"]; NSUInteger port = (NSUInteger)[portNumberString integerValue]; if (port == 0) { diff --git a/cucumber/Gemfile b/cucumber/Gemfile index 508d67ad..2945f286 100644 --- a/cucumber/Gemfile +++ b/cucumber/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" gem "calabash-cucumber" -gem "run_loop", :github => "calabash/run_loop", :branch => "develop" +gem "run_loop", :github => "sergey-plevako-badoo/run_loop", :branch => "add_setting_server_port" gem "cucumber", "2.99.0" gem "json", "1.8.6" gem "rspec", "~> 3.0" From 5637fb68a8fc44f7a7b5926a2001a0b9c4bbf8a6 Mon Sep 17 00:00:00 2001 From: Sergey Plevako Date: Mon, 17 Aug 2020 16:11:26 +0100 Subject: [PATCH 49/53] Reverted non-needed changes in Gemfile --- cucumber/Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cucumber/Gemfile b/cucumber/Gemfile index 2945f286..508d67ad 100644 --- a/cucumber/Gemfile +++ b/cucumber/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" gem "calabash-cucumber" -gem "run_loop", :github => "sergey-plevako-badoo/run_loop", :branch => "add_setting_server_port" +gem "run_loop", :github => "calabash/run_loop", :branch => "develop" gem "cucumber", "2.99.0" gem "json", "1.8.6" gem "rspec", "~> 3.0" From 0e108f23e04ff5b39af9894bd8be9f08b51c6bf0 Mon Sep 17 00:00:00 2001 From: Sergey Plevako Date: Mon, 31 Aug 2020 18:55:32 +0100 Subject: [PATCH 50/53] Extracted a method --- Server/CBXCUITestServer.m | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Server/CBXCUITestServer.m b/Server/CBXCUITestServer.m index 7995acfd..2bb55c40 100644 --- a/Server/CBXCUITestServer.m +++ b/Server/CBXCUITestServer.m @@ -93,14 +93,7 @@ - (void)start { NSError *error; BOOL serverStarted = NO; - NSString *portNumberString = [NSProcessInfo.processInfo.environment objectForKey: @"CbxServerPort"]; - NSUInteger port = (NSUInteger)[portNumberString integerValue]; - - if (port == 0) { - [self.server setPort:CBX_DEFAULT_SERVER_PORT]; - } else { - [self.server setPort:port]; - } + [self setServerPort]; DDLogDebug(@"Attempting to start the DeviceAgent server"); serverStarted = [self attemptToStartWithError:&error]; @@ -184,4 +177,15 @@ - (void)registerRoutes { } } +- (void) setServerPort { + NSString *portNumberString = [NSProcessInfo.processInfo.environment objectForKey: @"CbxServerPort"]; + NSUInteger port = (NSUInteger)[portNumberString integerValue]; + + if (!portNumberString) { + [self.server setPort:CBX_DEFAULT_SERVER_PORT]; + } else { + [self.server setPort:port]; + } +} + @end From 306e5a3eb0d94c36c2478c88f042127a82ef0105 Mon Sep 17 00:00:00 2001 From: Sergey Plevako Date: Sun, 6 Sep 2020 20:34:31 +0100 Subject: [PATCH 51/53] added a unit test --- Server/CBXCUITestServer.m | 3 +-- TestApp/DeviceAgentUnitTests/CBXUITestServerTest.m | 13 +++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Server/CBXCUITestServer.m b/Server/CBXCUITestServer.m index 2bb55c40..7960c0be 100644 --- a/Server/CBXCUITestServer.m +++ b/Server/CBXCUITestServer.m @@ -65,6 +65,7 @@ - (instancetype)init_private { [_server setTXTRecordDictionary:capabilities]; [self registerRoutes]; + [self setServerPort]; } return self; } @@ -93,8 +94,6 @@ - (void)start { NSError *error; BOOL serverStarted = NO; - [self setServerPort]; - DDLogDebug(@"Attempting to start the DeviceAgent server"); serverStarted = [self attemptToStartWithError:&error]; diff --git a/TestApp/DeviceAgentUnitTests/CBXUITestServerTest.m b/TestApp/DeviceAgentUnitTests/CBXUITestServerTest.m index 32925cd1..14ef04c6 100644 --- a/TestApp/DeviceAgentUnitTests/CBXUITestServerTest.m +++ b/TestApp/DeviceAgentUnitTests/CBXUITestServerTest.m @@ -1,6 +1,8 @@ #import "CBXServerUnitTestUmbrellaHeader.h" #import "CBXCUITestServer.h" +#import "CBXConstants.h" +#import #import "RoutingHTTPServer.h" @interface CBXCUITestServer (CBXTEST) @@ -43,4 +45,15 @@ - (void)testInitPrivateSetsServerAndRegistersRoutes { expect(self.testServer.isFinishedTesting).to.equal(NO); } +-(void)testInitSetsDefaultPort { + expect(self.testServer.server.port).equal(CBX_DEFAULT_SERVER_PORT); +} + +-(void)testPassingPortFromEnvironment { + id processInfoMock = OCMClassMock([NSProcessInfo class]); + OCMStub([[processInfoMock environment] objectForKey: @"CbxServerPort"]).andReturn("41799"); + + expect(self.testServer.server.port).equal(41799); +} + @end From b5ada754f608f6e94ce7ea85faccc7f1c166c6a1 Mon Sep 17 00:00:00 2001 From: Sergey Plevako Date: Tue, 8 Sep 2020 20:55:11 +0100 Subject: [PATCH 52/53] deleted an unused method --- Server/CBXCUITestServer.h | 1 - Server/CBXCUITestServer.m | 9 --------- TestApp/DeviceAgentUnitTests/CBXUITestServerTest.m | 5 ++++- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Server/CBXCUITestServer.h b/Server/CBXCUITestServer.h index e56bdf4f..bb78fdc0 100644 --- a/Server/CBXCUITestServer.h +++ b/Server/CBXCUITestServer.h @@ -18,5 +18,4 @@ */ + (void)stop; //Come to a complete (non-rolling) stop. -+ (NSString*)valueFromArguments: (NSArray *)arguments forKey: (NSString *_Nullable)key; @end diff --git a/Server/CBXCUITestServer.m b/Server/CBXCUITestServer.m index 7960c0be..2ae1449c 100644 --- a/Server/CBXCUITestServer.m +++ b/Server/CBXCUITestServer.m @@ -21,15 +21,6 @@ - (id)init_private; @implementation CBXCUITestServer -+ (NSString *)valueFromArguments: (NSArray *)arguments forKey: (NSString *)key -{ - NSUInteger index = [arguments indexOfObject:key]; - if (index == NSNotFound || index == arguments.count - 1) { - return nil; - } - return arguments[index + 1]; -} - static NSString *serverName = @"CalabashXCUITestServer"; - (id)init { diff --git a/TestApp/DeviceAgentUnitTests/CBXUITestServerTest.m b/TestApp/DeviceAgentUnitTests/CBXUITestServerTest.m index 14ef04c6..399804a8 100644 --- a/TestApp/DeviceAgentUnitTests/CBXUITestServerTest.m +++ b/TestApp/DeviceAgentUnitTests/CBXUITestServerTest.m @@ -51,9 +51,12 @@ -(void)testInitSetsDefaultPort { -(void)testPassingPortFromEnvironment { id processInfoMock = OCMClassMock([NSProcessInfo class]); - OCMStub([[processInfoMock environment] objectForKey: @"CbxServerPort"]).andReturn("41799"); + NSDictionary *mockedEnv = @{ @"CbxServerPort" : @"41799" }; + OCMExpect([processInfoMock environment]).andReturn(mockedEnv); expect(self.testServer.server.port).equal(41799); + + OCMVerifyAll(processInfoMock); } @end From 5924d6c6ae81ef6473f036124a4b095d81923e18 Mon Sep 17 00:00:00 2001 From: Sergey Plevako Date: Sun, 20 Sep 2020 20:28:27 +0100 Subject: [PATCH 53/53] fixed the unit test for setting a custom port --- .../DeviceAgentUnitTests/CBXUITestServerTest.m | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/TestApp/DeviceAgentUnitTests/CBXUITestServerTest.m b/TestApp/DeviceAgentUnitTests/CBXUITestServerTest.m index 399804a8..44d8d9e9 100644 --- a/TestApp/DeviceAgentUnitTests/CBXUITestServerTest.m +++ b/TestApp/DeviceAgentUnitTests/CBXUITestServerTest.m @@ -50,13 +50,16 @@ -(void)testInitSetsDefaultPort { } -(void)testPassingPortFromEnvironment { - id processInfoMock = OCMClassMock([NSProcessInfo class]); - NSDictionary *mockedEnv = @{ @"CbxServerPort" : @"41799" }; - OCMExpect([processInfoMock environment]).andReturn(mockedEnv); + id processInfo = [NSProcessInfo processInfo]; + id processInfoPartialMock = OCMPartialMock(processInfo); + NSMutableDictionary *mockedEnv = [[[NSProcessInfo processInfo] environment] mutableCopy]; + mockedEnv[@"CbxServerPort"] = @"41799"; + OCMStub([processInfoPartialMock environment]).andReturn([mockedEnv copy]); - expect(self.testServer.server.port).equal(41799); - - OCMVerifyAll(processInfoMock); + expect([[NSProcessInfo processInfo] environment][@"CbxServerPort"]).equal(@"41799"); + + CBXCUITestServer *customServer = [[CBXCUITestServer alloc] init_private]; + expect(customServer.server.port).equal(41799); } @end