diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 546ecad..530adfe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,7 @@ jobs: run: bundle exec fastlane ui_test - name: Uploading Artifacts + if: ${{ always() }} uses: actions/upload-artifact@v3 with: name: tests Artifacts diff --git a/Example/Gemfile.lock b/Example/Gemfile.lock index c6e24bd..4c18a41 100644 --- a/Example/Gemfile.lock +++ b/Example/Gemfile.lock @@ -15,6 +15,22 @@ GEM json (>= 1.5.1) artifactory (3.0.15) atomos (0.1.3) + aws-eventstream (1.2.0) + aws-partitions (1.795.0) + aws-sdk-core (3.180.1) + aws-eventstream (~> 1, >= 1.0.2) + aws-partitions (~> 1, >= 1.651.0) + aws-sigv4 (~> 1.5) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.71.0) + aws-sdk-core (~> 3, >= 3.177.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.132.0) + aws-sdk-core (~> 3, >= 3.179.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.6) + aws-sigv4 (1.6.0) + aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) claide (1.1.0) cocoapods (1.12.0) @@ -60,7 +76,7 @@ GEM highline (~> 2.0.0) concurrent-ruby (1.2.2) declarative (0.0.20) - digest-crc (0.6.4) + digest-crc (0.6.5) rake (>= 12.0.0, < 14.0.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) @@ -69,7 +85,7 @@ GEM escape (0.0.4) ethon (0.16.0) ffi (>= 1.15.0) - excon (0.99.0) + excon (0.100.0) faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -99,7 +115,7 @@ GEM faraday_middleware (1.2.0) faraday (~> 1.0) fastimage (2.2.7) - fastlane (2.213.0) + fastlane (2.214.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -142,9 +158,9 @@ GEM fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.42.0) + google-apis-androidpublisher_v3 (0.46.0) google-apis-core (>= 0.11.0, < 2.a) - google-apis-core (0.11.0) + google-apis-core (0.11.1) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -173,7 +189,7 @@ GEM google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (1.5.2) + googleauth (1.7.0) faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) memoist (~> 0.16) @@ -188,7 +204,7 @@ GEM concurrent-ruby (~> 1.0) jmespath (1.6.2) json (2.6.3) - jwt (2.7.0) + jwt (2.7.1) memoist (0.16.2) mini_magick (4.12.0) mini_mime (1.1.2) @@ -260,7 +276,7 @@ PLATFORMS DEPENDENCIES cocoapods (= 1.12) - fastlane (= 2.213.0) + fastlane (= 2.214.0) BUNDLED WITH 2.4.3 diff --git a/Example/Swerkin.xcodeproj/project.pbxproj b/Example/Swerkin.xcodeproj/project.pbxproj index acf6ac3..1d3e154 100644 --- a/Example/Swerkin.xcodeproj/project.pbxproj +++ b/Example/Swerkin.xcodeproj/project.pbxproj @@ -61,7 +61,7 @@ containerPortal = 607FACC81AFB9204008FA782 /* Project object */; proxyType = 1; remoteGlobalIDString = 607FACCF1AFB9204008FA782; - remoteInfo = "Swerkin_Example"; + remoteInfo = Swerkin_Example; }; /* End PBXContainerItemProxy section */ @@ -702,6 +702,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_TESTING_SEARCH_PATHS = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -719,7 +720,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; + ONLY_ACTIVE_ARCH = NO; SDKROOT = iphoneos; SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -761,6 +762,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTING_SEARCH_PATHS = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -771,6 +773,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = NO; + ONLY_ACTIVE_ARCH = NO; SDKROOT = iphoneos; SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; diff --git a/Example/fastlane/Fastfile b/Example/fastlane/Fastfile index fb42942..9f5f254 100644 --- a/Example/fastlane/Fastfile +++ b/Example/fastlane/Fastfile @@ -56,7 +56,7 @@ if (installed_xcodes.empty? || !installed_xcodes.include?(requested_xcode)) end end -simulator = "iPhone 14 Pro" +simulator = "iPhone 14 Pro (16.4)" # Select Xcode Defined in ENV or Fastfile xcode_select requested_xcode @@ -66,21 +66,22 @@ default_platform(:ios) platform :ios do lane :ui_test do scan( + workspace: "Swerkin.xcworkspace", scheme: "Swerkin-UITests", only_testing: "Swerkin-UITests", test_without_building: true, + devices: [simulator], configuration: "Debug", sdk: "iphonesimulator", - workspace: "Swerkin.xcworkspace", - devices: [simulator], output_types: "junit,html", output_files: "swerkin_app.junit", + result_bundle: true, buildlog_path: "./fastlane/test_output" - ) + ) end lane :unit_test do - scan( + scan( workspace: "Swerkin.xcworkspace", scheme: "Swerkin-UnitTests", only_testing: "Swerkin-UnitTests", @@ -90,7 +91,7 @@ platform :ios do output_files: "swerkin_app.junit", result_bundle: true, buildlog_path: "./fastlane/test_output" - ) + ) end lane :build_for_testing do diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..f2753da --- /dev/null +++ b/Package.swift @@ -0,0 +1,38 @@ +// swift-tools-version:5.3 + +import PackageDescription + +let package = Package( + name: "Swerkin", + defaultLocalization: "en", + platforms: [.iOS(.v12)], + products: [ + // Products define the executables and libraries a package produces, making them visible to other packages. + .library( + name: "Swerkin", + targets: ["Swerkin", "SwerkinAdditions"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + .package(url: "https://github.com/kif-framework/KIF.git", .upToNextMajor(from: "3.8.9"))], + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .target( + name: "SwerkinAdditions", + dependencies: [], + path: "Sources", + exclude: ["Swerkin"], + publicHeadersPath: ".", + cSettings: [ + .headerSearchPath(".") + ] + ), + .target( + name: "Swerkin", + dependencies: ["KIF","SwerkinAdditions"], + path: "Sources/Swerkin") + ], + swiftLanguageVersions: [.v5] +) diff --git a/Sources/Swerkin/Classes/Extensions/UIView+Accessibility.swift b/Sources/Swerkin/Classes/Extensions/UIView+Accessibility.swift index 0acba8a..57392f1 100644 --- a/Sources/Swerkin/Classes/Extensions/UIView+Accessibility.swift +++ b/Sources/Swerkin/Classes/Extensions/UIView+Accessibility.swift @@ -5,6 +5,8 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import UIKit + public typealias AccessibilityPair = (label: String, identifier: String) public extension UIView { diff --git a/Sources/Swerkin/Classes/Extensions/XCTestCase+KIF.swift b/Sources/Swerkin/Classes/Extensions/XCTestCase+KIF.swift index 6c983ba..a714e61 100644 --- a/Sources/Swerkin/Classes/Extensions/XCTestCase+KIF.swift +++ b/Sources/Swerkin/Classes/Extensions/XCTestCase+KIF.swift @@ -9,10 +9,12 @@ import Foundation import XCTest import KIF + #if SWIFT_PACKAGE @_exported import SwerkinAdditions #endif + extension XCTestCase { var tester: KIFUIViewTestActor { return viewTester() } diff --git a/Sources/Swerkin/Classes/Protocols/Assertable/Assertable+ScreenObject.swift b/Sources/Swerkin/Classes/Protocols/Assertable/Assertable+ScreenObject.swift index 1871ee9..28c2b14 100644 --- a/Sources/Swerkin/Classes/Protocols/Assertable/Assertable+ScreenObject.swift +++ b/Sources/Swerkin/Classes/Protocols/Assertable/Assertable+ScreenObject.swift @@ -5,6 +5,9 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import UIKit +import XCTest + public extension Assertable where Self: Screen { func elementExists(withIdentifier identifier: String) -> Bool { diff --git a/Sources/Swerkin/Classes/Protocols/Assertable/Assertable+StepDefiner.swift b/Sources/Swerkin/Classes/Protocols/Assertable/Assertable+StepDefiner.swift index 0da09f2..bb5c33e 100644 --- a/Sources/Swerkin/Classes/Protocols/Assertable/Assertable+StepDefiner.swift +++ b/Sources/Swerkin/Classes/Protocols/Assertable/Assertable+StepDefiner.swift @@ -5,6 +5,9 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import UIKit +import XCTest + extension Steps: Assertable { public func elementExists(withIdentifier identifier: String) -> Bool { diff --git a/Sources/Swerkin/Classes/Protocols/Assertable/AssertableProtocol.swift b/Sources/Swerkin/Classes/Protocols/Assertable/AssertableProtocol.swift index 472a5f6..6439436 100644 --- a/Sources/Swerkin/Classes/Protocols/Assertable/AssertableProtocol.swift +++ b/Sources/Swerkin/Classes/Protocols/Assertable/AssertableProtocol.swift @@ -5,6 +5,8 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import UIKit + public protocol Assertable: ElementAssertable, WaitAssertable, TextFieldAssertable, ButtonAssertable, ImageAssertable, LabelAssertable, TableCellAssertable { } public protocol ElementAssertable { diff --git a/Sources/Swerkin/Classes/Protocols/Touchable/Touchable+ScreenObject.swift b/Sources/Swerkin/Classes/Protocols/Touchable/Touchable+ScreenObject.swift index 00ccb84..1c70a03 100644 --- a/Sources/Swerkin/Classes/Protocols/Touchable/Touchable+ScreenObject.swift +++ b/Sources/Swerkin/Classes/Protocols/Touchable/Touchable+ScreenObject.swift @@ -5,6 +5,8 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import KIF + public extension Touchable where Self: Screen { func touchView(withIdentifier id: String? = nil, withLabel label: String? = nil, diff --git a/Sources/Swerkin/Classes/Protocols/Touchable/Touchable+StepDefiner.swift b/Sources/Swerkin/Classes/Protocols/Touchable/Touchable+StepDefiner.swift index dc8664a..d252e03 100644 --- a/Sources/Swerkin/Classes/Protocols/Touchable/Touchable+StepDefiner.swift +++ b/Sources/Swerkin/Classes/Protocols/Touchable/Touchable+StepDefiner.swift @@ -5,6 +5,8 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import KIF + extension Steps: Touchable { diff --git a/Sources/Swerkin/Classes/Protocols/Touchable/TouchableProtocol.swift b/Sources/Swerkin/Classes/Protocols/Touchable/TouchableProtocol.swift index a1ca6ef..677069d 100644 --- a/Sources/Swerkin/Classes/Protocols/Touchable/TouchableProtocol.swift +++ b/Sources/Swerkin/Classes/Protocols/Touchable/TouchableProtocol.swift @@ -5,6 +5,8 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import KIF + public protocol Touchable: ElementTouchable, SwitchTouchable, TextFieldTouchable, ButtonTouchable, DropDownTouchable, TableCellTouchable { } public protocol ElementTouchable { diff --git a/Sources/Swerkin/Classes/Protocols/Viewable/VIewableProtocol.swift b/Sources/Swerkin/Classes/Protocols/Viewable/VIewableProtocol.swift index 93e4ebc..0c922ba 100644 --- a/Sources/Swerkin/Classes/Protocols/Viewable/VIewableProtocol.swift +++ b/Sources/Swerkin/Classes/Protocols/Viewable/VIewableProtocol.swift @@ -5,6 +5,8 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import UIKit + public protocol Viewable { func element(withIdentifier identifier: String) -> UIView? func element(withLabel label: String) -> UIView? diff --git a/Sources/Swerkin/Classes/Protocols/Viewable/Viewable+ScreenObject.swift b/Sources/Swerkin/Classes/Protocols/Viewable/Viewable+ScreenObject.swift index 167230b..5722a86 100644 --- a/Sources/Swerkin/Classes/Protocols/Viewable/Viewable+ScreenObject.swift +++ b/Sources/Swerkin/Classes/Protocols/Viewable/Viewable+ScreenObject.swift @@ -5,6 +5,8 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import UIKit + public extension Viewable where Self: Screen { func element(withIdentifier identifier: String) -> UIView? { return self.viewTester.view(withIdentifier: identifier) diff --git a/Sources/Swerkin/Classes/Protocols/Viewable/Viewable+StepDefiner.swift b/Sources/Swerkin/Classes/Protocols/Viewable/Viewable+StepDefiner.swift index 86fed02..34aebf3 100644 --- a/Sources/Swerkin/Classes/Protocols/Viewable/Viewable+StepDefiner.swift +++ b/Sources/Swerkin/Classes/Protocols/Viewable/Viewable+StepDefiner.swift @@ -5,6 +5,8 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import UIKit + extension Steps: Viewable { public func element(withIdentifier identifier: String) -> UIView? { return self.viewTester.view(withIdentifier: identifier) diff --git a/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/SwipeSetupDefinitions.swift b/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/SwipeSetupDefinitions.swift index 2cda941..aaf7f17 100644 --- a/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/SwipeSetupDefinitions.swift +++ b/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/SwipeSetupDefinitions.swift @@ -5,6 +5,8 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import KIF + extension Steps { /// Swipe in the given direction diff --git a/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/TableCellStepDefinitions.swift b/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/TableCellStepDefinitions.swift index f87a05f..1a88ff0 100644 --- a/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/TableCellStepDefinitions.swift +++ b/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/TableCellStepDefinitions.swift @@ -4,6 +4,7 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import XCTest extension Steps { diff --git a/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/TextFieldStepDefinitions.swift b/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/TextFieldStepDefinitions.swift index e78dbe4..03c927e 100644 --- a/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/TextFieldStepDefinitions.swift +++ b/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/TextFieldStepDefinitions.swift @@ -5,6 +5,9 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import CoreFoundation +import CoreGraphics + extension Steps { /// Touch text box with a given accessibility identifier diff --git a/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/TouchStepDefinitions.swift b/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/TouchStepDefinitions.swift index aca655e..29bed27 100644 --- a/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/TouchStepDefinitions.swift +++ b/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/TouchStepDefinitions.swift @@ -5,6 +5,10 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import CoreFoundation +import CoreGraphics +import XCTest + extension Steps { /// Touch element with given accessibility label diff --git a/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/WaitStepDefinitions.swift b/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/WaitStepDefinitions.swift index be7cbee..287b9f4 100644 --- a/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/WaitStepDefinitions.swift +++ b/Sources/Swerkin/Classes/StepDefinitions/Common/Actions/WaitStepDefinitions.swift @@ -5,6 +5,9 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import XCTest +import UIKit + extension Steps { /// Wait for trait defined by the given screen object displays otherwise fail step diff --git a/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/ButtonAssertionStepDefinitions.swift b/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/ButtonAssertionStepDefinitions.swift index 57d5f4e..74b042f 100644 --- a/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/ButtonAssertionStepDefinitions.swift +++ b/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/ButtonAssertionStepDefinitions.swift @@ -4,6 +4,7 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import XCTest extension Steps { diff --git a/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/InlineEditAssertionStepDefinitions.swift b/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/InlineEditAssertionStepDefinitions.swift index e719a11..bae8abe 100644 --- a/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/InlineEditAssertionStepDefinitions.swift +++ b/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/InlineEditAssertionStepDefinitions.swift @@ -4,6 +4,7 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import XCTest extension Steps { diff --git a/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/TableCellAssertionStepDefinitions.swift b/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/TableCellAssertionStepDefinitions.swift index 42c8ce3..77d97db 100644 --- a/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/TableCellAssertionStepDefinitions.swift +++ b/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/TableCellAssertionStepDefinitions.swift @@ -4,6 +4,7 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import XCTest extension Steps { diff --git a/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/TextAssertionStepDefinitions.swift b/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/TextAssertionStepDefinitions.swift index 8cda0f4..7b7ff43 100644 --- a/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/TextAssertionStepDefinitions.swift +++ b/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/TextAssertionStepDefinitions.swift @@ -4,6 +4,7 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import XCTest extension Steps { diff --git a/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/TextFieldAssertionStepDefinitions.swift b/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/TextFieldAssertionStepDefinitions.swift index 8145ebb..c380d02 100644 --- a/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/TextFieldAssertionStepDefinitions.swift +++ b/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/TextFieldAssertionStepDefinitions.swift @@ -5,6 +5,8 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import XCTest + extension Steps { /// Verify UITextField exists with given accessibility idenitifier and text diff --git a/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/ViewAssertionStepDefinitions.swift b/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/ViewAssertionStepDefinitions.swift index 0bf1d76..c38268f 100644 --- a/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/ViewAssertionStepDefinitions.swift +++ b/Sources/Swerkin/Classes/StepDefinitions/Common/Assertions/ViewAssertionStepDefinitions.swift @@ -5,6 +5,9 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import UIKit +import XCTest + extension Steps { /// Verify element with given accessibility identifier exists diff --git a/Sources/Swerkin/Classes/StepDefinitions/Common/Setup/SetupStepDefinitions.swift b/Sources/Swerkin/Classes/StepDefinitions/Common/Setup/SetupStepDefinitions.swift index ddf75cc..c360cf3 100644 --- a/Sources/Swerkin/Classes/StepDefinitions/Common/Setup/SetupStepDefinitions.swift +++ b/Sources/Swerkin/Classes/StepDefinitions/Common/Setup/SetupStepDefinitions.swift @@ -5,6 +5,8 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import XCTest + extension Steps { /// Sets the current screen in the test case to a given presentable screen diff --git a/Sources/Swerkin/Classes/TestCore/Screens/UIWindow+Extensions.swift b/Sources/Swerkin/Classes/TestCore/Screens/UIWindow+Extensions.swift index 03bb566..d1a0dcf 100644 --- a/Sources/Swerkin/Classes/TestCore/Screens/UIWindow+Extensions.swift +++ b/Sources/Swerkin/Classes/TestCore/Screens/UIWindow+Extensions.swift @@ -6,6 +6,7 @@ */ import Foundation +import UIKit public extension UIWindow { diff --git a/Sources/Swerkin/Classes/TestCore/Steps/EndToEnd/StepNavigator.swift b/Sources/Swerkin/Classes/TestCore/Steps/EndToEnd/StepNavigator.swift index 6d73c7a..713fc8e 100644 --- a/Sources/Swerkin/Classes/TestCore/Steps/EndToEnd/StepNavigator.swift +++ b/Sources/Swerkin/Classes/TestCore/Steps/EndToEnd/StepNavigator.swift @@ -15,6 +15,8 @@ /// - step: One or more step definitions that when executed will drive the user from the start screen to end screen /// - preconditions: List of preconditions that need to be satisified to use this path segment +import XCTest + public struct PathSegment { public var start: PresentableScreen public var end: PresentableScreen diff --git a/Sources/Swerkin/Classes/TestCore/Steps/Steps.swift b/Sources/Swerkin/Classes/TestCore/Steps/Steps.swift index e1f0998..26c08fb 100644 --- a/Sources/Swerkin/Classes/TestCore/Steps/Steps.swift +++ b/Sources/Swerkin/Classes/TestCore/Steps/Steps.swift @@ -5,6 +5,8 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import XCTest + /// Swerkin step types of Given, When, Then, And /// /// Use these step types to qualify the steps within the test case for a Gherkin-like experience diff --git a/Sources/Swerkin/Classes/TestCore/TestTag.swift b/Sources/Swerkin/Classes/TestCore/TestTag.swift index 5370150..c7e10ac 100644 --- a/Sources/Swerkin/Classes/TestCore/TestTag.swift +++ b/Sources/Swerkin/Classes/TestCore/TestTag.swift @@ -5,6 +5,8 @@ All Rights Reserved.Use of this source code is governed by an MIT license that can be found in the LICENSE file at https://github.com/Progressive/Swerkin/LICENSE.md */ +import Foundation + /// Base list of TestTags to use to organize the tests suites /// diff --git a/Swerkin.podspec b/Swerkin.podspec index a278f34..239e11e 100644 --- a/Swerkin.podspec +++ b/Swerkin.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'Swerkin' - s.version = '0.0.1' + s.version = '0.0.2' s.summary = 'Library that contains the core components for UI Testing with KIF and Gherkin' # This description is used to generate tags and improve search results.