Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrated this library from Swift 3 to Swift 5 #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 23 additions & 53 deletions Example/KIF-Quick.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@
607FACCC1AFB9204008FA782 /* Sources */,
607FACCD1AFB9204008FA782 /* Frameworks */,
607FACCE1AFB9204008FA782 /* Resources */,
03A233D4BF3FF19D392FA0D1 /* [CP] Embed Pods Frameworks */,
9A5C481FACFCF47B8913868D /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -190,7 +188,6 @@
607FACE21AFB9204008FA782 /* Frameworks */,
607FACE31AFB9204008FA782 /* Resources */,
5DA08A1051D2406449BA726D /* [CP] Embed Pods Frameworks */,
0565EA9316600D7D3228FFFB /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -228,6 +225,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -262,49 +260,26 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
03A233D4BF3FF19D392FA0D1 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KIF-Quick_Example/Pods-KIF-Quick_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
0565EA9316600D7D3228FFFB /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KIF-Quick_Tests/Pods-KIF-Quick_Tests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
5DA08A1051D2406449BA726D /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-KIF-Quick_Tests/Pods-KIF-Quick_Tests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/KIF/KIF.framework",
"${BUILT_PRODUCTS_DIR}/KIF-Quick/KIF_Quick.framework",
"${BUILT_PRODUCTS_DIR}/Quick/Quick.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KIF.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KIF_Quick.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Quick.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KIF-Quick_Tests/Pods-KIF-Quick_Tests-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KIF-Quick_Tests/Pods-KIF-Quick_Tests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
90B7335B34F07998D3828595 /* [CP] Check Pods Manifest.lock */ = {
Expand All @@ -313,28 +288,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-KIF-Quick_Example-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
9A5C481FACFCF47B8913868D /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-KIF-Quick_Example/Pods-KIF-Quick_Example-resources.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
C768C9854FDD1E206A5E0EAC /* [CP] Check Pods Manifest.lock */ = {
Expand All @@ -343,13 +306,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-KIF-Quick_Tests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -441,7 +407,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -482,7 +448,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -501,6 +467,7 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -514,6 +481,7 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -530,6 +498,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUNDLE_LOADER)";
};
name = Debug;
Expand All @@ -543,6 +512,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUNDLE_LOADER)";
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "NO">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACE41AFB9204008FA782"
BuildableName = "KIF-Quick_Tests.xctest"
BlueprintName = "KIF-Quick_Tests"
ReferencedContainer = "container:KIF-Quick.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -69,8 +57,18 @@
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACE41AFB9204008FA782"
BuildableName = "KIF-Quick_Tests.xctest"
BlueprintName = "KIF-Quick_Tests"
ReferencedContainer = "container:KIF-Quick.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -92,8 +90,6 @@
ReferencedContainer = "container:KIF-Quick.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
32 changes: 19 additions & 13 deletions Example/KIF-Quick/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -21,8 +19,8 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6ID-Xi-DYH">
<rect key="frame" x="44" y="318" width="287" height="30"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6ID-Xi-DYH">
<rect key="frame" x="44" y="318.5" width="287" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="287" id="W1g-8Z-abt"/>
</constraints>
Expand All @@ -31,22 +29,30 @@
<action selector="onTap:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="nTV-I3-1hi"/>
</connections>
</button>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter some text" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="45W-aR-3Wn">
<rect key="frame" x="44" y="259.5" width="287" height="34"/>
<accessibility key="accessibilityConfiguration" hint="text_field" identifier="text_field" label="text_field"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="45W-aR-3Wn" firstAttribute="leading" secondItem="6ID-Xi-DYH" secondAttribute="leading" id="Brx-ie-fiY"/>
<constraint firstItem="45W-aR-3Wn" firstAttribute="centerX" secondItem="6ID-Xi-DYH" secondAttribute="centerX" id="M9X-By-m5k"/>
<constraint firstItem="6ID-Xi-DYH" firstAttribute="centerY" secondItem="kh9-bI-dsS" secondAttribute="centerY" id="OMz-gE-ule"/>
<constraint firstItem="45W-aR-3Wn" firstAttribute="trailing" secondItem="6ID-Xi-DYH" secondAttribute="trailing" id="g20-Mm-gAI"/>
<constraint firstItem="6ID-Xi-DYH" firstAttribute="top" secondItem="45W-aR-3Wn" secondAttribute="bottom" constant="25" id="j3i-vJ-yep"/>
<constraint firstItem="6ID-Xi-DYH" firstAttribute="centerX" secondItem="kh9-bI-dsS" secondAttribute="centerX" id="pWO-ng-uhA"/>
</constraints>
</view>
<connections>
<outlet property="textField" destination="45W-aR-3Wn" id="sNM-LY-aNQ"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="20.5" y="41.5"/>
<point key="canvasLocation" x="29.710144927536234" y="27.790178571428569"/>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4_7.fullscreen"/>
</simulatedMetricsContainer>
</document>
10 changes: 9 additions & 1 deletion Example/KIF-Quick/ViewController.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import UIKit

