diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb7da88ea..21b63f031 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,56 +14,15 @@ jobs: - name: Validate podspec run: pod lib lint - - build: - runs-on: macos-11 + build_macos14: + runs-on: macos-14 strategy: matrix: run-config: - - { xcode_version: '11.7', simulator: 'name=iPhone SE (2nd generation),OS=13.7' } - - { xcode_version: '12.5.1', simulator: 'name=iPhone SE (2nd generation),OS=14.5' } - - { xcode_version: '13.0', simulator: 'name=iPad Pro (12.9-inch) (5th generation),OS=15.0' } - - - steps: - - name: Checkout Project - uses: actions/checkout@v1 - - - name: Brew Update - run: brew update - - - name: Install Bundler - run: gem install bundler - - - name: Install Core Utils - run: if [ -z "$(brew ls --versions coreutils)" ] ; then brew install coreutils ; fi - - - name: Install XCPretty - run: gem install xcpretty --no-document --quiet - - - name: Show Xcode versions - run: ls -al /Applications/Xcode* - - - name: Select Xcode - run: sudo xcode-select -s /Applications/Xcode_${{ matrix.run-config['xcode_version'] }}.app - - - name: Current Xcode Selected - run: xcode-select -p - - - name: List Simulators - run: xcrun simctl list - - - name: Build & Test - run: ./scripts/ci.sh "${{ matrix.run-config['simulator'] }}" - - build_xcode10: - runs-on: macos-10.15 - strategy: - matrix: - run-config: - - { xcode_version: '10.3', simulator: 'name=iPad (5th generation),OS=12.4' } - - { xcode_version: '10.3', simulator: 'name=iPhone 8,OS=12.4' } - + - { xcode_version: '15.4', simulator: 'name=iPad (10th generation),OS=17.5', run_extra_validations: 'false' } + - { xcode_version: '15.4', simulator: 'name=iPhone 15,OS=17.5', run_extra_validations: 'false' } + - { xcode_version: '16.1', simulator: 'name=iPad (10th generation),OS=18.1', run_extra_validations: 'false' } + - { xcode_version: '16.1', simulator: 'name=iPhone 16,OS=18.1', run_extra_validations: 'true' } steps: - name: Checkout Project uses: actions/checkout@v1 @@ -93,4 +52,4 @@ jobs: run: xcrun simctl list - name: Build & Test - run: ./scripts/ci.sh "${{ matrix.run-config['simulator'] }}" + run: ./scripts/ci.sh "${{ matrix.run-config['simulator'] }}" "${{ matrix.run-config['run_extra_validations'] }}" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 423a97921..000000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: objective-c -matrix: - include: - - osx_image: xcode11.6 - env: 'SIMULATOR="name=iPad Pro (12.9-inch) (2nd generation),OS=11.4"' - -before_install: - - xcrun simctl list - - brew update || brew update - - gem install bundler -install: - - if [ -z "$(brew ls --versions coreutils)" ] ; then brew install coreutils ; fi - - gem install xcpretty --no-document --quiet -script: - - ./scripts/ci.sh "${SIMULATOR}" diff --git a/Documentation/Examples/Calculator/Acceptance Tests/BasicCalculatorRobot.m b/Documentation/Examples/Calculator/Acceptance Tests/BasicCalculatorRobot.m index 42c68141e..af27e55df 100644 --- a/Documentation/Examples/Calculator/Acceptance Tests/BasicCalculatorRobot.m +++ b/Documentation/Examples/Calculator/Acceptance Tests/BasicCalculatorRobot.m @@ -2,7 +2,7 @@ // See the LICENSE file distributed with this work for the terms under // which Square, Inc. licenses this file to you. -#import +@import KIF; #import "BasicCalculatorRobot.h" diff --git a/Documentation/Examples/Calculator/Acceptance Tests/TestRobot.m b/Documentation/Examples/Calculator/Acceptance Tests/TestRobot.m index a0f077cac..faf788217 100644 --- a/Documentation/Examples/Calculator/Acceptance Tests/TestRobot.m +++ b/Documentation/Examples/Calculator/Acceptance Tests/TestRobot.m @@ -6,7 +6,7 @@ // Copyright © 2017 SSK Development. All rights reserved. // -#import +@import KIF; #import "TestRobot.h" diff --git a/Documentation/Examples/Calculator/Calculator.xcodeproj/project.pbxproj b/Documentation/Examples/Calculator/Calculator.xcodeproj/project.pbxproj index ba0e116b4..3c04068ce 100644 --- a/Documentation/Examples/Calculator/Calculator.xcodeproj/project.pbxproj +++ b/Documentation/Examples/Calculator/Calculator.xcodeproj/project.pbxproj @@ -3,11 +3,11 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ - 62F81B511EBBE965009B2400 /* KIF.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 62F81B3C1EBBE917009B2400 /* KIF.framework */; }; + 6282C6352C9CBE210040DCDB /* KIF in Frameworks */ = {isa = PBXBuildFile; productRef = 6282C6342C9CBE210040DCDB /* KIF */; }; 62F81B521EBBE976009B2400 /* BasicCalculatorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EB4C315F167BAE6100E31109 /* BasicCalculatorTests.m */; }; 62F81B5D1EBBEB6B009B2400 /* BasicCalculatorRobot.m in Sources */ = {isa = PBXBuildFile; fileRef = 62F81B5C1EBBEB6B009B2400 /* BasicCalculatorRobot.m */; }; 62F972EB1F708273003EFFDA /* TestRobot.m in Sources */ = {isa = PBXBuildFile; fileRef = 62F972EA1F708273003EFFDA /* TestRobot.m */; }; @@ -29,27 +29,6 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 62F81B3B1EBBE917009B2400 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 9CC9673B1AD4B1B600576D13; - remoteInfo = KIFFramework; - }; - 62F81B3D1EBBE917009B2400 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = FAB89FFC1CAC546900C6DFC1; - remoteInfo = KIFFrameworkConsumer; - }; - 62F81B3F1EBBE917009B2400 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = FAB8A0141CAC546A00C6DFC1; - remoteInfo = KIFFrameworkConsumerTests; - }; 62F81B4A1EBBE925009B2400 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = EB4C30D0167B9E3A00E31109 /* Project object */; @@ -57,34 +36,6 @@ remoteGlobalIDString = EB4C30D8167B9E3A00E31109; remoteInfo = Calculator; }; - 62F81B4F1EBBE961009B2400 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 9CC9673A1AD4B1B600576D13; - remoteInfo = KIFFramework; - }; - A8892FFF1684F0A400FC7C63 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = AAB07268139719AC008AF393; - remoteInfo = KIF; - }; - EB2A8A871781D68600C6299F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB60ECC1177F8C83005A041A; - remoteInfo = "Test Host"; - }; - EB2A8A891781D68600C6299F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB60ECEB177F8DB3005A041A; - remoteInfo = "KIF Tests"; - }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -94,7 +45,7 @@ 62F81B5C1EBBEB6B009B2400 /* BasicCalculatorRobot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BasicCalculatorRobot.m; sourceTree = ""; }; 62F972E91F708273003EFFDA /* TestRobot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestRobot.h; sourceTree = ""; }; 62F972EA1F708273003EFFDA /* TestRobot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestRobot.m; sourceTree = ""; }; - A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = KIF.xcodeproj; path = ../../../KIF.xcodeproj; sourceTree = ""; }; + 62FA513E2C9CBDCD00E335D6 /* KIF */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = KIF; path = ../../..; sourceTree = ""; }; EB4C30D9167B9E3A00E31109 /* Calculator.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Calculator.app; sourceTree = BUILT_PRODUCTS_DIR; }; EB4C30DD167B9E3A00E31109 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; EB4C30DF167B9E3A00E31109 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -120,7 +71,6 @@ EB4C3158167BA99D00E31109 /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = ""; }; EB4C3159167BA99E00E31109 /* HomeViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HomeViewController.xib; sourceTree = ""; }; EB4C315F167BAE6100E31109 /* BasicCalculatorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BasicCalculatorTests.m; sourceTree = ""; }; - EB7204861680E02800278DA2 /* libKIFTestCase.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libKIFTestCase.a; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -128,7 +78,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 62F81B511EBBE965009B2400 /* KIF.framework in Frameworks */, + 6282C6352C9CBE210040DCDB /* KIF in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -145,19 +95,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - A8892FF81684F0A400FC7C63 /* Products */ = { - isa = PBXGroup; - children = ( - A88930001684F0A400FC7C63 /* libKIF.a */, - EB2A8A881781D68600C6299F /* Test Host.app */, - EB2A8A8A1781D68600C6299F /* KIF Tests - XCTest.xctest */, - 62F81B3C1EBBE917009B2400 /* KIF.framework */, - 62F81B3E1EBBE917009B2400 /* KIFFrameworkConsumer.app */, - 62F81B401EBBE917009B2400 /* KIFFrameworkConsumerTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; EB4C30CE167B9E3A00E31109 = { isa = PBXGroup; children = ( @@ -180,8 +117,7 @@ EB4C30DC167B9E3A00E31109 /* Frameworks */ = { isa = PBXGroup; children = ( - A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */, - EB7204861680E02800278DA2 /* libKIFTestCase.a */, + 62FA513E2C9CBDCD00E335D6 /* KIF */, EB4C30DD167B9E3A00E31109 /* UIKit.framework */, EB4C30DF167B9E3A00E31109 /* Foundation.framework */, EB4C30E1167B9E3A00E31109 /* CoreGraphics.framework */, @@ -259,10 +195,12 @@ buildRules = ( ); dependencies = ( - 62F81B501EBBE961009B2400 /* PBXTargetDependency */, 62F81B4B1EBBE925009B2400 /* PBXTargetDependency */, ); name = "Acceptance Tests"; + packageProductDependencies = ( + 6282C6342C9CBE210040DCDB /* KIF */, + ); productName = "Acceptance Tests"; productReference = 62F81B451EBBE925009B2400 /* Acceptance Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; @@ -280,6 +218,8 @@ dependencies = ( ); name = Calculator; + packageProductDependencies = ( + ); productName = Calculator; productReference = EB4C30D9167B9E3A00E31109 /* Calculator.app */; productType = "com.apple.product-type.application"; @@ -311,12 +251,6 @@ mainGroup = EB4C30CE167B9E3A00E31109; productRefGroup = EB4C30DA167B9E3A00E31109 /* Products */; projectDirPath = ""; - projectReferences = ( - { - ProductGroup = A8892FF81684F0A400FC7C63 /* Products */; - ProjectRef = A8892FF71684F0A400FC7C63 /* KIF.xcodeproj */; - }, - ); projectRoot = ""; targets = ( EB4C30D8167B9E3A00E31109 /* Calculator */, @@ -325,51 +259,6 @@ }; /* End PBXProject section */ -/* Begin PBXReferenceProxy section */ - 62F81B3C1EBBE917009B2400 /* KIF.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = KIF.framework; - remoteRef = 62F81B3B1EBBE917009B2400 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 62F81B3E1EBBE917009B2400 /* KIFFrameworkConsumer.app */ = { - isa = PBXReferenceProxy; - fileType = wrapper.application; - path = KIFFrameworkConsumer.app; - remoteRef = 62F81B3D1EBBE917009B2400 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 62F81B401EBBE917009B2400 /* KIFFrameworkConsumerTests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = KIFFrameworkConsumerTests.xctest; - remoteRef = 62F81B3F1EBBE917009B2400 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - A88930001684F0A400FC7C63 /* libKIF.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libKIF.a; - remoteRef = A8892FFF1684F0A400FC7C63 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - EB2A8A881781D68600C6299F /* Test Host.app */ = { - isa = PBXReferenceProxy; - fileType = wrapper.application; - path = "Test Host.app"; - remoteRef = EB2A8A871781D68600C6299F /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - EB2A8A8A1781D68600C6299F /* KIF Tests - XCTest.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "KIF Tests - XCTest.xctest"; - remoteRef = EB2A8A891781D68600C6299F /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - /* Begin PBXResourcesBuildPhase section */ 62F81B431EBBE925009B2400 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -425,11 +314,6 @@ target = EB4C30D8167B9E3A00E31109 /* Calculator */; targetProxy = 62F81B4A1EBBE925009B2400 /* PBXContainerItemProxy */; }; - 62F81B501EBBE961009B2400 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = KIFFramework; - targetProxy = 62F81B4F1EBBE961009B2400 /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -486,7 +370,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; INFOPLIST_FILE = "Acceptance Tests/Acceptance Tests-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_ENABLE_DEBUG_INFO = YES; OTHER_CFLAGS = ( "-DDEPRECATE_KIF_SYSTEM=1", @@ -526,7 +414,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; INFOPLIST_FILE = "Acceptance Tests/Acceptance Tests-Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = "-ObjC"; PRODUCT_BUNDLE_IDENTIFIER = "com.squareup.Acceptance-Tests"; @@ -579,7 +471,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -621,7 +513,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; @@ -683,6 +575,13 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + 6282C6342C9CBE210040DCDB /* KIF */ = { + isa = XCSwiftPackageProductDependency; + productName = KIF; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = EB4C30D0167B9E3A00E31109 /* Project object */; } diff --git a/Documentation/Examples/Calculator/Calculator/BasicCalculatorViewController.m b/Documentation/Examples/Calculator/Calculator/BasicCalculatorViewController.m index f2e99b594..6d42e1a01 100644 --- a/Documentation/Examples/Calculator/Calculator/BasicCalculatorViewController.m +++ b/Documentation/Examples/Calculator/Calculator/BasicCalculatorViewController.m @@ -36,18 +36,25 @@ - (id)init return self; } -- (void)setAccessibilityLabel:(NSString *)label forSegment:(NSInteger)segment -{ - UIView *view = (self.operationInput.subviews)[self.operationInput.subviews.count - segment - 1]; - view.accessibilityLabel = label; -} - - (void)viewDidLoad { - [self setAccessibilityLabel:@"Add" forSegment:Add]; - [self setAccessibilityLabel:@"Subtract" forSegment:Subtract]; - [self setAccessibilityLabel:@"Multiply" forSegment:Multiply]; - [self setAccessibilityLabel:@"Divide" forSegment:Divide]; + for (int i = 0; i < self.operationInput.subviews.count; i++) { + UIView *segment = (UIView *)self.operationInput.subviews[i]; + UIView *label = segment.subviews[0]; + NSString *segmentText = [(id)label text]; + + if ([segmentText isEqualToString:@"+"]) { + segment.accessibilityLabel = @"Add"; + } else if ([segmentText isEqualToString:@"–"]) { + segment.accessibilityLabel = @"Subtract"; + } else if ([segmentText isEqualToString:@"×"]) { + segment.accessibilityLabel = @"Multiply"; + } else if ([segmentText isEqualToString:@"÷"]) { + segment.accessibilityLabel = @"Divide"; + } else { + @throw([NSException exceptionWithName:NSInvalidArgumentException reason:[NSString stringWithFormat:@"Invalid segment text value (%@)", segmentText] userInfo:nil]); + } + } } - (IBAction)recalculate diff --git a/SPMIntegration/SPMIntegration.xcodeproj/project.pbxproj b/Documentation/Examples/SPMIntegration/SPMIntegration.xcodeproj/project.pbxproj similarity index 98% rename from SPMIntegration/SPMIntegration.xcodeproj/project.pbxproj rename to Documentation/Examples/SPMIntegration/SPMIntegration.xcodeproj/project.pbxproj index dc55e88ea..904565357 100644 --- a/SPMIntegration/SPMIntegration.xcodeproj/project.pbxproj +++ b/Documentation/Examples/SPMIntegration/SPMIntegration.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -27,6 +27,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 62582A9C2C9B9B5B00F800BF /* SPMIntegration.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = SPMIntegration.xctestplan; sourceTree = ""; }; B4310BDF260BA21400EE03AF /* SPMIntegration.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SPMIntegration.app; sourceTree = BUILT_PRODUCTS_DIR; }; B4310BE2260BA21400EE03AF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; B4310BE6260BA21400EE03AF /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -37,7 +38,7 @@ B4310BF5260BA21500EE03AF /* SPMIntegrationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SPMIntegrationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; B4310BF9260BA21500EE03AF /* SPMIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SPMIntegrationTests.swift; sourceTree = ""; }; B4310BFB260BA21500EE03AF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - B488554F260CE596008916AB /* KIF */ = {isa = PBXFileReference; lastKnownFileType = folder; name = KIF; path = ../..; sourceTree = ""; }; + B488554F260CE596008916AB /* KIF */ = {isa = PBXFileReference; lastKnownFileType = folder; name = KIF; path = ../../../..; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -62,6 +63,7 @@ B4310BD6260BA21400EE03AF = { isa = PBXGroup; children = ( + 62582A9C2C9B9B5B00F800BF /* SPMIntegration.xctestplan */, B4310BE1260BA21400EE03AF /* SPMIntegration */, B4310BF8260BA21500EE03AF /* SPMIntegrationTests */, B4310BE0260BA21400EE03AF /* Products */, diff --git a/KIF.xcodeproj/xcshareddata/xcschemes/KIFFramework.xcscheme b/Documentation/Examples/SPMIntegration/SPMIntegration.xcodeproj/xcshareddata/xcschemes/SPMIntegration.xcscheme similarity index 50% rename from KIF.xcodeproj/xcshareddata/xcschemes/KIFFramework.xcscheme rename to Documentation/Examples/SPMIntegration/SPMIntegration.xcodeproj/xcshareddata/xcschemes/SPMIntegration.xcscheme index 8d67f0179..ea78d87d9 100644 --- a/KIF.xcodeproj/xcshareddata/xcschemes/KIFFramework.xcscheme +++ b/Documentation/Examples/SPMIntegration/SPMIntegration.xcodeproj/xcshareddata/xcschemes/SPMIntegration.xcscheme @@ -1,23 +1,38 @@ + LastUpgradeVersion = "1540" + version = "1.7"> + buildImplicitDependencies = "YES" + buildArchitectures = "Automatic"> + + + + + BlueprintIdentifier = "B4310BF4260BA21500EE03AF" + BuildableName = "SPMIntegrationTests.xctest" + BlueprintName = "SPMIntegrationTests" + ReferencedContainer = "container:SPMIntegration.xcodeproj"> @@ -27,19 +42,12 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - - - - - + + + + - + + BlueprintIdentifier = "B4310BDE260BA21400EE03AF" + BuildableName = "SPMIntegration.app" + BlueprintName = "SPMIntegration" + ReferencedContainer = "container:SPMIntegration.xcodeproj"> - - - + + + + + diff --git a/Documentation/Examples/SPMIntegration/SPMIntegration.xctestplan b/Documentation/Examples/SPMIntegration/SPMIntegration.xctestplan new file mode 100644 index 000000000..6d0c31d34 --- /dev/null +++ b/Documentation/Examples/SPMIntegration/SPMIntegration.xctestplan @@ -0,0 +1,24 @@ +{ + "configurations" : [ + { + "id" : "F823B32F-2F22-4DD2-8CA2-174EF43D6620", + "name" : "Configuration 1", + "options" : { + + } + } + ], + "defaultOptions" : { + + }, + "testTargets" : [ + { + "target" : { + "containerPath" : "container:SPMIntegration.xcodeproj", + "identifier" : "B4310BF4260BA21500EE03AF", + "name" : "SPMIntegrationTests" + } + } + ], + "version" : 1 +} diff --git a/SPMIntegration/SPMIntegration/AppDelegate.swift b/Documentation/Examples/SPMIntegration/SPMIntegration/AppDelegate.swift similarity index 100% rename from SPMIntegration/SPMIntegration/AppDelegate.swift rename to Documentation/Examples/SPMIntegration/SPMIntegration/AppDelegate.swift diff --git a/SPMIntegration/SPMIntegration/Assets.xcassets/AccentColor.colorset/Contents.json b/Documentation/Examples/SPMIntegration/SPMIntegration/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from SPMIntegration/SPMIntegration/Assets.xcassets/AccentColor.colorset/Contents.json rename to Documentation/Examples/SPMIntegration/SPMIntegration/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/SPMIntegration/SPMIntegration/Assets.xcassets/AppIcon.appiconset/Contents.json b/Documentation/Examples/SPMIntegration/SPMIntegration/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from SPMIntegration/SPMIntegration/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Documentation/Examples/SPMIntegration/SPMIntegration/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/SPMIntegration/SPMIntegration/Assets.xcassets/Contents.json b/Documentation/Examples/SPMIntegration/SPMIntegration/Assets.xcassets/Contents.json similarity index 100% rename from SPMIntegration/SPMIntegration/Assets.xcassets/Contents.json rename to Documentation/Examples/SPMIntegration/SPMIntegration/Assets.xcassets/Contents.json diff --git a/SPMIntegration/SPMIntegration/Base.lproj/LaunchScreen.storyboard b/Documentation/Examples/SPMIntegration/SPMIntegration/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from SPMIntegration/SPMIntegration/Base.lproj/LaunchScreen.storyboard rename to Documentation/Examples/SPMIntegration/SPMIntegration/Base.lproj/LaunchScreen.storyboard diff --git a/SPMIntegration/SPMIntegration/Base.lproj/Main.storyboard b/Documentation/Examples/SPMIntegration/SPMIntegration/Base.lproj/Main.storyboard similarity index 100% rename from SPMIntegration/SPMIntegration/Base.lproj/Main.storyboard rename to Documentation/Examples/SPMIntegration/SPMIntegration/Base.lproj/Main.storyboard diff --git a/SPMIntegration/SPMIntegration/Info.plist b/Documentation/Examples/SPMIntegration/SPMIntegration/Info.plist similarity index 100% rename from SPMIntegration/SPMIntegration/Info.plist rename to Documentation/Examples/SPMIntegration/SPMIntegration/Info.plist diff --git a/SPMIntegration/SPMIntegration/ViewController.swift b/Documentation/Examples/SPMIntegration/SPMIntegration/ViewController.swift similarity index 100% rename from SPMIntegration/SPMIntegration/ViewController.swift rename to Documentation/Examples/SPMIntegration/SPMIntegration/ViewController.swift diff --git a/SPMIntegration/SPMIntegrationTests/Info.plist b/Documentation/Examples/SPMIntegration/SPMIntegrationTests/Info.plist similarity index 100% rename from SPMIntegration/SPMIntegrationTests/Info.plist rename to Documentation/Examples/SPMIntegration/SPMIntegrationTests/Info.plist diff --git a/SPMIntegration/SPMIntegrationTests/SPMIntegrationTests.swift b/Documentation/Examples/SPMIntegration/SPMIntegrationTests/SPMIntegrationTests.swift similarity index 100% rename from SPMIntegration/SPMIntegrationTests/SPMIntegrationTests.swift rename to Documentation/Examples/SPMIntegration/SPMIntegrationTests/SPMIntegrationTests.swift diff --git a/Documentation/Examples/Testable/Testable.xcodeproj/project.pbxproj b/Documentation/Examples/Testable/Testable.xcodeproj/project.pbxproj index 9b9c53d3c..a5ac6f9ed 100644 --- a/Documentation/Examples/Testable/Testable.xcodeproj/project.pbxproj +++ b/Documentation/Examples/Testable/Testable.xcodeproj/project.pbxproj @@ -8,9 +8,9 @@ /* Begin PBXBuildFile section */ 4440B32C17F5692A00253D51 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4440B32B17F5692A00253D51 /* Default-568h@2x.png */; }; + 6282C65B2C9CE4080040DCDB /* libKIF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6282C6562C9CE3F70040DCDB /* libKIF.a */; }; 62F81B001EBBD073009B2400 /* IntegrationTestCases.m in Sources */ = {isa = PBXBuildFile; fileRef = EB47EFB21781DF6D006BBFAC /* IntegrationTestCases.m */; }; 62F81B011EBBD073009B2400 /* KIFUITestActor+EXAddition.m in Sources */ = {isa = PBXBuildFile; fileRef = EB47EFB41781DF6D006BBFAC /* KIFUITestActor+EXAddition.m */; }; - 62F81B2F1EBBDCB6009B2400 /* libKIF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 62F81AD91EBBCF26009B2400 /* libKIF.a */; }; 62F81B311EBBE348009B2400 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 62F81B301EBBE348009B2400 /* IOKit.framework */; }; AAB073AD139861C0008AF393 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAB073AC139861C0008AF393 /* UIKit.framework */; }; AAB073AF139861C0008AF393 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAB073AE139861C0008AF393 /* Foundation.framework */; }; @@ -26,47 +26,26 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 62F81AD81EBBCF26009B2400 /* PBXContainerItemProxy */ = { + 6282C6552C9CE3F70040DCDB /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 62F81ACE1EBBCF26009B2400 /* KIF.xcodeproj */; + containerPortal = 6282C64E2C9CE3F70040DCDB /* KIF.xcodeproj */; proxyType = 2; remoteGlobalIDString = EABD46AA1857A0C700A5F081; remoteInfo = KIF; }; - 62F81ADA1EBBCF26009B2400 /* PBXContainerItemProxy */ = { + 6282C6572C9CE3F70040DCDB /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 62F81ACE1EBBCF26009B2400 /* KIF.xcodeproj */; + containerPortal = 6282C64E2C9CE3F70040DCDB /* KIF.xcodeproj */; proxyType = 2; remoteGlobalIDString = EB60ECC1177F8C83005A041A; - remoteInfo = "Test Host"; + remoteInfo = "TestHost"; }; - 62F81ADC1EBBCF26009B2400 /* PBXContainerItemProxy */ = { + 6282C6592C9CE3F70040DCDB /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 62F81ACE1EBBCF26009B2400 /* KIF.xcodeproj */; + containerPortal = 6282C64E2C9CE3F70040DCDB /* KIF.xcodeproj */; proxyType = 2; remoteGlobalIDString = EABD46CD1857A0F300A5F081; - remoteInfo = "KIF Tests"; - }; - 62F81ADE1EBBCF26009B2400 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 62F81ACE1EBBCF26009B2400 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 9CC9673B1AD4B1B600576D13; - remoteInfo = KIFFramework; - }; - 62F81AE01EBBCF26009B2400 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 62F81ACE1EBBCF26009B2400 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = FAB89FFC1CAC546900C6DFC1; - remoteInfo = KIFFrameworkConsumer; - }; - 62F81AE21EBBCF26009B2400 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 62F81ACE1EBBCF26009B2400 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = FAB8A0141CAC546A00C6DFC1; - remoteInfo = KIFFrameworkConsumerTests; + remoteInfo = "KIFTests"; }; 62F81AFB1EBBD038009B2400 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -75,20 +54,13 @@ remoteGlobalIDString = AAB073A7139861C0008AF393; remoteInfo = Testable; }; - 62F81B2D1EBBDC54009B2400 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 62F81ACE1EBBCF26009B2400 /* KIF.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = EABD46791857A0C700A5F081; - remoteInfo = KIF; - }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 22191E0524BF79F4004CAA18 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainWindow.xib; sourceTree = ""; }; 22191E0624BF79F4004CAA18 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/RootViewController.xib; sourceTree = ""; }; 4440B32B17F5692A00253D51 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 62F81ACE1EBBCF26009B2400 /* KIF.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = KIF.xcodeproj; path = ../../../../KIF.xcodeproj; sourceTree = ""; }; + 6282C64E2C9CE3F70040DCDB /* KIF.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = KIF.xcodeproj; path = ../../../KIF.xcodeproj; sourceTree = ""; }; 62F81AF61EBBD038009B2400 /* Acceptance Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Acceptance Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 62F81B301EBBE348009B2400 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/IOKit.framework; sourceTree = DEVELOPER_DIR; }; AAB073A8139861C0008AF393 /* Testable.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Testable.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -118,7 +90,7 @@ buildActionMask = 2147483647; files = ( BCA154372331FFF700CDC69F /* WebKit.framework in Frameworks */, - 62F81B2F1EBBDCB6009B2400 /* libKIF.a in Frameworks */, + 6282C65B2C9CE4080040DCDB /* libKIF.a in Frameworks */, 62F81B311EBBE348009B2400 /* IOKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -137,15 +109,12 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 62F81ACF1EBBCF26009B2400 /* Products */ = { + 6282C64F2C9CE3F70040DCDB /* Products */ = { isa = PBXGroup; children = ( - 62F81AD91EBBCF26009B2400 /* libKIF.a */, - 62F81ADB1EBBCF26009B2400 /* Test Host.app */, - 62F81ADD1EBBCF26009B2400 /* KIF Tests - XCTest.xctest */, - 62F81ADF1EBBCF26009B2400 /* KIF.framework */, - 62F81AE11EBBCF26009B2400 /* KIFFrameworkConsumer.app */, - 62F81AE31EBBCF26009B2400 /* KIFFrameworkConsumerTests.xctest */, + 6282C6562C9CE3F70040DCDB /* libKIF.a */, + 6282C6582C9CE3F70040DCDB /* TestHost.app */, + 6282C65A2C9CE3F70040DCDB /* KIFTests - XCTest.xctest */, ); name = Products; sourceTree = ""; @@ -173,6 +142,7 @@ AAB073AB139861C0008AF393 /* Frameworks */ = { isa = PBXGroup; children = ( + 6282C64E2C9CE3F70040DCDB /* KIF.xcodeproj */, BCA1542F2331FF8C00CDC69F /* WebKit.framework */, EB9DB7431781DDBA0087B6FD /* libKIF.a */, 62F81B301EBBE348009B2400 /* IOKit.framework */, @@ -212,7 +182,6 @@ EB9DB7361781DBD40087B6FD /* Acceptance Tests */ = { isa = PBXGroup; children = ( - 62F81ACE1EBBCF26009B2400 /* KIF.xcodeproj */, EB47EFB21781DF6D006BBFAC /* IntegrationTestCases.m */, EB47EFB31781DF6D006BBFAC /* KIFUITestActor+EXAddition.h */, EB47EFB41781DF6D006BBFAC /* KIFUITestActor+EXAddition.m */, @@ -244,7 +213,6 @@ ); dependencies = ( 62F81AFC1EBBD038009B2400 /* PBXTargetDependency */, - 62F81B2E1EBBDC54009B2400 /* PBXTargetDependency */, ); name = "Acceptance Tests"; productName = "Acceptance Tests"; @@ -296,8 +264,8 @@ projectDirPath = ""; projectReferences = ( { - ProductGroup = 62F81ACF1EBBCF26009B2400 /* Products */; - ProjectRef = 62F81ACE1EBBCF26009B2400 /* KIF.xcodeproj */; + ProductGroup = 6282C64F2C9CE3F70040DCDB /* Products */; + ProjectRef = 6282C64E2C9CE3F70040DCDB /* KIF.xcodeproj */; }, ); projectRoot = ""; @@ -309,46 +277,25 @@ /* End PBXProject section */ /* Begin PBXReferenceProxy section */ - 62F81AD91EBBCF26009B2400 /* libKIF.a */ = { + 6282C6562C9CE3F70040DCDB /* libKIF.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libKIF.a; - remoteRef = 62F81AD81EBBCF26009B2400 /* PBXContainerItemProxy */; + remoteRef = 6282C6552C9CE3F70040DCDB /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 62F81ADB1EBBCF26009B2400 /* Test Host.app */ = { + 6282C6582C9CE3F70040DCDB /* TestHost.app */ = { isa = PBXReferenceProxy; fileType = wrapper.application; - path = "Test Host.app"; - remoteRef = 62F81ADA1EBBCF26009B2400 /* PBXContainerItemProxy */; + path = "TestHost.app"; + remoteRef = 6282C6572C9CE3F70040DCDB /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 62F81ADD1EBBCF26009B2400 /* KIF Tests - XCTest.xctest */ = { + 6282C65A2C9CE3F70040DCDB /* KIFTests - XCTest.xctest */ = { isa = PBXReferenceProxy; fileType = wrapper.cfbundle; - path = "KIF Tests - XCTest.xctest"; - remoteRef = 62F81ADC1EBBCF26009B2400 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 62F81ADF1EBBCF26009B2400 /* KIF.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = KIF.framework; - remoteRef = 62F81ADE1EBBCF26009B2400 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 62F81AE11EBBCF26009B2400 /* KIFFrameworkConsumer.app */ = { - isa = PBXReferenceProxy; - fileType = wrapper.application; - path = KIFFrameworkConsumer.app; - remoteRef = 62F81AE01EBBCF26009B2400 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 62F81AE31EBBCF26009B2400 /* KIFFrameworkConsumerTests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = KIFFrameworkConsumerTests.xctest; - remoteRef = 62F81AE21EBBCF26009B2400 /* PBXContainerItemProxy */; + path = "KIFTests - XCTest.xctest"; + remoteRef = 6282C6592C9CE3F70040DCDB /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXReferenceProxy section */ @@ -402,11 +349,6 @@ target = AAB073A7139861C0008AF393 /* Testable */; targetProxy = 62F81AFB1EBBD038009B2400 /* PBXContainerItemProxy */; }; - 62F81B2E1EBBDC54009B2400 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = KIF; - targetProxy = 62F81B2D1EBBDC54009B2400 /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -570,7 +512,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; @@ -607,7 +549,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; SDKROOT = iphoneos; }; diff --git a/Documentation/Examples/Testable Swift/Testable Swift.xcodeproj/project.pbxproj b/Documentation/Examples/TestableSwift/TestableSwift.xcodeproj/project.pbxproj similarity index 67% rename from Documentation/Examples/Testable Swift/Testable Swift.xcodeproj/project.pbxproj rename to Documentation/Examples/TestableSwift/TestableSwift.xcodeproj/project.pbxproj index 25aad4963..30ffdd0c0 100644 --- a/Documentation/Examples/Testable Swift/Testable Swift.xcodeproj/project.pbxproj +++ b/Documentation/Examples/TestableSwift/TestableSwift.xcodeproj/project.pbxproj @@ -3,12 +3,13 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ 5600E94A1C3BBCC800235220 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5600E9491C3BBCC700235220 /* IOKit.framework */; }; - 62F81B141EBBD11A009B2400 /* KIF.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5600E9411C3BBB8300235220 /* KIF.framework */; }; + 62582AF22C9CB00E00F800BF /* KIF in Resources */ = {isa = PBXBuildFile; fileRef = 62582AF12C9CAFEA00F800BF /* KIF */; }; + 62FA513C2C9CB1A500E335D6 /* KIF in Frameworks */ = {isa = PBXBuildFile; productRef = 62FA513B2C9CB1A500E335D6 /* KIF */; }; A88CD9831A019AFF0064F706 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A88CD9821A019AFF0064F706 /* AppDelegate.swift */; }; A88CD9851A019AFF0064F706 /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A88CD9841A019AFF0064F706 /* MasterViewController.swift */; }; A88CD98A1A019AFF0064F706 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A88CD9881A019AFF0064F706 /* Main.storyboard */; }; @@ -20,79 +21,29 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 548FAB951E6814BB00C01467 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5600E9321C3BBB8300235220 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = FAB89FFC1CAC546900C6DFC1; - remoteInfo = KIFFrameworkConsumer; - }; - 548FAB971E6814BB00C01467 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5600E9321C3BBB8300235220 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = FAB8A0141CAC546A00C6DFC1; - remoteInfo = KIFFrameworkConsumerTests; - }; - 5600E93A1C3BBB8300235220 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5600E9321C3BBB8300235220 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EABD46AA1857A0C700A5F081; - remoteInfo = KIF; - }; - 5600E93C1C3BBB8300235220 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5600E9321C3BBB8300235220 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EB60ECC1177F8C83005A041A; - remoteInfo = "Test Host"; - }; - 5600E93E1C3BBB8300235220 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5600E9321C3BBB8300235220 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = EABD46CD1857A0F300A5F081; - remoteInfo = "KIF Tests"; - }; - 5600E9401C3BBB8300235220 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5600E9321C3BBB8300235220 /* KIF.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 9CC9673B1AD4B1B600576D13; - remoteInfo = KIFFramework; - }; - 62F81B0B1EBBD094009B2400 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 5600E9321C3BBB8300235220 /* KIF.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 9CC9673A1AD4B1B600576D13; - remoteInfo = KIFFramework; - }; A88CD9951A019AFF0064F706 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = A88CD9751A019AFF0064F706 /* Project object */; proxyType = 1; remoteGlobalIDString = A88CD97C1A019AFF0064F706; - remoteInfo = "Testable Swift"; + remoteInfo = TestableSwift; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 5600E9301C3BB8F700235220 /* KIF.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = KIF.framework; path = "../../../../build/Debug-iphoneos/KIF.framework"; sourceTree = ""; }; - 5600E9321C3BBB8300235220 /* KIF.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = KIF.xcodeproj; path = ../../../KIF.xcodeproj; sourceTree = SOURCE_ROOT; }; 5600E9491C3BBCC700235220 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/IOKit.framework; sourceTree = DEVELOPER_DIR; }; - A88CD97D1A019AFF0064F706 /* Testable Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Testable Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 62582AF12C9CAFEA00F800BF /* KIF */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = KIF; path = ../../../..; sourceTree = ""; }; + A88CD97D1A019AFF0064F706 /* TestableSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestableSwift.app; sourceTree = BUILT_PRODUCTS_DIR; }; A88CD9811A019AFF0064F706 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; A88CD9821A019AFF0064F706 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; A88CD9841A019AFF0064F706 /* MasterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterViewController.swift; sourceTree = ""; }; A88CD9891A019AFF0064F706 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; A88CD98B1A019AFF0064F706 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; A88CD98E1A019AFF0064F706 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - A88CD9941A019AFF0064F706 /* Testable SwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Testable SwiftTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + A88CD9941A019AFF0064F706 /* TestableSwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TestableSwiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; A88CD9991A019AFF0064F706 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; A88CD99A1A019AFF0064F706 /* Testable_SwiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Testable_SwiftTests.swift; sourceTree = ""; }; - A88CD9BA1A019F0B0064F706 /* Testable SwiftTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Testable SwiftTests-Bridging-Header.h"; sourceTree = ""; }; + A88CD9BA1A019F0B0064F706 /* TestableSwiftTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TestableSwiftTests-Bridging-Header.h"; sourceTree = ""; }; A88CD9BB1A019F0B0064F706 /* SimpleObjCTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleObjCTest.m; sourceTree = ""; }; A88CD9BD1A019F300064F706 /* SimpleSwiftTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SimpleSwiftTest.swift; sourceTree = ""; }; /* End PBXFileReference section */ @@ -109,46 +60,41 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 62F81B141EBBD11A009B2400 /* KIF.framework in Frameworks */, 5600E94A1C3BBCC800235220 /* IOKit.framework in Frameworks */, + 62FA513C2C9CB1A500E335D6 /* KIF in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 5600E9331C3BBB8300235220 /* Products */ = { + 62FA513A2C9CB1A500E335D6 /* Frameworks */ = { isa = PBXGroup; children = ( - 5600E93B1C3BBB8300235220 /* libKIF.a */, - 5600E93D1C3BBB8300235220 /* Test Host.app */, - 5600E93F1C3BBB8300235220 /* KIF Tests - XCTest.xctest */, - 5600E9411C3BBB8300235220 /* KIF.framework */, - 548FAB961E6814BB00C01467 /* KIFFrameworkConsumer.app */, - 548FAB981E6814BB00C01467 /* KIFFrameworkConsumerTests.xctest */, ); - name = Products; + name = Frameworks; sourceTree = ""; }; A88CD9741A019AFF0064F706 = { isa = PBXGroup; children = ( - A88CD97F1A019AFF0064F706 /* Testable Swift */, - A88CD9971A019AFF0064F706 /* Testable SwiftTests */, + A88CD97F1A019AFF0064F706 /* TestableSwift */, + A88CD9971A019AFF0064F706 /* TestableSwiftTests */, A88CD97E1A019AFF0064F706 /* Products */, + 62FA513A2C9CB1A500E335D6 /* Frameworks */, ); sourceTree = ""; }; A88CD97E1A019AFF0064F706 /* Products */ = { isa = PBXGroup; children = ( - A88CD97D1A019AFF0064F706 /* Testable Swift.app */, - A88CD9941A019AFF0064F706 /* Testable SwiftTests.xctest */, + A88CD97D1A019AFF0064F706 /* TestableSwift.app */, + A88CD9941A019AFF0064F706 /* TestableSwiftTests.xctest */, ); name = Products; sourceTree = ""; }; - A88CD97F1A019AFF0064F706 /* Testable Swift */ = { + A88CD97F1A019AFF0064F706 /* TestableSwift */ = { isa = PBXGroup; children = ( A88CD9821A019AFF0064F706 /* AppDelegate.swift */, @@ -158,7 +104,7 @@ A88CD98D1A019AFF0064F706 /* LaunchScreen.xib */, A88CD9801A019AFF0064F706 /* Supporting Files */, ); - path = "Testable Swift"; + path = TestableSwift; sourceTree = ""; }; A88CD9801A019AFF0064F706 /* Supporting Files */ = { @@ -169,19 +115,18 @@ name = "Supporting Files"; sourceTree = ""; }; - A88CD9971A019AFF0064F706 /* Testable SwiftTests */ = { + A88CD9971A019AFF0064F706 /* TestableSwiftTests */ = { isa = PBXGroup; children = ( - 5600E9321C3BBB8300235220 /* KIF.xcodeproj */, + 62582AF12C9CAFEA00F800BF /* KIF */, 5600E9491C3BBCC700235220 /* IOKit.framework */, A88CD99A1A019AFF0064F706 /* Testable_SwiftTests.swift */, A88CD9981A019AFF0064F706 /* Supporting Files */, A88CD9BB1A019F0B0064F706 /* SimpleObjCTest.m */, A88CD9BD1A019F300064F706 /* SimpleSwiftTest.swift */, - A88CD9BA1A019F0B0064F706 /* Testable SwiftTests-Bridging-Header.h */, - 5600E9301C3BB8F700235220 /* KIF.framework */, + A88CD9BA1A019F0B0064F706 /* TestableSwiftTests-Bridging-Header.h */, ); - path = "Testable SwiftTests"; + path = TestableSwiftTests; sourceTree = ""; }; A88CD9981A019AFF0064F706 /* Supporting Files */ = { @@ -195,9 +140,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - A88CD97C1A019AFF0064F706 /* Testable Swift */ = { + A88CD97C1A019AFF0064F706 /* TestableSwift */ = { isa = PBXNativeTarget; - buildConfigurationList = A88CD99E1A019AFF0064F706 /* Build configuration list for PBXNativeTarget "Testable Swift" */; + buildConfigurationList = A88CD99E1A019AFF0064F706 /* Build configuration list for PBXNativeTarget "TestableSwift" */; buildPhases = ( A88CD9791A019AFF0064F706 /* Sources */, A88CD97A1A019AFF0064F706 /* Frameworks */, @@ -207,14 +152,14 @@ ); dependencies = ( ); - name = "Testable Swift"; - productName = "Testable Swift"; - productReference = A88CD97D1A019AFF0064F706 /* Testable Swift.app */; + name = TestableSwift; + productName = TestableSwift; + productReference = A88CD97D1A019AFF0064F706 /* TestableSwift.app */; productType = "com.apple.product-type.application"; }; - A88CD9931A019AFF0064F706 /* Testable SwiftTests */ = { + A88CD9931A019AFF0064F706 /* TestableSwiftTests */ = { isa = PBXNativeTarget; - buildConfigurationList = A88CD9A11A019AFF0064F706 /* Build configuration list for PBXNativeTarget "Testable SwiftTests" */; + buildConfigurationList = A88CD9A11A019AFF0064F706 /* Build configuration list for PBXNativeTarget "TestableSwiftTests" */; buildPhases = ( A88CD9901A019AFF0064F706 /* Sources */, A88CD9911A019AFF0064F706 /* Frameworks */, @@ -223,12 +168,14 @@ buildRules = ( ); dependencies = ( - 62F81B0C1EBBD094009B2400 /* PBXTargetDependency */, A88CD9961A019AFF0064F706 /* PBXTargetDependency */, ); - name = "Testable SwiftTests"; - productName = "Testable SwiftTests"; - productReference = A88CD9941A019AFF0064F706 /* Testable SwiftTests.xctest */; + name = TestableSwiftTests; + packageProductDependencies = ( + 62FA513B2C9CB1A500E335D6 /* KIF */, + ); + productName = TestableSwiftTests; + productReference = A88CD9941A019AFF0064F706 /* TestableSwiftTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ @@ -251,7 +198,7 @@ }; }; }; - buildConfigurationList = A88CD9781A019AFF0064F706 /* Build configuration list for PBXProject "Testable Swift" */; + buildConfigurationList = A88CD9781A019AFF0064F706 /* Build configuration list for PBXProject "TestableSwift" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = en; hasScannedForEncodings = 0; @@ -262,65 +209,14 @@ mainGroup = A88CD9741A019AFF0064F706; productRefGroup = A88CD97E1A019AFF0064F706 /* Products */; projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 5600E9331C3BBB8300235220 /* Products */; - ProjectRef = 5600E9321C3BBB8300235220 /* KIF.xcodeproj */; - }, - ); projectRoot = ""; targets = ( - A88CD97C1A019AFF0064F706 /* Testable Swift */, - A88CD9931A019AFF0064F706 /* Testable SwiftTests */, + A88CD97C1A019AFF0064F706 /* TestableSwift */, + A88CD9931A019AFF0064F706 /* TestableSwiftTests */, ); }; /* End PBXProject section */ -/* Begin PBXReferenceProxy section */ - 548FAB961E6814BB00C01467 /* KIFFrameworkConsumer.app */ = { - isa = PBXReferenceProxy; - fileType = wrapper.application; - path = KIFFrameworkConsumer.app; - remoteRef = 548FAB951E6814BB00C01467 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 548FAB981E6814BB00C01467 /* KIFFrameworkConsumerTests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = KIFFrameworkConsumerTests.xctest; - remoteRef = 548FAB971E6814BB00C01467 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 5600E93B1C3BBB8300235220 /* libKIF.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libKIF.a; - remoteRef = 5600E93A1C3BBB8300235220 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 5600E93D1C3BBB8300235220 /* Test Host.app */ = { - isa = PBXReferenceProxy; - fileType = wrapper.application; - path = "Test Host.app"; - remoteRef = 5600E93C1C3BBB8300235220 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 5600E93F1C3BBB8300235220 /* KIF Tests - XCTest.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "KIF Tests - XCTest.xctest"; - remoteRef = 5600E93E1C3BBB8300235220 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 5600E9411C3BBB8300235220 /* KIF.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = KIF.framework; - remoteRef = 5600E9401C3BBB8300235220 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - /* Begin PBXResourcesBuildPhase section */ A88CD97B1A019AFF0064F706 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -336,6 +232,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 62582AF22C9CB00E00F800BF /* KIF in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -364,14 +261,9 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 62F81B0C1EBBD094009B2400 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = KIFFramework; - targetProxy = 62F81B0B1EBBD094009B2400 /* PBXContainerItemProxy */; - }; A88CD9961A019AFF0064F706 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = A88CD97C1A019AFF0064F706 /* Testable Swift */; + target = A88CD97C1A019AFF0064F706 /* TestableSwift */; targetProxy = A88CD9951A019AFF0064F706 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -442,7 +334,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -489,10 +381,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; VALIDATE_PRODUCT = YES; }; name = Release; @@ -501,8 +394,11 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = "Testable Swift/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + INFOPLIST_FILE = TestableSwift/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "com.squareup.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; @@ -515,8 +411,11 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = "Testable Swift/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + INFOPLIST_FILE = TestableSwift/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "com.squareup.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; @@ -534,8 +433,12 @@ "DEBUG=1", "$(inherited)", ); - INFOPLIST_FILE = "Testable SwiftTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + INFOPLIST_FILE = TestableSwiftTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); OTHER_CFLAGS = ( "-DDEPRECATE_KIF_SYSTEM=1", "-DDEPRECATE_KIF_TESTER=1", @@ -548,11 +451,11 @@ ); PRODUCT_BUNDLE_IDENTIFIER = "com.squareup.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Testable SwiftTests/Testable SwiftTests-Bridging-Header.h"; + SWIFT_OBJC_BRIDGING_HEADER = "TestableSwiftTests/TestableSwiftTests-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Testable Swift.app/Testable Swift"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestableSwift.app/TestableSwift"; }; name = Debug; }; @@ -561,8 +464,12 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ENABLE_MODULES = YES; - INFOPLIST_FILE = "Testable SwiftTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + INFOPLIST_FILE = TestableSwiftTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); OTHER_LDFLAGS = ( "$(inherited)", "-framework", @@ -571,17 +478,17 @@ ); PRODUCT_BUNDLE_IDENTIFIER = "com.squareup.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Testable SwiftTests/Testable SwiftTests-Bridging-Header.h"; + SWIFT_OBJC_BRIDGING_HEADER = "TestableSwiftTests/TestableSwiftTests-Bridging-Header.h"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Testable Swift.app/Testable Swift"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestableSwift.app/TestableSwift"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - A88CD9781A019AFF0064F706 /* Build configuration list for PBXProject "Testable Swift" */ = { + A88CD9781A019AFF0064F706 /* Build configuration list for PBXProject "TestableSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( A88CD99C1A019AFF0064F706 /* Debug */, @@ -590,7 +497,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A88CD99E1A019AFF0064F706 /* Build configuration list for PBXNativeTarget "Testable Swift" */ = { + A88CD99E1A019AFF0064F706 /* Build configuration list for PBXNativeTarget "TestableSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( A88CD99F1A019AFF0064F706 /* Debug */, @@ -599,7 +506,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A88CD9A11A019AFF0064F706 /* Build configuration list for PBXNativeTarget "Testable SwiftTests" */ = { + A88CD9A11A019AFF0064F706 /* Build configuration list for PBXNativeTarget "TestableSwiftTests" */ = { isa = XCConfigurationList; buildConfigurations = ( A88CD9A21A019AFF0064F706 /* Debug */, @@ -609,6 +516,13 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + 62FA513B2C9CB1A500E335D6 /* KIF */ = { + isa = XCSwiftPackageProductDependency; + productName = KIF; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = A88CD9751A019AFF0064F706 /* Project object */; } diff --git a/Documentation/Examples/Testable Swift/Testable Swift.xcodeproj/xcshareddata/xcschemes/Testable Swift.xcscheme b/Documentation/Examples/TestableSwift/TestableSwift.xcodeproj/xcshareddata/xcschemes/TestableSwift.xcscheme similarity index 66% rename from Documentation/Examples/Testable Swift/Testable Swift.xcodeproj/xcshareddata/xcschemes/Testable Swift.xcscheme rename to Documentation/Examples/TestableSwift/TestableSwift.xcodeproj/xcshareddata/xcschemes/TestableSwift.xcscheme index 0768715c2..6667dde16 100644 --- a/Documentation/Examples/Testable Swift/Testable Swift.xcodeproj/xcshareddata/xcschemes/Testable Swift.xcscheme +++ b/Documentation/Examples/TestableSwift/TestableSwift.xcodeproj/xcshareddata/xcschemes/TestableSwift.xcscheme @@ -15,9 +15,23 @@ + BuildableName = "TestableSwift.app" + BlueprintName = "TestableSwift" + ReferencedContainer = "container:TestableSwift.xcodeproj"> + + + + @@ -27,29 +41,27 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> + + + + + BuildableName = "TestableSwiftTests.xctest" + BlueprintName = "TestableSwiftTests" + ReferencedContainer = "container:TestableSwift.xcodeproj"> - - - - - - - - - - - - - + + BuildableName = "TestableSwift.app" + BlueprintName = "TestableSwift" + ReferencedContainer = "container:TestableSwift.xcodeproj"> - + diff --git a/Documentation/Examples/Testable Swift/Testable Swift/AppDelegate.swift b/Documentation/Examples/TestableSwift/TestableSwift/AppDelegate.swift similarity index 100% rename from Documentation/Examples/Testable Swift/Testable Swift/AppDelegate.swift rename to Documentation/Examples/TestableSwift/TestableSwift/AppDelegate.swift diff --git a/Documentation/Examples/Testable Swift/Testable Swift/Base.lproj/LaunchScreen.xib b/Documentation/Examples/TestableSwift/TestableSwift/Base.lproj/LaunchScreen.xib similarity index 100% rename from Documentation/Examples/Testable Swift/Testable Swift/Base.lproj/LaunchScreen.xib rename to Documentation/Examples/TestableSwift/TestableSwift/Base.lproj/LaunchScreen.xib diff --git a/Documentation/Examples/Testable Swift/Testable Swift/Base.lproj/Main.storyboard b/Documentation/Examples/TestableSwift/TestableSwift/Base.lproj/Main.storyboard similarity index 100% rename from Documentation/Examples/Testable Swift/Testable Swift/Base.lproj/Main.storyboard rename to Documentation/Examples/TestableSwift/TestableSwift/Base.lproj/Main.storyboard diff --git a/Documentation/Examples/Testable Swift/Testable Swift/Images.xcassets/AppIcon.appiconset/Contents.json b/Documentation/Examples/TestableSwift/TestableSwift/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Documentation/Examples/Testable Swift/Testable Swift/Images.xcassets/AppIcon.appiconset/Contents.json rename to Documentation/Examples/TestableSwift/TestableSwift/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/Documentation/Examples/Testable Swift/Testable Swift/Images.xcassets/Contents.json b/Documentation/Examples/TestableSwift/TestableSwift/Images.xcassets/Contents.json similarity index 100% rename from Documentation/Examples/Testable Swift/Testable Swift/Images.xcassets/Contents.json rename to Documentation/Examples/TestableSwift/TestableSwift/Images.xcassets/Contents.json diff --git a/Documentation/Examples/Testable Swift/Testable Swift/Info.plist b/Documentation/Examples/TestableSwift/TestableSwift/Info.plist similarity index 100% rename from Documentation/Examples/Testable Swift/Testable Swift/Info.plist rename to Documentation/Examples/TestableSwift/TestableSwift/Info.plist diff --git a/Documentation/Examples/Testable Swift/Testable Swift/MasterViewController.swift b/Documentation/Examples/TestableSwift/TestableSwift/MasterViewController.swift similarity index 100% rename from Documentation/Examples/Testable Swift/Testable Swift/MasterViewController.swift rename to Documentation/Examples/TestableSwift/TestableSwift/MasterViewController.swift diff --git a/Documentation/Examples/Testable Swift/Testable SwiftTests/Info.plist b/Documentation/Examples/TestableSwift/TestableSwiftTests/Info.plist similarity index 100% rename from Documentation/Examples/Testable Swift/Testable SwiftTests/Info.plist rename to Documentation/Examples/TestableSwift/TestableSwiftTests/Info.plist diff --git a/Documentation/Examples/Testable Swift/Testable SwiftTests/SimpleObjCTest.m b/Documentation/Examples/TestableSwift/TestableSwiftTests/SimpleObjCTest.m similarity index 96% rename from Documentation/Examples/Testable Swift/Testable SwiftTests/SimpleObjCTest.m rename to Documentation/Examples/TestableSwift/TestableSwiftTests/SimpleObjCTest.m index ecb6334f1..ea39c9e24 100644 --- a/Documentation/Examples/Testable Swift/Testable SwiftTests/SimpleObjCTest.m +++ b/Documentation/Examples/TestableSwift/TestableSwiftTests/SimpleObjCTest.m @@ -8,7 +8,7 @@ // which Square, Inc. licenses this file to you. #import -#import +@import KIF; @interface SimpleObjCTest : KIFTestCase diff --git a/Documentation/Examples/Testable Swift/Testable SwiftTests/SimpleSwiftTest.swift b/Documentation/Examples/TestableSwift/TestableSwiftTests/SimpleSwiftTest.swift similarity index 100% rename from Documentation/Examples/Testable Swift/Testable SwiftTests/SimpleSwiftTest.swift rename to Documentation/Examples/TestableSwift/TestableSwiftTests/SimpleSwiftTest.swift diff --git a/Documentation/Examples/Testable Swift/Testable SwiftTests/Testable SwiftTests-Bridging-Header.h b/Documentation/Examples/TestableSwift/TestableSwiftTests/TestableSwiftTests-Bridging-Header.h similarity index 83% rename from Documentation/Examples/Testable Swift/Testable SwiftTests/Testable SwiftTests-Bridging-Header.h rename to Documentation/Examples/TestableSwift/TestableSwiftTests/TestableSwiftTests-Bridging-Header.h index 12c223598..196f6921a 100644 --- a/Documentation/Examples/Testable Swift/Testable SwiftTests/Testable SwiftTests-Bridging-Header.h +++ b/Documentation/Examples/TestableSwift/TestableSwiftTests/TestableSwiftTests-Bridging-Header.h @@ -2,4 +2,4 @@ // Use this file to import your target's public headers that you would like to expose to Swift. // -#import +#import "KIF.h" diff --git a/Documentation/Examples/Testable Swift/Testable SwiftTests/Testable_SwiftTests.swift b/Documentation/Examples/TestableSwift/TestableSwiftTests/Testable_SwiftTests.swift similarity index 100% rename from Documentation/Examples/Testable Swift/Testable SwiftTests/Testable_SwiftTests.swift rename to Documentation/Examples/TestableSwift/TestableSwiftTests/Testable_SwiftTests.swift diff --git a/KIF Tests/AccessibilityIdentifierPullToRefreshTests.m b/KIF Tests/AccessibilityIdentifierPullToRefreshTests.m deleted file mode 100644 index 123088e43..000000000 --- a/KIF Tests/AccessibilityIdentifierPullToRefreshTests.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// AccessibilityIdentifierPullToRefreshTests.m -// KIF -// -// Created by Michael Lupo on 9/22/15. -// -// - -#import -#import -#import - -@interface AccessibilityIdentifierPullToRefreshTests : KIFTestCase -@end - -@implementation AccessibilityIdentifierPullToRefreshTests - --(void) testPullToRefreshByAccessibilityIdentifier -{ - UITableView *tableView; - [tester waitForAccessibilityElement:NULL view:&tableView withIdentifier:@"Test Suite TableView" tappable:NO]; - - [tester tapViewWithAccessibilityLabel:@"Reset Refresh Control"]; - [tester pullToRefreshViewWithAccessibilityIdentifier:@"Test Suite TableView"]; - [tester waitForViewWithAccessibilityLabel:@"Bingo!"]; - [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Bingo!"]; -} - --(void) testPullToRefreshByAccessibilityIdentifierWithDuration -{ - UITableView *tableView; - [tester waitForAccessibilityElement:NULL view:&tableView withIdentifier:@"Test Suite TableView" tappable:NO]; - - [tester tapViewWithAccessibilityLabel:@"Reset Refresh Control"]; - [tester pullToRefreshViewWithAccessibilityIdentifier:@"Test Suite TableView" pullDownDuration:KIFPullToRefreshInAboutThreeSeconds]; - [tester waitForViewWithAccessibilityLabel:@"Bingo!"]; - [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Bingo!"]; -} - -@end diff --git a/KIF Tests/AccessibilityIdentifierTests.m b/KIF Tests/AccessibilityIdentifierTests.m deleted file mode 100644 index cafcf3676..000000000 --- a/KIF Tests/AccessibilityIdentifierTests.m +++ /dev/null @@ -1,139 +0,0 @@ -// -// AccessibilityIdentifierTests.m -// KIF -// -// Created by Brian Nickel on 11/6/14. -// -// - -#import -#import -#import - -@interface AccessibilityIdentifierTests : KIFTestCase -@end - -@implementation AccessibilityIdentifierTests - -- (void)beforeEach -{ - [tester tapViewWithAccessibilityLabel:@"Tapping"]; -} - -- (void)testWaitingForViewWithAccessibilityIdentifier -{ - // Since the tap has occurred in setup, we just need to wait for the result. - [tester waitForViewWithAccessibilityIdentifier:@"X_BUTTON"]; - KIFExpectFailure([[tester usingTimeout:0.5] waitForViewWithAccessibilityIdentifier:@"NOT_X_BUTTON"]); -} - -- (void)testTappingViewWithAccessibilityIdentifier -{ - [tester tapViewWithAccessibilityIdentifier:@"X_BUTTON"]; - [tester waitForViewWithAccessibilityLabel:@"X" traits:UIAccessibilityTraitButton | UIAccessibilityTraitSelected]; - KIFExpectFailure([[tester usingTimeout:0.5] tapViewWithAccessibilityIdentifier:@"NOT_X_BUTTON"]); -} - -- (void)testWaitingForAbscenceOfViewWithAccessibilityIdentifier -{ - // Since the tap has occurred in setup, we just need to wait for the result. - [tester waitForViewWithAccessibilityIdentifier:@"X_BUTTON"]; - [tester waitForAbsenceOfViewWithAccessibilityIdentifier:@"NOT_X_BUTTON"]; - KIFExpectFailure([[tester usingTimeout:0.5] waitForAbsenceOfViewWithAccessibilityIdentifier:@"X_BUTTON"]); - [tester tapViewWithAccessibilityLabel:@"Test Suite" traits:UIAccessibilityTraitButton]; - [tester waitForAbsenceOfViewWithAccessibilityIdentifier:@"X_BUTTON"]; - [tester tapViewWithAccessibilityLabel:@"Tapping"]; -} - -- (void)testLongPressingViewWithAccessibilityIdentifier -{ - [tester tapViewWithAccessibilityIdentifier:@"idGreeting"]; - [tester longPressViewWithAccessibilityIdentifier:@"idGreeting" duration:2]; - [tester tapViewWithAccessibilityLabel:@"Select All"]; -} - -- (void)testEnteringTextIntoViewWithAccessibilityIdentifier -{ - [tester tapViewWithAccessibilityIdentifier:@"idGreeting"]; - [tester longPressViewWithAccessibilityIdentifier:@"idGreeting" duration:2]; - [tester tapViewWithAccessibilityLabel:@"Select All"]; - [tester tapViewWithAccessibilityLabel:@"Cut"]; - [tester enterText:@"Yo" intoViewWithAccessibilityIdentifier:@"idGreeting"]; -} - -- (void)testEnteringTextIntoViewWithAccessibilityIdentifierExpectingResults -{ - [tester enterText:@", world" intoViewWithAccessibilityIdentifier:@"idGreeting" expectedResult:@"Hello, world"]; - [tester waitForViewWithAccessibilityLabel:@"Greeting" value:@"Hello, world" traits:UIAccessibilityTraitNone]; -} - -- (void)testClearingAndEnteringTextIntoViewWithAccessibilityLabel -{ - [tester clearTextFromAndThenEnterText:@"Yo" intoViewWithAccessibilityIdentifier:@"idGreeting"]; -} - -- (void)testSettingTextIntoViewWithAccessibilityIdentifier -{ - UIView *greetingView = [tester waitForViewWithAccessibilityIdentifier:@"idGreeting"]; - [tester longPressViewWithAccessibilityIdentifier:@"idGreeting" duration:2]; - [tester setText:@"Yo" intoViewWithAccessibilityIdentifier:@"idGreeting"]; - [tester expectView:greetingView toContainText:@"Yo"]; - [tester setText:@"Hello" intoViewWithAccessibilityIdentifier:@"idGreeting"]; - [tester expectView:greetingView toContainText:@"Hello"]; -} - -- (void)testTryFindingViewWithAccessibilityIdentifier -{ - if (![tester tryFindingViewWithAccessibilityIdentifier:@"idGreeting"]) - { - [tester fail]; - } - - if ([tester tryFindingViewWithAccessibilityIdentifier:@"idDoesNotExist"]) - { - [tester fail]; - } -} - -- (void) testTappingStepperIncrement -{ - UILabel *uiLabel = (UILabel *)[tester waitForViewWithAccessibilityIdentifier:@"tapViewController.stepperValue"]; - NSInteger originalValue = [[uiLabel text] integerValue]; - - [tester tapStepperWithAccessibilityIdentifier:@"tapViewController.stepper" increment:(KIFStepperDirectionIncrement)]; - - [tester waitForTimeInterval:0.5f]; - uiLabel = (UILabel *)[tester waitForViewWithAccessibilityIdentifier:@"tapViewController.stepperValue"]; - NSInteger newValue = [[uiLabel text] integerValue]; - if (newValue != (originalValue + 1)) - { - NSException *exception = [NSException exceptionWithName:@"Unexpected test failure" - reason:[NSString stringWithFormat: @"newValue was expected to be +1 of originalValue. Original Value was %ld while newValue is %ld", (long)originalValue, (long)newValue] userInfo:nil]; - [tester failWithException: exception stopTest: NO]; - } -} - -- (void) testTappingStepperDecrement -{ - UILabel *uiLabel = (UILabel *)[tester waitForViewWithAccessibilityIdentifier:@"tapViewController.stepperValue"]; - NSInteger originalValue = [[uiLabel text] integerValue]; - - [tester tapStepperWithAccessibilityIdentifier:@"tapViewController.stepper" increment:(KIFStepperDirectionDecrement)]; - - [tester waitForTimeInterval:0.5f]; - uiLabel = (UILabel *)[tester waitForViewWithAccessibilityIdentifier:@"tapViewController.stepperValue"]; - NSInteger newValue = [[uiLabel text] integerValue]; - if (newValue != (originalValue -1)) - { - NSException *exception = [NSException exceptionWithName:@"Unexpected test failure" - reason:[NSString stringWithFormat: @"newValue was expected to be -1 of originalValue. Original Value was %ld while newValue is %ld", (long)originalValue, (long)newValue] userInfo:nil]; - [tester failWithException: exception stopTest: NO]; - } -} - -- (void)afterEach -{ - [tester tapViewWithAccessibilityLabel:@"Test Suite" traits:UIAccessibilityTraitButton]; -} - -@end diff --git a/KIF Tests/KIF Tests-Prefix.pch b/KIF Tests/KIF Tests-Prefix.pch deleted file mode 100644 index 755f50c2f..000000000 --- a/KIF Tests/KIF Tests-Prefix.pch +++ /dev/null @@ -1,8 +0,0 @@ -// -// Prefix header for all source files of the 'KIF Tests' target in the 'KIF Tests' project -// - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/KIF Tests/PullToRefreshTests.m b/KIF Tests/PullToRefreshTests.m deleted file mode 100644 index 67f350d6b..000000000 --- a/KIF Tests/PullToRefreshTests.m +++ /dev/null @@ -1,45 +0,0 @@ -// -// PullToRefreshTests.m -// KIF -// -// Created by Michael Lupo on 9/22/15. -// -// - -#import -#import -#import - -@interface PullToRefreshTests : KIFTestCase -@end - -@implementation PullToRefreshTests - --(void) testPullToRefreshByAccessibilityLabelWithDuration -{ - UITableView *tableView; - [tester waitForAccessibilityElement:NULL view:&tableView withIdentifier:@"Test Suite TableView" tappable:NO]; - - [tester pullToRefreshViewWithAccessibilityLabel:@"Table View" pullDownDuration:KIFPullToRefreshInAboutThreeSeconds]; - [tester waitForViewWithAccessibilityLabel:@"Bingo!"]; - [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Bingo!"]; - - [tester waitForTimeInterval:5.0f]; //make sure the PTR is finished. -} - --(void) testPullToRefreshWithBigContentSize -{ - UITableView *tableView; - [tester waitForAccessibilityElement:NULL view:&tableView withIdentifier:@"Test Suite TableView" tappable:NO]; - CGSize originalSize = tableView.contentSize; - tableView.contentSize = CGSizeMake(1000, 10000); - - [tester pullToRefreshViewWithAccessibilityLabel:@"Table View" pullDownDuration:KIFPullToRefreshInAboutThreeSeconds]; - [tester waitForViewWithAccessibilityLabel:@"Bingo!"]; - [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Bingo!"]; - - [tester waitForTimeInterval:5.0f]; //make sure the PTR is finished. - tableView.contentSize = originalSize; -} - -@end diff --git a/KIF Tests/PullToRefreshTests_ViewTestActor.m b/KIF Tests/PullToRefreshTests_ViewTestActor.m deleted file mode 100644 index 6882d1075..000000000 --- a/KIF Tests/PullToRefreshTests_ViewTestActor.m +++ /dev/null @@ -1,42 +0,0 @@ -// -// PullToRefreshTests_ViewTestActor.m -// KIF -// -// Created by Alex Odawa on 1/29/16. -// -// - -#import -#import "KIFTestCase.h" -#import "KIFUIViewTestActor.h" - -@interface PullToRefreshTests_ViewTestActor : KIFTestCase -@end - -@implementation PullToRefreshTests_ViewTestActor - --(void) testPullToRefreshByAccessibilityLabelWithDuration -{ - [[viewTester usingIdentifier:@"Test Suite TableView"] waitForView]; - [[viewTester usingLabel:@"Table View"] pullToRefreshWithDuration:KIFPullToRefreshInAboutOneSecond]; - [[viewTester usingLabel:@"Bingo!"] waitForView]; - [[viewTester usingLabel:@"Bingo!"] waitForAbsenceOfView]; - [viewTester waitForTimeInterval:1.0f]; -} - --(void) testPullToRefreshWithBigContentSize -{ - - UITableView *tableView = (id)[[viewTester usingIdentifier:@"Test Suite TableView"] waitForView]; - CGSize originalSize = tableView.contentSize; - tableView.contentSize = CGSizeMake(1000, 10000); - - [[viewTester usingLabel:@"Table View"] pullToRefreshWithDuration:KIFPullToRefreshInAboutOneSecond]; - [[viewTester usingLabel:@"Bingo!"] waitForView]; - [[viewTester usingLabel:@"Bingo!"] waitForAbsenceOfView]; - [viewTester waitForTimeInterval:1.0f]; - - tableView.contentSize = originalSize; -} - -@end diff --git a/KIF Tests/WaitForViewTests_ViewTestActor.m b/KIF Tests/WaitForViewTests_ViewTestActor.m deleted file mode 100644 index 8d4a485c0..000000000 --- a/KIF Tests/WaitForViewTests_ViewTestActor.m +++ /dev/null @@ -1,54 +0,0 @@ -// -// ViewWaitForViewTests.m -// KIF -// -// Created by Alex Odawa on 1/26/15. -// -// - - -#import - -@interface WaitForViewTests_ViewTestActor : KIFTestCase -@end - - -@implementation WaitForViewTests_ViewTestActor - -- (void)beforeAll; -{ - [super beforeAll]; - - // If a previous test was still in the process of navigating back to the main view, let that complete before starting this test - [tester waitForAnimationsToFinish]; -} - -- (void)testWaitingForViewWithAccessibilityLabel -{ - [[viewTester usingLabel:@"Test Suite"] waitForView]; -} - -- (void)testWaitingForViewWithTraits -{ - NSString *label = nil; - UIAccessibilityTraits traits = UIAccessibilityTraitNone; - - NSOperatingSystemVersion iOS9 = {9, 0, 0}; - if ([NSProcessInfo instancesRespondToSelector:@selector(isOperatingSystemAtLeastVersion:)] && ![[NSProcessInfo new] isOperatingSystemAtLeastVersion:iOS9]) { - // In iOS 8 and before, you couldn't identify the table view elements as buttons - label = @"Test Suite"; - traits = UIAccessibilityTraitStaticText; - } else { - // In iOS 11, the static text trait of the navigation bar header goes away for some reason - label = @"UIAlertView"; - traits = UIAccessibilityTraitButton; - } - [[[viewTester usingLabel:label] usingTraits:traits] waitForView]; -} - -- (void)testWaitingForViewWithValue -{ - [[[viewTester usingLabel:@"Switch 1"] usingValue:@"1"] waitForView]; -} - -@end diff --git a/KIF.podspec b/KIF.podspec index 3b7f3e906..af6cbd3a0 100644 --- a/KIF.podspec +++ b/KIF.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "KIF" - s.version = "3.8.7" + s.version = "3.11.2" s.summary = "Keep It Functional - iOS UI acceptance testing in an XCUnit harness." s.homepage = "https://github.com/kif-framework/KIF/" s.license = 'Apache 2.0' s.authors = 'Michael Thole', 'Eric Firestone', 'Jim Puls', 'Brian Nickel' s.source = { :git => "https://github.com/kif-framework/KIF.git", :tag => "v#{ s.version.to_s }" } - s.platform = :ios, '10.0' + s.platform = :ios, '13.0' s.frameworks = 'CoreGraphics', 'QuartzCore', 'IOKit', 'WebKit', 'XCTest' s.default_subspec = 'Core' s.requires_arc = true diff --git a/KIF.xcodeproj/project.pbxproj b/KIF.xcodeproj/project.pbxproj index b8e1dd7ff..4db8a7db0 100644 --- a/KIF.xcodeproj/project.pbxproj +++ b/KIF.xcodeproj/project.pbxproj @@ -7,8 +7,15 @@ objects = { /* Begin PBXBuildFile section */ + 06104D1C2D51473B0038697E /* SwiftUIViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06104D1B2D5147370038697E /* SwiftUIViewController.swift */; }; + 06104D1F2D514E0C0038697E /* SwiftUITappingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06104D1E2D514E0C0038697E /* SwiftUITappingView.swift */; }; + 06104D212D5150D10038697E /* SwiftUIViewControllerFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06104D202D5150D00038697E /* SwiftUIViewControllerFactory.swift */; }; + 06104D242D5156760038697E /* SwiftUITappingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 06104D232D5156690038697E /* SwiftUITappingTests.m */; }; + 06104D262D516FEB0038697E /* ViewModifiers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06104D252D516FE70038697E /* ViewModifiers.swift */; }; + 064185B02D5ABADD00A33957 /* SwiftUITypingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 064185AF2D5ABADD00A33957 /* SwiftUITypingView.swift */; }; + 064185B22D5ABF5E00A33957 /* SwiftUITypingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 064185B12D5ABF5900A33957 /* SwiftUITypingTests.m */; }; + 06A507622D5274B800F77047 /* UIView+KIFPrivateAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 06A507612D5274B800F77047 /* UIView+KIFPrivateAPI.h */; }; 0E27A9EE1B45B53D00A6DE6E /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9AD81F91AA180B900B369FD /* IOKit.framework */; }; - 22191DFC24BF7944004CAA18 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 22191DFB24BF7944004CAA18 /* Default-568h@2x.png */; }; 2229D59525BEF47D0093296C /* KIFUITestActor-IdentifierTests.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D53E25BEF47D0093296C /* KIFUITestActor-IdentifierTests.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2229D59625BEF47D0093296C /* KIFUITestActor-IdentifierTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D53F25BEF47D0093296C /* KIFUITestActor-IdentifierTests.m */; }; 2229D59725BEF47D0093296C /* KIFTouchVisualizerViewCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D54125BEF47D0093296C /* KIFTouchVisualizerViewCoordinator.m */; }; @@ -90,86 +97,6 @@ 2229D5E525BEF47D0093296C /* KIFTestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D59125BEF47D0093296C /* KIFTestActor.m */; }; 2229D5E625BEF47D0093296C /* KIFUITestActor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D59225BEF47D0093296C /* KIFUITestActor.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2229D5E725BEF47D0093296C /* UIDatePicker+KIFPrivateAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D59425BEF47D0093296C /* UIDatePicker+KIFPrivateAPI.h */; }; - 22B1372625D6E27F00D88061 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22B1372525D6E27F00D88061 /* IOKit.framework */; }; - 22B1372D25D6E32700D88061 /* NSException-KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D54A25BEF47D0093296C /* NSException-KIFAdditions.m */; }; - 22B1372E25D6E32700D88061 /* UIEvent+KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D55725BEF47D0093296C /* UIEvent+KIFAdditions.h */; }; - 22B1372F25D6E32700D88061 /* UIView-KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D56525BEF47D0093296C /* UIView-KIFAdditions.m */; }; - 22B1373025D6E32700D88061 /* UIAutomationHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D58C25BEF47D0093296C /* UIAutomationHelper.m */; }; - 22B1373125D6E32700D88061 /* KIFSystemTestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D57825BEF47D0093296C /* KIFSystemTestActor.m */; }; - 22B1373225D6E32700D88061 /* KIFUITestActor_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D58325BEF47D0093296C /* KIFUITestActor_Private.h */; }; - 22B1373325D6E32700D88061 /* NSPredicate+KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D56F25BEF47D0093296C /* NSPredicate+KIFAdditions.m */; }; - 22B1373425D6E32700D88061 /* XCTestCase-KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D56E25BEF47D0093296C /* XCTestCase-KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1373525D6E32700D88061 /* UIDatePicker+KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D57125BEF47D0093296C /* UIDatePicker+KIFAdditions.h */; }; - 22B1373625D6E32700D88061 /* UIEvent+KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D56B25BEF47D0093296C /* UIEvent+KIFAdditions.m */; }; - 22B1373825D6E32700D88061 /* KIFEventVisualizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D54225BEF47D0093296C /* KIFEventVisualizer.h */; }; - 22B1373925D6E32700D88061 /* UITouch-KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D55125BEF47D0093296C /* UITouch-KIFAdditions.m */; }; - 22B1373A25D6E32700D88061 /* KIFUIObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D58825BEF47D0093296C /* KIFUIObject.m */; }; - 22B1373B25D6E32700D88061 /* CALayer-KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D55925BEF47D0093296C /* CALayer-KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1373C25D6E32700D88061 /* KIFTestActor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D58125BEF47D0093296C /* KIFTestActor.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1373D25D6E32700D88061 /* KIFTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D59025BEF47D0093296C /* KIFTestCase.m */; }; - 22B1373E25D6E32700D88061 /* KIFAccessibilityEnabler.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D58E25BEF47D0093296C /* KIFAccessibilityEnabler.m */; }; - 22B1373F25D6E32700D88061 /* KIFEventVisualizer.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D54425BEF47D0093296C /* KIFEventVisualizer.m */; }; - 22B1374025D6E32700D88061 /* UIScrollView-KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D54F25BEF47D0093296C /* UIScrollView-KIFAdditions.m */; }; - 22B1374125D6E32700D88061 /* KIFTypist.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D57A25BEF47D0093296C /* KIFTypist.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1374225D6E32700D88061 /* UIApplication-KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D54C25BEF47D0093296C /* UIApplication-KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1374325D6E32700D88061 /* XCTestCase-KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D55C25BEF47D0093296C /* XCTestCase-KIFAdditions.m */; }; - 22B1374425D6E32700D88061 /* CGGeometry-KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D55F25BEF47D0093296C /* CGGeometry-KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1374525D6E32700D88061 /* UIScrollView-KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D55D25BEF47D0093296C /* UIScrollView-KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1374625D6E32700D88061 /* KIFTouchVisualizerViewCoordinator.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D54125BEF47D0093296C /* KIFTouchVisualizerViewCoordinator.m */; }; - 22B1374725D6E32700D88061 /* LoadableCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D56D25BEF47D0093296C /* LoadableCategory.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1374825D6E32700D88061 /* UIDatePicker+KIFPrivateAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D59425BEF47D0093296C /* UIDatePicker+KIFPrivateAPI.h */; }; - 22B1374A25D6E32700D88061 /* UIScreen+KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D54925BEF47D0093296C /* UIScreen+KIFAdditions.m */; }; - 22B1374B25D6E32700D88061 /* KIFAccessibilityEnabler.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D57B25BEF47D0093296C /* KIFAccessibilityEnabler.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1374C25D6E32700D88061 /* UIApplication-KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D56025BEF47D0093296C /* UIApplication-KIFAdditions.m */; }; - 22B1374D25D6E32700D88061 /* NSFileManager-KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D55425BEF47D0093296C /* NSFileManager-KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1374E25D6E32700D88061 /* NSBundle-KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D57025BEF47D0093296C /* NSBundle-KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1374F25D6E32700D88061 /* NSString+KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D56125BEF47D0093296C /* NSString+KIFAdditions.h */; }; - 22B1375025D6E32700D88061 /* KIFTouchVisualizerView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D54325BEF47D0093296C /* KIFTouchVisualizerView.h */; }; - 22B1375125D6E32700D88061 /* CGGeometry-KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D54D25BEF47D0093296C /* CGGeometry-KIFAdditions.m */; }; - 22B1375225D6E32700D88061 /* NSPredicate+KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D55B25BEF47D0093296C /* NSPredicate+KIFAdditions.h */; }; - 22B1375325D6E32700D88061 /* KIFTextInputTraitsOverrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D58B25BEF47D0093296C /* KIFTextInputTraitsOverrides.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1375425D6E32700D88061 /* KIFUITestActor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D59225BEF47D0093296C /* KIFUITestActor.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1375525D6E32700D88061 /* KIFUIViewTestActor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D58D25BEF47D0093296C /* KIFUIViewTestActor.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1375625D6E32700D88061 /* CALayer-KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D57225BEF47D0093296C /* CALayer-KIFAdditions.m */; }; - 22B1375725D6E32700D88061 /* KIFUIObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D57725BEF47D0093296C /* KIFUIObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1375825D6E32700D88061 /* KIFTouchVisualizerViewCoordinator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D54525BEF47D0093296C /* KIFTouchVisualizerViewCoordinator.h */; }; - 22B1375925D6E32700D88061 /* NSError-KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D56C25BEF47D0093296C /* NSError-KIFAdditions.m */; }; - 22B1375A25D6E32700D88061 /* UIView-Debugging.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D56A25BEF47D0093296C /* UIView-Debugging.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1375B25D6E32700D88061 /* CAAnimation+KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D56725BEF47D0093296C /* CAAnimation+KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1375C25D6E32700D88061 /* KIFUITestActor-ConditionalTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D58725BEF47D0093296C /* KIFUITestActor-ConditionalTests.m */; }; - 22B1375D25D6E32700D88061 /* UITableView-KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D56925BEF47D0093296C /* UITableView-KIFAdditions.m */; }; - 22B1375E25D6E32700D88061 /* KIFTestStepValidation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D57925BEF47D0093296C /* KIFTestStepValidation.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1375F25D6E32700D88061 /* KIFTextInputTraitsOverrides.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D57E25BEF47D0093296C /* KIFTextInputTraitsOverrides.m */; }; - 22B1376025D6E32700D88061 /* UIScreen+KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D56325BEF47D0093296C /* UIScreen+KIFAdditions.h */; }; - 22B1376125D6E32700D88061 /* KIFUITestActor-IdentifierTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D53F25BEF47D0093296C /* KIFUITestActor-IdentifierTests.m */; }; - 22B1376225D6E32700D88061 /* UITableView-KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D55225BEF47D0093296C /* UITableView-KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1376325D6E32700D88061 /* NSString+KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D54B25BEF47D0093296C /* NSString+KIFAdditions.m */; }; - 22B1376425D6E32700D88061 /* UIAccessibilityElement-KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D54825BEF47D0093296C /* UIAccessibilityElement-KIFAdditions.m */; }; - 22B1376525D6E32700D88061 /* KIFTypist.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D58F25BEF47D0093296C /* KIFTypist.m */; }; - 22B1376625D6E32700D88061 /* KIFUIViewTestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D57C25BEF47D0093296C /* KIFUIViewTestActor.m */; }; - 22B1376725D6E32700D88061 /* UIWindow-KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D55E25BEF47D0093296C /* UIWindow-KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1376825D6E32700D88061 /* UIAutomationHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D57D25BEF47D0093296C /* UIAutomationHelper.h */; }; - 22B1376925D6E32700D88061 /* NSError-KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D55625BEF47D0093296C /* NSError-KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1376A25D6E32700D88061 /* UIDatePicker+KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D55825BEF47D0093296C /* UIDatePicker+KIFAdditions.m */; }; - 22B1376B25D6E32700D88061 /* UIView-KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D55525BEF47D0093296C /* UIView-KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1376C25D6E32700D88061 /* KIFTestCase.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D58225BEF47D0093296C /* KIFTestCase.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1376D25D6E32700D88061 /* KIFUITestActor-ConditionalTests.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D57625BEF47D0093296C /* KIFUITestActor-ConditionalTests.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1376E25D6E32700D88061 /* IOHIDEvent+KIF.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D58425BEF47D0093296C /* IOHIDEvent+KIF.m */; }; - 22B1376F25D6E32700D88061 /* KIFTestActor_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D58625BEF47D0093296C /* KIFTestActor_Private.h */; }; - 22B1377025D6E32700D88061 /* CAAnimation+KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D55325BEF47D0093296C /* CAAnimation+KIFAdditions.m */; }; - 22B1377125D6E32700D88061 /* KIFUITestActor-IdentifierTests.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D53E25BEF47D0093296C /* KIFUITestActor-IdentifierTests.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1377225D6E32700D88061 /* NSException-KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D56225BEF47D0093296C /* NSException-KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1377325D6E32700D88061 /* UIWindow-KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D54E25BEF47D0093296C /* UIWindow-KIFAdditions.m */; }; - 22B1377425D6E32700D88061 /* KIFTestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D59125BEF47D0093296C /* KIFTestActor.m */; }; - 22B1377525D6E32700D88061 /* NSBundle-KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D55A25BEF47D0093296C /* NSBundle-KIFAdditions.m */; }; - 22B1377625D6E32700D88061 /* NSFileManager-KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D56625BEF47D0093296C /* NSFileManager-KIFAdditions.m */; }; - 22B1377725D6E32700D88061 /* UIAccessibilityElement-KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D56425BEF47D0093296C /* UIAccessibilityElement-KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1377825D6E32700D88061 /* KIFTestStepValidation.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D58525BEF47D0093296C /* KIFTestStepValidation.m */; }; - 22B1377925D6E32700D88061 /* KIFSystemTestActor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D58925BEF47D0093296C /* KIFSystemTestActor.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1377A25D6E32700D88061 /* KIFUITestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D58025BEF47D0093296C /* KIFUITestActor.m */; }; - 22B1377B25D6E32700D88061 /* UITouch-KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2229D56825BEF47D0093296C /* UITouch-KIFAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22B1377C25D6E32700D88061 /* UIView-Debugging.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D55025BEF47D0093296C /* UIView-Debugging.m */; }; - 22B1377D25D6E32700D88061 /* KIFTouchVisualizerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2229D54625BEF47D0093296C /* KIFTouchVisualizerView.m */; }; 2CDEE1CB181DBED200DF6E63 /* PickerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CDEE1CA181DBED200DF6E63 /* PickerController.m */; }; 3812FB611A1212A700335733 /* AnimationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3812FB601A1212A700335733 /* AnimationViewController.m */; }; 3812FB631A12188700335733 /* WaitForAnimationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3812FB621A12188700335733 /* WaitForAnimationTests.m */; }; @@ -184,15 +111,20 @@ 85DB94721C5A5D430025F83E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85DB94711C5A5D430025F83E /* QuartzCore.framework */; }; 85DB94731C5A5FD50025F83E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85DB94711C5A5D430025F83E /* QuartzCore.framework */; }; 85DB94741C5A5FE10025F83E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85DB94711C5A5D430025F83E /* QuartzCore.framework */; }; - 85DB94751C5A5FEA0025F83E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85DB94711C5A5D430025F83E /* QuartzCore.framework */; }; + 8E654FC429D79BD8007F7811 /* OffscreenTests_ViewTestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E654FC329D79BD8007F7811 /* OffscreenTests_ViewTestActor.m */; }; + 8E654FCE29DA2FE7007F7811 /* UIWindow+KIFSwizzle.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E654FCC29DA2FE7007F7811 /* UIWindow+KIFSwizzle.h */; }; + 8E654FD029DA2FE7007F7811 /* UIWindow+KIFSwizzle.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E654FCD29DA2FE7007F7811 /* UIWindow+KIFSwizzle.m */; }; + 8EAA1EE229D3AF7A008F6029 /* OffscreenViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8EAA1EE129D3AF7A008F6029 /* OffscreenViewController.m */; }; + 8EAA1EE429D3B1F5008F6029 /* OffscreenTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8EAA1EE329D3B1F5008F6029 /* OffscreenTests.m */; }; + 8EC2CB1F29DB3D3B001BE493 /* NSObject+KIFSwizzle.h in Headers */ = {isa = PBXBuildFile; fileRef = 8EC2CB1D29DB3D3B001BE493 /* NSObject+KIFSwizzle.h */; }; + 8EC2CB2129DB3D3B001BE493 /* NSObject+KIFSwizzle.m in Sources */ = {isa = PBXBuildFile; fileRef = 8EC2CB1E29DB3D3B001BE493 /* NSObject+KIFSwizzle.m */; }; 97E8A5CF1B0A62F700124E3B /* BackgroundViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 97E8A5CE1B0A62F700124E3B /* BackgroundViewController.m */; }; 97E8A5D11B0A63D100124E3B /* BackgroundTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 97E8A5D01B0A63D100124E3B /* BackgroundTests.m */; }; - 9CC881A91AD4CE39002CD34C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAB072B413971AEA008AF393 /* UIKit.framework */; }; - 9CC881AA1AD4CE45002CD34C /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9AD81F91AA180B900B369FD /* IOKit.framework */; }; - 9CC881AB1AD4CE47002CD34C /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EABD46AB1857A0EB00A5F081 /* XCTest.framework */; }; - 9CC881AC1AD4CE4B002CD34C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAB0726B139719AC008AF393 /* Foundation.framework */; }; - 9CC881AD1AD4CE50002CD34C /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CC881A21AD4CAAC002CD34C /* CoreFoundation.framework */; }; - 9CC967401AD4B1B600576D13 /* KIF.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CC9673F1AD4B1B600576D13 /* KIF.h */; settings = {ATTRIBUTES = (Public, ); }; }; + ACA242E42C3DA55400E6F1B6 /* CustomActionTests_ViewTestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = ACA242E32C3DA55400E6F1B6 /* CustomActionTests_ViewTestActor.m */; }; + ACA242E72C3DB47400E6F1B6 /* UIAccessibilityCustomAction+KIFAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = ACA242E52C3DB46A00E6F1B6 /* UIAccessibilityCustomAction+KIFAdditions.m */; }; + ACA242E92C3DB4EA00E6F1B6 /* UIAccessibilityCustomAction+KIFAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = ACA242E82C3DB4B000E6F1B6 /* UIAccessibilityCustomAction+KIFAdditions.h */; settings = {ATTRIBUTES = (Private, ); }; }; + ACDB72682CA3146B00D9796E /* AccessibilityViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ACDB72672CA3146B00D9796E /* AccessibilityViewController.m */; }; + ACDB726A2CA314A800D9796E /* AccessibilityActivationTests_ViewTestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = ACDB72692CA314A800D9796E /* AccessibilityActivationTests_ViewTestActor.m */; }; AE62FCD01A1D20E5002B10DA /* WebViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = AE62FCCF1A1D20E5002B10DA /* WebViewTests.m */; }; AE62FCD61A1D2447002B10DA /* WebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AE62FCD51A1D2447002B10DA /* WebViewController.m */; }; AE62FCD81A1D2667002B10DA /* index.html in Resources */ = {isa = PBXBuildFile; fileRef = AE62FCD71A1D2667002B10DA /* index.html */; }; @@ -202,7 +134,6 @@ BCA1542A23312E7300CDC69F /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCA1542923312E7300CDC69F /* WebKit.framework */; }; BCA1542B23312E8100CDC69F /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCA1542923312E7300CDC69F /* WebKit.framework */; }; BCA1542C23312E8F00CDC69F /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCA1542923312E7300CDC69F /* WebKit.framework */; }; - BCA1542D23312E9A00CDC69F /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCA1542923312E7300CDC69F /* WebKit.framework */; }; BFE470901C7F44F700580EF9 /* UIScreen+KIFAdditionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BFE4708F1C7F44F700580EF9 /* UIScreen+KIFAdditionsTests.m */; }; CD19A99F1F46482200BF0325 /* CustomPickerController.m in Sources */ = {isa = PBXBuildFile; fileRef = CD19A99E1F46482200BF0325 /* CustomPickerController.m */; }; CD4E91F01F479A8C005D530C /* CustomPickerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CD4E91EF1F479A8C005D530C /* CustomPickerTests.m */; }; @@ -234,7 +165,6 @@ EABD46C31857A0F300A5F081 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAB072B413971AEA008AF393 /* UIKit.framework */; }; EABD46C41857A0F300A5F081 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AAB0726B139719AC008AF393 /* Foundation.framework */; }; EABD46C51857A0F300A5F081 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB60ECC4177F8C83005A041A /* CoreGraphics.framework */; }; - EABD46C71857A0F300A5F081 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = EB60ECF2177F8DB3005A041A /* InfoPlist.strings */; }; EABD46CF1857A15400A5F081 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EABD46AB1857A0EB00A5F081 /* XCTest.framework */; }; EABD46D21857A24E00A5F081 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EABD46AB1857A0EB00A5F081 /* XCTest.framework */; }; EABD46D61858C8ED00A5F081 /* libKIF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EABD46AA1857A0C700A5F081 /* libKIF.a */; }; @@ -274,13 +204,6 @@ FA8DA74F1A7711E900E0C644 /* WaitForTappableViewTests_ViewTestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = FA8DA74E1A7711E900E0C644 /* WaitForTappableViewTests_ViewTestActor.m */; }; FA8DA7511A7712E300E0C644 /* WaitForAnimationTests_ViewTestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = FA8DA7501A7712E300E0C644 /* WaitForAnimationTests_ViewTestActor.m */; }; FA914DB61A7707550073BB19 /* TypingTests_ViewTestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = FA914DB51A7707550073BB19 /* TypingTests_ViewTestActor.m */; }; - FAB8A0001CAC546A00C6DFC1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = FAB89FFF1CAC546A00C6DFC1 /* main.m */; }; - FAB8A0031CAC546A00C6DFC1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = FAB8A0021CAC546A00C6DFC1 /* AppDelegate.m */; }; - FAB8A0061CAC546A00C6DFC1 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FAB8A0051CAC546A00C6DFC1 /* ViewController.m */; }; - FAB8A0091CAC546A00C6DFC1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FAB8A0071CAC546A00C6DFC1 /* Main.storyboard */; }; - FAB8A00B1CAC546A00C6DFC1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FAB8A00A1CAC546A00C6DFC1 /* Assets.xcassets */; }; - FAB8A0191CAC546A00C6DFC1 /* KIFFrameworkConsumerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FAB8A0181CAC546A00C6DFC1 /* KIFFrameworkConsumerTests.m */; }; - FAB8A0231CAC547400C6DFC1 /* KIF.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9CC9673B1AD4B1B600576D13 /* KIF.framework */; }; FAC3A5621C5C0CD1003B681E /* PullToRefreshTests_ViewTestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = FAC3A5611C5C0CD1003B681E /* PullToRefreshTests_ViewTestActor.m */; }; FAE2D7631A76DDA90068B440 /* TappingTests_ViewTestActor.m in Sources */ = {isa = PBXBuildFile; fileRef = FAE2D7621A76DDA90068B440 /* TappingTests_ViewTestActor.m */; }; /* End PBXBuildFile section */ @@ -291,20 +214,21 @@ containerPortal = AAB0725F139719AC008AF393 /* Project object */; proxyType = 1; remoteGlobalIDString = EB60ECC0177F8C83005A041A; - remoteInfo = "Test Host"; - }; - FAB8A0151CAC546A00C6DFC1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = AAB0725F139719AC008AF393 /* Project object */; - proxyType = 1; - remoteGlobalIDString = FAB89FFB1CAC546900C6DFC1; - remoteInfo = KIFFrameworkConsumer; + remoteInfo = TestHost; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 06104D1B2D5147370038697E /* SwiftUIViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUIViewController.swift; sourceTree = ""; }; + 06104D1D2D51473D0038697E /* TestHost-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TestHost-Bridging-Header.h"; sourceTree = ""; }; + 06104D1E2D514E0C0038697E /* SwiftUITappingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUITappingView.swift; sourceTree = ""; }; + 06104D202D5150D00038697E /* SwiftUIViewControllerFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUIViewControllerFactory.swift; sourceTree = ""; }; + 06104D232D5156690038697E /* SwiftUITappingTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SwiftUITappingTests.m; sourceTree = ""; }; + 06104D252D516FE70038697E /* ViewModifiers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewModifiers.swift; sourceTree = ""; }; + 064185AF2D5ABADD00A33957 /* SwiftUITypingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUITypingView.swift; sourceTree = ""; }; + 064185B12D5ABF5900A33957 /* SwiftUITypingTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SwiftUITypingTests.m; sourceTree = ""; }; + 06A507612D5274B800F77047 /* UIView+KIFPrivateAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+KIFPrivateAPI.h"; sourceTree = ""; }; 22191DFA24BF793F004CAA18 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainStoryboard.storyboard; sourceTree = ""; }; - 22191DFB24BF7944004CAA18 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 221FF9A2252231030058F471 /* TestPlan.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = TestPlan.xctestplan; sourceTree = ""; }; 2229D53E25BEF47D0093296C /* KIFUITestActor-IdentifierTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KIFUITestActor-IdentifierTests.h"; sourceTree = ""; }; 2229D53F25BEF47D0093296C /* KIFUITestActor-IdentifierTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KIFUITestActor-IdentifierTests.m"; sourceTree = ""; }; @@ -401,14 +325,23 @@ 84D293B01A2C891700C10944 /* SystemAlertTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SystemAlertTests.m; sourceTree = ""; }; 84D293B71A2C8DF700C10944 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; }; 85DB94711C5A5D430025F83E /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 8E654FC329D79BD8007F7811 /* OffscreenTests_ViewTestActor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OffscreenTests_ViewTestActor.m; sourceTree = ""; }; + 8E654FCC29DA2FE7007F7811 /* UIWindow+KIFSwizzle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIWindow+KIFSwizzle.h"; sourceTree = ""; }; + 8E654FCD29DA2FE7007F7811 /* UIWindow+KIFSwizzle.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIWindow+KIFSwizzle.m"; sourceTree = ""; }; + 8EAA1EE129D3AF7A008F6029 /* OffscreenViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OffscreenViewController.m; sourceTree = ""; }; + 8EAA1EE329D3B1F5008F6029 /* OffscreenTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OffscreenTests.m; sourceTree = ""; }; + 8EC2CB1D29DB3D3B001BE493 /* NSObject+KIFSwizzle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSObject+KIFSwizzle.h"; sourceTree = ""; }; + 8EC2CB1E29DB3D3B001BE493 /* NSObject+KIFSwizzle.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSObject+KIFSwizzle.m"; sourceTree = ""; }; 97E8A5CE1B0A62F700124E3B /* BackgroundViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BackgroundViewController.m; sourceTree = ""; }; 97E8A5D01B0A63D100124E3B /* BackgroundTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BackgroundTests.m; sourceTree = ""; }; 9CC881A21AD4CAAC002CD34C /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; - 9CC9673B1AD4B1B600576D13 /* KIF.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = KIF.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9CC9673E1AD4B1B600576D13 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9CC9673F1AD4B1B600576D13 /* KIF.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KIF.h; sourceTree = ""; }; AAB0726B139719AC008AF393 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; AAB072B413971AEA008AF393 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + ACA242E32C3DA55400E6F1B6 /* CustomActionTests_ViewTestActor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CustomActionTests_ViewTestActor.m; sourceTree = ""; }; + ACA242E52C3DB46A00E6F1B6 /* UIAccessibilityCustomAction+KIFAdditions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIAccessibilityCustomAction+KIFAdditions.m"; sourceTree = ""; }; + ACA242E82C3DB4B000E6F1B6 /* UIAccessibilityCustomAction+KIFAdditions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIAccessibilityCustomAction+KIFAdditions.h"; sourceTree = ""; }; + ACDB72672CA3146B00D9796E /* AccessibilityViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AccessibilityViewController.m; sourceTree = ""; }; + ACDB72692CA314A800D9796E /* AccessibilityActivationTests_ViewTestActor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AccessibilityActivationTests_ViewTestActor.m; sourceTree = ""; }; AE62FCCF1A1D20E5002B10DA /* WebViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebViewTests.m; sourceTree = ""; }; AE62FCD51A1D2447002B10DA /* WebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WebViewController.m; sourceTree = ""; }; AE62FCD71A1D2667002B10DA /* index.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = index.html; sourceTree = ""; }; @@ -428,24 +361,22 @@ EA0F25491829839E006FF825 /* CollectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CollectionViewController.m; sourceTree = ""; }; EABD46AA1857A0C700A5F081 /* libKIF.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libKIF.a; sourceTree = BUILT_PRODUCTS_DIR; }; EABD46AB1857A0EB00A5F081 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - EABD46CD1857A0F300A5F081 /* KIF Tests - XCTest.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "KIF Tests - XCTest.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + EABD46CD1857A0F300A5F081 /* KIFTests - XCTest.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "KIFTests - XCTest.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; EB02523D17AA109400A7D13A /* CompositionTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CompositionTests.m; sourceTree = ""; }; EB09000F17E3696A00AA15B1 /* SearchFieldTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchFieldTests.m; sourceTree = ""; }; EB1A44D91A0C33AD004A3F61 /* AccessibilityIdentifierTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AccessibilityIdentifierTests.m; sourceTree = ""; }; EB22B5AF17AF52640090B848 /* CascadingFailureTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CascadingFailureTests.m; sourceTree = ""; }; EB3F654417AA0B8400469D18 /* TableViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TableViewTests.m; sourceTree = ""; }; EB4C3138167BA3D200E31109 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; - EB60ECC1177F8C83005A041A /* Test Host.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Test Host.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + EB60ECC1177F8C83005A041A /* TestHost.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestHost.app; sourceTree = BUILT_PRODUCTS_DIR; }; EB60ECC4177F8C83005A041A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - EB60ECC8177F8C83005A041A /* Test Host-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Test Host-Info.plist"; sourceTree = ""; }; + EB60ECC8177F8C83005A041A /* TestHost-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestHost-Info.plist"; sourceTree = ""; }; EB60ECCA177F8C83005A041A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; EB60ECCC177F8C84005A041A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - EB60ECCE177F8C84005A041A /* Test Host-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Test Host-Prefix.pch"; sourceTree = ""; }; + EB60ECCE177F8C84005A041A /* TestHost-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TestHost-Prefix.pch"; sourceTree = ""; }; EB60ECD2177F8C84005A041A /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; EB60ECD4177F8C84005A041A /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; EB60ECD6177F8C84005A041A /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - EB60ECF1177F8DB3005A041A /* KIF Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "KIF Tests-Info.plist"; sourceTree = ""; }; - EB60ECF3177F8DB3005A041A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; EB60ECFC177F9031005A041A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; EB60ECFD177F9031005A041A /* ShowHideViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShowHideViewController.m; sourceTree = ""; }; EB60ECFE177F9032005A041A /* TapViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TapViewController.m; sourceTree = ""; }; @@ -483,37 +414,11 @@ FA8DA74E1A7711E900E0C644 /* WaitForTappableViewTests_ViewTestActor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WaitForTappableViewTests_ViewTestActor.m; sourceTree = ""; }; FA8DA7501A7712E300E0C644 /* WaitForAnimationTests_ViewTestActor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WaitForAnimationTests_ViewTestActor.m; sourceTree = ""; }; FA914DB51A7707550073BB19 /* TypingTests_ViewTestActor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TypingTests_ViewTestActor.m; sourceTree = ""; }; - FAB89FFC1CAC546900C6DFC1 /* KIFFrameworkConsumer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KIFFrameworkConsumer.app; sourceTree = BUILT_PRODUCTS_DIR; }; - FAB89FFF1CAC546A00C6DFC1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - FAB8A0011CAC546A00C6DFC1 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - FAB8A0021CAC546A00C6DFC1 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - FAB8A0041CAC546A00C6DFC1 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - FAB8A0051CAC546A00C6DFC1 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - FAB8A0081CAC546A00C6DFC1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - FAB8A00A1CAC546A00C6DFC1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - FAB8A00F1CAC546A00C6DFC1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - FAB8A0141CAC546A00C6DFC1 /* KIFFrameworkConsumerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KIFFrameworkConsumerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - FAB8A0181CAC546A00C6DFC1 /* KIFFrameworkConsumerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KIFFrameworkConsumerTests.m; sourceTree = ""; }; - FAB8A01A1CAC546A00C6DFC1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; FAC3A5611C5C0CD1003B681E /* PullToRefreshTests_ViewTestActor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PullToRefreshTests_ViewTestActor.m; sourceTree = ""; }; FAE2D7621A76DDA90068B440 /* TappingTests_ViewTestActor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TappingTests_ViewTestActor.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 9CC967371AD4B1B600576D13 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BCA1542D23312E9A00CDC69F /* WebKit.framework in Frameworks */, - 85DB94751C5A5FEA0025F83E /* QuartzCore.framework in Frameworks */, - 9CC881A91AD4CE39002CD34C /* UIKit.framework in Frameworks */, - 9CC881AC1AD4CE4B002CD34C /* Foundation.framework in Frameworks */, - 9CC881AA1AD4CE45002CD34C /* IOKit.framework in Frameworks */, - 9CC881AD1AD4CE50002CD34C /* CoreFoundation.framework in Frameworks */, - 9CC881AB1AD4CE47002CD34C /* XCTest.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; EABD468C1857A0C700A5F081 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -556,25 +461,31 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - FAB89FF91CAC546900C6DFC1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FAB8A0111CAC546A00C6DFC1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 22B1372625D6E27F00D88061 /* IOKit.framework in Frameworks */, - FAB8A0231CAC547400C6DFC1 /* KIF.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 06104D1A2D51472F0038697E /* SwiftUI */ = { + isa = PBXGroup; + children = ( + 06104D1D2D51473D0038697E /* TestHost-Bridging-Header.h */, + 06104D202D5150D00038697E /* SwiftUIViewControllerFactory.swift */, + 06104D1B2D5147370038697E /* SwiftUIViewController.swift */, + 06104D1E2D514E0C0038697E /* SwiftUITappingView.swift */, + 06104D252D516FE70038697E /* ViewModifiers.swift */, + 064185AF2D5ABADD00A33957 /* SwiftUITypingView.swift */, + ); + path = SwiftUI; + sourceTree = ""; + }; + 06104D222D51565A0038697E /* SwiftUI Tests */ = { + isa = PBXGroup; + children = ( + 064185B12D5ABF5900A33957 /* SwiftUITypingTests.m */, + 06104D232D5156690038697E /* SwiftUITappingTests.m */, + ); + path = "SwiftUI Tests"; + sourceTree = ""; + }; 2229D53D25BEF47D0093296C /* IdentifierTests */ = { isa = PBXGroup; children = ( @@ -621,6 +532,8 @@ 2229D56F25BEF47D0093296C /* NSPredicate+KIFAdditions.m */, 2229D56125BEF47D0093296C /* NSString+KIFAdditions.h */, 2229D54B25BEF47D0093296C /* NSString+KIFAdditions.m */, + ACA242E82C3DB4B000E6F1B6 /* UIAccessibilityCustomAction+KIFAdditions.h */, + ACA242E52C3DB46A00E6F1B6 /* UIAccessibilityCustomAction+KIFAdditions.m */, 2229D56425BEF47D0093296C /* UIAccessibilityElement-KIFAdditions.h */, 2229D54825BEF47D0093296C /* UIAccessibilityElement-KIFAdditions.m */, 2229D54C25BEF47D0093296C /* UIApplication-KIFAdditions.h */, @@ -645,6 +558,10 @@ 2229D54E25BEF47D0093296C /* UIWindow-KIFAdditions.m */, 2229D56E25BEF47D0093296C /* XCTestCase-KIFAdditions.h */, 2229D55C25BEF47D0093296C /* XCTestCase-KIFAdditions.m */, + 8E654FCC29DA2FE7007F7811 /* UIWindow+KIFSwizzle.h */, + 8E654FCD29DA2FE7007F7811 /* UIWindow+KIFSwizzle.m */, + 8EC2CB1D29DB3D3B001BE493 /* NSObject+KIFSwizzle.h */, + 8EC2CB1E29DB3D3B001BE493 /* NSObject+KIFSwizzle.m */, ); name = Additions; path = Sources/KIF/Additions; @@ -690,40 +607,19 @@ 2229D59325BEF47D0093296C /* ApplePrivateAPIs */ = { isa = PBXGroup; children = ( + 06A507612D5274B800F77047 /* UIView+KIFPrivateAPI.h */, 2229D59425BEF47D0093296C /* UIDatePicker+KIFPrivateAPI.h */, ); name = ApplePrivateAPIs; path = Sources/KIF/ApplePrivateAPIs; sourceTree = ""; }; - 9CC9673C1AD4B1B600576D13 /* KIF Framework */ = { - isa = PBXGroup; - children = ( - 9CC9673F1AD4B1B600576D13 /* KIF.h */, - 9CC9673D1AD4B1B600576D13 /* Supporting Files */, - ); - name = "KIF Framework"; - path = KIFFramework; - sourceTree = ""; - }; - 9CC9673D1AD4B1B600576D13 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 9CC9673E1AD4B1B600576D13 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; AAB0725D139719AC008AF393 = { isa = PBXGroup; children = ( - 22191DFB24BF7944004CAA18 /* Default-568h@2x.png */, EB60ECBC177F8C51005A041A /* KIF */, - EB60ECC6177F8C83005A041A /* Test Host */, - EB60ECEF177F8DB3005A041A /* KIF Tests */, - 9CC9673C1AD4B1B600576D13 /* KIF Framework */, - FAB89FFD1CAC546A00C6DFC1 /* KIFFrameworkConsumer */, - FAB8A0171CAC546A00C6DFC1 /* KIFFrameworkConsumerTests */, + EB60ECEF177F8DB3005A041A /* Tests */, + EB60ECC6177F8C83005A041A /* TestHost */, AAB0726A139719AC008AF393 /* Frameworks */, AAB07269139719AC008AF393 /* Products */, ); @@ -732,12 +628,9 @@ AAB07269139719AC008AF393 /* Products */ = { isa = PBXGroup; children = ( - EB60ECC1177F8C83005A041A /* Test Host.app */, + EB60ECC1177F8C83005A041A /* TestHost.app */, EABD46AA1857A0C700A5F081 /* libKIF.a */, - EABD46CD1857A0F300A5F081 /* KIF Tests - XCTest.xctest */, - 9CC9673B1AD4B1B600576D13 /* KIF.framework */, - FAB89FFC1CAC546900C6DFC1 /* KIFFrameworkConsumer.app */, - FAB8A0141CAC546A00C6DFC1 /* KIFFrameworkConsumerTests.xctest */, + EABD46CD1857A0F300A5F081 /* KIFTests - XCTest.xctest */, ); name = Products; sourceTree = ""; @@ -781,9 +674,10 @@ name = KIF; sourceTree = ""; }; - EB60ECC6177F8C83005A041A /* Test Host */ = { + EB60ECC6177F8C83005A041A /* TestHost */ = { isa = PBXGroup; children = ( + ACDB72672CA3146B00D9796E /* AccessibilityViewController.m */, 3812FB601A1212A700335733 /* AnimationViewController.m */, 2CDEE1CA181DBED200DF6E63 /* PickerController.m */, CD19A99E1F46482200BF0325 /* CustomPickerController.m */, @@ -800,18 +694,20 @@ AE62FCD51A1D2447002B10DA /* WebViewController.m */, 84D293AC1A2C84F700C10944 /* SystemAlertViewController.m */, 97E8A5CE1B0A62F700124E3B /* BackgroundViewController.m */, + 06104D1A2D51472F0038697E /* SwiftUI */, EB60ECC7177F8C83005A041A /* Supporting Files */, + 8EAA1EE129D3AF7A008F6029 /* OffscreenViewController.m */, ); - path = "Test Host"; + path = TestHost; sourceTree = ""; }; EB60ECC7177F8C83005A041A /* Supporting Files */ = { isa = PBXGroup; children = ( - EB60ECC8177F8C83005A041A /* Test Host-Info.plist */, + EB60ECC8177F8C83005A041A /* TestHost-Info.plist */, EB60ECC9177F8C83005A041A /* InfoPlist.strings */, EB60ECCC177F8C84005A041A /* main.m */, - EB60ECCE177F8C84005A041A /* Test Host-Prefix.pch */, + EB60ECCE177F8C84005A041A /* TestHost-Prefix.pch */, EB60ECD2177F8C84005A041A /* Default.png */, EB60ECD4177F8C84005A041A /* Default@2x.png */, EB60ECD6177F8C84005A041A /* Default-568h@2x.png */, @@ -821,9 +717,10 @@ name = "Supporting Files"; sourceTree = ""; }; - EB60ECEF177F8DB3005A041A /* KIF Tests */ = { + EB60ECEF177F8DB3005A041A /* Tests */ = { isa = PBXGroup; children = ( + 06104D222D51565A0038697E /* SwiftUI Tests */, FA8DA74D1A77117A00E0C644 /* KIFUIViewTestActor Tests */, BFE4708E1C7F44C100580EF9 /* Additions */, 2CED883D181F5EE1005ABD20 /* PickerTests.m */, @@ -855,23 +752,15 @@ EB60ED0A177F90BA005A041A /* SystemTests.m */, 5F6A1B371C191F9600F20F22 /* UIApplicationKIFAdditionsTests.m */, B66B1BF3202BC94F00D0E4B2 /* AutocorrectTests.m */, - EB60ECF0177F8DB3005A041A /* Supporting Files */, + 8EAA1EE329D3B1F5008F6029 /* OffscreenTests.m */, ); - path = "KIF Tests"; - sourceTree = ""; - }; - EB60ECF0177F8DB3005A041A /* Supporting Files */ = { - isa = PBXGroup; - children = ( - EB60ECF1177F8DB3005A041A /* KIF Tests-Info.plist */, - EB60ECF2177F8DB3005A041A /* InfoPlist.strings */, - ); - name = "Supporting Files"; + path = Tests; sourceTree = ""; }; FA8DA74D1A77117A00E0C644 /* KIFUIViewTestActor Tests */ = { isa = PBXGroup; children = ( + ACDB72692CA314A800D9796E /* AccessibilityActivationTests_ViewTestActor.m */, FA4915641A7827D000A78E57 /* PickerTests_ViewTestActor.m */, B66B1BF5202BCF2000D0E4B2 /* AutocorrectTests_ViewTestActor.m */, CD4E91F11F479FF2005D530C /* CustomPickerTests_ViewTestActor.m */, @@ -897,94 +786,15 @@ FA8A3C5E1A772E6800206350 /* AccessibilityIdentifierTests_ViewTestActor.m */, FA8A3C5A1A77281900206350 /* WebViewTests_ViewTestActor.m */, FA8A3C601A77320000206350 /* SystemAlertTests_ViewTestActor.m */, + 8E654FC329D79BD8007F7811 /* OffscreenTests_ViewTestActor.m */, + ACA242E32C3DA55400E6F1B6 /* CustomActionTests_ViewTestActor.m */, ); name = "KIFUIViewTestActor Tests"; sourceTree = ""; }; - FAB89FFD1CAC546A00C6DFC1 /* KIFFrameworkConsumer */ = { - isa = PBXGroup; - children = ( - FAB8A0011CAC546A00C6DFC1 /* AppDelegate.h */, - FAB8A0021CAC546A00C6DFC1 /* AppDelegate.m */, - FAB8A0041CAC546A00C6DFC1 /* ViewController.h */, - FAB8A0051CAC546A00C6DFC1 /* ViewController.m */, - FAB8A0071CAC546A00C6DFC1 /* Main.storyboard */, - FAB8A00A1CAC546A00C6DFC1 /* Assets.xcassets */, - FAB8A00F1CAC546A00C6DFC1 /* Info.plist */, - FAB89FFE1CAC546A00C6DFC1 /* Supporting Files */, - ); - path = KIFFrameworkConsumer; - sourceTree = ""; - }; - FAB89FFE1CAC546A00C6DFC1 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - FAB89FFF1CAC546A00C6DFC1 /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - FAB8A0171CAC546A00C6DFC1 /* KIFFrameworkConsumerTests */ = { - isa = PBXGroup; - children = ( - FAB8A0181CAC546A00C6DFC1 /* KIFFrameworkConsumerTests.m */, - FAB8A01A1CAC546A00C6DFC1 /* Info.plist */, - ); - path = KIFFrameworkConsumerTests; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 9CC967381AD4B1B600576D13 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 22B1373825D6E32700D88061 /* KIFEventVisualizer.h in Headers */, - 22B1373425D6E32700D88061 /* XCTestCase-KIFAdditions.h in Headers */, - 22B1375325D6E32700D88061 /* KIFTextInputTraitsOverrides.h in Headers */, - 22B1377725D6E32700D88061 /* UIAccessibilityElement-KIFAdditions.h in Headers */, - 22B1376925D6E32700D88061 /* NSError-KIFAdditions.h in Headers */, - 22B1377125D6E32700D88061 /* KIFUITestActor-IdentifierTests.h in Headers */, - 22B1377225D6E32700D88061 /* NSException-KIFAdditions.h in Headers */, - 22B1374525D6E32700D88061 /* UIScrollView-KIFAdditions.h in Headers */, - 22B1374E25D6E32700D88061 /* NSBundle-KIFAdditions.h in Headers */, - 22B1374225D6E32700D88061 /* UIApplication-KIFAdditions.h in Headers */, - 22B1374B25D6E32700D88061 /* KIFAccessibilityEnabler.h in Headers */, - 22B1377B25D6E32700D88061 /* UITouch-KIFAdditions.h in Headers */, - 22B1376825D6E32700D88061 /* UIAutomationHelper.h in Headers */, - 22B1372E25D6E32700D88061 /* UIEvent+KIFAdditions.h in Headers */, - 22B1373B25D6E32700D88061 /* CALayer-KIFAdditions.h in Headers */, - 22B1375825D6E32700D88061 /* KIFTouchVisualizerViewCoordinator.h in Headers */, - 22B1375E25D6E32700D88061 /* KIFTestStepValidation.h in Headers */, - 22B1376025D6E32700D88061 /* UIScreen+KIFAdditions.h in Headers */, - 22B1374825D6E32700D88061 /* UIDatePicker+KIFPrivateAPI.h in Headers */, - 22B1374725D6E32700D88061 /* LoadableCategory.h in Headers */, - 22B1376C25D6E32700D88061 /* KIFTestCase.h in Headers */, - 22B1373225D6E32700D88061 /* KIFUITestActor_Private.h in Headers */, - 22B1375725D6E32700D88061 /* KIFUIObject.h in Headers */, - 22B1375525D6E32700D88061 /* KIFUIViewTestActor.h in Headers */, - 22B1375B25D6E32700D88061 /* CAAnimation+KIFAdditions.h in Headers */, - 22B1375225D6E32700D88061 /* NSPredicate+KIFAdditions.h in Headers */, - 22B1374D25D6E32700D88061 /* NSFileManager-KIFAdditions.h in Headers */, - 22B1374125D6E32700D88061 /* KIFTypist.h in Headers */, - 22B1376225D6E32700D88061 /* UITableView-KIFAdditions.h in Headers */, - 9CC967401AD4B1B600576D13 /* KIF.h in Headers */, - 22B1373525D6E32700D88061 /* UIDatePicker+KIFAdditions.h in Headers */, - 22B1376F25D6E32700D88061 /* KIFTestActor_Private.h in Headers */, - 22B1375025D6E32700D88061 /* KIFTouchVisualizerView.h in Headers */, - 22B1377925D6E32700D88061 /* KIFSystemTestActor.h in Headers */, - 22B1376D25D6E32700D88061 /* KIFUITestActor-ConditionalTests.h in Headers */, - 22B1374F25D6E32700D88061 /* NSString+KIFAdditions.h in Headers */, - 22B1376B25D6E32700D88061 /* UIView-KIFAdditions.h in Headers */, - 22B1373C25D6E32700D88061 /* KIFTestActor.h in Headers */, - 22B1374425D6E32700D88061 /* CGGeometry-KIFAdditions.h in Headers */, - 22B1375A25D6E32700D88061 /* UIView-Debugging.h in Headers */, - 22B1376725D6E32700D88061 /* UIWindow-KIFAdditions.h in Headers */, - 22B1375425D6E32700D88061 /* KIFUITestActor.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; EABD46901857A0C700A5F081 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -1006,13 +816,16 @@ 2229D5DE25BEF47D0093296C /* KIF.h in Headers */, 2229D5CE25BEF47D0093296C /* KIFTypist.h in Headers */, 2229D5A725BEF47D0093296C /* UITableView-KIFAdditions.h in Headers */, + 8EC2CB1F29DB3D3B001BE493 /* NSObject+KIFSwizzle.h in Headers */, 2229D5AB25BEF47D0093296C /* NSError-KIFAdditions.h in Headers */, 2229D5B825BEF47D0093296C /* UIScreen+KIFAdditions.h in Headers */, 2229D5AA25BEF47D0093296C /* UIView-KIFAdditions.h in Headers */, + ACA242E92C3DB4EA00E6F1B6 /* UIAccessibilityCustomAction+KIFAdditions.h in Headers */, 2229D5CD25BEF47D0093296C /* KIFTestStepValidation.h in Headers */, 2229D5C225BEF47D0093296C /* LoadableCategory.h in Headers */, 2229D5D625BEF47D0093296C /* KIFTestCase.h in Headers */, 2229D5C825BEF47D0093296C /* IOHIDEvent+KIF.h in Headers */, + 06A507622D5274B800F77047 /* UIView+KIFPrivateAPI.h in Headers */, 2229D5B725BEF47D0093296C /* NSException-KIFAdditions.h in Headers */, 2229D5C325BEF47D0093296C /* XCTestCase-KIFAdditions.h in Headers */, 2229D5B425BEF47D0093296C /* CGGeometry-KIFAdditions.h in Headers */, @@ -1020,6 +833,7 @@ 2229D5B625BEF47D0093296C /* NSString+KIFAdditions.h in Headers */, 2229D5BC25BEF47D0093296C /* CAAnimation+KIFAdditions.h in Headers */, 2229D59525BEF47D0093296C /* KIFUITestActor-IdentifierTests.h in Headers */, + 8E654FCE29DA2FE7007F7811 /* UIWindow+KIFSwizzle.h in Headers */, 2229D59925BEF47D0093296C /* KIFTouchVisualizerView.h in Headers */, 2229D5C525BEF47D0093296C /* NSBundle-KIFAdditions.h in Headers */, 2229D59B25BEF47D0093296C /* KIFTouchVisualizerViewCoordinator.h in Headers */, @@ -1055,24 +869,6 @@ /* End PBXLegacyTarget section */ /* Begin PBXNativeTarget section */ - 9CC9673A1AD4B1B600576D13 /* KIFFramework */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9CC967541AD4B1B600576D13 /* Build configuration list for PBXNativeTarget "KIFFramework" */; - buildPhases = ( - 9CC967361AD4B1B600576D13 /* Sources */, - 9CC967371AD4B1B600576D13 /* Frameworks */, - 9CC967381AD4B1B600576D13 /* Headers */, - 9CC967391AD4B1B600576D13 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = KIFFramework; - productName = KIFFramework; - productReference = 9CC9673B1AD4B1B600576D13 /* KIF.framework */; - productType = "com.apple.product-type.framework"; - }; EABD46791857A0C700A5F081 /* KIF */ = { isa = PBXNativeTarget; buildConfigurationList = EABD46A61857A0C700A5F081 /* Build configuration list for PBXNativeTarget "KIF" */; @@ -1090,9 +886,9 @@ productReference = EABD46AA1857A0C700A5F081 /* libKIF.a */; productType = "com.apple.product-type.library.static"; }; - EABD46AD1857A0F300A5F081 /* KIF Tests */ = { + EABD46AD1857A0F300A5F081 /* KIFTests */ = { isa = PBXNativeTarget; - buildConfigurationList = EABD46C91857A0F300A5F081 /* Build configuration list for PBXNativeTarget "KIF Tests" */; + buildConfigurationList = EABD46C91857A0F300A5F081 /* Build configuration list for PBXNativeTarget "KIFTests" */; buildPhases = ( EABD46B01857A0F300A5F081 /* Sources */, EABD46C01857A0F300A5F081 /* Frameworks */, @@ -1103,14 +899,14 @@ dependencies = ( EABD46AE1857A0F300A5F081 /* PBXTargetDependency */, ); - name = "KIF Tests"; - productName = "KIF Tests"; - productReference = EABD46CD1857A0F300A5F081 /* KIF Tests - XCTest.xctest */; + name = KIFTests; + productName = KIFTests; + productReference = EABD46CD1857A0F300A5F081 /* KIFTests - XCTest.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - EB60ECC0177F8C83005A041A /* Test Host */ = { + EB60ECC0177F8C83005A041A /* TestHost */ = { isa = PBXNativeTarget; - buildConfigurationList = EB60ECD8177F8C84005A041A /* Build configuration list for PBXNativeTarget "Test Host" */; + buildConfigurationList = EB60ECD8177F8C84005A041A /* Build configuration list for PBXNativeTarget "TestHost" */; buildPhases = ( EB60ECBD177F8C83005A041A /* Sources */, EB60ECBE177F8C83005A041A /* Frameworks */, @@ -1120,46 +916,11 @@ ); dependencies = ( ); - name = "Test Host"; - productName = "Test Host"; - productReference = EB60ECC1177F8C83005A041A /* Test Host.app */; - productType = "com.apple.product-type.application"; - }; - FAB89FFB1CAC546900C6DFC1 /* KIFFrameworkConsumer */ = { - isa = PBXNativeTarget; - buildConfigurationList = FAB8A0211CAC546A00C6DFC1 /* Build configuration list for PBXNativeTarget "KIFFrameworkConsumer" */; - buildPhases = ( - FAB89FF81CAC546900C6DFC1 /* Sources */, - FAB89FF91CAC546900C6DFC1 /* Frameworks */, - FAB89FFA1CAC546900C6DFC1 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = KIFFrameworkConsumer; - productName = KIFFrameworkConsumer; - productReference = FAB89FFC1CAC546900C6DFC1 /* KIFFrameworkConsumer.app */; + name = TestHost; + productName = TestHost; + productReference = EB60ECC1177F8C83005A041A /* TestHost.app */; productType = "com.apple.product-type.application"; }; - FAB8A0131CAC546A00C6DFC1 /* KIFFrameworkConsumerTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = FAB8A0221CAC546A00C6DFC1 /* Build configuration list for PBXNativeTarget "KIFFrameworkConsumerTests" */; - buildPhases = ( - FAB8A0101CAC546A00C6DFC1 /* Sources */, - FAB8A0111CAC546A00C6DFC1 /* Frameworks */, - FAB8A0121CAC546A00C6DFC1 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - FAB8A0161CAC546A00C6DFC1 /* PBXTargetDependency */, - ); - name = KIFFrameworkConsumerTests; - productName = KIFFrameworkConsumerTests; - productReference = FAB8A0141CAC546A00C6DFC1 /* KIFFrameworkConsumerTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -1169,15 +930,8 @@ LastTestingUpgradeCheck = 0510; LastUpgradeCheck = 1150; TargetAttributes = { - 9CC9673A1AD4B1B600576D13 = { - CreatedOnToolsVersion = 6.2; - }; - FAB89FFB1CAC546900C6DFC1 = { - CreatedOnToolsVersion = 7.1.1; - }; - FAB8A0131CAC546A00C6DFC1 = { - CreatedOnToolsVersion = 7.1.1; - TestTargetID = FAB89FFB1CAC546900C6DFC1; + EB60ECC0177F8C83005A041A = { + LastSwiftMigration = 1620; }; }; }; @@ -1196,28 +950,17 @@ targets = ( EABD46791857A0C700A5F081 /* KIF */, A88930091685088F00FC7C63 /* KIF Documentation */, - EB60ECC0177F8C83005A041A /* Test Host */, - EABD46AD1857A0F300A5F081 /* KIF Tests */, - 9CC9673A1AD4B1B600576D13 /* KIFFramework */, - FAB89FFB1CAC546900C6DFC1 /* KIFFrameworkConsumer */, - FAB8A0131CAC546A00C6DFC1 /* KIFFrameworkConsumerTests */, + EB60ECC0177F8C83005A041A /* TestHost */, + EABD46AD1857A0F300A5F081 /* KIFTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 9CC967391AD4B1B600576D13 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; EABD46C61857A0F300A5F081 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - EABD46C71857A0F300A5F081 /* InfoPlist.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1235,71 +978,9 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - FAB89FFA1CAC546900C6DFC1 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FAB8A00B1CAC546A00C6DFC1 /* Assets.xcassets in Resources */, - FAB8A0091CAC546A00C6DFC1 /* Main.storyboard in Resources */, - 22191DFC24BF7944004CAA18 /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FAB8A0121CAC546A00C6DFC1 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 9CC967361AD4B1B600576D13 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 22B1375625D6E32700D88061 /* CALayer-KIFAdditions.m in Sources */, - 22B1374625D6E32700D88061 /* KIFTouchVisualizerViewCoordinator.m in Sources */, - 22B1376125D6E32700D88061 /* KIFUITestActor-IdentifierTests.m in Sources */, - 22B1373D25D6E32700D88061 /* KIFTestCase.m in Sources */, - 22B1376A25D6E32700D88061 /* UIDatePicker+KIFAdditions.m in Sources */, - 22B1375F25D6E32700D88061 /* KIFTextInputTraitsOverrides.m in Sources */, - 22B1375925D6E32700D88061 /* NSError-KIFAdditions.m in Sources */, - 22B1377025D6E32700D88061 /* CAAnimation+KIFAdditions.m in Sources */, - 22B1373325D6E32700D88061 /* NSPredicate+KIFAdditions.m in Sources */, - 22B1376E25D6E32700D88061 /* IOHIDEvent+KIF.m in Sources */, - 22B1375D25D6E32700D88061 /* UITableView-KIFAdditions.m in Sources */, - 22B1372D25D6E32700D88061 /* NSException-KIFAdditions.m in Sources */, - 22B1377C25D6E32700D88061 /* UIView-Debugging.m in Sources */, - 22B1377A25D6E32700D88061 /* KIFUITestActor.m in Sources */, - 22B1372F25D6E32700D88061 /* UIView-KIFAdditions.m in Sources */, - 22B1373625D6E32700D88061 /* UIEvent+KIFAdditions.m in Sources */, - 22B1373F25D6E32700D88061 /* KIFEventVisualizer.m in Sources */, - 22B1373E25D6E32700D88061 /* KIFAccessibilityEnabler.m in Sources */, - 22B1377525D6E32700D88061 /* NSBundle-KIFAdditions.m in Sources */, - 22B1373025D6E32700D88061 /* UIAutomationHelper.m in Sources */, - 22B1376325D6E32700D88061 /* NSString+KIFAdditions.m in Sources */, - 22B1377625D6E32700D88061 /* NSFileManager-KIFAdditions.m in Sources */, - 22B1375125D6E32700D88061 /* CGGeometry-KIFAdditions.m in Sources */, - 22B1377325D6E32700D88061 /* UIWindow-KIFAdditions.m in Sources */, - 22B1376625D6E32700D88061 /* KIFUIViewTestActor.m in Sources */, - 22B1377D25D6E32700D88061 /* KIFTouchVisualizerView.m in Sources */, - 22B1374025D6E32700D88061 /* UIScrollView-KIFAdditions.m in Sources */, - 22B1373125D6E32700D88061 /* KIFSystemTestActor.m in Sources */, - 22B1377825D6E32700D88061 /* KIFTestStepValidation.m in Sources */, - 22B1373925D6E32700D88061 /* UITouch-KIFAdditions.m in Sources */, - 22B1374325D6E32700D88061 /* XCTestCase-KIFAdditions.m in Sources */, - 22B1376425D6E32700D88061 /* UIAccessibilityElement-KIFAdditions.m in Sources */, - 22B1374A25D6E32700D88061 /* UIScreen+KIFAdditions.m in Sources */, - 22B1373A25D6E32700D88061 /* KIFUIObject.m in Sources */, - 22B1377425D6E32700D88061 /* KIFTestActor.m in Sources */, - 22B1374C25D6E32700D88061 /* UIApplication-KIFAdditions.m in Sources */, - 22B1375C25D6E32700D88061 /* KIFUITestActor-ConditionalTests.m in Sources */, - 22B1376525D6E32700D88061 /* KIFTypist.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; EABD467A1857A0C700A5F081 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1312,6 +993,7 @@ 2229D59725BEF47D0093296C /* KIFTouchVisualizerViewCoordinator.m in Sources */, 2229D5B125BEF47D0093296C /* XCTestCase-KIFAdditions.m in Sources */, 2229D5A225BEF47D0093296C /* CGGeometry-KIFAdditions.m in Sources */, + 8E654FD029DA2FE7007F7811 /* UIWindow+KIFSwizzle.m in Sources */, 2229D5BE25BEF47D0093296C /* UITableView-KIFAdditions.m in Sources */, 2229D5AF25BEF47D0093296C /* NSBundle-KIFAdditions.m in Sources */, 2229D59C25BEF47D0093296C /* KIFTouchVisualizerView.m in Sources */, @@ -1340,6 +1022,8 @@ 2229D5D925BEF47D0093296C /* KIFTestStepValidation.m in Sources */, 2229D5A525BEF47D0093296C /* UIView-Debugging.m in Sources */, 2229D5C125BEF47D0093296C /* NSError-KIFAdditions.m in Sources */, + ACA242E72C3DB47400E6F1B6 /* UIAccessibilityCustomAction+KIFAdditions.m in Sources */, + 8EC2CB2129DB3D3B001BE493 /* NSObject+KIFSwizzle.m in Sources */, 2229D5B525BEF47D0093296C /* UIApplication-KIFAdditions.m in Sources */, 2229D5C025BEF47D0093296C /* UIEvent+KIFAdditions.m in Sources */, ); @@ -1351,11 +1035,15 @@ files = ( FA8A3C591A771C5500206350 /* SearchFieldTests_ViewTestActor.m in Sources */, FA8A3C551A77157F00206350 /* LongPressTests_ViewTestActor.m in Sources */, + 06104D242D5156760038697E /* SwiftUITappingTests.m in Sources */, FA49155E1A78206E00A78E57 /* CompositionTests_ViewTestActor.m in Sources */, FA8A3C5F1A772E6800206350 /* AccessibilityIdentifierTests_ViewTestActor.m in Sources */, + 8E654FC429D79BD8007F7811 /* OffscreenTests_ViewTestActor.m in Sources */, FA8A3C5D1A772CD100206350 /* WaitForAbscenceTests_ViewTestActor.m in Sources */, + 064185B22D5ABF5E00A33957 /* SwiftUITypingTests.m in Sources */, FA8A3C5B1A77281900206350 /* WebViewTests_ViewTestActor.m in Sources */, EABD46B11857A0F300A5F081 /* SearchFieldTests.m in Sources */, + ACDB726A2CA314A800D9796E /* AccessibilityActivationTests_ViewTestActor.m in Sources */, EABD46B21857A0F300A5F081 /* CascadingFailureTests.m in Sources */, EABD46B31857A0F300A5F081 /* CompositionTests.m in Sources */, CD4E91F01F479A8C005D530C /* CustomPickerTests.m in Sources */, @@ -1382,12 +1070,14 @@ FA4915691A78449C00A78E57 /* CollectionViewTests_ViewTestActor.m in Sources */, FA8DA74F1A7711E900E0C644 /* WaitForTappableViewTests_ViewTestActor.m in Sources */, EABD46BA1857A0F300A5F081 /* WaitForAbscenceTests.m in Sources */, + 8EAA1EE429D3B1F5008F6029 /* OffscreenTests.m in Sources */, EA47DA2818EDFD6F0034D2F5 /* CollectionViewTests.m in Sources */, EABD46BB1857A0F300A5F081 /* WaitForTappableViewTests.m in Sources */, EABD46BC1857A0F300A5F081 /* WaitForViewTests.m in Sources */, 5A62B0AE1BB205CA00A3F480 /* PullToRefreshTests.m in Sources */, 97E8A5D11B0A63D100124E3B /* BackgroundTests.m in Sources */, EABD46BD1857A0F300A5F081 /* LandscapeTests.m in Sources */, + ACA242E42C3DA55400E6F1B6 /* CustomActionTests_ViewTestActor.m in Sources */, EABD46BE1857A0F300A5F081 /* TableViewTests.m in Sources */, FA4915601A7823E500A78E57 /* ScrollViewTests_ViewTestActor.m in Sources */, EABD46BF1857A0F300A5F081 /* GestureTests.m in Sources */, @@ -1418,32 +1108,21 @@ AE62FCD61A1D2447002B10DA /* WebViewController.m in Sources */, EB60ECCD177F8C84005A041A /* main.m in Sources */, EB60ED00177F9032005A041A /* AppDelegate.m in Sources */, + 06104D1F2D514E0C0038697E /* SwiftUITappingView.swift in Sources */, D927B9DC18F9DF2D00DAD036 /* TableViewController.m in Sources */, EB60ED01177F9032005A041A /* ShowHideViewController.m in Sources */, CD19A99F1F46482200BF0325 /* CustomPickerController.m in Sources */, EB60ED02177F9032005A041A /* TapViewController.m in Sources */, 2CDEE1CB181DBED200DF6E63 /* PickerController.m in Sources */, + 064185B02D5ABADD00A33957 /* SwiftUITypingView.swift in Sources */, + 06104D1C2D51473B0038697E /* SwiftUIViewController.swift in Sources */, EB60ED03177F9032005A041A /* TestSuiteViewController.m in Sources */, + 06104D262D516FEB0038697E /* ViewModifiers.swift in Sources */, + ACDB72682CA3146B00D9796E /* AccessibilityViewController.m in Sources */, D9EA274318F05A6700D87E57 /* ScrollViewController.m in Sources */, + 8EAA1EE229D3AF7A008F6029 /* OffscreenViewController.m in Sources */, 3812FB611A1212A700335733 /* AnimationViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FAB89FF81CAC546900C6DFC1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FAB8A0061CAC546A00C6DFC1 /* ViewController.m in Sources */, - FAB8A0031CAC546A00C6DFC1 /* AppDelegate.m in Sources */, - FAB8A0001CAC546A00C6DFC1 /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FAB8A0101CAC546A00C6DFC1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - FAB8A0191CAC546A00C6DFC1 /* KIFFrameworkConsumerTests.m in Sources */, + 06104D212D5150D10038697E /* SwiftUIViewControllerFactory.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1452,14 +1131,9 @@ /* Begin PBXTargetDependency section */ EABD46AE1857A0F300A5F081 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = EB60ECC0177F8C83005A041A /* Test Host */; + target = EB60ECC0177F8C83005A041A /* TestHost */; targetProxy = EABD46AF1857A0F300A5F081 /* PBXContainerItemProxy */; }; - FAB8A0161CAC546A00C6DFC1 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = FAB89FFB1CAC546900C6DFC1 /* KIFFrameworkConsumer */; - targetProxy = FAB8A0151CAC546A00C6DFC1 /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -1471,14 +1145,6 @@ name = InfoPlist.strings; sourceTree = ""; }; - EB60ECF2177F8DB3005A041A /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - EB60ECF3177F8DB3005A041A /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; EB60ED04177F9041005A041A /* MainStoryboard.storyboard */ = { isa = PBXVariantGroup; children = ( @@ -1487,177 +1153,9 @@ name = MainStoryboard.storyboard; sourceTree = ""; }; - FAB8A0071CAC546A00C6DFC1 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - FAB8A0081CAC546A00C6DFC1 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 9CC9674E1AD4B1B600576D13 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - GCC_DYNAMIC_NO_PIC = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - INFOPLIST_FILE = KIFFramework/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.square.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = KIF; - PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 9CC9674F1AD4B1B600576D13 /* Coverage */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = NO; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - GCC_PREFIX_HEADER = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - INFOPLIST_FILE = KIFFramework/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "com.square.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = KIF; - PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Coverage; - }; - 9CC967501AD4B1B600576D13 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_BITCODE = NO; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(PLATFORM_DIR)/Developer/Library/Frameworks", - ); - GCC_PREFIX_HEADER = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - INFOPLIST_FILE = KIFFramework/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "com.square.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = KIF; - PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers"; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; A889300B1685088F00FC7C63 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1753,11 +1251,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; ONLY_ACTIVE_ARCH = YES; PUBLIC_HEADERS_FOLDER_PATH = "include/$(PRODUCT_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -1798,10 +1297,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; PUBLIC_HEADERS_FOLDER_PATH = "include/$(PRODUCT_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -1817,6 +1317,7 @@ GCC_PREFIX_HEADER = ""; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; HEADER_SEARCH_PATHS = "$(inherited)"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = KIF; }; @@ -1834,6 +1335,7 @@ GCC_PREFIX_HEADER = ""; GCC_PREPROCESSOR_DEFINITIONS = DEBUG; HEADER_SEARCH_PATHS = "$(inherited)"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = KIF; }; @@ -1850,6 +1352,7 @@ FRAMEWORK_SEARCH_PATHS = "$(PLATFORM_DIR)/Developer/Library/Frameworks"; GCC_PREFIX_HEADER = ""; HEADER_SEARCH_PATHS = "$(inherited)"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = KIF; }; @@ -1859,7 +1362,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Test Host.app/Test Host"; + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestHost.app/TestHost"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; @@ -1880,11 +1383,12 @@ ); GCC_WARN_UNINITIALIZED_AUTOS = YES; HEADER_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = "KIF Tests/KIF Tests-Info.plist"; + INFOPLIST_FILE = "Tests/KIFTests-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = "-ObjC"; PRODUCT_BUNDLE_IDENTIFIER = "com.square.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "KIF Tests - XCTest"; + PRODUCT_NAME = "KIFTests - XCTest"; TEST_HOST = "$(BUNDLE_LOADER)"; WRAPPER_EXTENSION = xctest; }; @@ -1894,7 +1398,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Test Host.app/Test Host"; + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestHost.app/TestHost"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; @@ -1915,11 +1419,12 @@ ); GCC_WARN_UNINITIALIZED_AUTOS = YES; HEADER_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = "KIF Tests/KIF Tests-Info.plist"; + INFOPLIST_FILE = "Tests/KIFTests-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = "-ObjC"; PRODUCT_BUNDLE_IDENTIFIER = "com.square.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "KIF Tests - XCTest"; + PRODUCT_NAME = "KIFTests - XCTest"; TEST_HOST = "$(BUNDLE_LOADER)"; WRAPPER_EXTENSION = xctest; }; @@ -1929,7 +1434,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Test Host.app/Test Host"; + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestHost.app/TestHost"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; @@ -1945,10 +1450,11 @@ GCC_PREFIX_HEADER = ""; GCC_WARN_UNINITIALIZED_AUTOS = YES; HEADER_SEARCH_PATHS = "$(inherited)"; - INFOPLIST_FILE = "KIF Tests/KIF Tests-Info.plist"; + INFOPLIST_FILE = "Tests/KIFTests-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; OTHER_LDFLAGS = "-ObjC"; PRODUCT_BUNDLE_IDENTIFIER = "com.square.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "KIF Tests - XCTest"; + PRODUCT_NAME = "KIFTests - XCTest"; TEST_HOST = "$(BUNDLE_LOADER)"; VALIDATE_PRODUCT = YES; WRAPPER_EXTENSION = xctest; @@ -1961,6 +1467,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -1973,17 +1480,20 @@ ENABLE_BITCODE = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Test Host/Test Host-Prefix.pch"; + GCC_PREFIX_HEADER = "TestHost/TestHost-Prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; GCC_WARN_UNINITIALIZED_AUTOS = YES; - INFOPLIST_FILE = "Test Host/Test Host-Info.plist"; + INFOPLIST_FILE = "TestHost/TestHost-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.square.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "TestHost/SwiftUI/TestHost-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; }; @@ -1995,6 +1505,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -2006,13 +1517,15 @@ DEVELOPMENT_TEAM = ""; ENABLE_BITCODE = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Test Host/Test Host-Prefix.pch"; + GCC_PREFIX_HEADER = "TestHost/TestHost-Prefix.pch"; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; GCC_WARN_UNINITIALIZED_AUTOS = YES; - INFOPLIST_FILE = "Test Host/Test Host-Info.plist"; + INFOPLIST_FILE = "TestHost/TestHost-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; PRODUCT_BUNDLE_IDENTIFIER = "com.square.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "TestHost/SwiftUI/TestHost-Bridging-Header.h"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; WRAPPER_EXTENSION = app; @@ -2061,10 +1574,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; PUBLIC_HEADERS_FOLDER_PATH = "include/$(PRODUCT_NAME)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_VERSION = 5.0; }; name = Coverage; }; @@ -2105,6 +1619,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -2117,275 +1632,28 @@ ENABLE_BITCODE = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Test Host/Test Host-Prefix.pch"; + GCC_PREFIX_HEADER = "TestHost/TestHost-Prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; GCC_WARN_UNINITIALIZED_AUTOS = YES; - INFOPLIST_FILE = "Test Host/Test Host-Info.plist"; + INFOPLIST_FILE = "TestHost/TestHost-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.square.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "TestHost/SwiftUI/TestHost-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; }; name = Coverage; }; - FAB8A01B1CAC546A00C6DFC1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - INFOPLIST_FILE = KIFFrameworkConsumer/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.squareup.KIFFrameworkConsumer; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - FAB8A01C1CAC546A00C6DFC1 /* Coverage */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - INFOPLIST_FILE = KIFFrameworkConsumer/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.squareup.KIFFrameworkConsumer; - PRODUCT_NAME = "$(TARGET_NAME)"; - VALIDATE_PRODUCT = YES; - }; - name = Coverage; - }; - FAB8A01D1CAC546A00C6DFC1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - INFOPLIST_FILE = KIFFrameworkConsumer/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = com.squareup.KIFFrameworkConsumer; - PRODUCT_NAME = "$(TARGET_NAME)"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - FAB8A01E1CAC546A00C6DFC1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - INFOPLIST_FILE = KIFFrameworkConsumerTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = com.squareup.KIFFrameworkConsumerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KIFFrameworkConsumer.app/KIFFrameworkConsumer"; - }; - name = Debug; - }; - FAB8A01F1CAC546A00C6DFC1 /* Coverage */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - INFOPLIST_FILE = KIFFrameworkConsumerTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = com.squareup.KIFFrameworkConsumerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KIFFrameworkConsumer.app/KIFFrameworkConsumer"; - VALIDATE_PRODUCT = YES; - }; - name = Coverage; - }; - FAB8A0201CAC546A00C6DFC1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - INFOPLIST_FILE = KIFFrameworkConsumerTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_BUNDLE_IDENTIFIER = com.squareup.KIFFrameworkConsumerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KIFFrameworkConsumer.app/KIFFrameworkConsumer"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 9CC967541AD4B1B600576D13 /* Build configuration list for PBXNativeTarget "KIFFramework" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9CC9674E1AD4B1B600576D13 /* Debug */, - 9CC9674F1AD4B1B600576D13 /* Coverage */, - 9CC967501AD4B1B600576D13 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; A889300A1685088F00FC7C63 /* Build configuration list for PBXLegacyTarget "KIF Documentation" */ = { isa = XCConfigurationList; buildConfigurations = ( @@ -2416,7 +1684,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - EABD46C91857A0F300A5F081 /* Build configuration list for PBXNativeTarget "KIF Tests" */ = { + EABD46C91857A0F300A5F081 /* Build configuration list for PBXNativeTarget "KIFTests" */ = { isa = XCConfigurationList; buildConfigurations = ( EABD46CA1857A0F300A5F081 /* Debug */, @@ -2426,7 +1694,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - EB60ECD8177F8C84005A041A /* Build configuration list for PBXNativeTarget "Test Host" */ = { + EB60ECD8177F8C84005A041A /* Build configuration list for PBXNativeTarget "TestHost" */ = { isa = XCConfigurationList; buildConfigurations = ( EB60ECD9177F8C84005A041A /* Debug */, @@ -2436,26 +1704,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - FAB8A0211CAC546A00C6DFC1 /* Build configuration list for PBXNativeTarget "KIFFrameworkConsumer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - FAB8A01B1CAC546A00C6DFC1 /* Debug */, - FAB8A01C1CAC546A00C6DFC1 /* Coverage */, - FAB8A01D1CAC546A00C6DFC1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - FAB8A0221CAC546A00C6DFC1 /* Build configuration list for PBXNativeTarget "KIFFrameworkConsumerTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - FAB8A01E1CAC546A00C6DFC1 /* Debug */, - FAB8A01F1CAC546A00C6DFC1 /* Coverage */, - FAB8A0201CAC546A00C6DFC1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ }; rootObject = AAB0725F139719AC008AF393 /* Project object */; diff --git a/KIF.xcodeproj/xcshareddata/xcschemes/KIF Documentation.xcscheme b/KIF.xcodeproj/xcshareddata/xcschemes/KIF Documentation.xcscheme index d2841e667..7fce67a0d 100644 --- a/KIF.xcodeproj/xcshareddata/xcschemes/KIF Documentation.xcscheme +++ b/KIF.xcodeproj/xcshareddata/xcschemes/KIF Documentation.xcscheme @@ -29,8 +29,6 @@ shouldUseLaunchSchemeArgsEnv = "YES"> - - - - diff --git a/KIF.xcodeproj/xcshareddata/xcschemes/KIFFrameworkConsumerTests.xcscheme b/KIF.xcodeproj/xcshareddata/xcschemes/KIFFrameworkConsumerTests.xcscheme deleted file mode 100644 index 51b6e6226..000000000 --- a/KIF.xcodeproj/xcshareddata/xcschemes/KIFFrameworkConsumerTests.xcscheme +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/KIFFramework/Info.plist b/KIFFramework/Info.plist deleted file mode 100644 index d3de8eefb..000000000 --- a/KIFFramework/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/KIFFramework/KIF.h b/KIFFramework/KIF.h deleted file mode 100644 index 45cad3040..000000000 --- a/KIFFramework/KIF.h +++ /dev/null @@ -1,48 +0,0 @@ -// -// KIF.h -// KIF -// -// Created by Shane Zatezalo on 4/7/15. -// Copyright (c) 2015 Lottadot LLC. All rights reserved. -// - -#import -#import -#import - -//! Project version number for KIF. -FOUNDATION_EXPORT double KIFVersionNumber; - -//! Project version string for KIF. -FOUNDATION_EXPORT const unsigned char KIFVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import diff --git a/KIFFrameworkConsumer/AppDelegate.h b/KIFFrameworkConsumer/AppDelegate.h deleted file mode 100644 index 022e78eab..000000000 --- a/KIFFrameworkConsumer/AppDelegate.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// AppDelegate.h -// KIFFrameworkConsumer -// -// Created by Alex Odawa on 3/30/16. -// -// - -#import - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - - -@end - diff --git a/KIFFrameworkConsumer/AppDelegate.m b/KIFFrameworkConsumer/AppDelegate.m deleted file mode 100644 index 28ac4ae58..000000000 --- a/KIFFrameworkConsumer/AppDelegate.m +++ /dev/null @@ -1,45 +0,0 @@ -// -// AppDelegate.m -// KIFFrameworkConsumer -// -// Created by Alex Odawa on 3/30/16. -// -// - -#import "AppDelegate.h" - -@interface AppDelegate () - -@end - -@implementation AppDelegate - - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - // Override point for customization after application launch. - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. -} - -- (void)applicationDidEnterBackground:(UIApplication *)application { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. -} - -- (void)applicationWillEnterForeground:(UIApplication *)application { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. -} - -- (void)applicationDidBecomeActive:(UIApplication *)application { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. -} - -- (void)applicationWillTerminate:(UIApplication *)application { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. -} - -@end diff --git a/KIFFrameworkConsumer/Assets.xcassets/AppIcon.appiconset/Contents.json b/KIFFrameworkConsumer/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 81213230d..000000000 --- a/KIFFrameworkConsumer/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/KIFFrameworkConsumer/Base.lproj/Main.storyboard b/KIFFrameworkConsumer/Base.lproj/Main.storyboard deleted file mode 100644 index 0352e8451..000000000 --- a/KIFFrameworkConsumer/Base.lproj/Main.storyboard +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/KIFFrameworkConsumer/Info.plist b/KIFFrameworkConsumer/Info.plist deleted file mode 100644 index dd791df0c..000000000 --- a/KIFFrameworkConsumer/Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/KIFFrameworkConsumer/ViewController.h b/KIFFrameworkConsumer/ViewController.h deleted file mode 100644 index 27c0caaa0..000000000 --- a/KIFFrameworkConsumer/ViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// ViewController.h -// KIFFrameworkConsumer -// -// Created by Alex Odawa on 3/30/16. -// -// - -#import - -@interface ViewController : UIViewController - - -@end - diff --git a/KIFFrameworkConsumer/ViewController.m b/KIFFrameworkConsumer/ViewController.m deleted file mode 100644 index f17064b9e..000000000 --- a/KIFFrameworkConsumer/ViewController.m +++ /dev/null @@ -1,31 +0,0 @@ -// -// ViewController.m -// KIFFrameworkConsumer -// -// Created by Alex Odawa on 3/30/16. -// -// - -#import "ViewController.h" - -@interface ViewController () - -@property (strong, nonatomic) IBOutlet UILabel *label; -@end - -@implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} -- (IBAction)buttonTapped:(id)sender { - [self.label performSelector:@selector(setText:) withObject:@"Tapped" afterDelay:0.5]; -} - -@end diff --git a/KIFFrameworkConsumer/main.m b/KIFFrameworkConsumer/main.m deleted file mode 100644 index e469cecbd..000000000 --- a/KIFFrameworkConsumer/main.m +++ /dev/null @@ -1,16 +0,0 @@ -// -// main.m -// KIFFrameworkConsumer -// -// Created by Alex Odawa on 3/30/16. -// -// - -#import -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/KIFFrameworkConsumerTests/Info.plist b/KIFFrameworkConsumerTests/Info.plist deleted file mode 100644 index ba72822e8..000000000 --- a/KIFFrameworkConsumerTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/KIFFrameworkConsumerTests/KIFFrameworkConsumerTests.m b/KIFFrameworkConsumerTests/KIFFrameworkConsumerTests.m deleted file mode 100644 index 1a38e10b0..000000000 --- a/KIFFrameworkConsumerTests/KIFFrameworkConsumerTests.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// KIFFrameworkConsumerTests.m -// KIFFrameworkConsumerTests -// -// Created by Alex Odawa on 3/30/16. -// -// - -#import - -@interface KIFFrameworkConsumerTests : KIFTestCase - -@end - -@implementation KIFFrameworkConsumerTests - - -- (void)test_Framework { - [tester waitForViewWithAccessibilityLabel:@"Button"]; - [[viewTester usingLabel:@"Button"] tap]; - [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Label"]; - [[viewTester usingLabel:@"Tapped"] waitForView]; -} - - -@end diff --git a/Package.swift b/Package.swift index bbb111f2e..2e0b35c48 100644 --- a/Package.swift +++ b/Package.swift @@ -1,11 +1,11 @@ -// swift-tools-version:5.0 +// swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "KIF", platforms: [ - .iOS(.v9) + .iOS(.v13) ], products: [ .library( @@ -26,12 +26,12 @@ let package = Package( .headerSearchPath("Visualizer/"), .headerSearchPath("IdentifierTests/"), ], - linkerSettings: [.linkedFramework("IOKit")] + linkerSettings: [.linkedFramework("IOKit"), .linkedFramework("XCTest")] ), .testTarget( name: "KIFTests", dependencies: ["KIF"], - path: "./KIF Tests", + path: "./Tests", cSettings: [.headerSearchPath("../Sources/KIF/")] // allow to look a "private" headers ), ] diff --git a/README.md b/README.md index 346b18a9b..b51821f3c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/kif-framework/KIF.svg?branch=master)](https://travis-ci.org/kif-framework/KIF) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![CocoaPod Version](https://img.shields.io/cocoapods/v/KIF.svg?style=flat)](https://cocoapods.org) +[![Build Status](https://travis-ci.org/kif-framework/KIF.svg?branch=master)](https://travis-ci.org/kif-framework/KIF) [![CocoaPod Version](https://img.shields.io/cocoapods/v/KIF.svg?style=flat)](https://cocoapods.org) **IMPORTANT! Even though KIF is used to test your UI, you need to add it to your Unit Test target, _not_ your UI Test target. The magic of KIF is that it allows you to drive your UI from your unit tests and reap all the advantages of testing in-process.** @@ -34,7 +34,7 @@ You can easily run a single KIF test with the Test Navigator or kick off nightly See KIF in Action ----------------- -KIF uses techniques described below to validate its internal functionality. You can see a test suite that exercises its entire functionality by simply building and testing the KIF scheme with ⌘U. Look at the tests in the "KIF Tests" group for ideas on how to build your own tests. +KIF uses techniques described below to validate its internal functionality. You can see a test suite that exercises its entire functionality by simply building and testing the KIF scheme with ⌘U. Look at the tests in the "Tests" group for ideas on how to build your own tests. Installation (with CocoaPods) ----------------------------- @@ -113,13 +113,13 @@ Read **Final Test Target Configurations** below for the final details on getting Installing Accessibility Identifier Tests ----------------------------------------- -Normally you identify a UI element via its accessibility label so that KIF simulates the interactions of a real user as closely as possible. In some cases, however, you may have to use accessibility identifiers, which are not exposed to users. If using CocoaPods, install the additional identifier-based KIF tests via the Identifier CocoaPods subspec: +Normally you identify a UI element via its accessibility label so that KIF simulates the interactions of a real user as closely as possible. In some cases, however, you may have to use accessibility identifiers, which are not exposed to users. If using CocoaPods, install the additional identifier-based Tests via the Identifier CocoaPods subspec: ``` pod 'KIF/IdentifierTests' ``` -If not using CocoaPods, the identifier-based KIF tests can be added by including "KIFUITestActor-IdentifierTests.h". +If not using CocoaPods, the identifier-based Tests can be added by including "KIFUITestActor-IdentifierTests.h". Final Test Target Configurations -------------------------------- @@ -128,7 +128,7 @@ You need your tests to run hosted in your application. **Xcode does this for you First add your application by selecting "Build Phases", expanding the "Target Dependencies" section, clicking on the "+" button, and in the new sheet that appears selecting your application target and clicking "Add". -Next, configure your bundle loader. In "Build Settings", expand "Linking" and edit "Bundle Loader" to be "$(TEST_HOST)". Expand the "Testing" section and edit "Test Host" to be "$(BUILT_PRODUCTS_DIR)/MyApplication.app/MyApplication" where "MyApplication" is the name of your app. Also make sure that "Wrapper Extension" is set to "xctest". +Next, configure your bundle loader. In "Build Settings", expand "Linking" and edit "Bundle Loader" to be `$(TEST_HOST)`. Expand the "Testing" section and edit "Test Host" to be `$(BUILT_PRODUCTS_DIR)/MyApplication.app/MyApplication` where `MyApplication` is the name of your app. Also make sure that "Wrapper Extension" is set to `xctest`. The last step is to configure your unit tests to run when you trigger a test (⌘U). Click on your scheme name and select "Edit Scheme…". Click on "Test" in the sidebar followed by the "+" in the bottom left corner. Select your testing target and click "OK". @@ -221,7 +221,7 @@ Everything should now be configured. When you run the integration tests using th Use with other testing frameworks --------------------------------- -`KIFTestCase` is not necessary for running KIF tests. Tests can run directly in `XCTestCase` or any subclass. The basic requirement is that when you call `tester` or `system`, `self` must be an instance of `XCTestCase` and you must call `KIFEnableAccessibility` in `setUp`. +`KIFTestCase` is not necessary for running Tests. Tests can run directly in `XCTestCase` or any subclass. The basic requirement is that when you call `tester` or `system`, `self` must be an instance of `XCTestCase` and you must call `KIFEnableAccessibility` in `setUp`. For example, the following [Specta](https://github.com/specta/specta) test works without any changes to KIF or Specta: @@ -289,7 +289,7 @@ Troubleshooting ### Simulator launches but app doesn't appear, steps time out after 10 seconds -This issue occurs when XCTest does not have a valid test host. Reread the instructions above with regards to the "Bundle Loader" and "Test Host" settings. You may have missed something. +This issue occurs when XCTest does not have a valid Test Host. Reread the instructions above with regards to the "Bundle Loader" and "Test Host" settings. You may have missed something. ### Step fails because a view cannot be found diff --git a/Scripts/ci.sh b/Scripts/ci.sh new file mode 100755 index 000000000..57f75f641 --- /dev/null +++ b/Scripts/ci.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +set -o xtrace +set -o errexit +set -o pipefail + +SIMULATOR=$1 +RUN_EXTRA_VALIDATIONS=$2 + +if [ -z "${SIMULATOR}" ]; then + echo 'Must supply a simulator description in the form of "name=iPad Air,OS=9.2"' + exit 1 +fi + +rm -rf ${PWD}/build + +# Run KIF Tests +env NSUnbufferedIO=YES xcodebuild test -project KIF.xcodeproj -scheme KIF -derivedDataPath=${PWD}/build/KIF -destination "platform=iOS Simulator,${SIMULATOR}" CODE_SIGNING_ALLOWED=NO | xcbeautify + +if [ $RUN_EXTRA_VALIDATIONS != "true" ]; then + exit 0 +fi + +# Compile the KIF SPM package directly +swift build -Xcc "-isysroot" -Xcc "$(xcrun --sdk iphonesimulator --show-sdk-path)" -Xcc "-target" -Xcc "x86_64-apple-ios$(xcrun --sdk iphonesimulator --show-sdk-version)-simulator" + +# Consume KIF via Swift Package Manager in an Xcode project +env NSUnbufferedIO=YES xcodebuild test -project "Documentation/Examples/SPMIntegration/SPMIntegration.xcodeproj" -scheme "SPMIntegration" -derivedDataPath=${PWD}/build/SPMIntegration -destination "platform=iOS Simulator,${SIMULATOR}" CODE_SIGNING_ALLOWED=NO | xcbeautify + +# Test the "Testable" example project +env NSUnbufferedIO=YES xcodebuild test -project "Documentation/Examples/Testable/Testable.xcodeproj" -scheme Testable -derivedDataPath=${PWD}/build/Testable -destination "platform=iOS Simulator,${SIMULATOR}" CODE_SIGNING_ALLOWED=NO | xcbeautify + +# Test the "TestableSwift" example project +env NSUnbufferedIO=YES xcodebuild test -project "Documentation/Examples/TestableSwift/TestableSwift.xcodeproj" -scheme "TestableSwift" -derivedDataPath=${PWD}/build/TestableSwift -destination "platform=iOS Simulator,${SIMULATOR}" CODE_SIGNING_ALLOWED=NO | xcbeautify + +# Test the "Calculator" example project +env NSUnbufferedIO=YES xcodebuild test -project "Documentation/Examples/Calculator/Calculator.xcodeproj" -scheme "Calculator" -derivedDataPath=${PWD}/build/Calculator -destination "platform=iOS Simulator,${SIMULATOR}" CODE_SIGNING_ALLOWED=NO | xcbeautify + diff --git a/Sources/KIF/Additions/CALayer-KIFAdditions.h b/Sources/KIF/Additions/CALayer-KIFAdditions.h index 711daa13a..d42065723 100644 --- a/Sources/KIF/Additions/CALayer-KIFAdditions.h +++ b/Sources/KIF/Additions/CALayer-KIFAdditions.h @@ -25,6 +25,7 @@ @abstract Calls a block on the layer itself and on all its descendent layers. @param block The block that will be called on the layers. Stop the traversation of the layers by assigning YES to the stop-parameter of the block. + We will not recurse into hidden layers. */ - (void)performBlockOnDescendentLayers:(void (^)(CALayer *layer, BOOL *stop))block; diff --git a/Sources/KIF/Additions/CALayer-KIFAdditions.m b/Sources/KIF/Additions/CALayer-KIFAdditions.m index 231c451a4..9ea6b2f37 100644 --- a/Sources/KIF/Additions/CALayer-KIFAdditions.m +++ b/Sources/KIF/Additions/CALayer-KIFAdditions.m @@ -27,25 +27,51 @@ - (BOOL)hasAnimations { __block BOOL result = NO; [self performBlockOnDescendentLayers:^(CALayer *layer, BOOL *stop) { - // explicitly exclude _UIParallaxMotionEffect as it is used in alertviews, and we don't want every alertview to be paused - // explicitly exclude UITextSelectionViewCaretBlinkAnimation as it is used in textfields, and we don't want every view with textfields to be paused - BOOL hasAnimation = layer.animationKeys.count != 0 && ![layer.animationKeys containsObject:@"_UIParallaxMotionEffect"] && ![layer.animationKeys containsObject:@"UITextSelectionViewCaretBlinkAnimation"]; - if (hasAnimation && !layer.hidden) { - double currentTime = CACurrentMediaTime() * [layer KIF_absoluteSpeed]; - - [layer.animationKeys enumerateObjectsUsingBlock:^(NSString *animationKey, NSUInteger idx, BOOL *innerStop) { - CAAnimation *animation = [layer animationForKey:animationKey]; - double beginTime = [animation beginTime]; - double completionTime = [animation KIF_completionTime]; - - // Ignore infinitely repeating animations - if (currentTime >= beginTime && completionTime != HUGE_VALF && currentTime < completionTime) { - result = YES; - *innerStop = YES; - *stop = YES; - } - }]; - } + // explicitly exclude _UIParallaxMotionEffect as it is used in alertviews, and we don't want every alertview to be paused + // explicitly exclude UITextSelectionViewCaretBlinkAnimation as it is used in textfields, and we don't want every view with textfields to be paused + BOOL hasAnimation = layer.animationKeys.count != 0 && ![layer.animationKeys containsObject:@"_UIParallaxMotionEffect"] && ![layer.animationKeys containsObject:@"UITextSelectionViewCaretBlinkAnimation"]; + + // Ignore the animation of the KIF touch visualizer circle as it does not affect any view behavior + if ([NSStringFromClass(layer.delegate.class) isEqualToString:@"KIFTouchVisualizerView"]) { + hasAnimation = NO; + } + + if (hasAnimation && !layer.hidden) { + double currentTime = CACurrentMediaTime() * [layer KIF_absoluteSpeed]; + + [layer.animationKeys enumerateObjectsUsingBlock:^(NSString *animationKey, NSUInteger idx, BOOL *innerStop) { + CAAnimation *animation = [layer animationForKey:animationKey]; + + double completionTime = [animation KIF_completionTime]; + + // Ignore long running animations (> 1 minute duration), as we don't want to wait on them + if (completionTime > currentTime + 60) { + return; + } + + // If an animation is set to be removed on completion, it must still be in progress if we enumerated it + // This is the default behavior for animations, so we should often hit this codepath. + if ([animation isRemovedOnCompletion]) { + result = YES; + } else if ([animation.delegate isKindOfClass:NSClassFromString(@"UIViewAnimationState")]) { + // Use a private property on the private class to determine if the animation state has completed + BOOL animationDidStopSent = [[(NSObject *)animation.delegate valueForKey:@"_animationDidStopSent"] boolValue]; + + if (!animationDidStopSent) { + result = YES; + } + } else if (currentTime > completionTime) { + // Otherwise, use the completion time to determine if the animation has been completed. + // This doesn't seem to always be exactly right however. + result = YES; + } + + if (result) { + *innerStop = YES; + *stop = YES; + } + }]; + } }]; return result; } @@ -58,6 +84,10 @@ - (void)performBlockOnDescendentLayers:(void (^)(CALayer *layer, BOOL *stop))blo - (void)performBlockOnDescendentLayers:(void (^)(CALayer *, BOOL *))block stop:(BOOL *)stop { + if (self.isHidden) { + return; + } + block(self, stop); if (*stop) { return; diff --git a/Sources/KIF/Additions/NSObject+KIFSwizzle.h b/Sources/KIF/Additions/NSObject+KIFSwizzle.h new file mode 100644 index 000000000..2267c48ea --- /dev/null +++ b/Sources/KIF/Additions/NSObject+KIFSwizzle.h @@ -0,0 +1,14 @@ +// +// NSObject+KIFSwizzle.h +// KIF +// +// Created by Steve Sun on 2023-04-03. +// + +#import + +@interface NSObject (KIFSwizzle) + ++ (void)swizzleSEL:(SEL)originalSEL withSEL:(SEL)swizzledSEL; + +@end diff --git a/Sources/KIF/Additions/NSObject+KIFSwizzle.m b/Sources/KIF/Additions/NSObject+KIFSwizzle.m new file mode 100644 index 000000000..62d900da1 --- /dev/null +++ b/Sources/KIF/Additions/NSObject+KIFSwizzle.m @@ -0,0 +1,26 @@ +// +// NSObject+KIFSwizzle.m +// KIF +// +// Created by Steve Sun on 2023-04-03. +// + +#import "NSObject+KIFSwizzle.h" +#import + +@implementation NSObject (KIFSwizzle) + ++ (void)swizzleSEL:(SEL)originalSEL withSEL:(SEL)swizzledSEL +{ + Class class = [self class]; + + Method originalMethod = class_getInstanceMethod(class, originalSEL); + Method swizzledMethod = class_getInstanceMethod(class, swizzledSEL); + + NSAssert(originalMethod != nil, @"The original method for selector '%@' couldn't be found", NSStringFromSelector(originalSEL)); + NSAssert(swizzledMethod != nil, @"The swizzled method for selector '%@' couldn't be found", NSStringFromSelector(swizzledSEL)); + + method_exchangeImplementations(originalMethod, swizzledMethod); +} + +@end diff --git a/Sources/KIF/Additions/UIAccessibilityCustomAction+KIFAdditions.h b/Sources/KIF/Additions/UIAccessibilityCustomAction+KIFAdditions.h new file mode 100644 index 000000000..1a62c7f20 --- /dev/null +++ b/Sources/KIF/Additions/UIAccessibilityCustomAction+KIFAdditions.h @@ -0,0 +1,21 @@ +// +// UIAccessibilityCustomAction+KIFAdditions.h +// KIF +// +// Created by Alex Odawa on 09/07/2024. +// + +#import + +@interface NSObject (KIFCustomActionAdditions) + +- (UIAccessibilityCustomAction *)KIF_customActionWithName:(NSString *)name; + +@end + +@interface UIAccessibilityCustomAction (KIFAdditions) + +- (BOOL)KIF_activate; + +@end + diff --git a/Sources/KIF/Additions/UIAccessibilityCustomAction+KIFAdditions.m b/Sources/KIF/Additions/UIAccessibilityCustomAction+KIFAdditions.m new file mode 100644 index 000000000..bcec94fea --- /dev/null +++ b/Sources/KIF/Additions/UIAccessibilityCustomAction+KIFAdditions.m @@ -0,0 +1,85 @@ +// +// UIAccessibilityCustomAction+KIFAdditions.m +// KIF +// +// Created by Alex Odawa on 09/07/2024. +// + +#import +#import "UIAccessibilityCustomAction+KIFAdditions.h" + + + +@interface UIAccessibilityCustomAction (KIFPrivate) + +- (NSString *)KIF_normalizedName; + +@end + +@implementation UIAccessibilityCustomAction (KIFAdditions) + +- (BOOL)KIF_activate; +{ + if (@available(iOS 13.0, *)) { + if (self.actionHandler) { + return self.actionHandler(self); + } + } + + if ([self.target respondsToSelector:self.selector]) { + NSMethodSignature *signature = [self.target methodSignatureForSelector:self.selector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + invocation.selector = self.selector; + invocation.target = self.target; + + /* + https://developer.apple.com/documentation/uikit/uiaccessibilitycustomaction/1620499-init + The method signature must take one of the following forms: + - (BOOL)myPerformActionMethod + - (BOOL)myPerformActionMethod:(UIAccessibilityCustomAction *)action + */ + if (signature.numberOfArguments == 3) { + id arg = self; + [invocation setArgument: &arg atIndex:2]; + } + + [invocation invoke]; + BOOL returnValue = NO; + [invocation getReturnValue:&returnValue]; + return returnValue; + } + NSString *targetStr = [self.target description]; + NSString *selectorStr = NSStringFromSelector(self.selector); + [[NSException exceptionWithName:@"KIFUIAccessibilityCustomActionActivationException" + reason:@"UIAccessibilityCustomAction Target does not respond to provided Selector." + userInfo:@{@"Target" : targetStr, @"Selector" : selectorStr}] + raise]; + + return NO; +} + +- (NSString *)KIF_normalizedName; +{ + NSString *name = [self name]; + if ([name isKindOfClass:[NSAttributedString class]]) { + name = [(NSAttributedString *)name string]; + } + return name; +} + +@end + + +@implementation NSObject (KIFCustomActionAdditions) + +- (UIAccessibilityCustomAction *)KIF_customActionWithName:(NSString *)name; +{ + for (UIAccessibilityCustomAction *action in [self.accessibilityCustomActions copy]) { + if ([name isEqualToString: [action KIF_normalizedName]]) { + return action; + } + } + return nil; +} + +@end diff --git a/Sources/KIF/Additions/UIAccessibilityElement-KIFAdditions.h b/Sources/KIF/Additions/UIAccessibilityElement-KIFAdditions.h index 501859bc0..608ce9156 100644 --- a/Sources/KIF/Additions/UIAccessibilityElement-KIFAdditions.h +++ b/Sources/KIF/Additions/UIAccessibilityElement-KIFAdditions.h @@ -92,6 +92,17 @@ */ + (BOOL)accessibilityElement:(out UIAccessibilityElement **)foundElement view:(out UIView **)foundView withElementMatchingPredicate:(NSPredicate *)predicate tappable:(BOOL)mustBeTappable error:(out NSError **)error; +/*! + @abstract Finds an accessibility element and view where the element passes the predicate, optionally passing a tappability test. + @param foundElement The found accessibility element or @c nil if the method returns @c NO. Can be @c NULL. + @param foundView The first matching view for @c foundElement as determined by the accessibility API or @c nil if the view is hidden or fails the tappability test. Can be @c NULL. + @param predicate The predicate to test the accessibility element on. + @param error A reference to an error object to be populated when no matching element or view is found. Can be @c NULL. + @param scrollDisabled Disable scroll performing the search only in the current visible frame. + @result @c YES if the element and view were found. Otherwise @c NO. + */ ++ (BOOL)accessibilityElement:(out UIAccessibilityElement **)foundElement view:(out UIView **)foundView withElementMatchingPredicate:(NSPredicate *)predicate tappable:(BOOL)mustBeTappable error:(out NSError **)error disableScroll:(BOOL)scrollDisabled; + /*! @abstract Finds and attempts to make visible a view for a given accessibility element. @discussion If the element is found, off screen, and is inside a scroll view, this method will attempt to programmatically scroll the view onto the screen before performing any logic as to if the view is tappable. @@ -103,6 +114,18 @@ */ + (UIView *)viewContainingAccessibilityElement:(UIAccessibilityElement *)element tappable:(BOOL)mustBeTappable error:(NSError **)error; +/*! + @abstract Finds and attempts to make visible a view for a given accessibility element. + @discussion If the element is found, off screen, and is inside a scroll view, this method will attempt to programmatically scroll the view onto the screen before performing any logic as to if the view is tappable. + + @param element The accessibility element. + @param mustBeTappable If @c YES, a tappability test will be performed. + @param error A reference to an error object to be populated when no element is found. Can be @c NULL. + @param scrollDisabled Disable scroll performing the search only in the current visible frame. + @return The first matching view as determined by the accessibility API or nil if the view is hidden or fails the tappability test. + */ ++ (UIView *)viewContainingAccessibilityElement:(UIAccessibilityElement *)element tappable:(BOOL)mustBeTappable error:(NSError **)error disableScroll:(BOOL)scrollDisabled; + /*! @abstract Returns a human readable string of UIAccessiblityTrait names, derived from UIAccessibilityConstants.h. @param traits The accessibility traits to list. diff --git a/Sources/KIF/Additions/UIAccessibilityElement-KIFAdditions.m b/Sources/KIF/Additions/UIAccessibilityElement-KIFAdditions.m index 1dede63cf..51c362543 100644 --- a/Sources/KIF/Additions/UIAccessibilityElement-KIFAdditions.m +++ b/Sources/KIF/Additions/UIAccessibilityElement-KIFAdditions.m @@ -58,13 +58,18 @@ + (BOOL)accessibilityElement:(out UIAccessibilityElement **)foundElement view:(o } + (BOOL)accessibilityElement:(out UIAccessibilityElement **)foundElement view:(out UIView **)foundView withLabel:(NSString *)label value:(NSString *)value traits:(UIAccessibilityTraits)traits fromRootView:(UIView *)fromView tappable:(BOOL)mustBeTappable error:(out NSError **)error +{ + return [self accessibilityElement:foundElement view:foundView withLabel:label value:value traits:traits fromRootView:fromView tappable:mustBeTappable error:error disableScroll:NO]; +} + ++ (BOOL)accessibilityElement:(out UIAccessibilityElement **)foundElement view:(out UIView **)foundView withLabel:(NSString *)label value:(NSString *)value traits:(UIAccessibilityTraits)traits fromRootView:(UIView *)fromView tappable:(BOOL)mustBeTappable error:(out NSError **)error disableScroll:(BOOL)scrollDisabled { UIAccessibilityElement *element = [self accessibilityElementWithLabel:label value:value traits:traits fromRootView:fromView error:error]; if (!element) { return NO; } - UIView *view = [self viewContainingAccessibilityElement:element tappable:mustBeTappable error:error]; + UIView *view = [self viewContainingAccessibilityElement:element tappable:mustBeTappable error:error disableScroll:scrollDisabled]; if (!view) { return NO; } @@ -82,19 +87,24 @@ + (BOOL)accessibilityElement:(out UIAccessibilityElement **)foundElement view:(o } + (BOOL)accessibilityElement:(out UIAccessibilityElement **)foundElement view:(out UIView **)foundView withElementMatchingPredicate:(NSPredicate *)predicate tappable:(BOOL)mustBeTappable error:(out NSError **)error; +{ + return [self accessibilityElement:foundElement view:foundView withElementMatchingPredicate:predicate tappable:mustBeTappable error:error disableScroll:NO]; +} + ++ (BOOL)accessibilityElement:(out UIAccessibilityElement **)foundElement view:(out UIView **)foundView withElementMatchingPredicate:(NSPredicate *)predicate tappable:(BOOL)mustBeTappable error:(out NSError **)error disableScroll:(BOOL)scrollDisabled; { UIAccessibilityElement *element = [[UIApplication sharedApplication] accessibilityElementMatchingBlock:^BOOL(UIAccessibilityElement *element) { return [predicate evaluateWithObject:element]; - }]; - + } disableScroll: scrollDisabled]; + if (!element) { if (error) { - *error = [self errorForFailingPredicate:predicate]; + *error = [self errorForFailingPredicate:predicate disableScroll:scrollDisabled]; } return NO; } - UIView *view = [UIAccessibilityElement viewContainingAccessibilityElement:element tappable:mustBeTappable error:error]; + UIView *view = [UIAccessibilityElement viewContainingAccessibilityElement:element tappable:mustBeTappable error:error disableScroll:scrollDisabled]; if (!view) { return NO; } @@ -105,11 +115,16 @@ + (BOOL)accessibilityElement:(out UIAccessibilityElement **)foundElement view:(o } + (BOOL)accessibilityElement:(out UIAccessibilityElement *__autoreleasing *)foundElement view:(out UIView *__autoreleasing *)foundView withElementMatchingPredicate:(NSPredicate *)predicate fromRootView:(UIView *)fromView tappable:(BOOL)mustBeTappable error:(out NSError *__autoreleasing *)error +{ + return [self accessibilityElement:foundElement view:foundView withElementMatchingPredicate:predicate fromRootView:fromView tappable:mustBeTappable error:error disableScroll:NO]; +} + ++ (BOOL)accessibilityElement:(out UIAccessibilityElement *__autoreleasing *)foundElement view:(out UIView *__autoreleasing *)foundView withElementMatchingPredicate:(NSPredicate *)predicate fromRootView:(UIView *)fromView tappable:(BOOL)mustBeTappable error:(out NSError *__autoreleasing *)error disableScroll:(BOOL)scrollDisabled { UIAccessibilityElement *element = [fromView accessibilityElementMatchingBlock:^BOOL(UIAccessibilityElement *element) { return [predicate evaluateWithObject:element]; - }]; - + } disableScroll:scrollDisabled]; + if (!element) { if (error) { *error = [NSError KIFErrorWithFormat:@"Could not find view matching: %@", predicate]; @@ -117,7 +132,7 @@ + (BOOL)accessibilityElement:(out UIAccessibilityElement *__autoreleasing *)foun return NO; } - UIView *view = [UIAccessibilityElement viewContainingAccessibilityElement:element tappable:mustBeTappable error:error]; + UIView *view = [UIAccessibilityElement viewContainingAccessibilityElement:element tappable:mustBeTappable error:error disableScroll:scrollDisabled]; if (!view) { return NO; } @@ -163,6 +178,11 @@ + (UIAccessibilityElement *)accessibilityElementWithLabel:(NSString *)label valu } + (UIView *)viewContainingAccessibilityElement:(UIAccessibilityElement *)element tappable:(BOOL)mustBeTappable error:(NSError **)error; +{ + return [self viewContainingAccessibilityElement:element tappable:mustBeTappable error:error disableScroll:NO]; +} + ++ (UIView *)viewContainingAccessibilityElement:(UIAccessibilityElement *)element tappable:(BOOL)mustBeTappable error:(NSError **)error disableScroll:(BOOL)scrollDisabled; { // Small safety mechanism. If someone calls this method after a failing call to accessibilityElementWithLabel:..., we don't want to wipe out the error message. if (!element && error && *error) { @@ -178,67 +198,62 @@ + (UIView *)viewContainingAccessibilityElement:(UIAccessibilityElement *)element return nil; } - // Scroll the view (and superviews) to be visible if necessary - UIView *superview = view; - while (superview) { - if ([superview isKindOfClass:[UIScrollView class]]) { - UIScrollView *scrollView = (UIScrollView *)superview; - BOOL animationEnabled = [KIFUITestActor testActorAnimationsEnabled]; - - if (((UIAccessibilityElement *)view == element) && ![view isKindOfClass:[UITableViewCell class]]) { - [scrollView scrollViewToVisible:view animated:animationEnabled]; - } else { - if ([view isKindOfClass:[UITableViewCell class]] && [scrollView.superview isKindOfClass:[UITableView class]]) { - UITableViewCell *cell = (UITableViewCell *)view; - UITableView *tableView = (UITableView *)scrollView.superview; - NSIndexPath *indexPath = [tableView indexPathForCell:cell]; - [tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionNone animated:animationEnabled]; + if(!scrollDisabled) { + // Scroll the view (and superviews) to be visible if necessary + UIView *superview = view; + while (superview) { + if ([superview isKindOfClass:[UIScrollView class]]) { + UIScrollView *scrollView = (UIScrollView *)superview; + BOOL animationEnabled = [KIFUITestActor testActorAnimationsEnabled]; + + if (((UIAccessibilityElement *)view == element) && ![view isKindOfClass:[UITableViewCell class]]) { + [scrollView scrollViewToVisible:view animated:animationEnabled]; } else { - CGRect elementFrame = [view.window convertRect:element.accessibilityFrame toView:scrollView]; - CGRect visibleRect = CGRectMake(scrollView.contentOffset.x, scrollView.contentOffset.y, CGRectGetWidth(scrollView.bounds), CGRectGetHeight(scrollView.bounds)); + if ([view isKindOfClass:[UITableViewCell class]] && [scrollView.superview isKindOfClass:[UITableView class]]) { + UITableViewCell *cell = (UITableViewCell *)view; + UITableView *tableView = (UITableView *)scrollView.superview; + NSIndexPath *indexPath = [tableView indexPathForCell:cell]; + [tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionNone animated:animationEnabled]; + } else { + CGRect elementFrame = [view.window convertRect:element.accessibilityFrame toView:scrollView]; + CGRect visibleRect = CGRectMake(scrollView.contentOffset.x, scrollView.contentOffset.y, CGRectGetWidth(scrollView.bounds), CGRectGetHeight(scrollView.bounds)); - UIEdgeInsets contentInset; -#ifdef __IPHONE_11_0 - if (@available(iOS 11.0, *)) { - contentInset = scrollView.adjustedContentInset; - } else { + UIEdgeInsets contentInset; + #ifdef __IPHONE_11_0 + if (@available(iOS 11.0, *)) { + contentInset = scrollView.adjustedContentInset; + } else { + contentInset = scrollView.contentInset; + } + #else contentInset = scrollView.contentInset; - } -#else - contentInset = scrollView.contentInset; -#endif - visibleRect = UIEdgeInsetsInsetRect(visibleRect, contentInset); + #endif + visibleRect = UIEdgeInsetsInsetRect(visibleRect, contentInset); - // Only call scrollRectToVisible if the element isn't already visible - // iOS 8 will sometimes incorrectly scroll table views so the element scrolls out of view - if (!CGRectContainsRect(visibleRect, elementFrame)) { - [scrollView scrollRectToVisible:elementFrame animated:animationEnabled]; + // Only call scrollRectToVisible if the element isn't already visible + // iOS 8 will sometimes incorrectly scroll table views so the element scrolls out of view + if (!CGRectContainsRect(visibleRect, elementFrame)) { + [scrollView scrollRectToVisible:elementFrame animated:animationEnabled]; + } } - } - // Give the scroll view a small amount of time to perform the scroll. - CFTimeInterval delay = animationEnabled ? 0.3 : 0.05; - KIFRunLoopRunInModeRelativeToAnimationSpeed(kCFRunLoopDefaultMode, delay, false); + // Give the scroll view a small amount of time to perform the scroll. + CFTimeInterval delay = animationEnabled ? 0.3 : 0.05; + KIFRunLoopRunInModeRelativeToAnimationSpeed(kCFRunLoopDefaultMode, delay, false); - // Because of cell reuse the first found view could be different after we scroll. - // Find the same element's view to ensure that after we have scrolled we get the same view back. - UIView *checkedView = [UIAccessibilityElement viewContainingAccessibilityElement:element]; - // intentionally doing a memory address check vs a isEqual check because - // we want to ensure that the memory address hasn't changed after scroll. - if(view != checkedView) { - view = checkedView; + // Because of cell reuse the first found view could be different after we scroll. + // Find the same element's view to ensure that after we have scrolled we get the same view back. + UIView *checkedView = [UIAccessibilityElement viewContainingAccessibilityElement:element]; + // intentionally doing a memory address check vs a isEqual check because + // we want to ensure that the memory address hasn't changed after scroll. + if(view != checkedView) { + view = checkedView; + } } } - } - - superview = superview.superview; - } - if ([[UIApplication sharedApplication] isIgnoringInteractionEvents]) { - if (error) { - *error = [NSError KIFErrorWithFormat:@"Application is ignoring interaction events"]; + superview = superview.superview; } - return nil; } // If we don't require tappability, at least make sure it's not hidden @@ -259,9 +274,9 @@ + (UIView *)viewContainingAccessibilityElement:(UIAccessibilityElement *)element return view; } -+ (NSError *)errorForFailingPredicate:(NSPredicate*)failingPredicate; ++ (NSError *)errorForFailingPredicate:(NSPredicate*)failingPredicate disableScroll:(BOOL) scrollDisabled; { - NSPredicate *closestMatchingPredicate = [self findClosestMatchingPredicate:failingPredicate]; + NSPredicate *closestMatchingPredicate = [self findClosestMatchingPredicate:failingPredicate disableScroll:scrollDisabled]; if (closestMatchingPredicate) { return [NSError KIFErrorWithFormat:@"Found element with %@ but not %@", \ closestMatchingPredicate.kifPredicateDescription, \ @@ -270,7 +285,7 @@ + (NSError *)errorForFailingPredicate:(NSPredicate*)failingPredicate; return [NSError KIFErrorWithFormat:@"Could not find element with %@", failingPredicate.kifPredicateDescription]; } -+ (NSPredicate *)findClosestMatchingPredicate:(NSPredicate *)aPredicate; ++ (NSPredicate *)findClosestMatchingPredicate:(NSPredicate *)aPredicate disableScroll:(BOOL) scrollDisabled; { if (!aPredicate) { return nil; @@ -278,7 +293,7 @@ + (NSPredicate *)findClosestMatchingPredicate:(NSPredicate *)aPredicate; UIAccessibilityElement *match = [[UIApplication sharedApplication] accessibilityElementMatchingBlock:^BOOL (UIAccessibilityElement *element) { return [aPredicate evaluateWithObject:element]; - }]; + } disableScroll:scrollDisabled]; if (match) { return aPredicate; } @@ -296,7 +311,7 @@ + (NSPredicate *)findClosestMatchingPredicate:(NSPredicate *)aPredicate; if (predicateMinusOneCondition) { UIAccessibilityElement *match = [[UIApplication sharedApplication] accessibilityElementMatchingBlock:^BOOL (UIAccessibilityElement *element) { return [predicateMinusOneCondition evaluateWithObject:element]; - }]; + } disableScroll:scrollDisabled]; if (match) { return predicateMinusOneCondition; } diff --git a/Sources/KIF/Additions/UIApplication-KIFAdditions.h b/Sources/KIF/Additions/UIApplication-KIFAdditions.h index fef032ef9..214b6601f 100644 --- a/Sources/KIF/Additions/UIApplication-KIFAdditions.h +++ b/Sources/KIF/Additions/UIApplication-KIFAdditions.h @@ -49,6 +49,13 @@ CF_EXPORT SInt32 KIFRunLoopRunInModeRelativeToAnimationSpeed(CFStringRef mode, C @param matchBlock A block to be performed on each element to see if it passes. */ - (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessibilityElement *))matchBlock; +/*! + @abstract Finds an accessibility element where @c matchBlock returns @c YES, across all windows in the application starting at the fronmost window. + @discussion This method should be used if @c accessibilityElementWithLabel:accessibilityValue:traits: does not meet your requirements. For example, if you are searching for an element that begins with a pattern or if of a certain view type. + @param matchBlock A block to be performed on each element to see if it passes. + @param scrollDisabled Disable scroll performing the search only in the current visible frame. + */ +- (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessibilityElement *))matchBlock disableScroll:(BOOL)scrollDisabled; /*! @returns The window containing the keyboard or @c nil if the keyboard is not visible. @@ -75,6 +82,12 @@ CF_EXPORT SInt32 KIFRunLoopRunInModeRelativeToAnimationSpeed(CFStringRef mode, C */ - (NSArray *)windowsWithKeyWindow; +/*! + @discussion A replacement for the @c keyWindow property, which was deprecated in iOS 13 + @returns The key window, found by iterating @c UIApplication's @c connectedScenes. + */ +- (UIWindow *)windowSceneKeyWindow; + /// @discussion The first responders are ordered in the reverse order of @c -windowsWithKeyWindow /// to return in order of nearest visually. /// @returns All first responders in the application. diff --git a/Sources/KIF/Additions/UIApplication-KIFAdditions.m b/Sources/KIF/Additions/UIApplication-KIFAdditions.m index e02cfe1c9..cbfb82e20 100644 --- a/Sources/KIF/Additions/UIApplication-KIFAdditions.m +++ b/Sources/KIF/Additions/UIApplication-KIFAdditions.m @@ -62,9 +62,14 @@ - (UIAccessibilityElement *)accessibilityElementWithLabel:(NSString *)label acce } - (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessibilityElement *))matchBlock; +{ + return [self accessibilityElementMatchingBlock:matchBlock disableScroll:NO]; +} + +- (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessibilityElement *))matchBlock disableScroll:(BOOL)scrollDisabled; { for (UIWindow *window in [self.windowsWithKeyWindow reverseObjectEnumerator]) { - UIAccessibilityElement *element = [window accessibilityElementMatchingBlock:matchBlock]; + UIAccessibilityElement *element = [window accessibilityElementMatchingBlock:matchBlock disableScroll:scrollDisabled]; if (element) { return element; } @@ -129,25 +134,42 @@ - (UIWindow *)getWindowForSubviewClass:(NSString*)className; - (NSArray *)windowsWithKeyWindow { - NSMutableArray *windows = self.windows.mutableCopy; - UIWindow *keyWindow = self.keyWindow; - if (keyWindow && ![windows containsObject:keyWindow]) { - [windows addObject:keyWindow]; + NSMutableArray *windows = [NSMutableArray array]; + + for (UIWindowScene *scene in UIApplication.sharedApplication.connectedScenes) { + if ([scene isKindOfClass:[UIWindowScene class]]) { + [windows addObjectsFromArray:scene.windows]; + } } + return windows; } +- (UIWindow *)windowSceneKeyWindow +{ + for (UIWindow *window in [self windowsWithKeyWindow]) { + if (window.isKeyWindow) { + return window; + } + } + + return nil; +} + - (float)animationSpeed { - if (!self.keyWindow) { + UIWindow *keyWindow = [self windowSceneKeyWindow]; + if (!keyWindow) { return 1.0f; } - return self.keyWindow.layer.speed; + return keyWindow.layer.speed; } - (void)setAnimationSpeed:(float)animationSpeed { - self.keyWindow.layer.speed = animationSpeed; + for (UIWindow *window in [self windowsWithKeyWindow]) { + window.layer.speed = animationSpeed; + } } #pragma mark - Screenshotting @@ -176,7 +198,9 @@ - (BOOL)writeScreenshotForLine:(NSUInteger)lineNumber inFile:(NSString *)filenam } return NO; } - + + UIWindow *keyboardWindow = [self keyboardWindow]; + UIGraphicsBeginImageContextWithOptions([[windows objectAtIndex:0] bounds].size, YES, 0); for (UIWindow *window in windows) { //avoid https://github.com/kif-framework/KIF/issues/679 @@ -184,6 +208,12 @@ - (BOOL)writeScreenshotForLine:(NSUInteger)lineNumber inFile:(NSString *)filenam continue; } + if (@available(iOS 17.0, *)) { + if (window == keyboardWindow) { + continue; + } + } + if ([window respondsToSelector:@selector(drawViewHierarchyInRect:afterScreenUpdates:)]) { [window drawViewHierarchyInRect:window.bounds afterScreenUpdates:YES]; } else { diff --git a/Sources/KIF/Additions/UITouch-KIFAdditions.h b/Sources/KIF/Additions/UITouch-KIFAdditions.h index ea8dc350c..5fedffe42 100644 --- a/Sources/KIF/Additions/UITouch-KIFAdditions.h +++ b/Sources/KIF/Additions/UITouch-KIFAdditions.h @@ -17,5 +17,6 @@ - (void)setLocationInWindow:(CGPoint)location; - (void)setPhaseAndUpdateTimestamp:(UITouchPhase)phase; +- (void)setIsFromEdge:(BOOL)isFromEdge; @end diff --git a/Sources/KIF/Additions/UITouch-KIFAdditions.m b/Sources/KIF/Additions/UITouch-KIFAdditions.m index 59b2e34ea..f29a2f130 100644 --- a/Sources/KIF/Additions/UITouch-KIFAdditions.m +++ b/Sources/KIF/Additions/UITouch-KIFAdditions.m @@ -8,8 +8,10 @@ // which Square, Inc. licenses this file to you. #import "UITouch-KIFAdditions.h" +#import "UIView+KIFPrivateAPI.h" #import "LoadableCategory.h" #import +#import #import "IOHIDEvent+KIF.h" MAKE_CATEGORIES_LOADABLE(UITouch_KIFAdditions) @@ -37,6 +39,7 @@ - (void)_setIsFirstTouchForView:(BOOL)firstTouchForView; - (void)_setIsTapToClick:(BOOL)tapToClick; - (void)_setHidEvent:(IOHIDEventRef)event; +- (void)_setEdgeType:(NSInteger)edgeType; @end @@ -62,9 +65,9 @@ - (id)initAtPoint:(CGPoint)point inWindow:(UIWindow *)window; [self setTapCount:1]; [self _setLocationInWindow:point resetPrevious:YES]; - UIView *hitTestView = [window hitTest:point withEvent:nil]; - + UIView *hitTestView = [self kif_getHitTestViewInWindow:window atPoint:point]; [self setView:hitTestView]; + [self setPhase:UITouchPhaseBegan]; if ([self respondsToSelector:@selector(_setIsFirstTouchForView:)]) { @@ -87,10 +90,7 @@ - (id)initAtPoint:(CGPoint)point inWindow:(UIWindow *)window; } // Starting with iOS 9, internal IOHIDEvent must be set for UITouch object - NSOperatingSystemVersion iOS9 = {9, 0, 0}; - if ([NSProcessInfo instancesRespondToSelector:@selector(isOperatingSystemAtLeastVersion:)] && [[NSProcessInfo new] isOperatingSystemAtLeastVersion:iOS9]) { - [self kif_setHidEvent]; - } + [self kif_setHidEvent]; return self; } @@ -117,10 +117,68 @@ - (void)setPhaseAndUpdateTimestamp:(UITouchPhase)phase [self setPhase:phase]; } -- (void)kif_setHidEvent { +- (void)setIsFromEdge:(BOOL)isFromEdge +{ + NSInteger edgeType = isFromEdge ? 4 : 0; + [self _setEdgeType:edgeType]; +} + +- (void)kif_setHidEvent +{ IOHIDEventRef event = kif_IOHIDEventWithTouches(@[self]); [self _setHidEvent:event]; CFRelease(event); } +/*! + @abstract Beginning with iOS 18, there is @c _UIHitTestContext structure introduced for hit testing SwiftUI views. This method tries to mimic that behaviour. + @returns The view that should be assigned to the touch gesture. + */ +- (UIView *)kif_getHitTestViewInWindow:(UIWindow *)window atPoint:(CGPoint)point +{ + UIView *hitTestView = [window hitTest:point withEvent:nil]; + + if (@available(iOS 18.0, *)) { + static Class UIHitTestContextClass; + static SEL contextWithPointAndRadiusSel; + static BOOL canCreateContext; + static BOOL canHitTestWithContext; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + UIHitTestContextClass = NSClassFromString(@"_UIHitTestContext"); + contextWithPointAndRadiusSel = NSSelectorFromString(@"contextWithPoint:radius:"); + canCreateContext = UIHitTestContextClass && [UIHitTestContextClass respondsToSelector:contextWithPointAndRadiusSel]; + canHitTestWithContext = [[UIView class] instancesRespondToSelector:@selector(_hitTestWithContext:)]; + }); + + if (canCreateContext && canHitTestWithContext) { + id hitTestContext = ((id (*)(id, SEL, CGPoint, CGFloat))objc_msgSend)(UIHitTestContextClass, contextWithPointAndRadiusSel, point, 0); + + if (hitTestContext) { + /* + From observation - this can be either of following types: + - UIView type (e.g. when using UIViewRepresentable inside SwiftUI) + - specialized SwiftUI view compatible with UIView, + - newly introduced structure SwiftUI.UIKitGestureContainer implementing UIResponder interface. + What's important it seems it is compatible with setView:(UIView *) method. + */ + id foundResponder = NULL; + UIView *currentView = hitTestView; + + while(foundResponder == NULL && currentView != NULL) { + foundResponder = [currentView _hitTestWithContext:hitTestContext]; + currentView = [currentView superview]; + } + + if (foundResponder) { + return foundResponder; + } + } + } + } + + return hitTestView; +} + @end diff --git a/Sources/KIF/Additions/UIView-Debugging.m b/Sources/KIF/Additions/UIView-Debugging.m index a9311e7bc..8f7b12acf 100644 --- a/Sources/KIF/Additions/UIView-Debugging.m +++ b/Sources/KIF/Additions/UIView-Debugging.m @@ -136,6 +136,11 @@ - (void)printDatePickerState { case UIDatePickerModeCountDownTimer: printf(" UIDatePickerModeCountDownTimer"); break; +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 170400 //__IPHONE_17_4 + case UIDatePickerModeYearAndMonth: + printf(" UIDatePickerModeYearAndMonth"); + break; +#endif } printf(")"); printf(" (minute interval: %s)", @(datePicker.minuteInterval).stringValue.UTF8String); diff --git a/Sources/KIF/Additions/UIView-KIFAdditions.h b/Sources/KIF/Additions/UIView-KIFAdditions.h index d04818b22..a78ae5b48 100644 --- a/Sources/KIF/Additions/UIView-KIFAdditions.h +++ b/Sources/KIF/Additions/UIView-KIFAdditions.h @@ -31,6 +31,14 @@ typedef CGPoint KIFDisplacement; @result The matching accessibility element. */ - (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessibilityElement *))matchBlock; +/*! + @method accessibilityElementMatchingBlock: + @abstract Finds the descendent accessibility element that matches the conditions defined by the match block. + @param matchBlock A block which returns YES for matching elements. + @param scrollDisabled Disable scroll performing the search only in the current visible frame. + @result The matching accessibility element. + */ +- (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessibilityElement *))matchBlock disableScroll:(BOOL)scrollDisabled; - (UIView *)subviewWithClassNamePrefix:(NSString *)prefix __deprecated; - (NSArray *)subviewsWithClassNamePrefix:(NSString *)prefix; @@ -53,6 +61,7 @@ typedef CGPoint KIFDisplacement; - (void)dragFromPoint:(CGPoint)startPoint toPoint:(CGPoint)endPoint; - (void)dragFromPoint:(CGPoint)startPoint toPoint:(CGPoint)endPoint steps:(NSUInteger)stepCount; - (void)dragFromPoint:(CGPoint)startPoint displacement:(KIFDisplacement)displacement steps:(NSUInteger)stepCount; +- (void)dragFromEdge:(UIRectEdge)startEdge toEdge:(UIRectEdge)endEdge; - (void)dragAlongPathWithPoints:(CGPoint *)points count:(NSInteger)count; - (void)twoFingerPanFromPoint:(CGPoint)startPoint toPoint:(CGPoint)toPoint steps:(NSUInteger)stepCount; - (void)pinchAtPoint:(CGPoint)centerPoint distance:(CGFloat)distance steps:(NSUInteger)stepCount; @@ -102,6 +111,12 @@ typedef CGPoint KIFDisplacement; */ - (BOOL)isVisibleInWindowFrame; +/*! + @abstract Evaluates if the view is within visible or scrollable range. + @discussion A view can be offscreen completely so we consider this as NOT visible in window. + */ +- (BOOL)isPossiblyVisibleInWindow; + /*! @method performBlockOnDescendentViews: @abstract Calls a block on the view itself and on all its descendent views. diff --git a/Sources/KIF/Additions/UIView-KIFAdditions.m b/Sources/KIF/Additions/UIView-KIFAdditions.m index a9e9e2976..4155b5a8c 100644 --- a/Sources/KIF/Additions/UIView-KIFAdditions.m +++ b/Sources/KIF/Additions/UIView-KIFAdditions.m @@ -17,6 +17,9 @@ #import "KIFUITestActor.h" #import +#define DRAG_TOUCH_DELAY 0.01 +#define CELL_SCROLL_DELAY_STABILIZATION 0.05 + double KIFDegreesToRadians(double deg) { return (deg) / 180.0 * M_PI; } @@ -132,10 +135,56 @@ + (BOOL)accessibilityElement:(UIAccessibilityElement *)element hasLabel:(NSStrin - (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessibilityElement *))matchBlock; { - return [self accessibilityElementMatchingBlock:matchBlock notHidden:YES]; + return [self accessibilityElementMatchingBlock:matchBlock disableScroll:NO]; +} + +- (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessibilityElement *))matchBlock disableScroll:(BOOL)scrollDisabled; +{ + return [self accessibilityElementMatchingBlock:matchBlock notHidden:YES disableScroll:scrollDisabled]; } -- (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessibilityElement *))matchBlock notHidden:(BOOL)notHidden; +- (BOOL)isPossiblyVisibleInWindow +{ + if (self.alpha == 0) { + return NO; + } + + if ([self isVisibleInWindowFrame]) { + return YES; + } else { + // This is a fix when a view is not hidden but outside of visible area and scrollable content size + // + // scroll view scrollable content + // ------------- + // | | + // |scrollView | View is not hidden and it's out of the scollable content + // | | ----- + // | | | | <- a subview of the scrollView + // | | | | + // ------------- ----- + // + // We want to detect that if the view is there but it's out of the scrollable content size + // If it's out of the scrollable content size, we consider as not visible + // + // We are only interested if the parent is a scrollView and NOT collectionView and NOT tableView + UIScrollView *scrollView = (UIScrollView *)[self ancestorScrollView]; + // if scrollView is within a tappable point, that means we can check to see if `self` is viewable within content size + // + // TODO: We haven't handled if a scrollView is inside another scrollView + if (scrollView && scrollView.isTappable) { + CGSize scrollViewSize = scrollView.contentSize; + BOOL isXVisible = scrollViewSize.width >= self.frame.origin.x; + BOOL isYVisible = scrollViewSize.height >= self.frame.origin.y; + BOOL isSelfVisible = isXVisible && isYVisible; + + return isSelfVisible; + } + + return NO; + } +} + +- (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessibilityElement *))matchBlock notHidden:(BOOL)notHidden disableScroll:(BOOL)scrollDisabled; { if (notHidden && self.hidden) { return nil; @@ -163,7 +212,14 @@ - (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessi // rather than the real subviews it contains. We want the real views if possible. // UITableViewCell is such an offender. for (UIView *view in [self.subviews reverseObjectEnumerator]) { - UIAccessibilityElement *element = [view accessibilityElementMatchingBlock:matchBlock]; + + UIAccessibilityElement *element = [view accessibilityElementMatchingBlock:matchBlock disableScroll:scrollDisabled]; + + if (!element) { + UIView* fallbackView = [self tryGetiOS16KeyboardFallbackViewFromParentView:view]; + element = [fallbackView accessibilityElementMatchingBlock:matchBlock disableScroll:scrollDisabled]; + } + if (!element) { continue; } @@ -173,7 +229,7 @@ - (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessi if ([viewForElement isTappableInRect:accessibilityFrame]) { return element; - } else { + } else if (!scrollDisabled || [viewForElement isVisibleInWindowFrame]){ matchingButOccludedElement = element; } } @@ -192,7 +248,7 @@ - (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessi if ([viewForElement isTappableInRect:accessibilityFrame]) { return element; - } else { + } else if (!scrollDisabled || [viewForElement isVisibleInWindowFrame]){ matchingButOccludedElement = element; continue; } @@ -225,9 +281,11 @@ - (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessi } } - if (!matchingButOccludedElement && self.window) { + if (!scrollDisabled && !matchingButOccludedElement && self.window) { CGPoint scrollContentOffset = {-1.0, -1.0}; UIScrollView *scrollView = nil; + + // Table view - scroll to non visible cells if ([self isKindOfClass:[UITableView class]]) { NSString * subViewName = nil; //special case for UIPickerView (which has a private class UIPickerTableView) @@ -255,7 +313,6 @@ - (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessi } }]; - CFTimeInterval delay = 0.05; for (NSUInteger section = 0, numberOfSections = [tableView numberOfSections]; section < numberOfSections; section++) { for (NSUInteger row = 0, numberOfRows = [tableView numberOfRowsInSection:section]; row < numberOfRows; row++) { if (!self.window) { @@ -273,12 +330,12 @@ - (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessi } @autoreleasepool { - // Scroll to the cell and wait for the animation to complete. Using animations here may not be optimal. + // Scroll to the cell and wait for the animation to complete. CGRect sectionRect = [tableView rectForRowAtIndexPath:indexPath]; [tableView scrollRectToVisible:sectionRect animated:NO]; UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; - UIAccessibilityElement *element = [cell accessibilityElementMatchingBlock:matchBlock notHidden:NO]; + UIAccessibilityElement *element = [cell accessibilityElementMatchingBlock:matchBlock notHidden:NO disableScroll:NO]; // Skip this cell if it isn't the one we're looking for if (!element) { @@ -287,24 +344,25 @@ - (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessi } // Note: using KIFRunLoopRunInModeRelativeToAnimationSpeed here may cause tests to stall - CFRunLoopRunInMode(UIApplicationCurrentRunMode, delay, false); - return [self accessibilityElementMatchingBlock:matchBlock]; + CFRunLoopRunInMode(UIApplicationCurrentRunMode, CELL_SCROLL_DELAY_STABILIZATION, false); + return [self accessibilityElementMatchingBlock:matchBlock disableScroll:NO]; } } //if we're in a picker (scrollView), let's make sure we set the position back to how it was last set. - if(scrollView != nil && scrollContentOffset.x != -1.0) + if (scrollView != nil && scrollContentOffset.x != -1.0) { [scrollView setContentOffset:scrollContentOffset]; } else { [tableView setContentOffset:initialPosition.origin]; } - CFRunLoopRunInMode(UIApplicationCurrentRunMode, delay, false); + + CFRunLoopRunInMode(UIApplicationCurrentRunMode, CELL_SCROLL_DELAY_STABILIZATION, false); } else if ([self isKindOfClass:[UICollectionView class]]) { UICollectionView *collectionView = (UICollectionView *)self; - + CGRect initialPosition = CGRectMake(collectionView.contentOffset.x, collectionView.contentOffset.y, collectionView.frame.size.width, collectionView.frame.size.height); NSArray *indexPathsForVisibleItems = [collectionView indexPathsForVisibleItems]; - + for (NSUInteger section = 0, numberOfSections = [collectionView numberOfSections]; section < numberOfSections; section++) { for (NSUInteger item = 0, numberOfItems = [collectionView numberOfItemsInSection:section]; item < numberOfItems; item++) { if (!self.window) { @@ -316,41 +374,77 @@ - (UIAccessibilityElement *)accessibilityElementMatchingBlock:(BOOL(^)(UIAccessi if ([indexPathsForVisibleItems containsObject:indexPath]) { continue; } - - @autoreleasepool { - // Get the cell directly from the dataSource because UICollectionView will only vend visible cells - UICollectionViewCell *cell = [collectionView.dataSource collectionView:collectionView cellForItemAtIndexPath:indexPath]; - // The cell contents might change just prior to being displayed, so we simulate the cell appearing onscreen - if ([collectionView.delegate respondsToSelector:@selector(collectionView:willDisplayCell:forItemAtIndexPath:)]) { - [collectionView.delegate collectionView:collectionView willDisplayCell:cell forItemAtIndexPath:indexPath]; + if (@available(iOS 18, *)) { + @autoreleasepool { + CGRect visibleRect = [collectionView layoutAttributesForItemAtIndexPath:indexPath].frame; + [collectionView scrollRectToVisible:visibleRect animated:NO]; + [collectionView layoutIfNeeded]; + UICollectionViewCell *cell = [collectionView cellForItemAtIndexPath:indexPath]; + for (NSUInteger attempts = 0; attempts < 10 && !cell && collectionView.window; attempts++) { + CFRunLoopRunInMode(UIApplicationCurrentRunMode, 0.01, false); + cell = [collectionView cellForItemAtIndexPath:indexPath]; + } + if (cell == nil) { + [collectionView scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionNone animated:NO]; + [collectionView layoutIfNeeded]; + cell = [collectionView cellForItemAtIndexPath:indexPath]; + } + // Skip this cell if it can't be found + if (!cell) { + continue; + } + UIAccessibilityElement *element = [cell accessibilityElementMatchingBlock:matchBlock notHidden:NO disableScroll:NO]; + + // Skip this cell if it isn't the one we're looking for + if (!element) { + continue; + } } - - UIAccessibilityElement *element = [cell accessibilityElementMatchingBlock:matchBlock notHidden:NO]; - - // Remove the cell from the collection view so that it doesn't stick around - [cell removeFromSuperview]; - - // Skip this cell if it isn't the one we're looking for - // Sometimes we get cells with no size here which can cause an endless loop, so we ignore those - if (!element || CGSizeEqualToSize(cell.frame.size, CGSizeZero)) { - continue; + + // Note: using KIFRunLoopRunInModeRelativeToAnimationSpeed here may cause tests to stall + CFRunLoopRunInMode(UIApplicationCurrentRunMode, CELL_SCROLL_DELAY_STABILIZATION, false); + return [self accessibilityElementMatchingBlock:matchBlock disableScroll:NO]; + } else { + @autoreleasepool { + // Get the cell directly from the dataSource because UICollectionView will only vend visible cells + UICollectionViewCell *cell = [collectionView.dataSource collectionView:collectionView cellForItemAtIndexPath:indexPath]; + + // The cell contents might change just prior to being displayed, so we simulate the cell appearing onscreen + if ([collectionView.delegate respondsToSelector:@selector(collectionView:willDisplayCell:forItemAtIndexPath:)]) { + [collectionView.delegate collectionView:collectionView willDisplayCell:cell forItemAtIndexPath:indexPath]; + } + + UIAccessibilityElement *element = [cell accessibilityElementMatchingBlock:matchBlock notHidden:NO disableScroll:NO]; + + // Remove the cell from the collection view so that it doesn't stick around + [cell removeFromSuperview]; + + // Skip this cell if it isn't the one we're looking for + // Sometimes we get cells with no size here which can cause an endless loop, so we ignore those + if (!element || CGSizeEqualToSize(cell.frame.size, CGSizeZero)) { + continue; + } } + + // Scroll to the cell and wait for the animation to complete + CGRect frame = [collectionView.collectionViewLayout layoutAttributesForItemAtIndexPath:indexPath].frame; + [collectionView scrollRectToVisible:frame animated:YES]; + // Note: using KIFRunLoopRunInModeRelativeToAnimationSpeed here may cause tests to stall + CFRunLoopRunInMode(UIApplicationCurrentRunMode, 0.5, false); + + // Now try finding the element again + return [self accessibilityElementMatchingBlock:matchBlock]; } - - // Scroll to the cell and wait for the animation to complete - CGRect frame = [collectionView.collectionViewLayout layoutAttributesForItemAtIndexPath:indexPath].frame; - [collectionView scrollRectToVisible:frame animated:YES]; - // Note: using KIFRunLoopRunInModeRelativeToAnimationSpeed here may cause tests to stall - CFRunLoopRunInMode(UIApplicationCurrentRunMode, 0.5, false); - - // Now try finding the element again - return [self accessibilityElementMatchingBlock:matchBlock]; } } + + [collectionView setContentOffset:initialPosition.origin]; + [collectionView layoutIfNeeded]; + CFRunLoopRunInMode(UIApplicationCurrentRunMode, CELL_SCROLL_DELAY_STABILIZATION, false); } } - + return matchingButOccludedElement; } @@ -374,12 +468,23 @@ - (NSArray *)subviewsWithClassNamePrefix:(NSString *)prefix; if ([NSStringFromClass([view class]) hasPrefix:prefix]) { [result addObject:view]; } + + UIView* fallbackView = [self tryGetiOS16KeyboardFallbackViewFromParentView:view]; + if ([NSStringFromClass([fallbackView class]) hasPrefix:prefix]) { + [result addObject:fallbackView]; + } } // Now traverse the subviews of the subviews, adding matches. for (UIView *view in self.subviews) { NSArray *matchingSubviews = [view subviewsWithClassNamePrefix:prefix]; [result addObjectsFromArray:matchingSubviews]; + + UIView* fallbackView = [self tryGetiOS16KeyboardFallbackViewFromParentView:view]; + if (fallbackView) { + NSArray *matchingSubviews = [fallbackView subviewsWithClassNamePrefix:prefix]; + [result addObjectsFromArray:matchingSubviews]; + } } return result; @@ -403,14 +508,30 @@ - (NSArray *)subviewsWithClassNameOrSuperClassNamePrefix:(NSString *)prefix; // First traverse the next level of subviews, adding matches for (UIView *view in self.subviews) { Class klass = [view class]; + while (klass) { if ([NSStringFromClass(klass) hasPrefix:prefix]) { [result addObject:view]; break; } + UIView* fallbackView = [self tryGetiOS16KeyboardFallbackViewFromParentView:view]; + if (fallbackView) { + Class klass = [fallbackView class]; + while (klass) { + if ([NSStringFromClass(klass) hasPrefix:prefix]) { + [result addObject:fallbackView]; + break; + } + + klass = [klass superclass]; + } + } + klass = [klass superclass]; } + + } // Now traverse the subviews of the subviews, adding matches @@ -510,8 +631,6 @@ - (void)twoFingerTapAtPoint:(CGPoint)point { [[UIApplication sharedApplication] kif_sendEvent:event]; } -#define DRAG_TOUCH_DELAY 0.01 - - (void)longPressAtPoint:(CGPoint)point duration:(NSTimeInterval)duration { UITouch *touch = [[UITouch alloc] initAtPoint:point inView:self]; @@ -562,6 +681,27 @@ - (void)dragFromPoint:(CGPoint)startPoint displacement:(KIFDisplacement)displace [self dragPointsAlongPaths:@[path]]; } +- (void)dragFromEdge:(UIRectEdge)startEdge toEdge:(UIRectEdge)endEdge +{ + CGFloat width = self.bounds.size.width; + CGFloat height = self.bounds.size.height; + CGFloat edgeInset = 0.5; + NSDictionary *edgeToPoint = @{ + @(UIRectEdgeTop): @(CGPointMake(width / 2, edgeInset)), + @(UIRectEdgeLeft): @(CGPointMake(edgeInset, height / 2)), + @(UIRectEdgeBottom): @(CGPointMake(width / 2, height - edgeInset)), + @(UIRectEdgeRight): @(CGPointMake(width - edgeInset, height / 2)), + }; + CGPoint startPoint = [edgeToPoint[@(startEdge)] CGPointValue]; + CGPoint endPoint = [edgeToPoint[@(endEdge)] CGPointValue]; + + CGPoint screenPoint = [self convertPoint:startPoint toView:self.window]; + BOOL isFromScreenEdge = (screenPoint.x < 1 || screenPoint.x > self.window.bounds.size.width - 1); + + NSArray *path = [self pointsFromStartPoint:startPoint toPoint:endPoint steps:20]; + [self dragPointsAlongPaths:@[path] isFromEdge:isFromScreenEdge]; +} + - (void)dragAlongPathWithPoints:(CGPoint *)points count:(NSInteger)count; { // convert point array into NSArray with NSValue @@ -574,6 +714,10 @@ - (void)dragAlongPathWithPoints:(CGPoint *)points count:(NSInteger)count; } - (void)dragPointsAlongPaths:(NSArray *> *)arrayOfPaths { + [self dragPointsAlongPaths:arrayOfPaths isFromEdge:NO]; +} + +- (void)dragPointsAlongPaths:(NSArray *> *)arrayOfPaths isFromEdge:(BOOL)isFromEdge { // There must be at least one path with at least one point if (arrayOfPaths.count == 0 || arrayOfPaths.firstObject.count == 0) { @@ -618,6 +762,7 @@ - (void)dragPointsAlongPaths:(NSArray *> *)arrayOfPaths { point = [self convertPoint:point fromView:self.window]; UITouch *touch = [[UITouch alloc] initAtPoint:point inView:self]; [touch setPhaseAndUpdateTimestamp:UITouchPhaseBegan]; + [touch setIsFromEdge:isFromEdge]; [touches addObject:touch]; } UIEvent *eventDown = [self eventWithTouches:[NSArray arrayWithArray:touches]]; @@ -765,8 +910,7 @@ - (BOOL)isProbablyTappable // Is this view currently on screen? - (BOOL)isTappable; { - return ([self hasTapGestureRecognizerAndIsControlEnabled] || - [self isTappableInRect:self.bounds]); + return [self isTappableInRect:self.bounds]; } - (BOOL)hasTapGestureRecognizerAndIsControlEnabled @@ -1020,5 +1164,32 @@ - (void)performBlockOnAscendentViews:(void (^)(UIView *view, BOOL *stop))block } } +- (UIView *)tryGetiOS16KeyboardFallbackViewFromParentView:(UIView*) parentView +{ + if([parentView isKindOfClass:NSClassFromString(@"_UIRemoteKeyboardPlaceholderView")]) { + UIView* fallbackView = [parentView valueForKey:@"_fallbackView"]; + return fallbackView; + } + + return nil; +} + +- (nullable UIView *)ancestorScrollView +{ + // We don't want collection view and table view because we handle them separately. + // This function is only getting a plain scroll view + UIView *currentSuperview = self.superview; + while (currentSuperview != nil) { + if ([currentSuperview isKindOfClass:[UIScrollView class]] && + ![currentSuperview isKindOfClass:[UICollectionView class]] && + ![currentSuperview isKindOfClass:[UITableView class]]) { + return currentSuperview; + } + + currentSuperview = currentSuperview.superview; + } + + return nil; +} @end diff --git a/Sources/KIF/Additions/UIWindow+KIFSwizzle.h b/Sources/KIF/Additions/UIWindow+KIFSwizzle.h new file mode 100644 index 000000000..e03d4857e --- /dev/null +++ b/Sources/KIF/Additions/UIWindow+KIFSwizzle.h @@ -0,0 +1,12 @@ +// +// UIWindow+KIFAdditions.h +// KIF +// +// Created by Steve Sun on 2023-04-02. +// + +#import + +@interface UIWindow (KIFSwizzle) + +@end diff --git a/Sources/KIF/Additions/UIWindow+KIFSwizzle.m b/Sources/KIF/Additions/UIWindow+KIFSwizzle.m new file mode 100644 index 000000000..919012b5a --- /dev/null +++ b/Sources/KIF/Additions/UIWindow+KIFSwizzle.m @@ -0,0 +1,56 @@ +// +// UIWindow+KIFAdditions.m +// KIF +// +// Created by Steve Sun on 2023-04-02. +// + +#import "UIWindow+KIFSwizzle.h" +#import "UIApplication-KIFAdditions.h" +#import "NSObject+KIFSwizzle.h" + +@interface UIWindow () + +- (instancetype)_initWithFrame:(CGRect)rect debugName:(NSString *)debugName windowScene:(UIWindowScene *)windowScene API_AVAILABLE(ios(13)); + +@end + + +@implementation UIWindow (KIFSwizzle) + ++ (void)load +{ + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + if (@available(iOS 13, *)) { + [self swizzleSEL:@selector(_initWithFrame:debugName:windowScene:) withSEL:@selector(swizzle__initWithFrame:debugName:windowScene:)]; + } else { + [self swizzleSEL:@selector(init) withSEL:@selector(swizzle_init)]; + } + [self swizzleSEL:@selector(becomeKeyWindow) withSEL:@selector(swizzle_becomeKeyWindow)]; + }); +} + +- (instancetype)swizzle__initWithFrame:(CGRect)rect debugName:(NSString *)debugName windowScene:(UIWindowScene *)windowScene API_AVAILABLE(ios(13)) +{ + UIWindow *window = [self swizzle__initWithFrame:rect debugName:debugName windowScene:windowScene]; + window.layer.speed = [UIApplication sharedApplication].animationSpeed; + + return window; +} + +- (instancetype)swizzle_init +{ + UIWindow *window = [self swizzle_init]; + window.layer.speed = [UIApplication sharedApplication].animationSpeed; + + return window; +} + +- (void)swizzle_becomeKeyWindow +{ + [self swizzle_becomeKeyWindow]; + self.layer.speed = [UIApplication sharedApplication].animationSpeed; +} + +@end diff --git a/Sources/KIF/ApplePrivateAPIs/UIView+KIFPrivateAPI.h b/Sources/KIF/ApplePrivateAPIs/UIView+KIFPrivateAPI.h new file mode 100644 index 000000000..b6cc68516 --- /dev/null +++ b/Sources/KIF/ApplePrivateAPIs/UIView+KIFPrivateAPI.h @@ -0,0 +1,8 @@ +#import + +// Private API's used for UIView. +@interface UIView (KIFPrivateAPI) + +- (id)_hitTestWithContext:(id)context; + +@end diff --git a/Sources/KIF/Classes/KIFSystemTestActor.m b/Sources/KIF/Classes/KIFSystemTestActor.m index ef8deebb7..b6baa80d6 100644 --- a/Sources/KIF/Classes/KIFSystemTestActor.m +++ b/Sources/KIF/Classes/KIFSystemTestActor.m @@ -58,7 +58,54 @@ - (void)simulateMemoryWarning - (void)simulateDeviceRotationToOrientation:(UIDeviceOrientation)orientation { - [[UIDevice currentDevice] setValue:@(orientation) forKey:@"orientation"]; +#ifdef __IPHONE_16_0 + if (@available(iOS 16.0, *)) { + NSSet *scenes = [[UIApplication sharedApplication] connectedScenes]; + UIWindowScene* windowScene; + for (UIScene* scene in scenes) { + if([scene isKindOfClass:[UIWindowScene class]]) { + windowScene = (UIWindowScene*) scene; + break; + } + } + + if (windowScene) { + UIInterfaceOrientationMask orientationMask; + switch (orientation) { + case UIDeviceOrientationUnknown: + orientationMask = UIInterfaceOrientationMaskAll; + break; + case UIDeviceOrientationPortrait: + orientationMask = UIInterfaceOrientationMaskPortrait; + break; + case UIDeviceOrientationPortraitUpsideDown: + orientationMask = UIInterfaceOrientationMaskPortraitUpsideDown; + break; + case UIDeviceOrientationLandscapeLeft: + orientationMask = UIInterfaceOrientationMaskLandscapeRight; + break; + case UIDeviceOrientationLandscapeRight: + orientationMask = UIInterfaceOrientationMaskLandscapeLeft; + break; + case UIDeviceOrientationFaceUp: + orientationMask = UIInterfaceOrientationMaskAll; + break; + case UIDeviceOrientationFaceDown: + orientationMask = UIInterfaceOrientationMaskAll; + break; + } + + UIWindowSceneGeometryPreferencesIOS* preferences = [[UIWindowSceneGeometryPreferencesIOS alloc]initWithInterfaceOrientations:orientationMask]; + [windowScene requestGeometryUpdateWithPreferences:preferences errorHandler:^(NSError * _Nonnull error) { + [self failWithError:[NSError KIFErrorWithUnderlyingError:error format:@"Could not rotate the screen"] stopTest:YES]; + }]; + } + } else { +#endif + [[UIDevice currentDevice] setValue:@(orientation) forKey:@"orientation"]; +#ifdef __IPHONE_16_0 + } +#endif } diff --git a/Sources/KIF/Classes/KIFTestActor.m b/Sources/KIF/Classes/KIFTestActor.m index ad6dfa12e..79325e5d9 100644 --- a/Sources/KIF/Classes/KIFTestActor.m +++ b/Sources/KIF/Classes/KIFTestActor.m @@ -131,7 +131,7 @@ - (void)runBlock:(KIFTestExecutionBlock)executionBlock #pragma mark Class Methods -static NSTimeInterval KIFTestStepDefaultAnimationWaitingTimeout = 0.5; +static NSTimeInterval KIFTestStepDefaultAnimationWaitingTimeout = 2.0; static NSTimeInterval KIFTestStepDefaultAnimationStabilizationTimeout = 0.5; static NSTimeInterval KIFTestStepDefaultMainThreadDispatchStabilizationTimeout = 0.5; static NSTimeInterval KIFTestStepDefaultTimeout = 10.0; diff --git a/Sources/KIF/Classes/KIFUITestActor-ConditionalTests.h b/Sources/KIF/Classes/KIFUITestActor-ConditionalTests.h index 10cdc3349..344355a43 100644 --- a/Sources/KIF/Classes/KIFUITestActor-ConditionalTests.h +++ b/Sources/KIF/Classes/KIFUITestActor-ConditionalTests.h @@ -65,4 +65,6 @@ - (BOOL)tryFindingAccessibilityElement:(out UIAccessibilityElement **)element view:(out UIView **)view withElementMatchingPredicate:(NSPredicate *)predicate tappable:(BOOL)mustBeTappable error:(out NSError **)error; +- (BOOL)tryFindingAccessibilityElement:(out UIAccessibilityElement **)element view:(out UIView **)view withElementMatchingPredicate:(NSPredicate *)predicate tappable:(BOOL)mustBeTappable error:(out NSError **)error disableScroll:(BOOL) scrollDisabled; + @end diff --git a/Sources/KIF/Classes/KIFUITestActor-ConditionalTests.m b/Sources/KIF/Classes/KIFUITestActor-ConditionalTests.m index 9ad980ec7..a42438f8f 100644 --- a/Sources/KIF/Classes/KIFUITestActor-ConditionalTests.m +++ b/Sources/KIF/Classes/KIFUITestActor-ConditionalTests.m @@ -66,9 +66,14 @@ - (BOOL)tryFindingAccessibilityElement:(out UIAccessibilityElement **)element vi } - (BOOL)tryFindingAccessibilityElement:(out UIAccessibilityElement * __autoreleasing *)element view:(out UIView * __autoreleasing *)view withElementMatchingPredicate:(NSPredicate *)predicate tappable:(BOOL)mustBeTappable error:(out NSError **)error +{ + return [self tryFindingAccessibilityElement:element view:view withElementMatchingPredicate:predicate tappable:mustBeTappable error:error disableScroll:NO]; +} + +- (BOOL)tryFindingAccessibilityElement:(out UIAccessibilityElement * __autoreleasing *)element view:(out UIView * __autoreleasing *)view withElementMatchingPredicate:(NSPredicate *)predicate tappable:(BOOL)mustBeTappable error:(out NSError **)error disableScroll:(BOOL)scrollDisabled { return [self tryRunningBlock:^KIFTestStepResult(NSError *__autoreleasing *error) { - return [UIAccessibilityElement accessibilityElement:element view:view withElementMatchingPredicate:predicate tappable:mustBeTappable error:error] ? KIFTestStepResultSuccess : KIFTestStepResultWait; + return [UIAccessibilityElement accessibilityElement:element view:view withElementMatchingPredicate:predicate tappable:mustBeTappable error:error disableScroll:scrollDisabled] ? KIFTestStepResultSuccess : KIFTestStepResultWait; } complete:nil timeout:1.0 error:error]; } diff --git a/Sources/KIF/Classes/KIFUITestActor.h b/Sources/KIF/Classes/KIFUITestActor.h index db346ed02..fec93874d 100644 --- a/Sources/KIF/Classes/KIFUITestActor.h +++ b/Sources/KIF/Classes/KIFUITestActor.h @@ -239,6 +239,19 @@ typedef NS_ENUM(NSUInteger, KIFPullToRefreshTiming) { */ - (void)waitForAccessibilityElement:(UIAccessibilityElement **)element view:(out UIView **)view withElementMatchingPredicate:(NSPredicate *)predicate tappable:(BOOL)mustBeTappable; +/*! + @abstract Waits for an accessibility element and its containing view based on a predicate. + @discussion This method provides a more verbose API for achieving what is available in the waitForView/waitForTappableView family of methods, exposing both the found element and its containing view. The results can be used in other methods such as @c tapAccessibilityElement:inView: + + This method provides more flexability than @c waitForAccessibilityElement:view:withLabel:value:traits:tappable: but less precise error messages. This message will tell you why the method failed but not whether or not the element met some of the criteria. + @param element To be populated with the matching accessibility element when found. Can be NULL. + @param view To be populated with the matching view when found. Can be NULL. + @param predicate The predicate to match. + @param mustBeTappable If YES, only an element that can be tapped on will be returned. + @param scrollDisabled If YES, disable scroll performing the search only in the current visible frame. + */ +- (void)waitForAccessibilityElement:(UIAccessibilityElement **)element view:(out UIView **)view withElementMatchingPredicate:(NSPredicate *)predicate tappable:(BOOL)mustBeTappable disableScroll:(BOOL)scrollDisabled; + /*! @abstract Waits until an accessibility element is no longer present. @discussion The accessibility element matching the given predicate is found in the view hierarchy. If the element is found, then the step will attempt to wait until it isn't. Note that the associated view does not necessarily have to be visible on the screen, and may be behind another view or offscreen. Views with their hidden property set to YES are considered absent. @@ -322,6 +335,12 @@ typedef NS_ENUM(NSUInteger, KIFPullToRefreshTiming) { */ - (void)tapScreenAtPoint:(CGPoint)screenPoint; +/*! + @abstract Performs a swipe gesture starting from the specified edge of the screen. + @param edge The edge from which the swipe gesture should start. + */ +- (void)swipeFromEdge:(UIRectEdge)edge; + /*! @abstract Performs a long press on a particular view in the view hierarchy. @discussion The view or accessibility element with the given label is searched for in the view hierarchy. If the element isn't found or isn't currently tappable, then the step will attempt to wait until it is. Once the view is present and tappable, touch events are simulated in the center of the view or element. @@ -382,6 +401,14 @@ typedef NS_ENUM(NSUInteger, KIFPullToRefreshTiming) { - (void)enterTextIntoCurrentFirstResponder:(NSString *)text; - (void)enterTextIntoCurrentFirstResponder:(NSString *)text fallbackView:(UIView *)fallbackView; +/*! + @abstract Enters text into a the current first responder. + @discussion Text is entered into the view by simulating taps on the appropriate keyboard keys if the keyboard is already displayed. Useful to enter text in WKWebViews or components with no accessibility labels. + @param text The text to enter. + @param characterTypingDelay the amount to delay between typing each character. + */ +- (void)enterTextIntoCurrentFirstResponder:(NSString *)text fallbackView:(UIView *)fallbackView characterTypingDelay:(CFTimeInterval)characterTypingDelay; + /*! @abstract Enters text into a particular view in the view hierarchy. @discussion If the element isn't currently tappable, then the step will attempt to wait until it is. Once the view is present and tappable, a tap event is simulated in the center of the view or element, then text is entered into the view by simulating taps on the appropriate keyboard keys. @@ -392,6 +419,17 @@ typedef NS_ENUM(NSUInteger, KIFPullToRefreshTiming) { */ - (void)enterText:(NSString *)text intoElement:(UIAccessibilityElement *)element inView:(UIView *)view expectedResult:(NSString *)expectedResult; +/*! + @abstract Enters text into a particular view in the view hierarchy. + @discussion If the element isn't currently tappable, then the step will attempt to wait until it is. Once the view is present and tappable, a tap event is simulated in the center of the view or element, then text is entered into the view by simulating taps on the appropriate keyboard keys. + @param text The text to enter. + @param expectedResult What the text value should be after entry, including any formatting done by the field. If this is nil, the "text" parameter will be used. + @param element the element to type into. + @param view the view to type into. + @param characterTypingDelay the amount to delay between typing each character. + */ +- (void)enterText:(NSString *)text intoElement:(UIAccessibilityElement *)element inView:(UIView *)view expectedResult:(NSString *)expectedResult characterTypingDelay:(CFTimeInterval)characterTypingDelay; + /*! @abstract Enters text into a particular view in the view hierarchy. @discussion The view or accessibility element with the given label is searched for in the view hierarchy. If the element isn't found or isn't currently tappable, then the step will attempt to wait until it is. Once the view is present and tappable, a tap event is simulated in the center of the view or element, then text is entered into the view by simulating taps on the appropriate keyboard keys. diff --git a/Sources/KIF/Classes/KIFUITestActor.m b/Sources/KIF/Classes/KIFUITestActor.m index 456af62cb..f86eecb28 100644 --- a/Sources/KIF/Classes/KIFUITestActor.m +++ b/Sources/KIF/Classes/KIFUITestActor.m @@ -143,9 +143,14 @@ - (void)waitForAccessibilityElement:(UIAccessibilityElement *__autoreleasing *)e } - (void)waitForAccessibilityElement:(UIAccessibilityElement * __autoreleasing *)element view:(out UIView * __autoreleasing *)view withElementMatchingPredicate:(NSPredicate *)predicate tappable:(BOOL)mustBeTappable +{ + [self waitForAccessibilityElement:element view:view withElementMatchingPredicate:predicate tappable:mustBeTappable disableScroll:NO]; +} + +- (void)waitForAccessibilityElement:(UIAccessibilityElement * __autoreleasing *)element view:(out UIView * __autoreleasing *)view withElementMatchingPredicate:(NSPredicate *)predicate tappable:(BOOL)mustBeTappable disableScroll:(BOOL) scrollDisabled { [self runBlock:^KIFTestStepResult(NSError **error) { - return [UIAccessibilityElement accessibilityElement:element view:view withElementMatchingPredicate:predicate tappable:mustBeTappable error:error] ? KIFTestStepResultSuccess : KIFTestStepResultWait; + return [UIAccessibilityElement accessibilityElement:element view:view withElementMatchingPredicate:predicate tappable:mustBeTappable error:error disableScroll:scrollDisabled] ? KIFTestStepResultSuccess : KIFTestStepResultWait; }]; } @@ -162,9 +167,6 @@ - (void)waitForAbsenceOfViewWithAccessibilityLabel:(NSString *)label traits:(UIA - (void)waitForAbsenceOfViewWithAccessibilityLabel:(NSString *)label value:(NSString *)value traits:(UIAccessibilityTraits)traits { [self runBlock:^KIFTestStepResult(NSError **error) { - // If the app is ignoring interaction events, then wait before doing our analysis - KIFTestWaitCondition(![[UIApplication sharedApplication] isIgnoringInteractionEvents], error, @"Application is ignoring interaction events."); - // If the element can't be found, then we're done UIAccessibilityElement *element = [[UIApplication sharedApplication] accessibilityElementWithLabel:label accessibilityValue:value traits:traits]; if (!element) { @@ -177,7 +179,7 @@ - (void)waitForAbsenceOfViewWithAccessibilityLabel:(NSString *)label value:(NSSt KIFTestWaitCondition(view, error, @"Cannot find view containing accessibility element with the label \"%@\"", label); // Hidden views count as absent - KIFTestWaitCondition([view isHidden] || [view superview] == nil, error, @"Accessibility element %@ with label \"%@\" is visible and not hidden.", view, label); + KIFTestWaitCondition([view isHidden] || [view superview] == nil || ![view isPossiblyVisibleInWindow], error, @"Accessibility element %@ with label \"%@\" is visible and not hidden.", view, label); return KIFTestStepResultSuccess; }]; @@ -185,9 +187,6 @@ - (void)waitForAbsenceOfViewWithAccessibilityLabel:(NSString *)label value:(NSSt - (void)waitForAbsenceOfViewWithElementMatchingPredicate:(NSPredicate *)predicate { [self runBlock:^KIFTestStepResult(NSError **error) { - // If the app is ignoring interaction events, then wait before doing our analysis - KIFTestWaitCondition(![[UIApplication sharedApplication] isIgnoringInteractionEvents], error, @"Application is ignoring interaction events."); - // If the element can't be found, then we're done UIAccessibilityElement *element = nil; if (![UIAccessibilityElement accessibilityElement:&element view:NULL withElementMatchingPredicate:predicate tappable:NO error:NULL]) { @@ -200,7 +199,7 @@ - (void)waitForAbsenceOfViewWithElementMatchingPredicate:(NSPredicate *)predicat KIFTestWaitCondition(view, error, @"Cannot find view containing accessibility element with the predicate \"%@\"", predicate); // Hidden views count as absent - KIFTestWaitCondition([view isHidden] || [view superview] == nil, error, @"Accessibility element with predicate \"%@\" is visible and not hidden.", predicate); + KIFTestWaitCondition([view isHidden] || [view superview] == nil || ![view isPossiblyVisibleInWindow], error, @"Accessibility element with predicate \"%@\" is visible and not hidden.", predicate); return KIFTestStepResultSuccess; }]; @@ -338,9 +337,8 @@ - (void)tapAccessibilityElement:(UIAccessibilityElement *)element inView:(UIView // This is mostly redundant of the test in _accessibilityElementWithLabel: KIFTestWaitCondition(!isnan(tappablePointInElement.x), error, @"View is not tappable: %@", view); - NSOperatingSystemVersion iOS9 = {9, 0, 0}; - BOOL isOperatingSystemAtLeastVersion9 = [NSProcessInfo instancesRespondToSelector:@selector(isOperatingSystemAtLeastVersion:)] && [[NSProcessInfo new] isOperatingSystemAtLeastVersion:iOS9]; - if (isOperatingSystemAtLeastVersion9 && [NSStringFromClass([view class]) isEqualToString:@"_UIAlertControllerActionView"]) { + + if ([NSStringFromClass([view class]) isEqualToString:@"_UIAlertControllerActionView"]) { [view longPressAtPoint:tappablePointInElement duration:0.1]; } else { [view tapAtPoint:tappablePointInElement]; @@ -366,18 +364,7 @@ - (void)tapAccessibilityElement:(UIAccessibilityElement *)element inView:(UIView - (void)tapScreenAtPoint:(CGPoint)screenPoint { [self runBlock:^KIFTestStepResult(NSError **error) { - - // Try all the windows until we get one back that actually has something in it at the given point - UIView *view = nil; - for (UIWindow *window in [[[UIApplication sharedApplication] windowsWithKeyWindow] reverseObjectEnumerator]) { - CGPoint windowPoint = [window convertPoint:screenPoint fromView:nil]; - view = [window hitTest:windowPoint withEvent:nil]; - - // If we hit the window itself, then skip it. - if (view != window && view != nil) { - break; - } - } + UIView *view = [self viewAtPoint:screenPoint]; KIFTestWaitCondition(view, error, @"No view was found at the point %@", NSStringFromCGPoint(screenPoint)); @@ -389,6 +376,45 @@ - (void)tapScreenAtPoint:(CGPoint)screenPoint }]; } +- (void)swipeFromEdge:(UIRectEdge)edge +{ + CGSize screenSize = UIScreen.mainScreen.bounds.size; + CGPoint screenPoint; + if (edge == UIRectEdgeLeft) { + screenPoint = CGPointMake(0.3, screenSize.height / 2); + } else if (edge == UIRectEdgeRight) { + screenPoint = CGPointMake(screenSize.width - 0.3, screenSize.height / 2); + } else { + return; + } + [self runBlock:^KIFTestStepResult(NSError **error) { + UIView *view = [self viewAtPoint:screenPoint]; + + KIFTestWaitCondition(view, error, @"No view was found at the point %@", NSStringFromCGPoint(screenPoint)); + + UIRectEdge endEdge = (UIRectEdgeLeft | UIRectEdgeRight) - edge; + [view dragFromEdge:edge toEdge:endEdge]; + + return KIFTestStepResultSuccess; + }]; +} + +- (UIView *)viewAtPoint:(CGPoint)screenPoint +{ + // Try all the windows until we get one back that actually has something in it at the given point + UIView *view = nil; + for (UIWindow *window in [[[UIApplication sharedApplication] windowsWithKeyWindow] reverseObjectEnumerator]) { + CGPoint windowPoint = [window convertPoint:screenPoint fromView:nil]; + view = [window hitTest:windowPoint withEvent:nil]; + + // If we hit the window itself, then skip it. + if (view != window && view != nil) { + break; + } + } + return view; +} + - (void)longPressViewWithAccessibilityLabel:(NSString *)label duration:(NSTimeInterval)duration; { [self longPressViewWithAccessibilityLabel:label value:nil traits:UIAccessibilityTraitNone duration:duration]; @@ -434,7 +460,7 @@ - (void)longPressAccessibilityElement:(UIAccessibilityElement *)element inView:( }]; // Wait for view to settle. - [self waitForTimeInterval:0.5 relativeToAnimationSpeed:YES]; + [self waitForAnimationsToFinish]; } - (void)waitForKeyboard @@ -481,7 +507,11 @@ - (void)enterTextIntoCurrentFirstResponder:(NSString *)text [self enterTextIntoCurrentFirstResponder:text fallbackView:nil]; } -- (void)enterTextIntoCurrentFirstResponder:(NSString *)text fallbackView:(UIView *)fallbackView +- (void)enterTextIntoCurrentFirstResponder:(NSString *)text fallbackView:(UIView *)fallbackView { + [self enterTextIntoCurrentFirstResponder:text fallbackView:fallbackView characterTypingDelay:0.0]; +} + +- (void)enterTextIntoCurrentFirstResponder:(NSString *)text fallbackView:(UIView *)fallbackView characterTypingDelay:(CFTimeInterval)characterTypingDelay { [text enumerateSubstringsInRange:NSMakeRange(0, text.length) options:NSStringEnumerationByComposedCharacterSequences @@ -519,6 +549,9 @@ - (void)enterTextIntoCurrentFirstResponder:(NSString *)text fallbackView:(UIView [self failWithError:[NSError KIFErrorWithFormat:@"Failed to find key for character \"%@\"", characterString] stopTest:YES]; } + if (characterTypingDelay > 0) { + CFRunLoopRunInMode(UIApplicationCurrentRunMode, characterTypingDelay, false); + } }]; NSTimeInterval remainingWaitTime = 0.01 - [KIFTypist keystrokeDelay]; @@ -543,6 +576,11 @@ - (void)enterText:(NSString *)text intoViewWithAccessibilityLabel:(NSString *)la } - (void)enterText:(NSString *)text intoElement:(UIAccessibilityElement *)element inView:(UIView *)view expectedResult:(NSString *)expectedResult; +{ + [self enterText:text intoElement:element inView:view expectedResult:expectedResult characterTypingDelay:0.0]; +} + +- (void)enterText:(NSString *)text intoElement:(UIAccessibilityElement *)element inView:(UIView *)view expectedResult:(NSString *)expectedResult characterTypingDelay:(CFTimeInterval)characterTypingDelay; { // In iOS7, tapping a field that is already first responder moves the cursor to the front of the field if (view.window.firstResponder != view) { @@ -550,7 +588,7 @@ - (void)enterText:(NSString *)text intoElement:(UIAccessibilityElement *)element [self waitForTimeInterval:0.25 relativeToAnimationSpeed:YES]; } - [self enterTextIntoCurrentFirstResponder:text fallbackView:view]; + [self enterTextIntoCurrentFirstResponder:text fallbackView:view characterTypingDelay:characterTypingDelay]; if (self.validateEnteredText) { [self expectView:view toContainText:expectedResult ?: text]; } @@ -835,11 +873,16 @@ - (void)selectPickerViewRowWithTitle:(NSString *)title inComponent:(NSInteger)co // Find all pickers in view. Either UIDatePickerView or UIPickerView NSArray *datePickerViews = [[[UIApplication sharedApplication] datePickerWindow] subviewsWithClassNameOrSuperClassNamePrefix:@"UIPickerView"]; NSArray *pickerViews = [[[UIApplication sharedApplication] pickerViewWindow] subviewsWithClassNameOrSuperClassNamePrefix:@"UIPickerView"]; + + NSArray *iOS16DatePickerViews = [[[UIApplication sharedApplication] datePickerWindow] subviewsWithClassNameOrSuperClassNamePrefix:@"UIDatePicker"]; // Grab one picker and assume it is datePicker and then test our hypothesis later! pickerView = [datePickerViews lastObject]; if ([pickerView respondsToSelector:@selector(setDate:animated:)] || [pickerView isKindOfClass:NSClassFromString(@"_UIDatePickerView")]) { pickerType = KIFUIDatePicker; + }else if([[iOS16DatePickerViews lastObject] respondsToSelector:@selector(setDate:animated:)]) { + pickerView = [[iOS16DatePickerViews lastObject] valueForKey:@"_pickerView"]; + pickerType = KIFUIDatePicker; } else { pickerView = [pickerViews lastObject]; pickerType = KIFUIPickerView; @@ -1295,9 +1338,10 @@ - (void)pullToRefreshAccessibilityElement:(UIAccessibilityElement *)element inVi const NSUInteger kNumberOfPointsInSwipePath = pullDownDuration ? pullDownDuration : KIFPullToRefreshInAboutAHalfSecond; // Can handle only the touchable space. - CGRect elementFrame = [viewToSwipe convertRect:viewToSwipe.bounds toView:[UIApplication sharedApplication].keyWindow.rootViewController.view]; + CGRect elementFrame = [viewToSwipe convertRect:viewToSwipe.bounds toView:[[UIApplication sharedApplication] windowSceneKeyWindow].rootViewController.view]; CGPoint swipeStart = CGPointCenteredInRect(elementFrame); - CGPoint swipeDisplacement = CGPointMake(CGRectGetMidX(elementFrame), CGRectGetMaxY(elementFrame)); + swipeStart.y = swipeStart.y - CGRectGetMaxY(elementFrame) / 4.0; + CGPoint swipeDisplacement = CGPointMake(0, CGRectGetMaxY(elementFrame) / 2.0); [viewToSwipe dragFromPoint:swipeStart displacement:swipeDisplacement steps:kNumberOfPointsInSwipePath]; } @@ -1533,11 +1577,6 @@ - (UICollectionViewCell *)waitForCellAtIndexPath:(NSIndexPath *)indexPath inColl - (void)tapStatusBar { - [self runBlock:^KIFTestStepResult(NSError **error) { - KIFTestWaitCondition(![UIApplication sharedApplication].statusBarHidden, error, @"Expected status bar to be visible."); - return KIFTestStepResultSuccess; - }]; - UIWindow *statusBarWindow = [[UIApplication sharedApplication] statusBarWindow]; NSArray *statusBars = [statusBarWindow subviewsWithClassNameOrSuperClassNamePrefix:@"UIStatusBar"]; @@ -1634,6 +1673,14 @@ - (CGRect) elementFrameForElement:(UIAccessibilityElement *)element andView:(UIV - (CGPoint) tappablePointInElement:(UIAccessibilityElement *)element andView:(UIView *)view { + // AccessibilityActivationPoint indicates where on the element assistive technologies should issue a tap event to activate the element. + // In the case where the property has not been explicitly set. The default value is the midpoint of the accessibility frame. + UIView *hitView = [view.window hitTest:element.accessibilityActivationPoint withEvent:nil]; + if ([view isTappableWithHitTestResultView:hitView]) { + return [view.window convertPoint:element.accessibilityActivationPoint toView:view]; + } + + // If the element's AccessibilityActivationPoint is not tappable, attempt to find a suitable tappable point within the element's frame. CGRect elementFrame = [self elementFrameForElement:element andView:view]; CGPoint tappablePoint = [view tappablePointInRect:elementFrame]; diff --git a/Sources/KIF/Classes/KIFUIViewTestActor.h b/Sources/KIF/Classes/KIFUIViewTestActor.h index 1df5d02f1..31f7fb211 100644 --- a/Sources/KIF/Classes/KIFUIViewTestActor.h +++ b/Sources/KIF/Classes/KIFUIViewTestActor.h @@ -39,6 +39,14 @@ extern NSString *const inputFieldTestString; */ - (instancetype)validateEnteredText:(BOOL)validateEnteredText; +/*! + @abstract Controls if we want to disable the automatic scroll while looking for an element. + @discussion This method limits the search in the current frame for each operation that searches for an element. + + @return The message reciever, these methods are intended to be chained together. + */ +- (instancetype)usingCurrentFrame; + #pragma mark - Searching for Accessibility Elements /*! @@ -118,12 +126,20 @@ extern NSString *const inputFieldTestString; /*! @abstract Adds a given predicate to the tester's search predicate. - @description The given predicate will be evaluated when searching for a matching view. You likely wont need this method very often, and should rely on the accessibility properties when possibile. + @discussion The given predicate will be evaluated when searching for a matching view. You likely wont need this method very often, and should rely on the accessibility properties when possibile. @param predicate The predicate to add to the tester's search predicate. @return The message reciever, these methods are intended to be chained together. */ - (instancetype)usingPredicate:(NSPredicate *)predicate; +/*! + @abstract Adds a check for an accessibility custom action with a provided name to the tester's search predicate. + @discussion The tester will evaluate accessibility elements looking for a matching accessibility custom action. + @param name The name of the custom action providd by element to match. + @return The message reciever, these methods are intended to be chained together. + */ +- (instancetype)usingCustomActionWithName:(NSString *)name; + #pragma mark - Acting on Accessibility Elements /*! @@ -165,6 +181,31 @@ extern NSString *const inputFieldTestString; */ - (void)swipeInDirection:(KIFSwipeDirection)direction; +/*! + @abstract Performs a swipe gesture starting from the specified edge of the screen. + @param edge The edge from which the swipe gesture should start. + */ +- (void)swipeFromEdge:(UIRectEdge)edge; + +/*! + @abstract Activates a custom accessibility action available on the element.. + @param name The name of the custom action to activate. + */ +- (void)activateCustomActionWithName:(NSString *)name; + +/*! + @abstract Activates a custom accessibility action available on the element.. + @param name The name of the custom action to activate. + @param expectedResult The expected boolean return from activation of the custom action. + */ +- (void)activateCustomActionWithName:(NSString *)name expectedResult:(BOOL)expectedResult; + +/*! + @abstract Activates a found element via `accessibilityActivate()`. + @param expectedResult The expected boolean return from activation of the element. + */ +- (void)performAccessibilityActivateWithExpectedResult:(BOOL)expectedResult; + #pragma mark Waiting & Finding /*! @@ -314,6 +355,15 @@ extern NSString *const inputFieldTestString; */ - (void)enterText:(NSString *)text expectedResult:(NSString *)expectedResult; +/*! + @abstract Enters text into a particular view matching the tester's search predicate, then asserts that the view contains the expected text. + @discussion If the element isn't currently tappable, then the step will attempt to wait until it is. Once the view is present and tappable, a tap event is simulated in the center of the view or element, then text is entered into the view by simulating taps on the appropriate keyboard keys. + @param text The text to enter. + @param expectedResult What the text value should be after entry completes, including any formatting done by the field. If this is nil, the "text" parameter will be used. + @param characterTypingDelay the amount to delay between typing each character. + */ +- (void)enterText:(NSString *)text expectedResult:(NSString *)expectedResult characterTypingDelay:(CFTimeInterval)characterTypingDelay; + /*! @abstract Enters text into a the current first responder. @discussion Text is entered into the view by simulating taps on the appropriate keyboard keys if the keyboard is already displayed. Useful to enter text in WKWebViews or components with no accessibility labels. @@ -347,6 +397,14 @@ extern NSString *const inputFieldTestString; @param text The text to enter after clearing the view. */ - (void)clearAndEnterText:(NSString *)text; + +/*! + @abstract Clears text from a particular view matching the tester's search predicate, then sets new text. + @discussion If the element isn't currently tappable, then the step will attempt to wait until it is. Once the view is present and tappable, a tap event is simulated in the center of the view or element, then text is cleared from the view by simulating taps on the backspace key, the new text is then entered by simulating taps on the appropriate keyboard keys. + @param text The text to enter after clearing the view. + @param characterTypingDelay the amount to delay between typing each character. + */ +- (void)clearAndEnterText:(NSString *)text characterTypingDelay:(CFTimeInterval)characterTypingDelay; /*! @abstract Clears text from a particular view matching the tester's search predicate, sets new text, then asserts that the view contains the expected text. @discussion If the element isn't currently tappable, then the step will attempt to wait until it is. Once the view is present and tappable, a tap event is simulated in the center of the view or element, then text is cleared from the view by simulating taps on the backspace key, the new text is then entered by simulating taps on the appropriate keyboard keys, finally the text of the view is compared against the expected result. @@ -356,6 +414,15 @@ extern NSString *const inputFieldTestString; */ - (void)clearAndEnterText:(NSString *)text expectedResult:(NSString *)expectedResult; +/*! + @abstract Clears text from a particular view matching the tester's search predicate, sets new text, then asserts that the view contains the expected text. + @discussion If the element isn't currently tappable, then the step will attempt to wait until it is. Once the view is present and tappable, a tap event is simulated in the center of the view or element, then text is cleared from the view by simulating taps on the backspace key, the new text is then entered by simulating taps on the appropriate keyboard keys, finally the text of the view is compared against the expected result. + @param text The text to enter after clearing the view. + @param expectedResult What the text value should be after entry completes, including any formatting done by the field. If this is nil, the "text" parameter will be used. + @param characterTypingDelay the amount to delay between typing each character. + */ +- (void)clearAndEnterText:(NSString *)text expectedResult:(NSString *)expectedResult characterTypingDelay:(CFTimeInterval)characterTypingDelay; + /*! @abstract Sets text into a particular view matching the tester's search predicate. @discussion The text is set on the view directly with 'setText:'. Does not result in first responder changes. Does not perform expected result validation. diff --git a/Sources/KIF/Classes/KIFUIViewTestActor.m b/Sources/KIF/Classes/KIFUIViewTestActor.m index 012e86916..7ad893132 100644 --- a/Sources/KIF/Classes/KIFUIViewTestActor.m +++ b/Sources/KIF/Classes/KIFUIViewTestActor.m @@ -15,6 +15,7 @@ #import "NSPredicate+KIFAdditions.h" #import "NSString+KIFAdditions.h" #import "UIAccessibilityElement-KIFAdditions.h" +#import "UIAccessibilityCustomAction+KIFAdditions.h" #import "UIApplication-KIFAdditions.h" #import "UIWindow-KIFAdditions.h" #import "UIDatePicker+KIFAdditions.h" @@ -24,6 +25,7 @@ @interface KIFUIViewTestActor () @property (nonatomic, strong, readonly) KIFUITestActor *actor; @property (nonatomic, strong, readwrite) NSPredicate *predicate; @property (nonatomic, assign) BOOL validateEnteredText; +@property (nonatomic, assign) BOOL disablingAutomaticScroll; @end @@ -39,6 +41,7 @@ - (instancetype)initWithFile:(NSString *)file line:(NSInteger)line delegate:(id< self = [super initWithFile:file line:line delegate:delegate]; NSParameterAssert(self); _validateEnteredText = YES; + _disablingAutomaticScroll = NO; return self; } @@ -50,6 +53,12 @@ - (instancetype)validateEnteredText:(BOOL)validateEnteredText; return self; } +- (instancetype)usingCurrentFrame; +{ + self.disablingAutomaticScroll = YES; + return self; +} + #pragma mark - Searching for Accessibility Elements - (instancetype)usingPredicate:(NSPredicate *)predicate; @@ -155,6 +164,15 @@ - (instancetype)usingFirstResponder; return [self usingPredicate:predicate]; } +- (instancetype)usingCustomActionWithName:(NSString *)name +{ + NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) { + return ([evaluatedObject KIF_customActionWithName:name] != nil); + }]; + predicate.kifPredicateDescription = [NSString stringWithFormat:@"Custom Action with name equal to \"%@\"", name]; + return [self usingPredicate:predicate]; +} + #pragma mark - System Actions #if TARGET_IPHONE_SIMULATOR @@ -184,9 +202,6 @@ - (UIView *)waitForView; - (void)waitForAbsenceOfView; { [self runBlock:^KIFTestStepResult(NSError **error) { - // If the app is ignoring interaction events, then wait before doing our analysis - KIFTestWaitCondition(![[UIApplication sharedApplication] isIgnoringInteractionEvents], error, @"Application is ignoring interaction events."); - // If the element can't be found, then we're done KIFUIObject *found = [self _predicateSearchWithRequiresMatch:NO mustBeTappable:NO]; if (!found) { @@ -197,8 +212,8 @@ - (void)waitForAbsenceOfView; KIFTestWaitCondition(found.view, error, @"Cannot find view containing accessibility element \"%@\"", found.element); // Hidden views count as absent - KIFTestWaitCondition([found.view isHidden] || [found.view superview] == nil, error, @"Accessibility element \"%@\" is visible and not hidden.", found); - + KIFTestWaitCondition([found.view isHidden] || [found.view superview] == nil || ![found.view isPossiblyVisibleInWindow], error, @"Accessibility element \"%@\" is visible and not hidden.", found); + return KIFTestStepResultSuccess; }]; } @@ -308,6 +323,11 @@ - (void)enterText:(NSString *)text; } - (void)enterText:(NSString *)text expectedResult:(NSString *)expectedResult; +{ + [self enterText:text expectedResult:expectedResult characterTypingDelay:0.0]; +} + +- (void)enterText:(NSString *)text expectedResult:(NSString *)expectedResult characterTypingDelay:(CFTimeInterval)characterTypingDelay; { if (!self.validateEnteredText && expectedResult) { [self failWithMessage:@"Can't supply an expectedResult string if `validateEnteredText` is NO."]; @@ -315,19 +335,29 @@ - (void)enterText:(NSString *)text expectedResult:(NSString *)expectedResult; @autoreleasepool { KIFUIObject *found = [self _predicateSearchWithRequiresMatch:YES mustBeTappable:NO]; - [self.actor enterText:text intoElement:found.element inView:found.view expectedResult:expectedResult]; + [self.actor enterText:text intoElement:found.element inView:found.view expectedResult:expectedResult characterTypingDelay:characterTypingDelay]; } } - (void)clearAndEnterText:(NSString *)text; { - [self clearAndEnterText:text expectedResult:nil]; + [self clearAndEnterText:text expectedResult:nil characterTypingDelay:0.0]; +} + +- (void)clearAndEnterText:(NSString *)text characterTypingDelay:(CFTimeInterval)characterTypingDelay; +{ + [self clearAndEnterText:text expectedResult:nil characterTypingDelay:characterTypingDelay]; } - (void)clearAndEnterText:(NSString *)text expectedResult:(NSString *)expectedResult; +{ + [self clearAndEnterText:text expectedResult:expectedResult characterTypingDelay:0.0]; +} + +- (void)clearAndEnterText:(NSString *)text expectedResult:(NSString *)expectedResult characterTypingDelay:(CFTimeInterval)characterTypingDelay; { [self clearText]; - [self enterText:text expectedResult:expectedResult]; + [self enterText:text expectedResult:expectedResult characterTypingDelay:characterTypingDelay]; } - (void)enterTextIntoCurrentFirstResponder:(NSString *)text; @@ -380,6 +410,49 @@ - (void)swipeInDirection:(KIFSwipeDirection)direction; } } +- (void)swipeFromEdge:(UIRectEdge)edge +{ + [self.actor swipeFromEdge:edge]; +} + +#pragma mark - Accesibility Actions + +- (void)activateCustomActionWithName:(NSString *)name;{ + [self activateCustomActionWithName:name expectedResult:YES]; +} + +- (void)activateCustomActionWithName:(NSString *)name expectedResult:(BOOL)expectedResult; +{ + @autoreleasepool { + KIFUIObject *found = [self _predicateSearchWithRequiresMatch:YES mustBeTappable:NO]; + + [self runBlock:^KIFTestStepResult(NSError **error) { + if([[found.element KIF_customActionWithName:name] KIF_activate] == expectedResult) { + [self waitForAnimationsToFinish]; + return KIFTestStepResultSuccess; + } + [self waitForAnimationsToFinish]; + return KIFTestStepResultFailure; + }]; + } +} + +- (void)performAccessibilityActivateWithExpectedResult:(BOOL)expectedResult; +{ + @autoreleasepool { + KIFUIObject *found = [self _predicateSearchWithRequiresMatch:YES mustBeTappable:NO]; + + [self runBlock:^KIFTestStepResult(NSError **error) { + if([found.element accessibilityActivate] == expectedResult) { + [self waitForAnimationsToFinish]; + return KIFTestStepResultSuccess; + } + [self waitForAnimationsToFinish]; + return KIFTestStepResultFailure; + }]; + } +} + #pragma mark - Scroll/Table/CollectionView Actions - (void)scrollByFractionOfSizeHorizontal:(CGFloat)horizontalFraction vertical:(CGFloat)verticalFraction; @@ -602,11 +675,11 @@ - (KIFUIObject *)_predicateSearchWithRequiresMatch:(BOOL)requiresMatch mustBeTap __block UIAccessibilityElement *foundElement = nil; if (requiresMatch) { - [self.actor waitForAccessibilityElement:&foundElement view:&foundView withElementMatchingPredicate:self.predicate tappable:tappable]; + [self.actor waitForAccessibilityElement:&foundElement view:&foundView withElementMatchingPredicate:self.predicate tappable:tappable disableScroll:self.disablingAutomaticScroll]; } else { NSError *error; [self tryRunningBlock:^KIFTestStepResult(NSError **error) { - KIFTestWaitCondition([self.actor tryFindingAccessibilityElement:&foundElement view:&foundView withElementMatchingPredicate:self.predicate tappable:tappable error:error], error, @"Waiting on view matching %@", self.predicate.kifPredicateDescription); + KIFTestWaitCondition([self.actor tryFindingAccessibilityElement:&foundElement view:&foundView withElementMatchingPredicate:self.predicate tappable:tappable error:error disableScroll:self.disablingAutomaticScroll], error, @"Waiting on view matching %@", self.predicate.kifPredicateDescription); return KIFTestStepResultSuccess; } complete:nil timeout:1.0 error:&error]; } diff --git a/Sources/KIF/IdentifierTests/KIFUITestActor-IdentifierTests.h b/Sources/KIF/IdentifierTests/KIFUITestActor-IdentifierTests.h index 7da13b44c..f841ca2d4 100644 --- a/Sources/KIF/IdentifierTests/KIFUITestActor-IdentifierTests.h +++ b/Sources/KIF/IdentifierTests/KIFUITestActor-IdentifierTests.h @@ -85,6 +85,13 @@ */ - (BOOL) tryFindingViewWithAccessibilityIdentifier:(NSString *) accessibilityIdentifier; +/*! + @abstract returns YES or NO if the element is visible in the current frame (without scrolling). + @discussion if the element described by the accessibility identifier is visible, the method returns true. + @param accessibilityIdentifier The accessibility identifier of the element to query for + */ +- (BOOL) tryFindingViewInFrameWithAccessibilityIdentifier:(NSString *) accessibilityIdentifier; + /*! @abstract Swipes a particular view in the view hierarchy in the given direction. @discussion This step will get the view with the specified accessibility identifier and swipe the screen in the given direction from the view's center. diff --git a/Sources/KIF/IdentifierTests/KIFUITestActor-IdentifierTests.m b/Sources/KIF/IdentifierTests/KIFUITestActor-IdentifierTests.m index dbf6d7d2c..aa06f5d92 100644 --- a/Sources/KIF/IdentifierTests/KIFUITestActor-IdentifierTests.m +++ b/Sources/KIF/IdentifierTests/KIFUITestActor-IdentifierTests.m @@ -191,6 +191,14 @@ - (void)waitForFirstResponderWithAccessibilityIdentifier:(NSString *)accessibili }]; } +- (BOOL) tryFindingViewInFrameWithAccessibilityIdentifier:(NSString *)accessibilityIdentifier +{ + NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(id _Nullable evaluatedObject, NSDictionary * _Nullable bindings) { + return [[evaluatedObject accessibilityIdentifier] isEqualToString:accessibilityIdentifier]; + }]; + return [UIAccessibilityElement accessibilityElement:nil view:nil withElementMatchingPredicate:predicate tappable:NO error:nil disableScroll:YES]; +} + - (BOOL) tryFindingViewWithAccessibilityIdentifier:(NSString *)accessibilityIdentifier { NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(id _Nullable evaluatedObject, NSDictionary * _Nullable bindings) { diff --git a/Sources/KIF/Visualizer/KIFTouchVisualizerViewCoordinator.m b/Sources/KIF/Visualizer/KIFTouchVisualizerViewCoordinator.m index b8e8d4860..6cdfddf14 100644 --- a/Sources/KIF/Visualizer/KIFTouchVisualizerViewCoordinator.m +++ b/Sources/KIF/Visualizer/KIFTouchVisualizerViewCoordinator.m @@ -1,5 +1,6 @@ #import "KIFTouchVisualizerViewCoordinator.h" #import "KIFTouchVisualizerView.h" +#import "UIApplication-KIFAdditions.h" static const CGFloat KIFTouchAnimationDuration = 0.75; @@ -56,10 +57,10 @@ - (void)touchEnded:(nonnull UITouch *)touch - (UIWindow *)_topWindow { - UIWindow *topWindow = UIApplication.sharedApplication.keyWindow; + NSMutableArray *windows = [[UIApplication.sharedApplication windowsWithKeyWindow] mutableCopy]; + UIWindow *topWindow = windows.firstObject; - for (UIWindow *window in UIApplication.sharedApplication.windows) { - topWindow = window; + for (UIWindow *window in windows) { if (!window.isHidden && window.windowLevel > topWindow.windowLevel) { topWindow = window; } diff --git a/Test Host/Default-568h@2x.png b/Test Host/Default-568h@2x.png deleted file mode 100644 index 0891b7aab..000000000 Binary files a/Test Host/Default-568h@2x.png and /dev/null differ diff --git a/Test Host/TestSuiteViewController.m b/Test Host/TestSuiteViewController.m deleted file mode 100644 index 1d7403851..000000000 --- a/Test Host/TestSuiteViewController.m +++ /dev/null @@ -1,122 +0,0 @@ -// -// TestSuiteViewController.m -// Test Suite -// -// Created by Brian K Nickel on 6/26/13. -// Copyright (c) 2013 Brian Nickel. All rights reserved. -// - -#import - -@interface TestSuiteViewController : UITableViewController -@end - -@implementation TestSuiteViewController - --(void) viewDidLoad -{ - [super viewDidLoad]; - - //set up an accessibility label on the table. - self.tableView.isAccessibilityElement = YES; - self.tableView.accessibilityLabel = @"Table View"; - - // memory warning was causing cells to disappear on static table views, reloading lets them come back - [[NSNotificationCenter defaultCenter] addObserver:self.tableView selector:@selector(reloadData) name:UIApplicationDidReceiveMemoryWarningNotification object:[UIApplication sharedApplication]]; -} - -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - -- (void) setupRefreshControl -{ - self.refreshControl = [[UIRefreshControl alloc] init]; - self.refreshControl.backgroundColor = [UIColor grayColor]; - self.refreshControl.tintColor = [UIColor whiteColor]; - [self.refreshControl addTarget:self - action:@selector(pullToRefreshHandler) - forControlEvents:UIControlEventValueChanged]; - self.refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:NSLocalizedString(@"Refreshing...", @"") attributes:nil]; -} - -- (void)viewDidAppear:(BOOL)animated -{ - [super viewDidAppear:animated]; - - dispatch_async(dispatch_get_main_queue(), ^{ - [self setupRefreshControl]; - }); -} - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - if (indexPath.section != 1) { - return; - } - - switch (indexPath.row) { - case 0: - { - [[[UIAlertView alloc] initWithTitle:@"Alert View" message:@"Message" delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:@"Continue", nil] show]; - break; - } - - case 1: - { - break; - } - - case 2: - { - [[[UIActionSheet alloc] initWithTitle:@"Action Sheet" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Destroy" otherButtonTitles:@"A", @"B", nil] showInView:tableView]; - break; - } - - case 3: - { - Class AVCClass = NSClassFromString(@"UIActivityViewController"); - if (AVCClass) { - UIActivityViewController *controller = [[AVCClass alloc] initWithActivityItems:@[@"Hello World"] applicationActivities:nil]; - - if ([controller respondsToSelector:@selector(popoverPresentationController)] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { - // iOS 8 iPad presents in a popover - controller.popoverPresentationController.sourceView = [tableView cellForRowAtIndexPath:indexPath]; - UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:controller]; - [popover presentPopoverFromRect:controller.popoverPresentationController.sourceView.frame inView:tableView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; - } else { - [self presentViewController:controller animated:YES completion:nil]; - } - } - break; - } - } -} - --(void)pullToRefreshHandler -{ - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(4.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - self.refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:NSLocalizedString(@"Bingo!", @"") attributes:nil]; - [self.refreshControl endRefreshing]; - [self.tableView setContentOffset:CGPointZero animated:YES]; - }); -} - -#pragma mark - UIActionSheetDelegate - -- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex -{ - UIAlertController * alertController = [UIAlertController alertControllerWithTitle:@"Alert View" - message:@"Message" - preferredStyle:UIAlertControllerStyleAlert]; - [alertController addAction:[UIAlertAction actionWithTitle:@"Continue" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {}]]; - [alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {}]]; - [self presentViewController:alertController animated:YES completion:nil]; -} - -- (IBAction)resetRefreshControl -{ - self.refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:NSLocalizedString(@"Refreshing...", @"") attributes:nil]; -} -@end diff --git a/Test Host/en.lproj/InfoPlist.strings b/Test Host/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff8..000000000 --- a/Test Host/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/TestHost/AccessibilityViewController.m b/TestHost/AccessibilityViewController.m new file mode 100644 index 000000000..6290a3cb0 --- /dev/null +++ b/TestHost/AccessibilityViewController.m @@ -0,0 +1,168 @@ +// +// AccessibilityViewController.m +// Test Host +// +// Created by Alex Odawa on 17/09/2024. +// + +#import + +@interface AccessibilityViewController_AccessibilityView : UIView +@property (nonatomic, assign) BOOL activationReturnValue; +@property (nonatomic, assign) int activationCount; + +@property (nonatomic, strong) UILabel *topLabel; +@property (nonatomic, strong) UILabel *swtichLabel; +@property (nonatomic, strong) UISwitch *activationSwitch; + +@end + + +@implementation AccessibilityViewController_AccessibilityView + +- (instancetype)initWithCoder:(NSCoder *)coder { + self = [super initWithCoder:coder]; + self.isAccessibilityElement = YES; + self.accessibilityLabel = @"AccessibilityView"; + + self.activationReturnValue = YES; + + self.topLabel = [[UILabel alloc] initWithFrame: CGRectZero]; + self.topLabel.text = @"Awaiting activation or tap"; + [self addSubview:self.topLabel]; + + self.swtichLabel = [[UILabel alloc] initWithFrame: CGRectZero]; + self.swtichLabel.text = @"Returns YES"; + [self addSubview:self.swtichLabel]; + + self.activationSwitch = [[UISwitch alloc] initWithFrame: CGRectZero]; + [self addSubview: self.activationSwitch]; + + [self.activationSwitch setOn:self.activationReturnValue]; + [self.activationSwitch addTarget: self action: @selector(toggleReturnValue) forControlEvents: UIControlEventValueChanged]; + self.activationSwitch.accessibilityLabel = @"AccessibilitySwitch"; + + return self; +} + +- (void)toggleReturnValue { + self.activationReturnValue = !self.activationReturnValue; + + if (self.activationReturnValue == YES) { + self.backgroundColor = [UIColor systemTealColor]; + self.swtichLabel.text = @"Returns YES"; + } else { + self.backgroundColor = [UIColor systemTealColor]; + self.swtichLabel.text = @"Returns NO"; + } + [self setNeedsLayout]; +} + +-(void)layoutSubviews { + [super layoutSubviews]; + [self.topLabel sizeToFit]; + self.topLabel.frame = CGRectMake(20, + 20, + self.topLabel.frame.size.width, + self.topLabel.frame.size.height); + + [self.swtichLabel sizeToFit]; + self.swtichLabel.frame = CGRectMake(20, + CGRectGetMaxY(self.topLabel.frame) + 40, + self.swtichLabel.frame.size.width, + self.swtichLabel.frame.size.height); + + [self.activationSwitch sizeToFit]; + self.activationSwitch.frame = CGRectMake(20, + CGRectGetMaxY(self.swtichLabel.frame) + 10 , + self.activationSwitch.frame.size.width, + self.activationSwitch.frame.size.width); + +} + +- (NSString *)accessibilityValue { + return self.topLabel.text; +} + +- (BOOL)accessibilityActivate { + self.activationCount += 1; + self.topLabel.text = [NSString stringWithFormat:@"Activated: %i", self.activationCount]; + [self setNeedsLayout]; + return self.activationReturnValue; +} + + +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { + CGPoint location = [[touches anyObject] locationInView: self]; + self.topLabel.text = [NSString stringWithFormat:@"Tapped - x:%.04f, y:%.04f", location.x, location.y]; + [self setNeedsLayout]; +} + +@end + +@interface AccessibilityViewController : UIViewController +@property (weak, nonatomic) IBOutlet AccessibilityViewController_AccessibilityView *accessibilityView; + +@end + +@implementation AccessibilityViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + self.accessibilityView.accessibilityCustomActions = [self customActions]; +} + + +- (NSArray *)customActions +{ + NSArray *actions = @[self.customActionWithoutArgument, self.customActionWithArgument, self.customActionThatFails]; + if (@available(iOS 13.0, *)) { + return [actions arrayByAddingObject: self.customActionWithBlock]; + } + return actions; +} + +- (UIAccessibilityCustomAction *)customActionWithBlock +{ + if (@available(iOS 13.0, *)) { + return [[UIAccessibilityCustomAction alloc] initWithName: @"Action With block handler" + actionHandler:^BOOL(UIAccessibilityCustomAction * _Nonnull customAction) { + return YES; + }]; + } else { + return nil; + } +} + +- (UIAccessibilityCustomAction *)customActionWithoutArgument +{ + return [[UIAccessibilityCustomAction alloc] initWithName:@"Action without argument" target:self selector:@selector(customActionHandlerWithoutArgument)]; +} + +- (UIAccessibilityCustomAction *)customActionWithArgument +{ + return [[UIAccessibilityCustomAction alloc] initWithName:@"Action with argument" target:self selector:@selector(customActionHandlerWithArgument:)]; +} + +- (UIAccessibilityCustomAction *)customActionThatFails +{ + return [[UIAccessibilityCustomAction alloc] initWithName:@"Action that fails" target:self selector:@selector(customActionThatFails)]; +} + +- (BOOL)customActionHandlerWithoutArgument +{ + return YES; +} + +- (BOOL)customActionHandlerWithArgument:(UIAccessibilityCustomAction *)action +{ + return YES; +} + +- (BOOL)customActionHandlerThatFails +{ + return NO; +} + +@end diff --git a/Test Host/AnimationViewController.m b/TestHost/AnimationViewController.m similarity index 100% rename from Test Host/AnimationViewController.m rename to TestHost/AnimationViewController.m diff --git a/Test Host/AppDelegate.m b/TestHost/AppDelegate.m similarity index 100% rename from Test Host/AppDelegate.m rename to TestHost/AppDelegate.m diff --git a/Test Host/BackgroundViewController.m b/TestHost/BackgroundViewController.m similarity index 100% rename from Test Host/BackgroundViewController.m rename to TestHost/BackgroundViewController.m diff --git a/Test Host/Base.lproj/MainStoryboard.storyboard b/TestHost/Base.lproj/MainStoryboard.storyboard similarity index 81% rename from Test Host/Base.lproj/MainStoryboard.storyboard rename to TestHost/Base.lproj/MainStoryboard.storyboard index 3b2a46cb7..713fbc8a8 100644 --- a/Test Host/Base.lproj/MainStoryboard.storyboard +++ b/TestHost/Base.lproj/MainStoryboard.storyboard @@ -1,9 +1,10 @@ - + - + + @@ -12,7 +13,7 @@ - + @@ -35,24 +36,24 @@ - + - + - + @@ -63,17 +64,17 @@ - + - + @@ -84,17 +85,17 @@ - + - + @@ -105,17 +106,17 @@ - + - + @@ -126,17 +127,17 @@ - + - + @@ -147,17 +148,17 @@ - + - + @@ -168,17 +169,17 @@ - + - + @@ -188,17 +189,17 @@ - + - + @@ -208,17 +209,17 @@ - + - + @@ -228,17 +229,17 @@ - + - + @@ -247,40 +248,62 @@ - - - - - - - - - + + + + + - - + + + + + + + + + + + + + + + + + + + + + - + - + @@ -290,17 +313,17 @@ - + - + - @@ -308,17 +331,17 @@ - + - + @@ -327,6 +350,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -367,14 +430,14 @@ - + @@ -394,7 +457,7 @@ - + @@ -406,7 +469,7 @@ - + @@ -416,14 +479,14 @@ - + - + @@ -438,7 +501,7 @@ - + @@ -459,7 +522,7 @@ - + @@ -469,14 +532,14 @@ - + - + @@ -486,14 +549,14 @@ - + - + @@ -503,14 +566,14 @@ - + - + @@ -520,14 +583,14 @@ - + - + @@ -537,14 +600,14 @@ - + - + @@ -554,14 +617,14 @@ - + - + @@ -571,14 +634,14 @@ - + - + @@ -588,14 +651,14 @@ - + - + @@ -605,14 +668,14 @@ - + - + @@ -622,14 +685,14 @@ - + - + @@ -639,14 +702,14 @@ - + - + @@ -656,449 +719,449 @@ - + - + - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - - + - @@ -1109,13 +1172,13 @@ - + - - - - + - - - + - - + @@ -1547,10 +1696,10 @@ - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1980,14 +2222,14 @@ Line Break - + @@ -2005,4 +2247,21 @@ Line Break + + + + + + + + + + + + + + + + + diff --git a/Test Host/CollectionViewController.m b/TestHost/CollectionViewController.m similarity index 100% rename from Test Host/CollectionViewController.m rename to TestHost/CollectionViewController.m diff --git a/Test Host/CustomPickerController.m b/TestHost/CustomPickerController.m similarity index 98% rename from Test Host/CustomPickerController.m rename to TestHost/CustomPickerController.m index 520759704..ff2b4464d 100644 --- a/Test Host/CustomPickerController.m +++ b/TestHost/CustomPickerController.m @@ -212,4 +212,10 @@ - (void)viewDidLoad textTitleSelectionTextField.accessibilityLabel = @"Text Title Selection"; } +- (void)viewWillDisappear:(BOOL)animated +{ + [self.view endEditing:YES]; + [super viewWillDisappear:animated]; +} + @end diff --git a/Default-568h@2x.png b/TestHost/Default-568h@2x.png similarity index 100% rename from Default-568h@2x.png rename to TestHost/Default-568h@2x.png diff --git a/Test Host/Default.png b/TestHost/Default.png similarity index 100% rename from Test Host/Default.png rename to TestHost/Default.png diff --git a/Test Host/Default@2x.png b/TestHost/Default@2x.png similarity index 100% rename from Test Host/Default@2x.png rename to TestHost/Default@2x.png diff --git a/Test Host/GestureViewController.m b/TestHost/GestureViewController.m similarity index 58% rename from Test Host/GestureViewController.m rename to TestHost/GestureViewController.m index a41f701ab..77fd0eda0 100644 --- a/Test Host/GestureViewController.m +++ b/TestHost/GestureViewController.m @@ -8,7 +8,7 @@ #import -@interface GestureViewController : UIViewController +@interface GestureViewController : UIViewController @property (weak, nonatomic) IBOutlet UILabel *lastSwipeDescriptionLabel; @property (weak, nonatomic) IBOutlet UILabel *lastVelocityVeluesLabel; @property (weak, nonatomic) IBOutlet UILabel *bottomRightLabel; @@ -26,6 +26,20 @@ - (void)viewDidLoad self.scrollView.contentSize = CGRectUnion(self.scrollView.bounds, self.bottomRightLabel.frame).size; } +- (void)viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; + + self.navigationController.interactivePopGestureRecognizer.enabled = NO; +} + +- (void)viewDidDisappear:(BOOL)animated +{ + [super viewDidDisappear:animated]; + + self.navigationController.interactivePopGestureRecognizer.enabled = YES; +} + - (IBAction)swipedUp:(id)sender { self.lastSwipeDescriptionLabel.text = @"Up"; @@ -51,9 +65,24 @@ - (IBAction)hadlePanGestureRecognizer:(UIPanGestureRecognizer *)sender self.lastVelocityVeluesLabel.text = [self formattedVelocityValues:[sender velocityInView:self.panAreaLabel]]; } +- (IBAction)handleScreenEdgePanGestureRecognizer:(UIScreenEdgePanGestureRecognizer *)sender +{ + self.lastSwipeDescriptionLabel.text = sender.edges == UIRectEdgeLeft ? @"LeftEdge" : @"RightEdge"; +} + - (NSString*)formattedVelocityValues:(CGPoint)velocity { return [NSString stringWithFormat:@"X:%.2f Y:%.2f", velocity.x, velocity.y]; } +#pragma mark - UIGestureRecognizerDelegate + +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer +{ + if ([gestureRecognizer isKindOfClass:UIScreenEdgePanGestureRecognizer.class]) { + return YES; + } + return NO; +} + @end diff --git a/TestHost/OffscreenViewController.m b/TestHost/OffscreenViewController.m new file mode 100644 index 000000000..1514c0bc6 --- /dev/null +++ b/TestHost/OffscreenViewController.m @@ -0,0 +1,61 @@ +// +// OffscreenViewController.m +// TestHost +// +// Created by Steve Sun on 2023-03-28. +// + +@interface OffscreenViewController : UIViewController +@property (weak, nonatomic) IBOutlet UIView *alphaView; +@property (weak, nonatomic) IBOutlet UIView *movingView; +@property (weak, nonatomic) IBOutlet UIScrollView *scrollView; +@property (weak, nonatomic) IBOutlet UIView *hiddenView; + +@property (strong, nonatomic) UIView *scrollMovingView; +@end + +@implementation OffscreenViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + self.scrollView.accessibilityLabel = @"Scroll View"; + self.scrollView.contentInset = UIEdgeInsetsMake(2000, 2000, 0, 0); + self.scrollView.contentSize = CGSizeMake(2000, 2000); + self.scrollView.delegate = self; + + self.scrollMovingView = [UIView new]; + self.scrollMovingView.frame = CGRectMake(1000, 500, 100, 100); + self.scrollMovingView.backgroundColor = [UIColor systemPinkColor]; + self.scrollMovingView.accessibilityLabel = @"Scroll moving view"; + + [self.scrollView addSubview:self.scrollMovingView]; +} + +- (IBAction)hideAndMoveViewsTapped:(UIButton *)sender +{ + CGRect screenRect = [[UIScreen mainScreen] bounds]; + + [UIView animateWithDuration:0.5 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ + self.movingView.frame = CGRectMake(screenRect.size.width + 10, + self.movingView.frame.origin.y, + self.movingView.frame.size.width, + self.movingView.frame.size.height); + self.scrollMovingView.frame = CGRectMake(50000, + self.scrollMovingView.frame.origin.y, + self.scrollMovingView.frame.size.width, + self.scrollMovingView.frame.size.height); + self.alphaView.alpha = 0; + [self.hiddenView setHidden:YES]; + } completion:^(BOOL finished) {}]; + +} + +#pragma mark UIScrollViewDelegate Methods + +- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView +{ + return scrollView; +} + +@end diff --git a/Test Host/PickerController.m b/TestHost/PickerController.m similarity index 100% rename from Test Host/PickerController.m rename to TestHost/PickerController.m diff --git a/Test Host/ScrollViewController.m b/TestHost/ScrollViewController.m similarity index 100% rename from Test Host/ScrollViewController.m rename to TestHost/ScrollViewController.m diff --git a/Test Host/ShowHideViewController.m b/TestHost/ShowHideViewController.m similarity index 100% rename from Test Host/ShowHideViewController.m rename to TestHost/ShowHideViewController.m diff --git a/TestHost/SwiftUI/SwiftUITappingView.swift b/TestHost/SwiftUI/SwiftUITappingView.swift new file mode 100644 index 000000000..7c95fb6f9 --- /dev/null +++ b/TestHost/SwiftUI/SwiftUITappingView.swift @@ -0,0 +1,157 @@ +// +// SwiftUITappingView.swift +// TestHost +// +// Created by Bartłomiej Włodarczak on 03/02/2025. +// + +import SwiftUI + +struct SwiftUITappingView: View { + var body: some View { + List { + TextWithTapCount(text: "Text with tap gesture") + TextWithTapCount(text: "Partially offscreen text with tap gesture") + .offset(x: 100) + ButtonWithTapCount() + ToggleWithState() + StepperWithValue() + ImageWithLongPressGesture() + UILabelWithTapCount() + } + } +} + +#Preview { + SwiftUITappingView() +} + +private struct ButtonWithTapCount: View { + @State var count = 0 + + var body: some View { + HStack { + Text("Tap count: \(count)") + Spacer() + Button("Button") { + count += 1 + } + } + } +} + +private struct TextWithTapCount: View { + let text: String + @State var count = 0 + + var body: some View { + HStack { + Text("Tap count: \(count)") + Spacer() + Text(text) + .foregroundColor(.blue) + .onTapGesture { + count += 1 + } + } + } +} + +private struct ToggleWithState: View { + @State var enabled: Bool = true + + var body: some View { + HStack { + Text(enabled ? "Enabled" : "Disabled") + Spacer() + Toggle("", isOn: $enabled) + .withAccessibility(label: "Toggle switch") + } + } +} + +private struct StepperWithValue: View { + @State var value = 50 + + var body: some View { + HStack { + Text("Value: \(value)") + Spacer() + Stepper(value: $value, label: {}) + } + } +} + +private struct ImageWithLongPressGesture: View { + @State var filled = false + + var body: some View { + HStack { + let gestureText = filled ? "Long press" : "Tap" + Text("\(gestureText) to toggle") + + Spacer() + + let imageName = filled ? "heart.fill" : "heart" + Image(systemName: imageName) + .resizable() + .frame(width: 40, height: 40) + .foregroundColor(.red) + .onTapGesture { + if !filled { filled = true } + } + .onLongPressGesture { + if filled { filled = false } + } + + } + } +} + +private struct UILabelWithTapCount: View { + @State var count = 0 + + var body: some View { + HStack { + Text("Tap count: \(count)") + UILabelWrapper(onTapGesture: { self.count += 1 }) + } + } +} + +private struct UILabelWrapper: UIViewRepresentable { + let onTapGesture: () -> Void + + func makeUIView(context: Context) -> UIView { + let label = UILabel() + label.text = "UIViewRepresentable label" + label.textColor = .systemBlue + label.textAlignment = .center + label.isUserInteractionEnabled = true + label.addGestureRecognizer(UITapGestureRecognizer(target: context.coordinator, + action: #selector(Coordinator.handleTapGesture))) + + let stackView = UIStackView() + stackView.alignment = .center + stackView.addArrangedSubview(label) + return stackView + } + + func updateUIView(_ uiView: UIView, context: Context) {} + + class Coordinator: NSObject { + let onTapGesture: () -> Void + + init(onTapGesture: @escaping () -> Void) { + self.onTapGesture = onTapGesture + } + + @objc func handleTapGesture() { + onTapGesture() + } + } + + func makeCoordinator() -> Coordinator { + Coordinator(onTapGesture: onTapGesture) + } +} diff --git a/TestHost/SwiftUI/SwiftUITypingView.swift b/TestHost/SwiftUI/SwiftUITypingView.swift new file mode 100644 index 000000000..643c441ea --- /dev/null +++ b/TestHost/SwiftUI/SwiftUITypingView.swift @@ -0,0 +1,44 @@ +// +// SwiftUITypingView.swift +// TestHost +// +// Created by Bartłomiej Włodarczak on 10/02/2025. +// + +import SwiftUI + +struct SwiftUITypingView: View { + var body: some View { + List { + TextFieldWithMirror() + } + } +} + +#Preview { + SwiftUITypingView() +} + +private struct TextFieldWithMirror: View { + @State var text = "" + + var body: some View { + VStack(alignment: .leading) { + Button(text.isEmpty ? "Fill text field" : "Clear text field") { + if text.isEmpty { + text = "This is some inserted text" + } else { + text = "" + } + } + .buttonStyle(.plain) + .foregroundColor(.blue) + + TextField("This is SwiftUI TextField", text: $text) + .withAccessibility(label: "SwiftUI TextField") + .textFieldStyle(.roundedBorder) + + Text(text) + } + } +} diff --git a/TestHost/SwiftUI/SwiftUIViewController.swift b/TestHost/SwiftUI/SwiftUIViewController.swift new file mode 100644 index 000000000..8510ce632 --- /dev/null +++ b/TestHost/SwiftUI/SwiftUIViewController.swift @@ -0,0 +1,32 @@ +// +// SwiftUIViewController.swift +// KIF +// +// Created by Bartłomiej Włodarczak on 03/02/2025. +// + +import UIKit +import SwiftUI + +final class SwiftUIViewController: UIViewController { + private let hostingController: UIHostingController + + init(content: Content) { + hostingController = UIHostingController(rootView: content) + super.init(nibName: nil, bundle: nil) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func viewDidLoad() { + super.viewDidLoad() + + addChild(hostingController) + hostingController.view.frame = view.bounds + view.addSubview(hostingController.view) + hostingController.view.autoresizingMask = [.flexibleWidth, .flexibleHeight] + hostingController.didMove(toParent: self) + } +} diff --git a/TestHost/SwiftUI/SwiftUIViewControllerFactory.swift b/TestHost/SwiftUI/SwiftUIViewControllerFactory.swift new file mode 100644 index 000000000..6a5a90d5e --- /dev/null +++ b/TestHost/SwiftUI/SwiftUIViewControllerFactory.swift @@ -0,0 +1,20 @@ +// +// SwiftUIViewControllerFactory.swift +// KIF +// +// Created by Bartłomiej Włodarczak on 03/02/2025. +// + +import UIKit + +@MainActor final class SwiftUIViewControllerFactory: NSObject { + private override init() {} + + @objc static func makeSwiftUITappingViewController() -> UIViewController { + SwiftUIViewController(content: SwiftUITappingView()) + } + + @objc static func makeSwiftUITypingViewController() -> UIViewController { + SwiftUIViewController(content: SwiftUITypingView()) + } +} diff --git a/TestHost/SwiftUI/TestHost-Bridging-Header.h b/TestHost/SwiftUI/TestHost-Bridging-Header.h new file mode 100644 index 000000000..1b2cb5d6d --- /dev/null +++ b/TestHost/SwiftUI/TestHost-Bridging-Header.h @@ -0,0 +1,4 @@ +// +// Use this file to import your target's public headers that you would like to expose to Swift. +// + diff --git a/TestHost/SwiftUI/ViewModifiers.swift b/TestHost/SwiftUI/ViewModifiers.swift new file mode 100644 index 000000000..d4bdaec3d --- /dev/null +++ b/TestHost/SwiftUI/ViewModifiers.swift @@ -0,0 +1,34 @@ +// +// ViewModifiers.swift +// KIF +// +// Created by Bartłomiej Włodarczak on 03/02/2025. +// + +import SwiftUI + +extension View { + func withAccessibility(label: String) -> some View { + self.modifier(AccessibilityLabelModifier(label)) + } +} + +private struct AccessibilityLabelModifier: ViewModifier { + let label: String + + init(_ label: String) { + self.label = label + } + + func body(content: Content) -> some View { + if #available(iOS 14.0, *) { + content + .accessibilityLabel(label) + } else { + content + .accessibility(label: Text(label)) + } + } +} + + diff --git a/Test Host/SystemAlertViewController.m b/TestHost/SystemAlertViewController.m similarity index 100% rename from Test Host/SystemAlertViewController.m rename to TestHost/SystemAlertViewController.m diff --git a/Test Host/TableViewController.m b/TestHost/TableViewController.m similarity index 100% rename from Test Host/TableViewController.m rename to TestHost/TableViewController.m diff --git a/Test Host/TapViewController.m b/TestHost/TapViewController.m similarity index 96% rename from Test Host/TapViewController.m rename to TestHost/TapViewController.m index 7ffbab72c..db6b1a101 100644 --- a/Test Host/TapViewController.m +++ b/TestHost/TapViewController.m @@ -7,6 +7,7 @@ // #import +#import @interface TapViewController : UIViewController @property (weak, nonatomic) IBOutlet UISlider *slider; @@ -76,10 +77,10 @@ - (void)dealloc - (BOOL)textFieldShouldReturn:(UITextField *)textField { - [textField resignFirstResponder]; - if (textField == self.otherTextField) { [self.greetingTextField becomeFirstResponder]; + } else { + [textField resignFirstResponder]; } return NO; } @@ -93,6 +94,9 @@ - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRang return YES; } + + + #pragma mark - - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { diff --git a/Test Host/Test Host-Info.plist b/TestHost/TestHost-Info.plist similarity index 100% rename from Test Host/Test Host-Info.plist rename to TestHost/TestHost-Info.plist diff --git a/Test Host/Test Host-Prefix.pch b/TestHost/TestHost-Prefix.pch similarity index 71% rename from Test Host/Test Host-Prefix.pch rename to TestHost/TestHost-Prefix.pch index 5e01c4e6b..7fb14020c 100644 --- a/Test Host/Test Host-Prefix.pch +++ b/TestHost/TestHost-Prefix.pch @@ -1,5 +1,5 @@ // -// Prefix header for all source files of the 'Test Host' target in the 'Test Host' project +// Prefix header for all source files of the 'TestHost' target in the 'KIF' project // #import diff --git a/TestHost/TestSuiteViewController.m b/TestHost/TestSuiteViewController.m new file mode 100644 index 000000000..ee4f9526e --- /dev/null +++ b/TestHost/TestSuiteViewController.m @@ -0,0 +1,166 @@ +// +// TestSuiteViewController.m +// Test Suite +// +// Created by Brian K Nickel on 6/26/13. +// Copyright (c) 2013 Brian Nickel. All rights reserved. +// + +#import +#import "TestHost-Swift.h" + +@interface TestSuiteViewController : UITableViewController +@end + +@implementation TestSuiteViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + //set up an accessibility label on the table. + self.tableView.isAccessibilityElement = YES; + self.tableView.accessibilityLabel = @"Table View"; + + // memory warning was causing cells to disappear on static table views, reloading lets them come back + [[NSNotificationCenter defaultCenter] addObserver:self.tableView selector:@selector(reloadData) name:UIApplicationDidReceiveMemoryWarningNotification object:[UIApplication sharedApplication]]; +} + +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (void)setupRefreshControl +{ + self.refreshControl = [[UIRefreshControl alloc] init]; + self.refreshControl.backgroundColor = [UIColor grayColor]; + self.refreshControl.tintColor = [UIColor whiteColor]; + [self.refreshControl addTarget:self + action:@selector(pullToRefreshHandler) + forControlEvents:UIControlEventValueChanged]; + self.refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:NSLocalizedString(@"Refreshing...", @"") attributes:nil]; +} + +- (void)viewDidAppear:(BOOL)animated +{ + [super viewDidAppear:animated]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [self setupRefreshControl]; + }); +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + switch (indexPath.section) { + case 0: // Basics section + break; + case 1: // Modal views section + switch (indexPath.row) { + case 0: + { + break; + } + + case 1: + { + UIAlertController *alertController = [UIAlertController + alertControllerWithTitle:@"Alert Controller" + message:@"" + preferredStyle:UIAlertControllerStyleActionSheet]; + UIAlertAction *destroyAction = [UIAlertAction actionWithTitle:@"Destroy" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) { + [self alertControllerDismissed]; + }]; + + UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { + [self alertControllerDismissed]; + }]; + + [alertController addAction:destroyAction]; + [alertController addAction:[self alertActionWithTitle:@"A"]]; + [alertController addAction:[self alertActionWithTitle:@"B"]]; + [alertController addAction:cancelAction]; + + if ([alertController respondsToSelector:@selector(popoverPresentationController)] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { + // iOS 8 iPad presents in a popover + alertController.popoverPresentationController.sourceView = [tableView cellForRowAtIndexPath:indexPath]; + UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:alertController]; + [popover presentPopoverFromRect:alertController.popoverPresentationController.sourceView.frame inView:tableView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; + } else { + [self presentViewController:alertController animated:YES completion:nil]; + } + break; + } + + case 2: + { + Class AVCClass = NSClassFromString(@"UIActivityViewController"); + if (AVCClass) { + UIActivityViewController *controller = [[AVCClass alloc] initWithActivityItems:@[@"Hello World"] applicationActivities:nil]; + + if ([controller respondsToSelector:@selector(popoverPresentationController)] && UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { + // iOS 8 iPad presents in a popover + controller.popoverPresentationController.sourceView = [tableView cellForRowAtIndexPath:indexPath]; + UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:controller]; + [popover presentPopoverFromRect:controller.popoverPresentationController.sourceView.frame inView:tableView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; + } else { + [self presentViewController:controller animated:YES completion:nil]; + } + } + break; + } + } + return; + case 2: // SwiftUI section + switch (indexPath.row) { + case 0: + { + [[self navigationController] pushViewController:[SwiftUIViewControllerFactory makeSwiftUITappingViewController] animated:true]; + break; + } + + case 1: + { + [[self navigationController] pushViewController:[SwiftUIViewControllerFactory makeSwiftUITypingViewController] animated:true]; + break; + } + } + } +} + +-(void)pullToRefreshHandler +{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + self.refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:NSLocalizedString(@"Bingo!", @"") attributes:nil]; + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [self.refreshControl endRefreshing]; + [self resetRefreshControl]; + [self.tableView setContentOffset:CGPointZero animated:YES]; + }); + }); +} + +- (void)alertControllerDismissed +{ + UIAlertController * alertController = [UIAlertController alertControllerWithTitle:@"Alert View" + message:@"Message" + preferredStyle:UIAlertControllerStyleAlert]; + [alertController addAction:[UIAlertAction actionWithTitle:@"Continue" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {}]]; + [alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {}]]; + [self presentViewController:alertController animated:YES completion:nil]; +} + +-(UIAlertAction *)alertActionWithTitle:(NSString *)title +{ + return [UIAlertAction actionWithTitle:title style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { + [self alertControllerDismissed]; + }]; +} + +- (IBAction)resetRefreshControl +{ + self.refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:NSLocalizedString(@"Refreshing...", @"") attributes:nil]; +} +@end diff --git a/Test Host/WebViewController.m b/TestHost/WebViewController.m similarity index 100% rename from Test Host/WebViewController.m rename to TestHost/WebViewController.m diff --git a/KIF Tests/en.lproj/InfoPlist.strings b/TestHost/en.lproj/InfoPlist.strings similarity index 100% rename from KIF Tests/en.lproj/InfoPlist.strings rename to TestHost/en.lproj/InfoPlist.strings diff --git a/Test Host/index.html b/TestHost/index.html similarity index 100% rename from Test Host/index.html rename to TestHost/index.html diff --git a/Test Host/main.m b/TestHost/main.m similarity index 94% rename from Test Host/main.m rename to TestHost/main.m index 49dde022d..104a43138 100644 --- a/Test Host/main.m +++ b/TestHost/main.m @@ -1,6 +1,6 @@ // // main.m -// Test Host +// TestHost // // Created by Brian Nickel on 6/29/13. // diff --git a/Test Host/page2.html b/TestHost/page2.html similarity index 100% rename from Test Host/page2.html rename to TestHost/page2.html diff --git a/Tests/AccessibilityActivationTests_ViewTestActor.m b/Tests/AccessibilityActivationTests_ViewTestActor.m new file mode 100644 index 000000000..da867445c --- /dev/null +++ b/Tests/AccessibilityActivationTests_ViewTestActor.m @@ -0,0 +1,50 @@ +// +// AccessibilityActivateTests_ViewTestActor.m +// KIF Tests +// +// Created by Alex Odawa on 09/07/2024. +// + +#import +#import + +@interface AccessibilityActivateTests_ViewTestActor : KIFTestCase +@end + + +@implementation AccessibilityActivateTests_ViewTestActor + +- (void)beforeEach +{ + [[viewTester usingLabel:@"Accessibility"] tap]; +} + +- (void)afterEach +{ + [[[viewTester usingLabel:@"Test Suite"] usingTraits:UIAccessibilityTraitButton] tap]; +} + +- (void)testAccessibilityActivate +{ + [[viewTester usingLabel:@"AccessibilityView"] performAccessibilityActivateWithExpectedResult: YES]; + [[viewTester usingValue:@"Activated: 1"] waitForView]; + + [[viewTester usingLabel:@"AccessibilitySwitch"] setSwitchOn:false]; + [[viewTester usingLabel:@"AccessibilityView"] performAccessibilityActivateWithExpectedResult: NO]; + [[viewTester usingValue:@"Activated: 2"] waitForView]; +} + +- (void)testAccessibilityActiationPoint +{ + UIView *view = [[viewTester usingValue: @"Awaiting activation or tap"] waitForView]; + [view setAccessibilityActivationPoint: [view.window convertPoint:CGPointMake(25.0, 50.0) fromView:view]]; + + [[viewTester usingLabel: @"AccessibilityView"] tap]; + [[viewTester usingValue:@"Tapped - x:25.0000, y:50.0000"] waitForView]; + + [view setAccessibilityActivationPoint: [view.window convertPoint:CGPointMake(50.0, 25.0) fromView:view]]; + [[viewTester usingLabel: @"AccessibilityView"] tap]; + [[viewTester usingValue:@"Tapped - x:50.0000, y:25.0000"] waitForView]; +} + +@end diff --git a/Tests/AccessibilityIdentifierPullToRefreshTests.m b/Tests/AccessibilityIdentifierPullToRefreshTests.m new file mode 100644 index 000000000..b578f4046 --- /dev/null +++ b/Tests/AccessibilityIdentifierPullToRefreshTests.m @@ -0,0 +1,50 @@ +// +// AccessibilityIdentifierPullToRefreshTests.m +// KIF +// +// Created by Michael Lupo on 9/22/15. +// +// + +#import +#import +#import + +#import + +@interface AccessibilityIdentifierPullToRefreshTests : KIFTestCase +@end + +@implementation AccessibilityIdentifierPullToRefreshTests + +- (void)beforeAll +{ + // Ensure that we've scrolled the TestSuite VC back to the top + [tester waitForViewWithAccessibilityLabel:@"Tapping"]; +} + +- (void)testPullToRefreshByAccessibilityIdentifier +{ + [tester waitForViewWithAccessibilityIdentifier:@"Test Suite TableView"]; + [tester pullToRefreshViewWithAccessibilityIdentifier:@"Test Suite TableView"]; + + // Implicit scrolling of the table view when searching the view hierarchy is causing "Bingo!" to disappear. + // Hacky to use viewTester here, but the alternative would be to expose + // `usingCurrentFrame` functionality on the legacy `tester` API. + [[[viewTester usingCurrentFrame] usingLabel:@"Bingo!"] waitForView]; + [[[viewTester usingCurrentFrame] usingLabel:@"Bingo!"] waitForAbsenceOfView]; +} + +- (void)testPullToRefreshByAccessibilityIdentifierWithDuration +{ + [tester waitForViewWithAccessibilityIdentifier:@"Test Suite TableView"]; + [tester pullToRefreshViewWithAccessibilityIdentifier:@"Test Suite TableView" pullDownDuration:KIFPullToRefreshInAboutAHalfSecond]; + + // Implicit scrolling of the table view when searching the view hierarchy is causing "Bingo!" to disappear. + // Hacky to use viewTester here, but the alternative would be to expose + // `usingCurrentFrame` functionality on the legacy `tester` API. + [[[viewTester usingCurrentFrame] usingLabel:@"Bingo!"] waitForView]; + [[[viewTester usingCurrentFrame] usingLabel:@"Bingo!"] waitForAbsenceOfView]; +} + +@end diff --git a/Tests/AccessibilityIdentifierTests.m b/Tests/AccessibilityIdentifierTests.m new file mode 100644 index 000000000..b94becbff --- /dev/null +++ b/Tests/AccessibilityIdentifierTests.m @@ -0,0 +1,162 @@ +// +// AccessibilityIdentifierTests.m +// KIF +// +// Created by Brian Nickel on 11/6/14. +// +// + +#import +#import +#import + +@interface AccessibilityIdentifierTests : KIFTestCase +@end + +@implementation AccessibilityIdentifierTests + +- (void)beforeEach +{ + UIPasteboard.generalPasteboard.string = nil; + [tester tapViewWithAccessibilityLabel:@"Tapping"]; +} + +- (void)testWaitingForViewWithAccessibilityIdentifier +{ + // Since the tap has occurred in setup, we just need to wait for the result. + [tester waitForViewWithAccessibilityIdentifier:@"X_BUTTON"]; + KIFExpectFailure([[tester usingTimeout:0.5] waitForViewWithAccessibilityIdentifier:@"NOT_X_BUTTON"]); +} + +- (void)testTappingViewWithAccessibilityIdentifier +{ + [tester tapViewWithAccessibilityIdentifier:@"X_BUTTON"]; + [tester waitForViewWithAccessibilityLabel:@"X" traits:UIAccessibilityTraitButton | UIAccessibilityTraitSelected]; + KIFExpectFailure([[tester usingTimeout:0.5] tapViewWithAccessibilityIdentifier:@"NOT_X_BUTTON"]); +} + +- (void)testWaitingForAbscenceOfViewWithAccessibilityIdentifier +{ + // Since the tap has occurred in setup, we just need to wait for the result. + [tester waitForViewWithAccessibilityIdentifier:@"X_BUTTON"]; + [tester waitForAbsenceOfViewWithAccessibilityIdentifier:@"NOT_X_BUTTON"]; + KIFExpectFailure([[tester usingTimeout:0.5] waitForAbsenceOfViewWithAccessibilityIdentifier:@"X_BUTTON"]); + [tester tapViewWithAccessibilityLabel:@"Test Suite" traits:UIAccessibilityTraitButton]; + [tester waitForAbsenceOfViewWithAccessibilityIdentifier:@"X_BUTTON"]; + [tester tapViewWithAccessibilityLabel:@"Tapping"]; +} + +- (void)testLongPressingViewWithAccessibilityIdentifier +{ + [tester tapViewWithAccessibilityIdentifier:@"idGreeting"]; + [tester longPressViewWithAccessibilityIdentifier:@"idGreeting" duration:1]; + [tester tapViewWithAccessibilityLabel:@"Select All"]; +} + +- (void)testEnteringTextIntoViewWithAccessibilityIdentifier +{ + [tester tapViewWithAccessibilityIdentifier:@"idGreeting"]; + [tester longPressViewWithAccessibilityIdentifier:@"idGreeting" duration:1]; + [tester waitForAnimationsToFinish]; + [tester tapViewWithAccessibilityLabel:@"Select All"]; + [tester tapViewWithAccessibilityLabel:@"Cut"]; + [tester enterText:@"Yo" intoViewWithAccessibilityIdentifier:@"idGreeting"]; +} + +- (void)testEnteringTextIntoViewWithAccessibilityIdentifierExpectingResults +{ + [tester enterText:@", world" intoViewWithAccessibilityIdentifier:@"idGreeting" expectedResult:@"Hello, world"]; + [tester waitForViewWithAccessibilityLabel:@"Greeting" value:@"Hello, world" traits:UIAccessibilityTraitNone]; +} + +- (void)testClearingAndEnteringTextIntoViewWithAccessibilityLabel +{ + [tester clearTextFromAndThenEnterText:@"Yo" intoViewWithAccessibilityIdentifier:@"idGreeting"]; +} + +- (void)testSettingTextIntoViewWithAccessibilityIdentifier +{ + UIView *greetingView = [tester waitForViewWithAccessibilityIdentifier:@"idGreeting"]; + [tester longPressViewWithAccessibilityIdentifier:@"idGreeting" duration:1]; + [tester setText:@"Yo" intoViewWithAccessibilityIdentifier:@"idGreeting"]; + [tester expectView:greetingView toContainText:@"Yo"]; + [tester setText:@"Hello" intoViewWithAccessibilityIdentifier:@"idGreeting"]; + [tester expectView:greetingView toContainText:@"Hello"]; +} + +- (void)testTryFindingViewWithAccessibilityIdentifier +{ + if (![tester tryFindingViewWithAccessibilityIdentifier:@"idGreeting"]) + { + [tester fail]; + } + + if ([tester tryFindingViewWithAccessibilityIdentifier:@"idDoesNotExist"]) + { + [tester fail]; + } +} + +- (void)testTryFindingOutOfFrameViewWithAccessibilityIdentifier +{ + if (![tester tryFindingViewWithAccessibilityIdentifier:@"outOfFrameView"]) + { + [tester fail]; + } +} + +- (void)testTryFindingViewInFrameWithAccessibilityIdentifier +{ + if (![tester tryFindingViewInFrameWithAccessibilityIdentifier:@"idGreeting"]) + { + [tester fail]; + } + + if ([tester tryFindingViewInFrameWithAccessibilityIdentifier:@"outOfFrameView"]) + { + [tester fail]; + } +} + +- (void) testTappingStepperIncrement +{ + UILabel *uiLabel = (UILabel *)[tester waitForViewWithAccessibilityIdentifier:@"tapViewController.stepperValue"]; + NSInteger originalValue = [[uiLabel text] integerValue]; + + [tester tapStepperWithAccessibilityIdentifier:@"tapViewController.stepper" increment:(KIFStepperDirectionIncrement)]; + + [tester waitForTimeInterval:0.5f]; + uiLabel = (UILabel *)[tester waitForViewWithAccessibilityIdentifier:@"tapViewController.stepperValue"]; + NSInteger newValue = [[uiLabel text] integerValue]; + if (newValue != (originalValue + 1)) + { + NSException *exception = [NSException exceptionWithName:@"Unexpected test failure" + reason:[NSString stringWithFormat: @"newValue was expected to be +1 of originalValue. Original Value was %ld while newValue is %ld", (long)originalValue, (long)newValue] userInfo:nil]; + [tester failWithException: exception stopTest: NO]; + } +} + +- (void) testTappingStepperDecrement +{ + UILabel *uiLabel = (UILabel *)[tester waitForViewWithAccessibilityIdentifier:@"tapViewController.stepperValue"]; + NSInteger originalValue = [[uiLabel text] integerValue]; + + [tester tapStepperWithAccessibilityIdentifier:@"tapViewController.stepper" increment:(KIFStepperDirectionDecrement)]; + + [tester waitForTimeInterval:0.5f]; + uiLabel = (UILabel *)[tester waitForViewWithAccessibilityIdentifier:@"tapViewController.stepperValue"]; + NSInteger newValue = [[uiLabel text] integerValue]; + if (newValue != (originalValue -1)) + { + NSException *exception = [NSException exceptionWithName:@"Unexpected test failure" + reason:[NSString stringWithFormat: @"newValue was expected to be -1 of originalValue. Original Value was %ld while newValue is %ld", (long)originalValue, (long)newValue] userInfo:nil]; + [tester failWithException: exception stopTest: NO]; + } +} + +- (void)afterEach +{ + [tester tapViewWithAccessibilityLabel:@"Test Suite" traits:UIAccessibilityTraitButton]; +} + +@end diff --git a/KIF Tests/AccessibilityIdentifierTests_ViewTestActor.m b/Tests/AccessibilityIdentifierTests_ViewTestActor.m similarity index 70% rename from KIF Tests/AccessibilityIdentifierTests_ViewTestActor.m rename to Tests/AccessibilityIdentifierTests_ViewTestActor.m index 20501d165..240253bf4 100644 --- a/KIF Tests/AccessibilityIdentifierTests_ViewTestActor.m +++ b/Tests/AccessibilityIdentifierTests_ViewTestActor.m @@ -17,6 +17,7 @@ @implementation AccessibilityIdentifierTests_ViewTestActor - (void)beforeEach { + UIPasteboard.generalPasteboard.string = nil; [[viewTester usingLabel:@"Tapping"] tap]; } @@ -48,14 +49,14 @@ - (void)testWaitingForAbscenceOfViewWithAccessibilityIdentifier - (void)testLongPressingViewWithAccessibilityIdentifier { [[viewTester usingIdentifier:@"idGreeting"] tap]; - [[viewTester usingIdentifier:@"idGreeting"] longPressWithDuration:2]; + [[viewTester usingIdentifier:@"idGreeting"] longPressWithDuration:1]; [[viewTester usingLabel:@"Select All"] tap]; } - (void)testEnteringTextIntoViewWithAccessibilityIdentifier { [[viewTester usingIdentifier:@"idGreeting"] tap]; - [[viewTester usingIdentifier:@"idGreeting"] longPressWithDuration:2]; + [[viewTester usingIdentifier:@"idGreeting"] longPressWithDuration:1]; [[viewTester usingLabel:@"Select All"] tap]; [[viewTester usingLabel:@"Cut"] tap]; [[viewTester usingIdentifier:@"idGreeting"] enterText:@"Yo"]; @@ -72,6 +73,49 @@ - (void)testClearingAndEnteringTextIntoViewWithAccessibilityLabel [[viewTester usingIdentifier:@"idGreeting"] clearAndEnterText:@"Yo"]; } +- (void)testTryFindingOutOfFrameViewWithAccessibilityIdentifier +{ + if (![[viewTester usingIdentifier:@"outOfFrameView"] tryFindingView]) + { + [tester fail]; + } +} + +- (void)testTryFindingViewInFrameWithAccessibilityIdentifier +{ + if (![[[viewTester usingCurrentFrame] usingIdentifier:@"idGreeting"] tryFindingView]) + { + [tester fail]; + } + + if ([[[viewTester usingCurrentFrame] usingIdentifier:@"outOfFrameView"] tryFindingView]) + { + [tester fail]; + } +} + +- (void)testTryFindingTappableViewInFrameWithAccessibilityIdentifier +{ + if (![[[viewTester usingCurrentFrame] usingIdentifier:@"idGreeting"] tryFindingTappableView]) + { + [tester fail]; + } + + if ([[[viewTester usingCurrentFrame] usingIdentifier:@"outOfFrameView"] tryFindingTappableView]) + { + [tester fail]; + } +} + +- (void)testTryFindingOccludedTappableViewInFrameWithAccessibilityIdentifier +{ + + if ([[[viewTester usingCurrentFrame] usingIdentifier:@"occludedView"] tryFindingTappableView]) + { + [tester fail]; + } +} + - (void)afterEach { [[[viewTester usingLabel:@"Test Suite"] usingTraits:UIAccessibilityTraitButton] tap]; diff --git a/KIF Tests/Additions/UIScreen+KIFAdditionsTests.m b/Tests/Additions/UIScreen+KIFAdditionsTests.m similarity index 100% rename from KIF Tests/Additions/UIScreen+KIFAdditionsTests.m rename to Tests/Additions/UIScreen+KIFAdditionsTests.m diff --git a/KIF Tests/AutocorrectTests.m b/Tests/AutocorrectTests.m similarity index 100% rename from KIF Tests/AutocorrectTests.m rename to Tests/AutocorrectTests.m diff --git a/KIF Tests/AutocorrectTests_ViewTestActor.m b/Tests/AutocorrectTests_ViewTestActor.m similarity index 100% rename from KIF Tests/AutocorrectTests_ViewTestActor.m rename to Tests/AutocorrectTests_ViewTestActor.m diff --git a/KIF Tests/BackgroundTests.m b/Tests/BackgroundTests.m similarity index 100% rename from KIF Tests/BackgroundTests.m rename to Tests/BackgroundTests.m diff --git a/KIF Tests/CascadingFailureTests.m b/Tests/CascadingFailureTests.m similarity index 100% rename from KIF Tests/CascadingFailureTests.m rename to Tests/CascadingFailureTests.m diff --git a/KIF Tests/CollectionViewTests.m b/Tests/CollectionViewTests.m similarity index 100% rename from KIF Tests/CollectionViewTests.m rename to Tests/CollectionViewTests.m diff --git a/KIF Tests/CollectionViewTests_ViewTestActor.m b/Tests/CollectionViewTests_ViewTestActor.m similarity index 100% rename from KIF Tests/CollectionViewTests_ViewTestActor.m rename to Tests/CollectionViewTests_ViewTestActor.m diff --git a/KIF Tests/CompositionTests.m b/Tests/CompositionTests.m similarity index 100% rename from KIF Tests/CompositionTests.m rename to Tests/CompositionTests.m diff --git a/KIF Tests/CompositionTests_ViewTestActor.m b/Tests/CompositionTests_ViewTestActor.m similarity index 100% rename from KIF Tests/CompositionTests_ViewTestActor.m rename to Tests/CompositionTests_ViewTestActor.m diff --git a/Tests/CustomActionTests_ViewTestActor.m b/Tests/CustomActionTests_ViewTestActor.m new file mode 100644 index 000000000..ddde51e7d --- /dev/null +++ b/Tests/CustomActionTests_ViewTestActor.m @@ -0,0 +1,39 @@ +// +// CustomActionTests_ViewTestActor.m +// KIF Tests +// +// Created by Alex Odawa on 09/07/2024. +// + +#import + +@interface CustomActionTests_ViewTestActor : KIFTestCase +@end + + +@implementation CustomActionTests_ViewTestActor + +- (void)beforeEach +{ + [[viewTester usingLabel:@"Accessibility"] tap]; +} + +- (void)afterEach +{ + [[[viewTester usingLabel:@"Test Suite"] usingTraits:UIAccessibilityTraitButton] tap]; +} + +- (void)testCustomActions +{ + if (@available(iOS 13.0, *)) { + [[viewTester usingLabel:@"AccessibilityView"] activateCustomActionWithName:@"Action With block handler"]; + } + + for (NSString *name in @[@"Action without argument", @"Action with argument"]) { + [[viewTester usingLabel:@"AccessibilityView"] activateCustomActionWithName:name]; + } + + [[viewTester usingLabel:@"AccessibilityView"] activateCustomActionWithName:@"Action that fails" expectedResult:NO]; +} + +@end diff --git a/KIF Tests/CustomPickerTests.m b/Tests/CustomPickerTests.m similarity index 100% rename from KIF Tests/CustomPickerTests.m rename to Tests/CustomPickerTests.m diff --git a/KIF Tests/CustomPickerTests_ViewTestActor.m b/Tests/CustomPickerTests_ViewTestActor.m similarity index 100% rename from KIF Tests/CustomPickerTests_ViewTestActor.m rename to Tests/CustomPickerTests_ViewTestActor.m diff --git a/KIF Tests/ExistTests.m b/Tests/ExistTests.m similarity index 81% rename from KIF Tests/ExistTests.m rename to Tests/ExistTests.m index 9e911bd9f..3924a2d99 100644 --- a/KIF Tests/ExistTests.m +++ b/Tests/ExistTests.m @@ -13,16 +13,10 @@ @interface ExistTests : KIFTestCase @implementation ExistTests -- (void)beforeAll; -{ - [super beforeAll]; - - // If a previous test was still in the process of navigating back to the main view, let that complete before starting this test - [tester waitForAnimationsToFinish]; -} - - (void)testExistsViewWithAccessibilityLabel { + // If a previous test was still in the process of navigating back to the main view, let that complete before starting this test. + [tester waitForAnimationsToFinishWithTimeout:5.0 stabilizationTime:0.0]; BOOL tappingFound = [tester tryFindingTappableViewWithAccessibilityLabel:@"Tapping" error:NULL]; BOOL testSuiteFound = [tester tryFindingTappableViewWithAccessibilityLabel:@"Test Suite" traits:UIAccessibilityTraitButton error:NULL]; if (tappingFound && !testSuiteFound) { @@ -31,6 +25,8 @@ - (void)testExistsViewWithAccessibilityLabel [tester fail]; } + // This test will fail if the view controller hasn't fully finished animating in, so wait for that first. + [tester waitForAnimationsToFinishWithTimeout:5.0 stabilizationTime:0.0]; tappingFound = [tester tryFindingTappableViewWithAccessibilityLabel:@"Tapping" error:NULL]; testSuiteFound = [tester tryFindingTappableViewWithAccessibilityLabel:@"Test Suite" traits:UIAccessibilityTraitButton error:NULL]; if (testSuiteFound && !tappingFound) { diff --git a/KIF Tests/ExistTests_ViewTestActor.m b/Tests/ExistTests_ViewTestActor.m similarity index 62% rename from KIF Tests/ExistTests_ViewTestActor.m rename to Tests/ExistTests_ViewTestActor.m index e9f83c0b7..d4748031b 100644 --- a/KIF Tests/ExistTests_ViewTestActor.m +++ b/Tests/ExistTests_ViewTestActor.m @@ -14,24 +14,20 @@ @interface ExistTests_ViewTestActor : KIFTestCase @implementation ExistTests_ViewTestActor -- (void)beforeAll; -{ - [super beforeAll]; - - // If a previous test was still in the process of navigating back to the main view, let that complete before starting this test - [tester waitForAnimationsToFinish]; -} - - (void)testExistsViewWithAccessibilityLabel { + // If a previous test was still in the process of navigating back to the main view, let that complete before starting this test. + [[[viewTester usingAnimationWaitingTimeout:5.0] usingAnimationStabilizationTimeout:0.0] waitForAnimationsToFinish]; + if ([[viewTester usingLabel:@"Tapping"] tryFindingTappableView] && ![[[viewTester usingLabel:@"Test Suite"] usingTraits:UIAccessibilityTraitButton] tryFindingTappableView]) { - [[viewTester usingLabel:@"Tapping"] tap]; + // This test will fail if the view controller hasn't fully finished animating in, so give it a lot of time to complete the animation. + [[[viewTester usingLabel:@"Tapping"] usingAnimationWaitingTimeout:5.0] tap]; } else { [viewTester fail]; } if ([[viewTester usingLabel:@"Test Suite"] tryFindingTappableView] && ![[viewTester usingLabel:@"Tapping"] tryFindingTappableView]) { - [[[viewTester usingLabel:@"Test Suite"] usingTraits:UIAccessibilityTraitButton] tap]; + [[[[viewTester usingLabel:@"Test Suite"] usingAnimationWaitingTimeout:5.0] usingTraits:UIAccessibilityTraitButton] tap]; } else { [viewTester fail]; } diff --git a/KIF Tests/GestureTests.m b/Tests/GestureTests.m similarity index 88% rename from KIF Tests/GestureTests.m rename to Tests/GestureTests.m index ecb62b625..1c7abf8e3 100644 --- a/KIF Tests/GestureTests.m +++ b/Tests/GestureTests.m @@ -193,6 +193,34 @@ - (void)testSwipingDownWithIdentifier [tester waitForViewWithAccessibilityLabel:@"Down"]; } +- (void)testSwipingFromScreenEdgeLeft +{ + UIView *view = [tester waitForViewWithAccessibilityIdentifier:@"gestures.swipeMe"]; + CGSize windowSize = view.window.bounds.size; + CGPoint point = CGPointMake(0.5, 200); + point = [view convertPoint:point fromView:view.window]; + KIFDisplacement displacement = CGPointMake(windowSize.width * 0.5, 5); + [view dragFromPoint:point displacement:displacement steps:20]; + [tester waitForAbsenceOfViewWithAccessibilityLabel:@"LeftEdge"]; + + [tester swipeFromEdge:UIRectEdgeLeft]; + [tester waitForViewWithAccessibilityLabel:@"LeftEdge"]; +} + +- (void)testSwipingFromScreenEdgeRight +{ + UIView *view = [tester waitForViewWithAccessibilityIdentifier:@"gestures.swipeMe"]; + CGSize windowSize = view.window.bounds.size; + CGPoint point = CGPointMake(windowSize.width - 0.5, 200); + point = [view convertPoint:point fromView:view.window]; + KIFDisplacement displacement = CGPointMake(-windowSize.width * 0.5, 5); + [view dragFromPoint:point displacement:displacement steps:20]; + [tester waitForAbsenceOfViewWithAccessibilityLabel:@"RightEdge"]; + + [tester swipeFromEdge:UIRectEdgeRight]; + [tester waitForViewWithAccessibilityLabel:@"RightEdge"]; +} + - (void)testScrolling { // Needs to be offset from the edge to prevent the navigation controller's interactivePopGestureRecognizer from triggering diff --git a/KIF Tests/GestureTests_ViewTestActor.m b/Tests/GestureTests_ViewTestActor.m similarity index 91% rename from KIF Tests/GestureTests_ViewTestActor.m rename to Tests/GestureTests_ViewTestActor.m index d34fe93e7..43e303b02 100644 --- a/KIF Tests/GestureTests_ViewTestActor.m +++ b/Tests/GestureTests_ViewTestActor.m @@ -108,4 +108,16 @@ - (void)testMissingScrollableElement KIFExpectFailure([[[viewTester usingTimeout:0.25] usingIdentifier:@"Unknown"] scrollByFractionOfSizeHorizontal:0.5 vertical:0.5]); } +- (void)testSwipingFromScreenEdgeLeft +{ + [viewTester swipeFromEdge:UIRectEdgeLeft]; + [[viewTester usingLabel:@"LeftEdge"] waitForView]; +} + +- (void)testSwipingFromScreenEdgeRight +{ + [viewTester swipeFromEdge:UIRectEdgeRight]; + [[viewTester usingLabel:@"RightEdge"] waitForView]; +} + @end diff --git a/KIF Tests/KIF Tests-Info.plist b/Tests/KIFTests-Info.plist similarity index 100% rename from KIF Tests/KIF Tests-Info.plist rename to Tests/KIFTests-Info.plist diff --git a/KIF Tests/LandscapeTests.m b/Tests/LandscapeTests.m similarity index 54% rename from KIF Tests/LandscapeTests.m rename to Tests/LandscapeTests.m index b7abe5122..edba380c8 100644 --- a/KIF Tests/LandscapeTests.m +++ b/Tests/LandscapeTests.m @@ -19,7 +19,7 @@ - (void)beforeAll [tester waitForTimeInterval:0.5]; // only scroll if we are on iphone - if(UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPhone) { + if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPhone) { [tester scrollViewWithAccessibilityIdentifier:@"Test Suite TableView" byFractionOfSizeHorizontal:0 vertical:-0.2]; } } @@ -32,9 +32,17 @@ - (void)afterAll - (void)testThatAlertViewsCanBeTappedInLandscape { - [tester tapViewWithAccessibilityLabel:@"UIAlertView"]; + [tester tapViewWithAccessibilityLabel:@"UIAlertController"]; + if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPhone) { + [tester tapViewWithAccessibilityLabel:@"Cancel"]; + } else { + /* On iPadOS the UIAlertController is displayed as a popup over table view cell, there's no "Cancel" button. + It can be dismissed by tapping anywhere on the screen. + */ + [tester tapScreenAtPoint:CGPointMake(1, 1)]; + } [tester tapViewWithAccessibilityLabel:@"Continue"]; - [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Message"]; + [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Alert View"]; } @end diff --git a/KIF Tests/LandscapeTests_ViewTestActor.m b/Tests/LandscapeTests_ViewTestActor.m similarity index 63% rename from KIF Tests/LandscapeTests_ViewTestActor.m rename to Tests/LandscapeTests_ViewTestActor.m index 5c246514a..343b25094 100644 --- a/KIF Tests/LandscapeTests_ViewTestActor.m +++ b/Tests/LandscapeTests_ViewTestActor.m @@ -32,7 +32,16 @@ - (void)beforeEach - (void)testThatAlertViewsCanBeTappedInLandscape { - [viewTester tapRowInTableViewAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:1]]; + [viewTester tapRowInTableViewAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:1]]; + + if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPhone) { + [[viewTester usingLabel:@"Cancel"] tap]; + } else { + /* On iPadOS the UIAlertController is displayed as a popup over table view cell, there's no "Cancel" button. + It can be dismissed by tapping anywhere on the screen. + */ + [viewTester tapRowInTableViewAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:1]]; + } [[viewTester usingLabel:@"Continue"] tap]; [[viewTester usingLabel:@"Message"] waitForAbsenceOfView]; } diff --git a/KIF Tests/LongPressTests.m b/Tests/LongPressTests.m similarity index 93% rename from KIF Tests/LongPressTests.m rename to Tests/LongPressTests.m index 95e8875a8..08f8449e5 100644 --- a/KIF Tests/LongPressTests.m +++ b/Tests/LongPressTests.m @@ -15,6 +15,7 @@ @implementation LongPressTests - (void)beforeEach { + UIPasteboard.generalPasteboard.string = nil; [tester tapViewWithAccessibilityLabel:@"Tapping"]; } @@ -27,21 +28,21 @@ - (void)afterEach - (void)testLongPressingViewWithAccessibilityLabel { [tester tapViewWithAccessibilityLabel:@"Greeting"]; - [tester longPressViewWithAccessibilityLabel:@"Greeting" duration:2]; + [tester longPressViewWithAccessibilityLabel:@"Greeting" duration:1]; [tester tapViewWithAccessibilityLabel:@"Select All"]; } - (void)testLongPressingViewViewWithTraits { [tester tapViewWithAccessibilityLabel:@"Greeting"]; - [tester longPressViewWithAccessibilityLabel:@"Greeting" value:@"Hello" duration:2]; + [tester longPressViewWithAccessibilityLabel:@"Greeting" value:@"Hello" duration:1]; [tester tapViewWithAccessibilityLabel:@"Select All"]; } - (void)testLongPressingViewViewWithValue { [tester tapViewWithAccessibilityLabel:@"Greeting"]; - [tester longPressViewWithAccessibilityLabel:@"Greeting" value:@"Hello" traits:UIAccessibilityTraitUpdatesFrequently duration:2]; + [tester longPressViewWithAccessibilityLabel:@"Greeting" value:@"Hello" traits:UIAccessibilityTraitUpdatesFrequently duration:1]; [tester tapViewWithAccessibilityLabel:@"Select All"]; } diff --git a/KIF Tests/LongPressTests_ViewTestActor.m b/Tests/LongPressTests_ViewTestActor.m similarity index 87% rename from KIF Tests/LongPressTests_ViewTestActor.m rename to Tests/LongPressTests_ViewTestActor.m index 393f58eac..334614789 100644 --- a/KIF Tests/LongPressTests_ViewTestActor.m +++ b/Tests/LongPressTests_ViewTestActor.m @@ -16,6 +16,7 @@ @implementation LongPressTests_ViewTestActor - (void)beforeEach { + UIPasteboard.generalPasteboard.string = nil; [[viewTester usingLabel:@"Tapping"] tap]; } @@ -27,21 +28,21 @@ - (void)afterEach - (void)testLongPressingViewWithAccessibilityLabel { [[viewTester usingLabel:@"Greeting"] tap]; - [[viewTester usingLabel:@"Greeting"] longPressWithDuration:2]; + [[viewTester usingLabel:@"Greeting"] longPressWithDuration:1]; [[viewTester usingLabel:@"Select All"] tap]; } - (void)testLongPressingViewViewWithTraits { [[viewTester usingLabel:@"Greeting"] tap]; - [[[viewTester usingLabel:@"Greeting"] usingValue:@"Hello"] longPressWithDuration:2]; + [[[viewTester usingLabel:@"Greeting"] usingValue:@"Hello"] longPressWithDuration:1]; [[viewTester usingLabel:@"Select All"] tap]; } - (void)testLongPressingViewViewWithValue { [[viewTester usingLabel:@"Greeting"] tap]; - [[[[viewTester usingLabel:@"Greeting"] usingValue:@"Hello"] usingTraits:UIAccessibilityTraitUpdatesFrequently] longPressWithDuration:2]; + [[[[viewTester usingLabel:@"Greeting"] usingValue:@"Hello"] usingTraits:UIAccessibilityTraitUpdatesFrequently] longPressWithDuration:1]; [[viewTester usingLabel:@"Select All"] tap]; } diff --git a/KIF Tests/ModalViewTests.m b/Tests/ModalViewTests.m similarity index 76% rename from KIF Tests/ModalViewTests.m rename to Tests/ModalViewTests.m index cdee7f768..225be9ab9 100644 --- a/KIF Tests/ModalViewTests.m +++ b/Tests/ModalViewTests.m @@ -18,21 +18,11 @@ - (void)beforeEach [tester waitForTimeInterval:0.25]; } -- (void)testInteractionWithAnAlertView -{ - [tester tapViewWithAccessibilityLabel:@"UIAlertView"]; - [tester waitForViewWithAccessibilityLabel:@"Alert View"]; - [tester waitForViewWithAccessibilityLabel:@"Message"]; - [tester waitForTappableViewWithAccessibilityLabel:@"Cancel"]; - [tester waitForTappableViewWithAccessibilityLabel:@"Continue"]; - [tester tapViewWithAccessibilityLabel:@"Continue"]; - [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Message"]; -} - (void)testInteractionWithAnActionSheet { - [tester tapViewWithAccessibilityLabel:@"UIActionSheet"]; - [tester waitForViewWithAccessibilityLabel:@"Action Sheet"]; + [tester tapViewWithAccessibilityLabel:@"UIAlertController"]; + [tester waitForViewWithAccessibilityLabel:@"Alert Controller"]; [tester waitForTappableViewWithAccessibilityLabel:@"Destroy"]; [tester waitForTappableViewWithAccessibilityLabel:@"A"]; [tester waitForTappableViewWithAccessibilityLabel:@"B"]; @@ -81,7 +71,7 @@ - (void)testInteractionWithAnActivityViewController - (void)_dismissModal; { - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { + if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad) { [tester dismissPopover]; } else { [tester tapViewWithAccessibilityLabel:@"Cancel"]; diff --git a/KIF Tests/ModalViewTests_ViewTestActor.m b/Tests/ModalViewTests_ViewTestActor.m similarity index 76% rename from KIF Tests/ModalViewTests_ViewTestActor.m rename to Tests/ModalViewTests_ViewTestActor.m index a885755ab..12f9a7774 100644 --- a/KIF Tests/ModalViewTests_ViewTestActor.m +++ b/Tests/ModalViewTests_ViewTestActor.m @@ -18,21 +18,10 @@ - (void)beforeEach [viewTester waitForTimeInterval:0.25]; } -- (void)testInteractionWithAnAlertView -{ - [[viewTester usingLabel:@"UIAlertView"] tap]; - [[viewTester usingLabel:@"Alert View"] waitForView]; - [[viewTester usingLabel:@"Message"] waitForView]; - [[viewTester usingLabel:@"Cancel"] waitForTappableView]; - [[viewTester usingLabel:@"Continue"] waitForTappableView]; - [[viewTester usingLabel:@"Continue"] tap]; - [[viewTester usingLabel:@"Message"] waitForAbsenceOfView]; -} - - (void)testInteractionWithAnActionSheet { - [[viewTester usingLabel:@"UIActionSheet"] tap]; - [[viewTester usingLabel:@"Action Sheet"] waitForView]; + [[viewTester usingLabel:@"UIAlertController"] tap]; + [[viewTester usingLabel:@"Alert Controller"] waitForView]; [[viewTester usingLabel:@"Destroy"] waitForTappableView]; [[viewTester usingLabel:@"A"] waitForTappableView]; [[viewTester usingLabel:@"B"] waitForTappableView]; @@ -79,7 +68,7 @@ - (void)testInteractionWithAnActivityViewController - (void)_dismissModal; { - if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { + if (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad) { [viewTester dismissPopover]; } else { [[viewTester usingLabel:@"Cancel"] tap]; diff --git a/KIF Tests/MultiFingerTests_ViewTestActor.m b/Tests/MultiFingerTests_ViewTestActor.m similarity index 100% rename from KIF Tests/MultiFingerTests_ViewTestActor.m rename to Tests/MultiFingerTests_ViewTestActor.m diff --git a/Tests/OffscreenTests.m b/Tests/OffscreenTests.m new file mode 100644 index 000000000..cac791932 --- /dev/null +++ b/Tests/OffscreenTests.m @@ -0,0 +1,36 @@ +// +// OffscreenTests.m +// KIF Tests +// +// Created by Steve Sun on 2023-03-28. +// + +#import +#import "KIFTestStepValidation.h" + +@interface OffscreenTests : KIFTestCase +@end + +@implementation OffscreenTests + +- (void)beforeEach +{ + [tester tapViewWithAccessibilityLabel:@"Offscreen Views"]; +} + +- (void)afterEach +{ + [tester tapViewWithAccessibilityLabel:@"Test Suite" traits:UIAccessibilityTraitButton]; +} + +- (void)testViewOffscreen +{ + [tester tapViewWithAccessibilityLabel:@"Scroll moving view"]; + [tester tapViewWithAccessibilityLabel:@"Move and hide views"]; + [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Out of screen view"]; + [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Alpha view"]; + [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Hidden view"]; + [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Scroll moving view"]; +} + +@end diff --git a/Tests/OffscreenTests_ViewTestActor.m b/Tests/OffscreenTests_ViewTestActor.m new file mode 100644 index 000000000..e24064888 --- /dev/null +++ b/Tests/OffscreenTests_ViewTestActor.m @@ -0,0 +1,37 @@ +// +// OffscreenTests_ViewTestActor.m +// KIF Tests +// +// Created by Steve Sun on 2023-03-31. +// + +#import +#import "KIFUITestActor.h" + +@interface OffscreenTests_ViewTestActor : KIFTestCase +@end + + +@implementation OffscreenTests_ViewTestActor + +- (void)beforeEach +{ + [[viewTester usingLabel:@"Offscreen Views"] tap]; +} + +- (void)afterEach +{ + [[[viewTester usingLabel:@"Test Suite"] usingTraits:UIAccessibilityTraitButton] tap]; +} + +- (void)testViewOffscreen +{ + [[viewTester usingLabel:@"Scroll moving view"] tap]; + [[viewTester usingLabel:@"Move and hide views"] tap]; + [[viewTester usingLabel:@"Out of screen view"] waitForAbsenceOfView]; + [[viewTester usingLabel:@"Alpha view"] waitForAbsenceOfView]; + [[viewTester usingLabel:@"Hidden view"] waitForAbsenceOfView]; + [[viewTester usingLabel:@"Scroll moving view"] waitForAbsenceOfView]; +} + +@end diff --git a/KIF Tests/PickerTests.m b/Tests/PickerTests.m similarity index 100% rename from KIF Tests/PickerTests.m rename to Tests/PickerTests.m diff --git a/KIF Tests/PickerTests_ViewTestActor.m b/Tests/PickerTests_ViewTestActor.m similarity index 100% rename from KIF Tests/PickerTests_ViewTestActor.m rename to Tests/PickerTests_ViewTestActor.m diff --git a/Tests/PullToRefreshTests.m b/Tests/PullToRefreshTests.m new file mode 100644 index 000000000..1f763843b --- /dev/null +++ b/Tests/PullToRefreshTests.m @@ -0,0 +1,55 @@ +// +// PullToRefreshTests.m +// KIF +// +// Created by Michael Lupo on 9/22/15. +// +// + +#import +#import +#import +#import + +@interface PullToRefreshTests : KIFTestCase +@end + +@implementation PullToRefreshTests + +- (void)beforeAll +{ + // Ensure that we've scrolled the TestSuite VC back to the top + [tester waitForViewWithAccessibilityLabel:@"Tapping"]; +} + +- (void)testPullToRefreshByAccessibilityLabelWithDuration +{ + [tester waitForViewWithAccessibilityIdentifier:@"Test Suite TableView"]; + [tester pullToRefreshViewWithAccessibilityLabel:@"Table View" pullDownDuration:KIFPullToRefreshInAboutAHalfSecond]; + + // Implicit scrolling of the table view when searching the view hierarchy is causing "Bingo!" to disappear. + // Hacky to use viewTester here, but the alternative would be to expose + // `usingCurrentFrame` functionality on the legacy `tester` API. + [[[viewTester usingCurrentFrame] usingLabel:@"Bingo!"] waitForView]; + [[[viewTester usingCurrentFrame] usingLabel:@"Bingo!"] waitForAbsenceOfView]; +} + +- (void)testPullToRefreshWithBigContentSize +{ + UITableView *tableView; + [tester waitForAccessibilityElement:NULL view:&tableView withIdentifier:@"Test Suite TableView" tappable:NO]; + CGSize originalSize = tableView.contentSize; + tableView.contentSize = CGSizeMake(1000, 10000); + + [tester pullToRefreshViewWithAccessibilityLabel:@"Table View" pullDownDuration:KIFPullToRefreshInAboutAHalfSecond]; + + // Implicit scrolling of the table view when searching the view hierarchy is causing "Bingo!" to disappear. + // Hacky to use viewTester here, but the alternative would be to expose + // `usingCurrentFrame` functionality on the legacy `tester` API. + [[[viewTester usingCurrentFrame] usingLabel:@"Bingo!"] waitForView]; + [[[viewTester usingCurrentFrame] usingLabel:@"Bingo!"] waitForAbsenceOfView]; + + tableView.contentSize = originalSize; +} + +@end diff --git a/Tests/PullToRefreshTests_ViewTestActor.m b/Tests/PullToRefreshTests_ViewTestActor.m new file mode 100644 index 000000000..e8ad4808b --- /dev/null +++ b/Tests/PullToRefreshTests_ViewTestActor.m @@ -0,0 +1,50 @@ +// +// PullToRefreshTests_ViewTestActor.m +// KIF +// +// Created by Alex Odawa on 1/29/16. +// +// + +#import +#import "KIFTestCase.h" +#import "KIFUIViewTestActor.h" + +@interface PullToRefreshTests_ViewTestActor : KIFTestCase +@end + +@implementation PullToRefreshTests_ViewTestActor + +- (void)beforeAll +{ + // Ensure that we've scrolled the TestSuite VC back to the top + [tester waitForViewWithAccessibilityLabel:@"Tapping"]; +} + +- (void)testPullToRefreshByAccessibilityLabelWithDuration +{ + [[viewTester usingIdentifier:@"Test Suite TableView"] waitForView]; + [[viewTester usingLabel:@"Table View"] pullToRefreshWithDuration:KIFPullToRefreshInAboutAHalfSecond]; + + // Implicit scrolling of the table view when searching the view hierarchy is causing "Bingo!" to disappear. + [[[viewTester usingCurrentFrame] usingLabel:@"Bingo!"] waitForView]; + [[[viewTester usingCurrentFrame] usingLabel:@"Bingo!"] waitForAbsenceOfView]; +} + +- (void)testPullToRefreshWithBigContentSize +{ + + UITableView *tableView = (id)[[viewTester usingIdentifier:@"Test Suite TableView"] waitForView]; + CGSize originalSize = tableView.contentSize; + tableView.contentSize = CGSizeMake(1000, 10000); + + [[viewTester usingLabel:@"Table View"] pullToRefreshWithDuration:KIFPullToRefreshInAboutAHalfSecond]; + + // Implicit scrolling of the table view when searching the view hierarchy is causing "Bingo!" to disappear. + [[[viewTester usingCurrentFrame] usingLabel:@"Bingo!"] waitForView]; + [[[viewTester usingCurrentFrame] usingLabel:@"Bingo!"] waitForAbsenceOfView]; + + tableView.contentSize = originalSize; +} + +@end diff --git a/KIF Tests/ScrollViewTests.m b/Tests/ScrollViewTests.m similarity index 100% rename from KIF Tests/ScrollViewTests.m rename to Tests/ScrollViewTests.m diff --git a/KIF Tests/ScrollViewTests_ViewTestActor.m b/Tests/ScrollViewTests_ViewTestActor.m similarity index 100% rename from KIF Tests/ScrollViewTests_ViewTestActor.m rename to Tests/ScrollViewTests_ViewTestActor.m diff --git a/KIF Tests/SearchFieldTests.m b/Tests/SearchFieldTests.m similarity index 100% rename from KIF Tests/SearchFieldTests.m rename to Tests/SearchFieldTests.m diff --git a/KIF Tests/SearchFieldTests_ViewTestActor.m b/Tests/SearchFieldTests_ViewTestActor.m similarity index 100% rename from KIF Tests/SearchFieldTests_ViewTestActor.m rename to Tests/SearchFieldTests_ViewTestActor.m diff --git a/KIF Tests/SpecificControlTests.m b/Tests/SpecificControlTests.m similarity index 100% rename from KIF Tests/SpecificControlTests.m rename to Tests/SpecificControlTests.m diff --git a/KIF Tests/SpecificControlTests_ViewTestActor.m b/Tests/SpecificControlTests_ViewTestActor.m similarity index 100% rename from KIF Tests/SpecificControlTests_ViewTestActor.m rename to Tests/SpecificControlTests_ViewTestActor.m diff --git a/Tests/SwiftUI Tests/SwiftUITappingTests.m b/Tests/SwiftUI Tests/SwiftUITappingTests.m new file mode 100644 index 000000000..3079dfb7f --- /dev/null +++ b/Tests/SwiftUI Tests/SwiftUITappingTests.m @@ -0,0 +1,78 @@ +// +// SwiftUITappingTests.m +// KIF +// +// Created by Bartłomiej Włodarczak on 03/02/2025. +// + +#import + +@interface SwiftUITappingTests : KIFTestCase +@end + +@implementation SwiftUITappingTests + +- (void)beforeEach +{ + [tester tapViewWithAccessibilityLabel:@"SwiftUI Tapping"]; +} + +- (void)afterEach +{ + [tester tapViewWithAccessibilityLabel:@"Test Suite" traits:UIAccessibilityTraitButton]; +} + +- (void)testTappingTextWithTapGesture +{ + [tester tapViewWithAccessibilityLabel:@"Text with tap gesture"]; + [tester waitForViewWithAccessibilityLabel:@"Tap count: 1"]; +} + +- (void)testTappingPartiallyOffscreenTextWithTapGesture +{ + [tester tapViewWithAccessibilityLabel:@"Partially offscreen text with tap gesture"]; + [tester waitForViewWithAccessibilityLabel:@"Tap count: 1"]; +} + +- (void)testTappingButton +{ + [tester tapViewWithAccessibilityLabel:@"Button"]; + [tester waitForViewWithAccessibilityLabel:@"Tap count: 1"]; + +} + +- (void)testTappingToggleSwitch +{ + [tester waitForViewWithAccessibilityLabel:@"Enabled"]; + [tester longPressViewWithAccessibilityLabel:@"Toggle switch" duration: 1.0f]; + [tester waitForViewWithAccessibilityLabel:@"Disabled"]; + + if (@available(iOS 17.0, *)) { + [tester longPressViewWithAccessibilityLabel:@"Toggle switch" value: nil traits:UIAccessibilityTraitToggleButton | UIAccessibilityTraitButton duration:1.0f]; + [tester waitForViewWithAccessibilityLabel:@"Enabled"]; + } +} + +- (void)testTappingStepper +{ + [tester tapViewWithAccessibilityLabel:@"Increment"]; + [tester waitForViewWithAccessibilityLabel:@"Value: 51"]; + [tester tapViewWithAccessibilityLabel:@"Decrement"]; + [tester waitForViewWithAccessibilityLabel:@"Value: 50"]; +} + +- (void)testLongPressingImage +{ + [tester tapViewWithAccessibilityLabel:@"Love"]; + [tester waitForViewWithAccessibilityLabel:@"Long press to toggle"]; + [tester longPressViewWithAccessibilityLabel:@"Love" duration:1]; + [tester waitForViewWithAccessibilityLabel:@"Tap to toggle"]; +} + +- (void)testTappingUIViewRepresentableLabel +{ + [tester tapViewWithAccessibilityLabel:@"UIViewRepresentable label"]; + [tester waitForViewWithAccessibilityLabel:@"Tap count: 1"]; +} + +@end diff --git a/Tests/SwiftUI Tests/SwiftUITypingTests.m b/Tests/SwiftUI Tests/SwiftUITypingTests.m new file mode 100644 index 000000000..7e730d444 --- /dev/null +++ b/Tests/SwiftUI Tests/SwiftUITypingTests.m @@ -0,0 +1,154 @@ +// +// SwiftUITypingTests.m +// KIF +// +// Created by Bartłomiej Włodarczak on 10/02/2025. +// + +#import +#import "KIFTestStepValidation.h" + +@interface SwiftUITypingTests : KIFTestCase +@end + +@implementation SwiftUITypingTests + +- (void)beforeEach +{ + UIPasteboard.generalPasteboard.string = nil; + [tester tapViewWithAccessibilityLabel:@"SwiftUI Typing"]; +} + +- (void)afterEach +{ + UIPasteboard.generalPasteboard.string = nil; + [tester tapViewWithAccessibilityLabel:@"Test Suite" traits:UIAccessibilityTraitButton]; +} + +- (void)testWaitingForFirstResponder +{ + [tester tapViewWithAccessibilityLabel:@"SwiftUI TextField" value:@"This is SwiftUI TextField" traits:UIAccessibilityTraitNone]; + [tester waitForFirstResponderWithAccessibilityLabel:@"SwiftUI TextField"]; +} + +- (void)testMissingFirstResponder +{ + KIFExpectFailure([[tester usingTimeout:1] waitForFirstResponderWithAccessibilityLabel:@"SwiftUI TextField"]); +} + +- (void)testEnteringTextIntoFirstResponder +{ + [tester tapViewWithAccessibilityLabel:@"SwiftUI TextField"]; + [tester enterTextIntoCurrentFirstResponder:@"Hello from SwiftUI TextField"]; + [tester waitForViewWithAccessibilityLabel:@"SwiftUI TextField" value:@"Hello from SwiftUI TextField" traits:UIAccessibilityTraitNone]; + [tester clearTextFromViewWithAccessibilityLabel:@"SwiftUI TextField"]; + [tester waitForAbsenceOfViewWithAccessibilityLabel:@"Hello from SwiftUI TextField"]; +} + +- (void)testFailingToEnterTextIntoFirstResponder +{ + KIFExpectFailure([[tester usingTimeout:1] enterTextIntoCurrentFirstResponder:@"Sup"]); +} + +- (void)testFillingAndClearingTextField +{ + [tester tapViewWithAccessibilityLabel:@"Fill text field"]; + [tester waitForViewWithAccessibilityLabel:@"SwiftUI TextField" value:@"This is some inserted text" traits: UIAccessibilityTraitNone]; + [tester tapViewWithAccessibilityLabel:@"Clear text field"]; + [tester waitForAbsenceOfViewWithAccessibilityLabel:@"SwiftUI TextField" value:@"This is some inserted text" traits:UIAccessibilityTraitNone]; + [tester waitForViewWithAccessibilityLabel:@"SwiftUI TextField" value:@"This is SwiftUI TextField" traits:UIAccessibilityTraitNone]; +} + +- (void)testClearingTextFromFirstResponder +{ + [tester tapViewWithAccessibilityLabel:@"Fill text field"]; + [tester clearTextFromAndThenEnterText:@"A man, a plan, a canal, Panama. Able was I, ere I saw Elba." intoViewWithAccessibilityLabel:@"SwiftUI TextField"]; + [tester clearTextFromFirstResponder]; + [tester waitForAbsenceOfViewWithAccessibilityLabel:@"SwiftUI TextField" value:@"A man, a plan, a canal, Panama. Able was I, ere I saw Elba." traits:UIAccessibilityTraitNone]; + [tester waitForViewWithAccessibilityLabel:@"SwiftUI TextField" value:@"This is SwiftUI TextField" traits:UIAccessibilityTraitNone]; +} + +- (void)testClearingTextFromViewWithAccessibilityLabel +{ + [tester tapViewWithAccessibilityLabel:@"Fill text field"]; + [tester clearTextFromAndThenEnterText:@"A man, a plan, a canal, Panama. Able was I, ere I saw Elba." intoViewWithAccessibilityLabel:@"SwiftUI TextField"]; + [tester clearTextFromViewWithAccessibilityLabel:@"SwiftUI TextField"]; + [tester waitForAbsenceOfViewWithAccessibilityLabel:@"SwiftUI TextField" value:@"A man, a plan, a canal, Panama. Able was I, ere I saw Elba." traits:UIAccessibilityTraitNone]; + [tester waitForViewWithAccessibilityLabel:@"SwiftUI TextField" value:@"This is SwiftUI TextField" traits:UIAccessibilityTraitNone]; +} + +- (void)testEnteringReturnCharacterIntoViewWithAccessibilityLabel +{ + [tester enterText:@"Hello\n" intoViewWithAccessibilityLabel:@"SwiftUI TextField"]; + [tester waitForViewWithAccessibilityLabel:@"Hello"]; + KIFExpectFailure([[tester usingTimeout:1] waitForFirstResponderWithAccessibilityLabel:@"SwiftUI TextField"]); +} + +- (void)testEnteringEmojiCharactersIntoViewWithAccessibilityLabel +{ + NSString *text = @" 😓He😤ll👿o"; + [tester enterText:text intoViewWithAccessibilityLabel:@"SwiftUI TextField"]; + [tester waitForViewWithAccessibilityLabel:@"SwiftUI TextField" value:text traits:UIAccessibilityTraitNone]; + [tester waitForViewWithAccessibilityLabel:text]; +} + +- (void)testSelectingAllAndTypingAgain +{ + [tester tapViewWithAccessibilityLabel:@"SwiftUI TextField"]; + [tester enterTextIntoCurrentFirstResponder:@"Thi"]; + [tester longPressViewWithAccessibilityLabel:@"SwiftUI TextField" duration:1]; + [tester tapViewWithAccessibilityLabel:@"Select All"]; + [tester enterTextIntoCurrentFirstResponder:@"This should overwrite current text"]; + [tester waitForViewWithAccessibilityLabel:@"SwiftUI TextField" value:@"This should overwrite current text" traits:UIAccessibilityTraitNone]; + [tester waitForViewWithAccessibilityLabel:@"This should overwrite current text"]; +} + +- (void)testThatBackspaceDeletesOneCharacter +{ + [tester enterText:@"hi\bello" intoViewWithAccessibilityLabel:@"SwiftUI TextField" traits:UIAccessibilityTraitNone expectedResult:@"Hello"]; + [tester waitForViewWithAccessibilityLabel:@"SwiftUI TextField" value:@"Hello" traits:UIAccessibilityTraitNone]; + [tester waitForViewWithAccessibilityLabel:@"Hello"]; +} + +- (void)testClearingAndEnteringTextIntoViewWithAccessibilityLabel +{ + [tester clearTextFromAndThenEnterText:@"Yo" intoViewWithAccessibilityLabel:@"SwiftUI TextField"]; +} + +- (void)testClearingAndEnteringQuotesIntoViewWithAccessibilityLabel +{ + [tester clearTextFromAndThenEnterText:@"'\"'," intoViewWithAccessibilityLabel:@"SwiftUI TextField"]; +} + +- (void)testClearingAndEnteringDashesIntoViewWithAccessibilityLabel +{ + [tester clearTextFromAndThenEnterText:@"--a" intoViewWithAccessibilityLabel:@"SwiftUI TextField"]; +} + +- (void)testClearingAndEnteringTypoIntoViewWithAccessibilityLabel +{ + [tester clearTextFromAndThenEnterText:@" Jkasd " intoViewWithAccessibilityLabel:@"SwiftUI TextField"]; +} + +- (void)testPastingTextIntoTextField +{ + NSString *text = @"This is a text from pasteboard"; + UIPasteboard.generalPasteboard.string = text; + [tester longPressViewWithAccessibilityLabel:@"SwiftUI TextField" duration:1]; + [tester tapViewWithAccessibilityLabel:@"Paste"]; + [tester waitForViewWithAccessibilityLabel:@"SwiftUI TextField" value:text traits:UIAccessibilityTraitNone]; + [tester waitForViewWithAccessibilityLabel:text]; +} + +- (void)testCopyingTextIntoPasteboard +{ + NSString *text = @"Text"; + [tester tapViewWithAccessibilityLabel:@"SwiftUI TextField"]; + [tester enterTextIntoCurrentFirstResponder:text]; + [tester longPressViewWithAccessibilityLabel:@"SwiftUI TextField" duration:1]; + [tester tapViewWithAccessibilityLabel:@"Select"]; + [tester tapViewWithAccessibilityLabel:@"Copy"]; + XCTAssertEqualObjects(UIPasteboard.generalPasteboard.string, text); +} + +@end diff --git a/KIF Tests/SystemAlertTests.m b/Tests/SystemAlertTests.m similarity index 100% rename from KIF Tests/SystemAlertTests.m rename to Tests/SystemAlertTests.m diff --git a/KIF Tests/SystemAlertTests_ViewTestActor.m b/Tests/SystemAlertTests_ViewTestActor.m similarity index 100% rename from KIF Tests/SystemAlertTests_ViewTestActor.m rename to Tests/SystemAlertTests_ViewTestActor.m diff --git a/KIF Tests/SystemTests.m b/Tests/SystemTests.m similarity index 61% rename from KIF Tests/SystemTests.m rename to Tests/SystemTests.m index bf695de11..46439dbc2 100644 --- a/KIF Tests/SystemTests.m +++ b/Tests/SystemTests.m @@ -63,48 +63,6 @@ - (void)testMemoryWarningSimulator } - (void)testMockingOpenURL -{ - __block BOOL openURLReturnValue; - __block BOOL canOpenURLReturnValue; - [system waitForApplicationToOpenURL:@"test123://" whileExecutingBlock:^{ - NSURL *uninstalledAppURL = [NSURL URLWithString:@"test123://"]; - canOpenURLReturnValue = [[UIApplication sharedApplication] canOpenURL:uninstalledAppURL]; - openURLReturnValue = [[UIApplication sharedApplication] openURL:uninstalledAppURL]; - } returning:NO]; - KIFAssertEqual(NO, openURLReturnValue, @"openURL: should have returned NO"); - KIFAssertEqual(NO, canOpenURLReturnValue, @"canOpenURL: should have returned NO"); - - [system waitForApplicationToOpenURL:@"test123://" whileExecutingBlock:^{ - NSURL *installedAppURL = [NSURL URLWithString:@"test123://"]; - canOpenURLReturnValue = [[UIApplication sharedApplication] canOpenURL:installedAppURL]; - openURLReturnValue = [[UIApplication sharedApplication] openURL:installedAppURL]; - } returning:YES]; - KIFAssertEqual(YES, openURLReturnValue, @"openURL: should have returned YES"); - KIFAssertEqual(YES, canOpenURLReturnValue, @"canOpenURL: should have returned YES"); - - [system waitForApplicationToOpenURLWithScheme:@"test123" whileExecutingBlock:^{ - NSURL *installedAppURL = [NSURL URLWithString:@"test123://some/path?query"]; - canOpenURLReturnValue = [[UIApplication sharedApplication] canOpenURL:installedAppURL]; - openURLReturnValue = [[UIApplication sharedApplication] openURL:installedAppURL]; - } returning:YES]; - KIFAssertEqual(YES, openURLReturnValue, @"openURL: should have returned YES"); - KIFAssertEqual(YES, canOpenURLReturnValue, @"canOpenURL: should have returned YES"); - - [system waitForApplicationToOpenAnyURLWhileExecutingBlock:^{ - NSURL *someURL = [NSURL URLWithString:@"423543523454://"]; - canOpenURLReturnValue = [[UIApplication sharedApplication] canOpenURL:someURL]; - openURLReturnValue = [[UIApplication sharedApplication] openURL:someURL]; - } returning:YES]; - KIFAssertEqual(YES, openURLReturnValue, @"openURL: should have returned YES"); - KIFAssertEqual(YES, canOpenURLReturnValue, @"canOpenURL: should have returned YES"); - - NSURL *fakeURL = [NSURL URLWithString:@"this-is-a-fake-url://"]; - KIFAssertFalse([[UIApplication sharedApplication] canOpenURL:fakeURL], @"Should no longer be mocking, reject bad URL."); - KIFAssertFalse([[UIApplication sharedApplication] openURL:fakeURL], @"Should no longer be mocking, reject bad URL."); -} - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 100000 -- (void)testMockingOpenURLiOS10xAndUp { __block BOOL canOpenURLReturnValue; [system waitForApplicationToOpenURL:@"test123://" whileExecutingBlock:^{ @@ -129,7 +87,7 @@ - (void)testMockingOpenURLiOS10xAndUp KIFAssertEqual(YES, canOpenURLReturnValue, @"canOpenURL: should have returned YES"); [system waitForApplicationToOpenAnyURLWhileExecutingBlock:^{ - NSURL *someURL = [NSURL URLWithString:@"423543523454://"]; + NSURL *someURL = [NSURL URLWithString:@"test12345://"]; canOpenURLReturnValue = [[UIApplication sharedApplication] canOpenURL:someURL]; [[UIApplication sharedApplication] openURL:someURL options:[NSDictionary dictionary] completionHandler:nil]; } returning:YES]; @@ -138,6 +96,5 @@ - (void)testMockingOpenURLiOS10xAndUp NSURL *fakeURL = [NSURL URLWithString:@"this-is-a-fake-url://"]; KIFAssertFalse([[UIApplication sharedApplication] canOpenURL:fakeURL], @"Should no longer be mocking, reject bad URL."); } -#endif @end diff --git a/KIF Tests/TableViewTests.m b/Tests/TableViewTests.m similarity index 100% rename from KIF Tests/TableViewTests.m rename to Tests/TableViewTests.m diff --git a/KIF Tests/TableViewTests_ViewTestActor.m b/Tests/TableViewTests_ViewTestActor.m similarity index 100% rename from KIF Tests/TableViewTests_ViewTestActor.m rename to Tests/TableViewTests_ViewTestActor.m diff --git a/KIF Tests/TappingTests.m b/Tests/TappingTests.m similarity index 100% rename from KIF Tests/TappingTests.m rename to Tests/TappingTests.m diff --git a/KIF Tests/TappingTests_ViewTestActor.m b/Tests/TappingTests_ViewTestActor.m similarity index 100% rename from KIF Tests/TappingTests_ViewTestActor.m rename to Tests/TappingTests_ViewTestActor.m diff --git a/KIF Tests/TypingTests.m b/Tests/TypingTests.m similarity index 97% rename from KIF Tests/TypingTests.m rename to Tests/TypingTests.m index f50a2cd2a..d1681c02a 100644 --- a/KIF Tests/TypingTests.m +++ b/Tests/TypingTests.m @@ -16,6 +16,7 @@ @implementation TypingTests - (void)beforeEach { + UIPasteboard.generalPasteboard.string = nil; [tester tapViewWithAccessibilityLabel:@"Tapping"]; } @@ -38,7 +39,7 @@ - (void)testMissingFirstResponder - (void)testEnteringTextIntoFirstResponder { [tester tapViewWithAccessibilityLabel:@"Greeting"]; - [tester longPressViewWithAccessibilityLabel:@"Greeting" value:@"Hello" duration:2]; + [tester longPressViewWithAccessibilityLabel:@"Greeting" value:@"Hello" duration:1]; [tester tapViewWithAccessibilityLabel:@"Select All"]; [tester enterTextIntoCurrentFirstResponder:@"Yo"]; [tester waitForViewWithAccessibilityLabel:@"Greeting" value:@"Yo" traits:UIAccessibilityTraitNone]; @@ -52,7 +53,7 @@ - (void)testFailingToEnterTextIntoFirstResponder - (void)testEnteringTextIntoViewWithAccessibilityLabel { [tester tapViewWithAccessibilityLabel:@"Greeting"]; - [tester longPressViewWithAccessibilityLabel:@"Greeting" value:@"Hello" duration:2]; + [tester longPressViewWithAccessibilityLabel:@"Greeting" value:@"Hello" duration:1]; [tester tapViewWithAccessibilityLabel:@"Select All"]; [tester tapViewWithAccessibilityLabel:@"Cut"]; [tester enterText:@"Yo" intoViewWithAccessibilityLabel:@"Greeting"]; @@ -109,7 +110,7 @@ - (void)testClearingALongTextField - (void)testSettingTextIntoViewWithAccessibilityLabel { UIView *greetingView = [tester waitForViewWithAccessibilityLabel:@"Greeting"]; - [tester longPressViewWithAccessibilityLabel:@"Greeting" duration:2]; + [tester longPressViewWithAccessibilityLabel:@"Greeting" duration:1]; [tester setText:@"Yo" intoViewWithAccessibilityLabel:@"Greeting"]; [tester expectView:greetingView toContainText:@"Yo"]; [tester setText:@"Hello" intoViewWithAccessibilityLabel:@"Greeting"]; diff --git a/KIF Tests/TypingTests_ViewTestActor.m b/Tests/TypingTests_ViewTestActor.m similarity index 97% rename from KIF Tests/TypingTests_ViewTestActor.m rename to Tests/TypingTests_ViewTestActor.m index 384c805be..e5ef5f8b1 100644 --- a/KIF Tests/TypingTests_ViewTestActor.m +++ b/Tests/TypingTests_ViewTestActor.m @@ -17,6 +17,7 @@ @implementation TypingTests_ViewTestActor - (void)beforeEach { + UIPasteboard.generalPasteboard.string = nil; [[viewTester usingLabel:@"Tapping"] tap]; } @@ -39,7 +40,7 @@ - (void)testMissingFirstResponder - (void)testEnteringTextIntoFirstResponder { [tester tapViewWithAccessibilityLabel:@"Greeting"]; - [[[viewTester usingLabel:@"Greeting"] usingValue:@"Hello"] longPressWithDuration:2]; + [[[viewTester usingLabel:@"Greeting"] usingValue:@"Hello"] longPressWithDuration:1]; [[viewTester usingLabel:@"Select All"] tap]; [[viewTester usingFirstResponder] enterText:@"Yo"]; [[[viewTester usingLabel:@"Greeting"] usingValue:@"Yo"] waitForView]; @@ -53,7 +54,7 @@ - (void)testFailingToEnterTextIntoFirstResponder - (void)testEnteringTextIntoViewWithAccessibilityLabel { [tester tapViewWithAccessibilityLabel:@"Greeting"]; - [[[viewTester usingLabel:@"Greeting"] usingValue:@"Hello"] longPressWithDuration:2]; + [[[viewTester usingLabel:@"Greeting"] usingValue:@"Hello"] longPressWithDuration:1]; [[viewTester usingLabel:@"Select All"] tap]; [[viewTester usingLabel:@"Cut"] tap]; [[viewTester usingLabel:@"Greeting"] enterText:@"Yo"]; diff --git a/KIF Tests/UIApplicationKIFAdditionsTests.m b/Tests/UIApplicationKIFAdditionsTests.m similarity index 100% rename from KIF Tests/UIApplicationKIFAdditionsTests.m rename to Tests/UIApplicationKIFAdditionsTests.m diff --git a/KIF Tests/WaitForAbscenceTests.m b/Tests/WaitForAbscenceTests.m similarity index 100% rename from KIF Tests/WaitForAbscenceTests.m rename to Tests/WaitForAbscenceTests.m diff --git a/KIF Tests/WaitForAbscenceTests_ViewTestActor.m b/Tests/WaitForAbscenceTests_ViewTestActor.m similarity index 100% rename from KIF Tests/WaitForAbscenceTests_ViewTestActor.m rename to Tests/WaitForAbscenceTests_ViewTestActor.m diff --git a/KIF Tests/WaitForAnimationTests.m b/Tests/WaitForAnimationTests.m similarity index 100% rename from KIF Tests/WaitForAnimationTests.m rename to Tests/WaitForAnimationTests.m diff --git a/KIF Tests/WaitForAnimationTests_ViewTestActor.m b/Tests/WaitForAnimationTests_ViewTestActor.m similarity index 100% rename from KIF Tests/WaitForAnimationTests_ViewTestActor.m rename to Tests/WaitForAnimationTests_ViewTestActor.m diff --git a/KIF Tests/WaitForTappableViewTests.m b/Tests/WaitForTappableViewTests.m similarity index 100% rename from KIF Tests/WaitForTappableViewTests.m rename to Tests/WaitForTappableViewTests.m diff --git a/KIF Tests/WaitForTappableViewTests_ViewTestActor.m b/Tests/WaitForTappableViewTests_ViewTestActor.m similarity index 100% rename from KIF Tests/WaitForTappableViewTests_ViewTestActor.m rename to Tests/WaitForTappableViewTests_ViewTestActor.m diff --git a/KIF Tests/WaitForViewTests.m b/Tests/WaitForViewTests.m similarity index 51% rename from KIF Tests/WaitForViewTests.m rename to Tests/WaitForViewTests.m index 32013b1a7..ac2415d7f 100644 --- a/KIF Tests/WaitForViewTests.m +++ b/Tests/WaitForViewTests.m @@ -28,20 +28,7 @@ - (void)testWaitingForViewWithAccessibilityLabel - (void)testWaitingForViewWithTraits { - NSString *label = nil; - UIAccessibilityTraits traits = UIAccessibilityTraitNone; - - NSOperatingSystemVersion iOS9 = {9, 0, 0}; - if ([NSProcessInfo instancesRespondToSelector:@selector(isOperatingSystemAtLeastVersion:)] && ![[NSProcessInfo new] isOperatingSystemAtLeastVersion:iOS9]) { - // In iOS 8 and before, you couldn't identify the table view elements as buttons - label = @"Test Suite"; - traits = UIAccessibilityTraitStaticText; - } else { - // In iOS 11, the static text trait of the navigation bar header goes away for some reason - label = @"UIAlertView"; - traits = UIAccessibilityTraitButton; - } - [tester waitForViewWithAccessibilityLabel:label traits:traits]; + [tester waitForViewWithAccessibilityLabel:@"Reset Refresh Control" traits:UIAccessibilityTraitButton]; } - (void)testWaitingForViewWithValue diff --git a/Tests/WaitForViewTests_ViewTestActor.m b/Tests/WaitForViewTests_ViewTestActor.m new file mode 100644 index 000000000..d97ee5771 --- /dev/null +++ b/Tests/WaitForViewTests_ViewTestActor.m @@ -0,0 +1,41 @@ +// +// ViewWaitForViewTests.m +// KIF +// +// Created by Alex Odawa on 1/26/15. +// +// + + +#import + +@interface WaitForViewTests_ViewTestActor : KIFTestCase +@end + + +@implementation WaitForViewTests_ViewTestActor + +- (void)beforeAll; +{ + [super beforeAll]; + + // If a previous test was still in the process of navigating back to the main view, let that complete before starting this test + [tester waitForAnimationsToFinish]; +} + +- (void)testWaitingForViewWithAccessibilityLabel +{ + [[viewTester usingLabel:@"Test Suite"] waitForView]; +} + +- (void)testWaitingForViewWithTraits +{ + [[[viewTester usingLabel:@"Reset Refresh Control"] usingTraits:UIAccessibilityTraitButton] waitForView]; +} + +- (void)testWaitingForViewWithValue +{ + [[[viewTester usingLabel:@"Switch 1"] usingValue:@"1"] waitForView]; +} + +@end diff --git a/KIF Tests/WebViewTests.m b/Tests/WebViewTests.m similarity index 100% rename from KIF Tests/WebViewTests.m rename to Tests/WebViewTests.m diff --git a/KIF Tests/WebViewTests_ViewTestActor.m b/Tests/WebViewTests_ViewTestActor.m similarity index 100% rename from KIF Tests/WebViewTests_ViewTestActor.m rename to Tests/WebViewTests_ViewTestActor.m diff --git a/scripts/ci.sh b/scripts/ci.sh deleted file mode 100755 index ea6b64e23..000000000 --- a/scripts/ci.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash - -set -o xtrace -set -o errexit -set -o pipefail - -SIMULATOR=$1 - -function xcode_major() { - if [ -z $XCODE_MAJOR ]; then - XCODE_MAJOR=`xcodebuild -version | head -n1 | sed -e "s/Xcode //" | cut -d '.' -f1` - fi - echo "$XCODE_MAJOR" -} - -function is_xcode_version_above() { - if [[ `xcode_major` -ge $1 ]]; then - return 0 - else - return 1 - fi -} - -if [ -z "${SIMULATOR}" ]; then - echo 'Must supply a simulator description in the form of "name=iPad Air,OS=9.2"' - exit 1 -fi - -rm -rf ${PWD}/build - -env NSUnbufferedIO=YES xcodebuild test -project KIF.xcodeproj -derivedDataPath=${PWD}/build/KIFFramework -scheme KIFFrameworkConsumerTests -destination "platform=iOS Simulator,${SIMULATOR}" | xcpretty -c -env NSUnbufferedIO=YES xcodebuild test -project KIF.xcodeproj -scheme KIF -derivedDataPath=${PWD}/build/KIF -destination "platform=iOS Simulator,${SIMULATOR}" | xcpretty -c - -# Due to unstable Swift language syntax, this only compiles on Xcode 8+ -if is_xcode_version_above 11; then - env NSUnbufferedIO=YES xcodebuild test -project "Documentation/Examples/Testable Swift/Testable Swift.xcodeproj" -scheme "Testable Swift" -derivedDataPath=${PWD}/build/TestableSwift -destination "platform=iOS Simulator,${SIMULATOR}" | xcpretty -c - env NSUnbufferedIO=YES xcodebuild test -project "SPMIntegration/SPMIntegration.xcodeproj" -scheme "SPMIntegration" -derivedDataPath=${PWD}/build/SPMIntegration -destination "platform=iOS Simulator,${SIMULATOR}" | xcpretty -c -fi - -env NSUnbufferedIO=YES xcodebuild test -project "Documentation/Examples/Testable/Testable.xcodeproj" -scheme Testable -derivedDataPath=${PWD}/build/Testable -destination "platform=iOS Simulator,${SIMULATOR}" | xcpretty -c -# For some reason, attempting to run the Calculator tests on Xcode 7 causes a frequent crash in CI -env NSUnbufferedIO=YES xcodebuild build -project "Documentation/Examples/Calculator/Calculator.xcodeproj" -scheme "Calculator" -derivedDataPath=${PWD}/build/Calculator -destination "platform=iOS Simulator,${SIMULATOR}" | xcpretty -c - -if ! is_xcode_version_above 12 ; then # see https://github.com/Carthage/Carthage/issues/3019 for Xcode 12 support - carthage build --no-skip-current - carthage archive KIF -fi - -swift build -Xcc "-isysroot" -Xcc "$(xcrun --sdk iphonesimulator --show-sdk-path)" -Xcc "-target" -Xcc "x86_64-apple-ios$(xcrun --sdk iphonesimulator --show-sdk-version)-simulator"