From 61a4715331fddd4c7526148bd5c3aacaaff37acc Mon Sep 17 00:00:00 2001 From: Daniel Ornelas Date: Mon, 1 May 2023 13:01:57 -0700 Subject: [PATCH 01/15] Bump ios minimum deployment target to 11.0 --- KIF.xcodeproj/project.pbxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/KIF.xcodeproj/project.pbxproj b/KIF.xcodeproj/project.pbxproj index 0dd2ab00..bd469678 100644 --- a/KIF.xcodeproj/project.pbxproj +++ b/KIF.xcodeproj/project.pbxproj @@ -1789,7 +1789,7 @@ 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; @@ -1834,7 +1834,7 @@ 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; @@ -2097,7 +2097,7 @@ 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; From 3eb917baae02356c66d13a241af5408f907b93c2 Mon Sep 17 00:00:00 2001 From: Daniel Ornelas Date: Sat, 6 May 2023 23:21:19 -0700 Subject: [PATCH 02/15] Fixing tests to compile with iOS11 --- KIF Tests/ModalViewTests.m | 4 +- KIF Tests/ModalViewTests_ViewTestActor.m | 4 +- KIF Tests/SystemTests.m | 43 ------------------- .../Base.lproj/MainStoryboard.storyboard | 6 +-- Test Host/TestSuiteViewController.m | 39 ++++++++++++++--- 5 files changed, 41 insertions(+), 55 deletions(-) diff --git a/KIF Tests/ModalViewTests.m b/KIF Tests/ModalViewTests.m index cdee7f76..330a9413 100644 --- a/KIF Tests/ModalViewTests.m +++ b/KIF Tests/ModalViewTests.m @@ -31,8 +31,8 @@ - (void)testInteractionWithAnAlertView - (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"]; diff --git a/KIF Tests/ModalViewTests_ViewTestActor.m b/KIF Tests/ModalViewTests_ViewTestActor.m index a885755a..b6e63bf5 100644 --- a/KIF Tests/ModalViewTests_ViewTestActor.m +++ b/KIF Tests/ModalViewTests_ViewTestActor.m @@ -31,8 +31,8 @@ - (void)testInteractionWithAnAlertView - (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]; diff --git a/KIF Tests/SystemTests.m b/KIF Tests/SystemTests.m index bf695de1..9973261c 100644 --- a/KIF Tests/SystemTests.m +++ b/KIF 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:^{ @@ -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/Test Host/Base.lproj/MainStoryboard.storyboard b/Test Host/Base.lproj/MainStoryboard.storyboard index 1235360b..59d0ffdd 100644 --- a/Test Host/Base.lproj/MainStoryboard.storyboard +++ b/Test Host/Base.lproj/MainStoryboard.storyboard @@ -1,9 +1,9 @@ - + - + @@ -317,7 +317,7 @@ -