class ViewController: UIViewController {
@IBOutlet var textField: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func onTap(_ button: UIButton) {
button.setTitle("Thank you!", for: .normal)
guard let text = textField.text, !text.isEmpty else {
button.setTitle("Tap Me", for: .normal)
return
}
button.setTitle(text, for: .normal)
}
}
23 changes: 14 additions & 9 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
PODS:
- KIF (3.5.1):
- KIF/Core (= 3.5.1)
- KIF (3.8.7):
- KIF/Core (= 3.8.7)
- KIF-Quick (1.1.0):
- KIF (~> 3.0)
- Quick (~> 1.0)
- KIF/Core (3.5.1)
- Quick (1.0.0)
- Quick (~> 1.3.2)
- KIF/Core (3.8.7)
- Quick (1.3.4)

DEPENDENCIES:
- KIF-Quick (from `../`)

SPEC REPOS:
trunk:
- KIF
- Quick

EXTERNAL SOURCES:
KIF-Quick:
:path: "../"

SPEC CHECKSUMS:
KIF: 082eb65279e51c3092923802849eb796a04982ab
KIF-Quick: d2b9cd7d28405983adf61d5b582165226aca93b7
Quick: 8024e4a47e6cc03a9d5245ef0948264fc6d27cff
KIF: 779cdbca106633b94ecee7b036537490ebdbd9de
KIF-Quick: 504e4c62294ac0b4cee6419bfb832f6af3eaf1e6
Quick: f4f7f063c524394c73ed93ac70983c609805d481

PODFILE CHECKSUM: 48447a2c9dab6d7233a99da1a7a9670158e4eb0e

COCOAPODS: 1.1.1
COCOAPODS: 1.11.3
15 changes: 11 additions & 4 deletions Example/Tests/SampleSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,25 @@ class SampleSpec: KIFSpec {
override func spec() {
describe("example app") {
context("main view") {

it("should have a button") {
it("should have necessary views") {
viewTester().usingLabel("Tap Me").waitForView()
viewTester().usingLabel("text_field").waitForView()
}
context("inject data to view") {
it("should allow data injection") {
viewTester().usingLabel("text_field").replaceText("Test Message")
}
}

context("tap") {
it("should be grateful") {
viewTester().usingLabel("Tap Me").tap()
viewTester().usingLabel("Thank you!").waitForView()
viewTester().usingLabel("Test Message").waitForView()
}
}
}
}
}
}



5 changes: 3 additions & 2 deletions KIF-Quick.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ Write Quick specs to drive KIF actors through user interface actions.
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Paul Zabelin' => '[email protected]' }
s.source = { :git => 'https://github.com/doordash/KIF-Quick.git', :tag => s.version.to_s }
s.platform = :ios, '8.0'
s.platform = :ios, '13.0'
s.swift_version = '5.0'
s.source_files = 'KIF-Quick/Classes'
s.framework = 'XCTest'
s.dependency 'KIF', '~> 3.0'
s.dependency 'Quick', '~> 1.0'
s.dependency 'Quick', '~> 1.3.2'
end
Loading