From cdbff0778dd6ca88a99016f4d30009e6e6f12293 Mon Sep 17 00:00:00 2001 From: Harris Borawski Date: Wed, 3 Apr 2024 14:44:45 -0700 Subject: [PATCH] iOS: Bazel 6 build updates (#262) * touch ups needed to run all tests through query * try running all tests in circle * fix indent * check homebrew path * update openjdk version * fix resource bundle for reference assets icon catalog * lower to serial test running, builds are getting interuptted with 2 * prebuild test modules before running tests * remove print * try large executor * update swift package deps * fix resource class * update xcode/macos * update xcode/macos * disable cache temporarily to test cold start build time * clean bazel and cache to really test cold start * clean bazel and cache to really test cold start * log out size of cache before / after clearing * reenable cache, speed improvements seem fine with no cache * fix some tests that had deps removed during conversion * update viewinspector to latest * remove applitools from UITests * fix flaky test * rewrite assertPublished again * increase timeout * tweak input asset so we can still test it all * update iOS contrib docs, remove old docs * remove Inspectable conformance as it was deprecated * change syntax for building all except ios * bump rules_swift * try storing coverage artifacts * fix path * install lcov with brew so we have genhtml * zip up html coverage output --- .bazelignore | 5 - .bazelrc | 13 +- .circleci/config.yml | 108 ++--- .gitignore | 2 +- BUILD.bazel | 10 +- CONTRIBUTING.md | 35 +- MODULE.bazel | 18 +- ios/BUILD.bazel | 2 +- .../Tests/Types/Generic/AnyTypeTests.swift | 6 +- .../Tests/utilities/ErrorUtilitiesTests.swift | 2 +- .../ManagedPlayerViewModelTests.swift | 78 ++- ios/swiftui/Tests/SwiftUIRegistryTests.swift | 2 +- .../ManagedPlayer/ManagedPlayerTests.swift | 5 +- .../ViewInspector/SwiftUIPlayerTests.swift | 6 +- ios/test-utils/BUILD.bazel | 4 + .../ui-test/AssetFlowViewTests.swift | 16 +- .../SwiftUIAssetUnitTestCaseTests.swift | 6 +- .../ViewInspector/BeaconPluginTests.swift | 2 +- plugins/check-path/ios/BUILD.bazel | 2 +- .../SwiftUICheckPathPluginTests.swift | 2 - .../ios/Tests/ExternalActionPluginTests.swift | 2 +- ...xternalActionViewModifierPluginTests.swift | 4 +- .../SwiftUIPendingTransactionPlugin.swift | 2 - plugins/reference-assets/swiftui/BUILD.bazel | 4 +- .../swiftui/Resources/BUILD.bazel | 2 +- .../swiftui/Sources/SwiftUI/InputAsset.swift | 24 +- .../Sources/Utilities/InternalAssets.swift | 8 +- .../swiftui/UITests/ActionAssetUITests.swift | 48 +- .../swiftui/UITests/BaseTestCase.swift | 79 ---- .../UITests/CollectionAssetUITests.swift | 14 +- .../swiftui/UITests/InfoAssetUITests.swift | 12 +- .../swiftui/UITests/InputAssetUITests.swift | 53 +-- .../swiftui/UITests/TextAssetUITests.swift | 14 +- .../SwiftUI/ActionAssetTests.swift | 2 - .../SwiftUI/CollectionAssetTests.swift | 2 - .../SwiftUI/InfoAssetTests.swift | 2 - .../SwiftUI/InputAssetTests.swift | 10 +- .../SwiftUI/TextAssetTests.swift | 3 - swift_deps.bzl | 4 +- swift_deps_index.json | 444 +----------------- tools/ios/BUILD.bazel | 3 +- tools/ios/Info.plist | 41 ++ xcode/Package.resolved | 112 +---- xcode/Package.swift | 9 +- 44 files changed, 279 insertions(+), 943 deletions(-) create mode 100644 tools/ios/Info.plist diff --git a/.bazelignore b/.bazelignore index ca3fd28d9..cb54b1553 100644 --- a/.bazelignore +++ b/.bazelignore @@ -23,11 +23,6 @@ profile DerivedData *.hmap *.ipa -xcode/Pods/ -CoverageData/ -bep.json -xcui.json -ios/*/*/Resources/**/*.js core/make-flow/node_modules core/types/node_modules diff --git a/.bazelrc b/.bazelrc index aad24e953..6ae7618e0 100644 --- a/.bazelrc +++ b/.bazelrc @@ -52,7 +52,7 @@ mobile-install --start=warm build:ci --build_metadata=ROLE=CI --workspace_status_command=./scripts/workspace-status.sh -# Circle large has 4 CPU cores/8GB mem +# Circle xlarge has 8 CPU cores/16GB mem build:ci --local_cpu_resources=8 build:ci --local_ram_resources=15000 build:ci --config="release" @@ -62,17 +62,6 @@ build:release --stamp --workspace_status_command=./scripts/workspace-status.sh # Cache action outputs on disk so they persist across output_base and bazel shutdown (eg. changing branches) # build --disk_cache=~/.cache/bazel-disk-cache -build:skip-ios -- \ - -//:PlayerUI \ - -//:PlayerUI_Pod \ - -//:PlayerUI-Demo \ - -//:PlayerUI-Unit-Unit \ - -//:PlayerUI-Unit-Unit.__internal__.__test_bundle \ - -//:PlayerUI-UI-ViewInspectorTests \ - -//:PlayerUI-UI-ViewInspectorTests.__internal__.__test_bundle \ - -//:PlayerUI-UI-XCUITests \ - -//:PlayerUI-UI-XCUITests.__internal__.__test_bundle - # Support for debugging NodeJS tests # Add the Bazel option `--config=debug` to enable this # --test_output=streamed diff --git a/.circleci/config.yml b/.circleci/config.yml index 0f90d52be..b7663bcf1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,9 +23,9 @@ executors: TZ: "/usr/share/zoneinfo/America/Los_Angeles" ios: working_directory: ~/player - resource_class: macos.x86.medium.gen2 + resource_class: macos.m1.large.gen1 macos: - xcode: 14.3 + xcode: 15.3.0 environment: TZ: "/usr/share/zoneinfo/America/Los_Angeles" android: @@ -93,8 +93,8 @@ jobs: steps: - attach_workspace: at: ~/player - - - run: bazel build --config=ci --config=skip-ios -- //... + - run: bazel query '//... except filter("ios|swiftui", //...)' + - run: bazel build --config=ci -- $(bazel query '//... except filter("ios|swiftui", //...)') - save_cache: paths: @@ -115,70 +115,38 @@ jobs: - run: name: Homebrew Dependencies command: | - HOMEBREW_NO_AUTO_UPDATE=1 brew install bazelisk maven openjdk@8 - - - run: - name: Set Ruby Version - command: | - rbenv install 2.6.10 - rbenv global 2.6.10 - rbenv rehash - - - restore_cache: - keys: - - android-tools-{{ arch }}-{{ checksum "scripts/install-android-tools.sh" }} - - - run: echo 'export ANDROID_HOME=~/android-tools' >> $BASH_ENV - - - run: - name: Install Android tools - command: | - sh scripts/install-android-tools.sh - echo 'export ANDROID_SDK_HOME=$ANDROID_HOME' >> $BASH_ENV - echo 'export ANDROID_NDK_HOME=$ANDROID_SDK_HOME/ndk/21.4.7075529' >> $BASH_ENV - echo 'export PATH=$ANDROID_SDK_HOME/tools/bin:$PATH' >> $BASH_ENV - echo 'export PATH=$ANDROID_SDK_HOME/tools:$PATH' >> $BASH_ENV - echo 'export PATH=$ANDROID_SDK_HOME/platform-tools:$PATH' >> $BASH_ENV - echo 'export PATH=$ANDROID_SDK_HOME/emulator:$PATH' >> $BASH_ENV - source $BASH_ENV - environment: - JAVA_HOME: /usr/local/opt/openjdk@8 - - - save_cache: - key: android-tools-{{ arch }}-{{ checksum "scripts/install-android-tools.sh" }} - paths: - - ~/android-tools - - - run: gem install bundler - - - restore_cache: - keys: - - gem-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - gem-v1-{{ arch }}-main-{{ checksum "Gemfile.lock" }} - - - run: bundle install - - - save_cache: - key: gem-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - paths: - - ~/.gem/ruby/2.7.5 + HOMEBREW_NO_AUTO_UPDATE=1 brew install bazelisk maven openjdk@17 lcov - macos/preboot-simulator: - version: "15.5" + version: "17.4" platform: "iOS" - device: "iPhone 13" - - - run: bazel sync + device: "iPhone 15" - - run: | - BUNDLE_TARGETS=$(bazel query "attr(name, '^.*_Bundles$', //...)" --output label 2>/dev/null | tr '\n' ' ') - bazel build --config=ci $BUNDLE_TARGETS + - run: bazel build --config=ci -- //ios/demo:PlayerUIDemo - - run: bazel shutdown - - run: cd xcode && bundle exec pod install - - run: bazel build --config=ci -- //:PlayerUI //:PlayerUI-Demo //:PlayerUI_Pod - # TODO: the timeout should be added to the test itself - - run: bazel test --test_env=APPLITOOLS_API_KEY=${APPLITOOLS_API_KEY} --test_env=APPLITOOLS_BATCH_ID=${CIRCLE_SHA1} --test_env=APPLITOOLS_PR_NUMBER=${CIRCLE_PULL_REQUEST##*/} --test_timeout=1200 --jobs=1 --verbose_failures --config=ci -- //:PlayerUI-Unit-Unit //:PlayerUI-UI-ViewInspectorTests //:PlayerUI-UI-XCUITests + - run: + name: Test Prebuild + command: | + bazel build \ + --config=ci \ + $(bazel query "kind(ios_unit_test, //ios/...)") \ + $(bazel query "kind(ios_unit_test, //plugins/...)") \ + $(bazel query "kind(ios_ui_test, //ios/...)") \ + $(bazel query "kind(ios_ui_test, //plugins/...)") + - run: + name: Tests + command: | + bazel coverage \ + --config=ci \ + --jobs=2 \ + --experimental_use_llvm_covmap \ + --combined_report=lcov \ + --test_output=all \ + --test_timeout=1800 \ + $(bazel query "kind(ios_unit_test, //ios/...)") \ + $(bazel query "kind(ios_unit_test, //plugins/...)") \ + $(bazel query "kind(ios_ui_test, //ios/...)") \ + $(bazel query "kind(ios_ui_test, //plugins/...)") - run: when: always @@ -189,6 +157,18 @@ jobs: mkdir -p $RESULTS_DIR/$(dirname $line) cp $line $RESULTS_DIR/$(dirname $line) done + - run: + when: always + command: | + mkdir -p _coverage/lcov + mkdir -p _coverage/html + cp -r $(bazel info output_path)/_coverage/_coverage_report.dat _coverage/lcov/ + genhtml --branch-coverage --output-directory=_coverage/html/ "$(bazel info output_path)/_coverage/_coverage_report.dat" + zip -r _coverage/html.zip _coverage/html/ + rm -r _coverage/html/ + + - store_artifacts: + path: _coverage - store_test_results: path: _test_results @@ -199,7 +179,7 @@ jobs: - attach_workspace: at: ~/player - - run: bazel test --config=skip-ios --config=ci -- //... -//docs/site -//android/demo:android_instrumentation_test + - run: bazel test --config=ci -- $(bazel query '//... except filter("ios|swiftui", //...)') -//docs/site -//android/demo:android_instrumentation_test - run: when: always diff --git a/.gitignore b/.gitignore index c740e6b3a..afaf3d1c1 100644 --- a/.gitignore +++ b/.gitignore @@ -76,7 +76,7 @@ xcui.json #SPM .build .swiftpm -ios/Player.xcodeproj +ios/PlayerUI.xcodeproj # Bundles used by cocoapods for development ios/*/*/Resources/**/*.js diff --git a/BUILD.bazel b/BUILD.bazel index 1f5bee2f2..964305bc0 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,6 +1,5 @@ -# load("@rules_player//cocoapods:cocoapod.bzl", "assemble_pod", "pod_push") +# load("@rules_player//cocoapods:cocoapod.bzl", "pod_push") # load("@rules_player//internal:stamp.bzl", "stamp") -# load("//:generated.bzl", "PlayerUI", "PlayerUI_Demo", "ui_tests", "unit_tests") load("//tools/ios:util.bzl", "assemble_pod") load("@npm//:defs.bzl", "npm_link_all_packages") @@ -83,13 +82,6 @@ js_library( ] + glob(["typings/*"]), visibility = ["//visibility:public"], ) -# PlayerUI(deps = []) - -# PlayerUI_Demo(deps = []) - -# unit_tests() - -# ui_tests() # # Update the version in the podspec # stamp( diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc9b3fa40..d713bda20 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,17 +21,6 @@ If the changes are larger (API design, architecture, etc), [opening an issue](ht * [Android NDK >= 19.2.5345600, <= 21](https://github.com/android/ndk/wiki/Unsupported-Downloads#r19c). Any version > 21 will not work, period. You'll need to add `ANDROID_NDK_HOME` to your environment manually. ## Building and Testing Locally (All platforms) -#### Presetup -For iOS builds, some pre-setup is required for `bazel` to generate BUILD files for dependent CocoaPods. - -```bash -bundle install -``` -CocoaPods does not directly integrate with `bazel`, when core targets are updated, the output bundles need to be copied to the location described in the `PlayerUI.podspec`, to do so run the script: -```bash -./tools/build_ios_bundles.sh -``` -This will query `bazel` for dependent targets, copy their output and regenerate the `.xcworkspace`. ### Player For speed and consistency, this repo leverages `bazel` as it's main build tool. Check out the [bazel](https://bazel.build/) docs for more info. @@ -47,20 +36,26 @@ Tests can also be ran using: bazel test //... ``` -#### Skipping iOS builds -The `.bazelrc` contains a convenience to build everything but the iOS targets, as the toolchain for those is platform specific. - -```bash -bazel build --config=skip-ios -``` - ## For Android Only builds -If you are interested in only contributing for android, follow our [android guide](https://github.com/player-ui/player/android/demo/README.md) +If you are interested in only contributing for android, follow our [android guide](https://github.com/player-ui/player/blob/main/android/demo/README.md) ## For iOS Only builds -If you are interested in only contributing for iOS, follow our [iOS guide](https://github.com/player-ui/player) +### Xcode Project generation +Generate the `.xcodeproj` to open and work in Xcode. Builds and tests will be executed through bazel, to ensure behavioral parity. +```bash +bazel run //ios:xcodeproj +open -a Xcode ios/PlayerUI.xcodeproj/ +``` +### Demo Application +#### Xcode +The first time the Xcode project is generated, the default selected target is `PlayerUI`, for a runnable target select `PlayerUIDemo` to run the demo application in the simulator. +#### Bazel +The demo app can also be built and launched in a simulator from the command line with bazel: +```bash +bazel run //ios/demo:PlayerUIDemo +``` ## Docs Sites These require the [Android NDK](https://developer.android.com/ndk). diff --git a/MODULE.bazel b/MODULE.bazel index 4a6e2e678..afce68939 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -22,9 +22,9 @@ node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") node.toolchain(node_version = "18.18.0") ################################# -# iOS - -bazel_dep(name = "rules_swift", version = "1.13.0", repo_name = "build_bazel_rules_swift") +###### Start iOS ###### +## Rule Dependencies +bazel_dep(name = "rules_swift", version = "1.14.0", repo_name = "build_bazel_rules_swift") bazel_dep(name = "rules_apple", version = "3.1.1", repo_name = "build_bazel_rules_apple") bazel_dep(name = "rules_ios", version = "3.1.4", repo_name = "build_bazel_rules_ios") bazel_dep(name = "rules_xcodeproj", version = "1.13.0") @@ -32,7 +32,7 @@ bazel_dep(name = "rules_xcodeproj", version = "1.13.0") bazel_dep(name = "gazelle", version = "0.34.0", repo_name = "bazel_gazelle") bazel_dep(name = "rules_swift_package_manager", version = "0.22.0") -# swift_deps START +## This section is handled by rules_swift_package_manager swift_deps = use_extension( "@rules_swift_package_manager//:extensions.bzl", "swift_deps", @@ -41,14 +41,16 @@ swift_deps.from_file( deps_index = "//:swift_deps_index.json", ) +## SPM Dependencies +### need to be listed here to be available as a target in BUILD files +### Add dependency in xcode/Package.swift and then run `bazel run //:update_swift_pkgs` +### before adding it here use_repo( swift_deps, "swiftpkg_swift_hooks", - "swiftpkg_viewinspector", - "swiftpkg_eyes_xcui_swift_package", + "swiftpkg_viewinspector" ) - -# end iOS +###### End iOS ###### npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") npm.npm_translate_lock( diff --git a/ios/BUILD.bazel b/ios/BUILD.bazel index 7ce9ac40e..3a5bd0edf 100644 --- a/ios/BUILD.bazel +++ b/ios/BUILD.bazel @@ -6,7 +6,7 @@ load( xcodeproj( name = "xcodeproj", - project_name = "Player", + project_name = "PlayerUI", tags = ["manual"], top_level_targets = [ top_level_target("//ios/demo:PlayerUIDemo", target_environments = ["simulator"]), diff --git a/ios/core/Tests/Types/Generic/AnyTypeTests.swift b/ios/core/Tests/Types/Generic/AnyTypeTests.swift index 5ba059f38..dbd6836eb 100644 --- a/ios/core/Tests/Types/Generic/AnyTypeTests.swift +++ b/ios/core/Tests/Types/Generic/AnyTypeTests.swift @@ -202,11 +202,13 @@ class AnyTypeTests: XCTestCase { XCTAssertEqual("[\"test\",\"data\"]", doEncode(AnyType.array(data: ["test", "data"]))) XCTAssertEqual("[1,2]", doEncode(AnyType.numberArray(data: [1, 2]))) XCTAssertEqual("[false,true]", doEncode(AnyType.booleanArray(data: [false, true]))) - XCTAssertEqual("{\"key\":false,\"key2\":1}", doEncode(AnyType.anyDictionary(data: ["key": false, "key2": 1]))) + XCTAssertEqual("{\"a\":false,\"b\":1}", doEncode(AnyType.anyDictionary(data: ["a": false, "b": 1]))) } func doEncode(_ data: AnyType) -> String? { - let data = try? JSONEncoder().encode(data) + let encoder = JSONEncoder() + encoder.outputFormatting = .sortedKeys + let data = try? encoder.encode(data) guard let data = data else { return nil } return String(data: data, encoding: .utf8) } diff --git a/ios/core/Tests/utilities/ErrorUtilitiesTests.swift b/ios/core/Tests/utilities/ErrorUtilitiesTests.swift index 8ef8c5c4b..5fa99f8ab 100644 --- a/ios/core/Tests/utilities/ErrorUtilitiesTests.swift +++ b/ios/core/Tests/utilities/ErrorUtilitiesTests.swift @@ -35,7 +35,7 @@ class ErrorUtilitiesTestCase: XCTestCase { XCTFail("DecodingError expected") } catch { let message = error.playerDescription - XCTAssertEqual(message, "Expected to decode Int but found a string/data instead. (coding path bar.bbb)") + XCTAssertEqual(message, "Expected to decode Int but found a string instead. (coding path bar.bbb)") } // keyNotFound diff --git a/ios/swiftui/Tests/ManagedPlayer/ManagedPlayerViewModelTests.swift b/ios/swiftui/Tests/ManagedPlayer/ManagedPlayerViewModelTests.swift index 913eb51f4..3d86ff716 100644 --- a/ios/swiftui/Tests/ManagedPlayer/ManagedPlayerViewModelTests.swift +++ b/ios/swiftui/Tests/ManagedPlayer/ManagedPlayerViewModelTests.swift @@ -27,9 +27,7 @@ class ManagedPlayerViewModelTests: XCTestCase { completed.fulfill() }) - Task { await viewModel.next() } - - await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow1 } + await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow1 } action: { await viewModel.next() } let result = """ { @@ -54,9 +52,8 @@ class ManagedPlayerViewModelTests: XCTestCase { let viewModel = ManagedPlayerViewModel(manager: flowManager, onComplete: {_ in}) - Task { await viewModel.next() } - await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow1 } + await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow1 } action: { await viewModel.next() } let result = """ { @@ -72,9 +69,7 @@ class ManagedPlayerViewModelTests: XCTestCase { let state = CompletedState.createInstance(from: stateObj)! - viewModel.result = .success(state) - - await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow2 } + await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow2 } action: { viewModel.result = .success(state) } } func testViewModelManagerError() async { @@ -87,12 +82,16 @@ class ManagedPlayerViewModelTests: XCTestCase { let viewModel = ManagedPlayerViewModel(manager: flowManager, onComplete: {_ in }) - await viewModel.next() + await assertPublished(AnyPublisher(viewModel.$loadingState), condition: { state in + guard + case .failed(let error) = state, + let _ = error as? PlayerError + else { return false } - guard - case .failed(let error) = viewModel.loadingState, - let _ = error as? PlayerError - else { return XCTFail("Expected PlayerError") } + return true + }) { + await viewModel.next() + } XCTAssertFalse(viewModel.loadingState.isLoaded) } @@ -102,13 +101,13 @@ class ManagedPlayerViewModelTests: XCTestCase { let viewModel = ManagedPlayerViewModel(manager: flowManager, onComplete: {_ in}) - await viewModel.next() - await assertPublished(AnyPublisher(viewModel.$loadingState)) { value in if case .loaded(let flow) = value, flow == self.flow1 { return true } return false + } action: { + await viewModel.next() } let result = """ @@ -125,31 +124,27 @@ class ManagedPlayerViewModelTests: XCTestCase { let state = CompletedState.createInstance(from: stateObj)! - viewModel.result = .success(state) - - await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow2 } - - viewModel.result = .failure(PlayerError.jsConversionFailure) + await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow2 } action: { viewModel.result = .success(state) } await assertPublished(AnyPublisher(viewModel.$loadingState)) { value in if case .failed = value { return true } return false + } action: { + viewModel.result = .failure(PlayerError.jsConversionFailure) } - viewModel.retry() - await assertPublished(AnyPublisher(viewModel.$loadingState)) { if case .retry = $0 { return true } return false + } action: { + viewModel.retry() } - await viewModel.next(state) - - await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow2 } + await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow2 } action: { await viewModel.next(state) } } func testViewModelReset() async throws { @@ -157,9 +152,7 @@ class ManagedPlayerViewModelTests: XCTestCase { let viewModel = ManagedPlayerViewModel(manager: flowManager, onComplete: {_ in}) - await viewModel.next() - - await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow1 } + await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow1 } action: { await viewModel.next() } let result = """ { @@ -175,31 +168,27 @@ class ManagedPlayerViewModelTests: XCTestCase { let state = CompletedState.createInstance(from: stateObj)! - viewModel.result = .success(state) - - await assertPublished(AnyPublisher(viewModel.$flow), timeout: 10) { $0 == self.flow2 } - - viewModel.result = .failure(PlayerError.jsConversionFailure) + await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow2 } action: { viewModel.result = .success(state) } await assertPublished(AnyPublisher(viewModel.$loadingState)) { value in if case .failed = value { return true } return false + } action: { + viewModel.result = .failure(PlayerError.jsConversionFailure) } - viewModel.reset() - await assertPublished(AnyPublisher(viewModel.$loadingState)) { if case .idle = $0 { return true } return false + } action: { + viewModel.reset() } - await viewModel.next() - - await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow1 } + await assertPublished(AnyPublisher(viewModel.$flow)) { $0 == self.flow1 } action: { await viewModel.next() } } func testViewModelErrorFlow() async { @@ -208,15 +197,13 @@ class ManagedPlayerViewModelTests: XCTestCase { let completed = expectation(description: "Flows Completed") let viewModel = ManagedPlayerViewModel(manager: flowManager, onComplete: {_ in}) - await viewModel.next() + await assertPublished(AnyPublisher(viewModel.$flow)) { $0 != nil } action: { await viewModel.next() } let cancellable = viewModel.$loadingState.sink { (loadingState) in guard case .failed = loadingState else { return } completed.fulfill() } - await assertPublished(AnyPublisher(viewModel.$flow)) { $0 != nil } - viewModel.result = .failure(.jsConversionFailure) await fulfillment(of: [completed], timeout: 2) @@ -305,14 +292,15 @@ class TerminatingManager: FlowManager { } internal extension XCTestCase { - @discardableResult - func assertPublished(_ publisher: AnyPublisher, timeout: Double = 2, condition: @escaping(T) -> Bool) async -> Cancellable { + func assertPublished(_ publisher: AnyPublisher, condition: @escaping (T) -> Bool, action: () async -> Void) async { let expectation = XCTestExpectation(description: "Waiting for publisher to emit value") let cancel = publisher.sink { (value) in guard condition(value) else { return } expectation.fulfill() } - await fulfillment(of: [expectation], timeout: timeout) - return cancel + defer { cancel.cancel() } + await action() + await fulfillment(of: [expectation], timeout: 5) + cancel.cancel() } } diff --git a/ios/swiftui/Tests/SwiftUIRegistryTests.swift b/ios/swiftui/Tests/SwiftUIRegistryTests.swift index 802d2cc60..23e4d78f8 100644 --- a/ios/swiftui/Tests/SwiftUIRegistryTests.swift +++ b/ios/swiftui/Tests/SwiftUIRegistryTests.swift @@ -251,7 +251,7 @@ class SwiftUIRegistryTests: XCTestCase { partialMatch.context = context partialMatch.setMapping(assetId: "someId", index: 0) let registry = SwiftUIRegistry(logger: TapableLogger()) - registry.register("text", asset: TextAsset.self) + registry.register("text", asset: SwiftUITestAsset.self) registry.partialMatchRegistry = partialMatch XCTAssertNil(registry.root) diff --git a/ios/swiftui/ViewInspector/ManagedPlayer/ManagedPlayerTests.swift b/ios/swiftui/ViewInspector/ManagedPlayer/ManagedPlayerTests.swift index ddac1d40d..a5f7102e9 100644 --- a/ios/swiftui/ViewInspector/ManagedPlayer/ManagedPlayerTests.swift +++ b/ios/swiftui/ViewInspector/ManagedPlayer/ManagedPlayerTests.swift @@ -16,10 +16,7 @@ import ViewInspector @testable import PlayerUIInternalTestUtilities @testable import PlayerUIReferenceAssets -extension ManagedPlayer: Inspectable {} -extension Inspection: InspectionEmissary where V: Inspectable { } - -extension ManagedPlayer14: Inspectable {} +extension Inspection: InspectionEmissary { } class ManagedPlayer14Tests: XCTestCase { func testLoadingView() throws { diff --git a/ios/swiftui/ViewInspector/SwiftUIPlayerTests.swift b/ios/swiftui/ViewInspector/SwiftUIPlayerTests.swift index fa0a475dd..ffea6c68a 100644 --- a/ios/swiftui/ViewInspector/SwiftUIPlayerTests.swift +++ b/ios/swiftui/ViewInspector/SwiftUIPlayerTests.swift @@ -18,13 +18,11 @@ import JavaScriptCore @testable import PlayerUIInternalTestUtilities @testable import PlayerUIReferenceAssets -extension SwiftUIPlayer: Inspectable {} - class SwiftUIPlayerTests: XCTestCase { func testFlowLoads() throws { var bag = Set() let context = SwiftUIPlayer.Context { JSContext() } - let player = SwiftUIPlayer(flow: FlowData.COUNTER, plugins: [], context: context) + let player = SwiftUIPlayer(flow: FlowData.COUNTER, plugins: [ReferenceAssetsPlugin()], context: context) let initialLoad = expectation(description: "Root loaded") player.assetRegistry.$root.sink { (asset) in @@ -65,7 +63,7 @@ class SwiftUIPlayerTests: XCTestCase { func testViewHook() throws { var bag = Set() - let player = SwiftUIPlayer(flow: FlowData.COUNTER, plugins: [ViewHookPlugin()]) + let player = SwiftUIPlayer(flow: FlowData.COUNTER, plugins: [ReferenceAssetsPlugin(), ViewHookPlugin()]) let initialLoad = expectation(description: "Root loaded") player.assetRegistry.$root.sink { (asset) in diff --git a/ios/test-utils/BUILD.bazel b/ios/test-utils/BUILD.bazel index 4c72743c7..b8b7d844d 100644 --- a/ios/test-utils/BUILD.bazel +++ b/ios/test-utils/BUILD.bazel @@ -46,8 +46,12 @@ ios_ui_test( "@swiftpkg_viewinspector//:Sources_ViewInspector", "//ios/swiftui:PlayerUISwiftUI", "//ios/core:PlayerUI", + "//ios/logger:PlayerUILogger", "//ios/internal-test-utils:PlayerUIInternalTestUtilities", "//plugins/reference-assets/swiftui:PlayerUIReferenceAssets", + "//plugins/beacon/ios:PlayerUIBaseBeaconPlugin", + "//plugins/beacon/swiftui:PlayerUIBeaconPlugin", + "//plugins/common-types/ios:PlayerUICommonTypesPlugin", ":PlayerUITestUtilities" ], visibility = ["//visibility:public"], diff --git a/ios/test-utils/ViewInspector/ui-test/AssetFlowViewTests.swift b/ios/test-utils/ViewInspector/ui-test/AssetFlowViewTests.swift index 1658d0712..9e662cc3b 100644 --- a/ios/test-utils/ViewInspector/ui-test/AssetFlowViewTests.swift +++ b/ios/test-utils/ViewInspector/ui-test/AssetFlowViewTests.swift @@ -12,10 +12,20 @@ import SwiftUI import ViewInspector @testable import PlayerUI +@testable import PlayerUICommonTypesPlugin +@testable import PlayerUIBaseBeaconPlugin +@testable import PlayerUIBeaconPlugin +@testable import PlayerUIReferenceAssets +@testable import PlayerUITestUtilities +@testable import PlayerUITestUtilitiesCore +@testable import PlayerUISwiftUI +@testable import PlayerUIInternalTestUtilities +@testable import PlayerUIInternalTestUtilities -extension AssetFlowView: Inspectable {} - -class AssetFlowViewTests: ViewInspectorTestCase { +class AssetFlowViewTests: XCTestCase { + override func setUp() { + XCUIApplication().terminate() + } func testVersionBodies() throws { let flow = FlowData.COUNTER diff --git a/ios/test-utils/ViewInspector/unit-test/SwiftUIAssetUnitTestCaseTests.swift b/ios/test-utils/ViewInspector/unit-test/SwiftUIAssetUnitTestCaseTests.swift index 66d17793c..45ef4eff7 100644 --- a/ios/test-utils/ViewInspector/unit-test/SwiftUIAssetUnitTestCaseTests.swift +++ b/ios/test-utils/ViewInspector/unit-test/SwiftUIAssetUnitTestCaseTests.swift @@ -13,6 +13,10 @@ import ViewInspector import XCTest @testable import PlayerUI +@testable import PlayerUILogger +@testable import PlayerUISwiftUI +@testable import PlayerUITestUtilities +@testable import PlayerUITestUtilitiesCore struct ExampleData: AssetData { var id: String @@ -36,8 +40,6 @@ class ExampleSwiftUIAsset: UncontrolledAsset { override var view: AnyView { AnyView(ExampleView(model: model)) } } -extension ExampleView: Inspectable {} - class SwiftUIAssetUnitTestDefaultTests: SwiftUIAssetUnitTestCase { func testDefaultRegister() { let player = TestPlayer(plugins: [self], registry: SwiftUIRegistry(logger: TapableLogger())) diff --git a/plugins/beacon/swiftui/ViewInspector/BeaconPluginTests.swift b/plugins/beacon/swiftui/ViewInspector/BeaconPluginTests.swift index 58aa55ef9..0200a2ee5 100644 --- a/plugins/beacon/swiftui/ViewInspector/BeaconPluginTests.swift +++ b/plugins/beacon/swiftui/ViewInspector/BeaconPluginTests.swift @@ -93,7 +93,7 @@ class BeaconPluginTests: XCTestCase { wait(for: [beaconed], timeout: 5) } } -extension TestButton: Inspectable {} + struct TestButton: View { @Environment(\.beaconContext) var beaconContext var metaData: MetaData? diff --git a/plugins/check-path/ios/BUILD.bazel b/plugins/check-path/ios/BUILD.bazel index 957361b1c..d1ac74e2f 100644 --- a/plugins/check-path/ios/BUILD.bazel +++ b/plugins/check-path/ios/BUILD.bazel @@ -25,7 +25,7 @@ pkg_files( swift_library( name = "PlayerUICheckPathPlugin", module_name = "PlayerUICheckPathPlugin", - srcs = [":PlayerUICheckPathPlugin", ":CheckPathPluginResourceShim"], + srcs = [":PlayerUICheckPathPlugin_Sources", ":CheckPathPluginResourceShim"], visibility = ["//visibility:public"], deps = ["//ios/core:PlayerUI"], data = [":PlayerUICheckPathResourceBundle"], diff --git a/plugins/check-path/swiftui/ViewInspector/SwiftUICheckPathPluginTests.swift b/plugins/check-path/swiftui/ViewInspector/SwiftUICheckPathPluginTests.swift index a7f338e94..3c38a554a 100644 --- a/plugins/check-path/swiftui/ViewInspector/SwiftUICheckPathPluginTests.swift +++ b/plugins/check-path/swiftui/ViewInspector/SwiftUICheckPathPluginTests.swift @@ -40,5 +40,3 @@ private struct CheckPathTestAssetView: View { Text(checkPath == nil ? "Not Found" : "Found").onAppear { didAppear?(self) } } } - -extension CheckPathTestAssetView: Inspectable {} diff --git a/plugins/external-action/ios/Tests/ExternalActionPluginTests.swift b/plugins/external-action/ios/Tests/ExternalActionPluginTests.swift index 75ef4d8f1..7effb6702 100644 --- a/plugins/external-action/ios/Tests/ExternalActionPluginTests.swift +++ b/plugins/external-action/ios/Tests/ExternalActionPluginTests.swift @@ -250,7 +250,7 @@ class ExternalActionPluginTests: XCTestCase { } } - wait(for: [handlerExpectation, completionExpectation], timeout: 3) + wait(for: [handlerExpectation, completionExpectation], timeout: 5) } func testExternalStateHandlingOptions() { diff --git a/plugins/external-action/swiftui/ViewInspector/ExternalActionViewModifierPluginTests.swift b/plugins/external-action/swiftui/ViewInspector/ExternalActionViewModifierPluginTests.swift index 6bb119c19..7d9952f72 100644 --- a/plugins/external-action/swiftui/ViewInspector/ExternalActionViewModifierPluginTests.swift +++ b/plugins/external-action/swiftui/ViewInspector/ExternalActionViewModifierPluginTests.swift @@ -247,7 +247,5 @@ class ExternalActionViewModifierPluginTests: XCTestCase { } } -extension ExternalStateSheetModifier: Inspectable {} extension InspectableSheet: PopupPresenter {} -extension SwiftUIPlayer: Inspectable {} -extension Inspection: InspectionEmissary where V: Inspectable { } +extension Inspection: InspectionEmissary { } diff --git a/plugins/pending-transaction/swiftui/ViewInspector/SwiftUIPendingTransactionPlugin.swift b/plugins/pending-transaction/swiftui/ViewInspector/SwiftUIPendingTransactionPlugin.swift index bf8861e14..5e1c84237 100644 --- a/plugins/pending-transaction/swiftui/ViewInspector/SwiftUIPendingTransactionPlugin.swift +++ b/plugins/pending-transaction/swiftui/ViewInspector/SwiftUIPendingTransactionPlugin.swift @@ -86,7 +86,6 @@ class SwiftUIPendingTransactionPluginTests: XCTestCase { } } -extension TestButtons: Inspectable {} private struct TestButtons: View { @Environment(\.transactionContext) var transactionContext @@ -114,7 +113,6 @@ private struct TestButtons: View { } } -extension TestButtons2: Inspectable {} private struct TestButtons2: View { @Environment(\.transactionContext) var transactionContext diff --git a/plugins/reference-assets/swiftui/BUILD.bazel b/plugins/reference-assets/swiftui/BUILD.bazel index f22d4b9ce..be2f6d8ec 100644 --- a/plugins/reference-assets/swiftui/BUILD.bazel +++ b/plugins/reference-assets/swiftui/BUILD.bazel @@ -11,7 +11,8 @@ apple_resource_bundle( name = "PlayerUIReferenceAssetsResourceBundle", bundle_name = "ReferenceAssets", bundle_id = "com.intuit.ios.player.resources.core", - resources = ["//plugins/reference-assets/swiftui/Resources:PlayerUIReferenceAssets_Resources", "//plugins/reference-assets/core:core_native_bundle"] + resources = ["//plugins/reference-assets/swiftui/Resources:PlayerUIReferenceAssets_Resources", "//plugins/reference-assets/core:core_native_bundle"], + infoplists = ["//tools/ios:Info.plist"] ) ios_bundle_module_shim("ReferenceAssets") @@ -69,7 +70,6 @@ ios_ui_test( srcs = glob(["UITests/**/*.swift"]), minimum_os_version = "14.0", deps = [ - "@swiftpkg_eyes_xcui_swift_package//:remote_archive_EyesXCUI.xcframework.zip_EyesXCUI", "//ios/swiftui:PlayerUISwiftUI", "//ios/core:PlayerUI", "//ios/test-utils:PlayerUITestUtilities", diff --git a/plugins/reference-assets/swiftui/Resources/BUILD.bazel b/plugins/reference-assets/swiftui/Resources/BUILD.bazel index 44145e40e..c34c20443 100644 --- a/plugins/reference-assets/swiftui/Resources/BUILD.bazel +++ b/plugins/reference-assets/swiftui/Resources/BUILD.bazel @@ -2,7 +2,7 @@ load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix") pkg_files( name = "PlayerUIReferenceAssets_Resources", - srcs = glob(["svg/**/*"]), + srcs = glob(["svg/*.xcassets/**/*"]), strip_prefix = strip_prefix.from_pkg(), visibility = ["//visibility:public"], ) \ No newline at end of file diff --git a/plugins/reference-assets/swiftui/Sources/SwiftUI/InputAsset.swift b/plugins/reference-assets/swiftui/Sources/SwiftUI/InputAsset.swift index 14323cac9..6c6242be2 100644 --- a/plugins/reference-assets/swiftui/Sources/SwiftUI/InputAsset.swift +++ b/plugins/reference-assets/swiftui/Sources/SwiftUI/InputAsset.swift @@ -102,17 +102,7 @@ struct InputAssetView: View { TextField( model.data.placeholder ?? "", text: $model.text, - onEditingChanged: { editing in - guard !editing else { - transactionContext.register(.input) { - self.model.set() - } - return - } - self.model.set() - // remove the transaction once editing ends - transactionContext.clear(.input) - } + onEditingChanged: onEditingChanged(_:) ) .padding(4) .background( @@ -130,6 +120,18 @@ struct InputAssetView: View { model.data.note?.asset?.view.foregroundColor(Color(red: 0.729, green: 0.745, blue: 0.773)).padding(.top, 8).font(.subheadline) } } + + func onEditingChanged(_ editing: Bool) { + guard !editing else { + transactionContext.register(.input) { + self.model.set() + } + return + } + self.model.set() + // remove the transaction once editing ends + transactionContext.clear(.input) + } } /** diff --git a/plugins/reference-assets/swiftui/Sources/Utilities/InternalAssets.swift b/plugins/reference-assets/swiftui/Sources/Utilities/InternalAssets.swift index b96992b7f..c2aab7a1e 100644 --- a/plugins/reference-assets/swiftui/Sources/Utilities/InternalAssets.swift +++ b/plugins/reference-assets/swiftui/Sources/Utilities/InternalAssets.swift @@ -29,7 +29,7 @@ class InternalAssets { */ static func getSVGOfSize(name: String, size: CGSize? = nil) -> UIImage? { guard - let url = Bundle(for: InternalAssets.self).resourceURL?.appendingPathComponent("ReferenceAssets.bundle"), + let url = InternalAssets.bundleURL, let bundle = Bundle(url: url) else { return nil } let image = UIImage(named: name, in: bundle, with: .none) @@ -40,6 +40,12 @@ class InternalAssets { return image?.withRenderingMode(.alwaysTemplate) } + + #if SWIFT_PACKAGE + static var bundleURL: URL? { Bundle.module.resourceURL } + #else + static var bundleURL: URL? { Bundle(for: InternalAssets.self).resourceURL?.appendingPathComponent("ReferenceAssets.bundle") } + #endif } extension UIImage { diff --git a/plugins/reference-assets/swiftui/UITests/ActionAssetUITests.swift b/plugins/reference-assets/swiftui/UITests/ActionAssetUITests.swift index 83004824d..b0c321cb0 100644 --- a/plugins/reference-assets/swiftui/UITests/ActionAssetUITests.swift +++ b/plugins/reference-assets/swiftui/UITests/ActionAssetUITests.swift @@ -1,49 +1,41 @@ import XCTest -import EyesXCUI class ActionAssetUITests: BaseTestCase { func testActionCounter() { - withEyes("action counter") { check in - waitFor(app.buttons["action"]) - check("Page Load") + openFlow("action counter") + waitFor(app.buttons["action"]) - tap(app.buttons["action"]) - waitFor(app.buttons["action"]) + waitAndTap(app.buttons["action"]) + waitFor(app.buttons["action"]) - let buttonText = app.buttons["action"].label + let buttonText = app.buttons["action"].label - check("After Click") - XCTAssertEqual(buttonText, "Clicked 1 times") - } + XCTAssertEqual(buttonText, "Clicked 1 times") } func testActionTransitionSuccess() { - withEyes("action transition to end", testName: "action transition to end - success") { check in - waitFor(app.buttons["action-good"]) - check("Page Load") + openFlow("action transition to end") + waitFor(app.buttons["action-good"]) - tap(app.buttons["action-good"]) + waitAndTap(app.buttons["action-good"]) - waitFor(app.alerts["Flow Finished"]) - check("After Click") - XCTAssertTrue(app.alerts["Flow Finished"].exists) + waitFor(app.alerts["Flow Finished"]) - XCTAssertEqual(app.alerts["Flow Finished"].staticTexts.element(boundBy: 1).label, "done") - } + XCTAssertTrue(app.alerts["Flow Finished"].exists) + + XCTAssertTrue(app.alerts["Flow Finished"].staticTexts.element(boundBy: 1).label.contains("done")) } func testActionTransitionError() { - withEyes("action transition to end", testName: "action transition to end - error") { check in - waitFor(app.buttons["action-bad"]) - check("Page Load") + openFlow("action transition to end") + waitFor(app.buttons["action-bad"]) + + waitAndTap(app.buttons["action-bad"]) - tap(app.buttons["action-bad"]) + waitFor(app.alerts["Flow Finished"]) - waitFor(app.alerts["Flow Finished"]) - check("After Click") - XCTAssertTrue(app.alerts["Flow Finished"].exists) + XCTAssertTrue(app.alerts["Flow Finished"].exists) - XCTAssertTrue(app.alerts["Flow Finished"].staticTexts.element(boundBy: 1).label.contains("Unclosed brace")) - } + XCTAssertTrue(app.alerts["Flow Finished"].staticTexts.element(boundBy: 1).label.contains("Unclosed brace")) } } diff --git a/plugins/reference-assets/swiftui/UITests/BaseTestCase.swift b/plugins/reference-assets/swiftui/UITests/BaseTestCase.swift index e80030ff2..7250b9ea7 100644 --- a/plugins/reference-assets/swiftui/UITests/BaseTestCase.swift +++ b/plugins/reference-assets/swiftui/UITests/BaseTestCase.swift @@ -8,85 +8,12 @@ import Foundation import XCTest -import EyesXCUI import PlayerUI import PlayerUITestUtilities import PlayerUITestUtilitiesCore import Combine class BaseTestCase: AssetUITestCase { - private var eyes = Eyes() - var key: String? - - func envOrDefault(_ key: String, fallback: String = "local") -> String { - guard let value = fromEnv(key) else { - print("Unable to fetch \(key) from the environment. Using fallback value: \(fallback)") - return fallback - } - return value - } - - func fromEnv(_ key: String) -> String? { - guard - let value = ProcessInfo.processInfo.environment[key], - !value.isEmpty, - value != "$(\(key))" - else { - return nil - } - return value - } - - override func setUp() { - continueAfterFailure = false - eyes.serverURL = "https://intuiteyesapi.applitools.com" - - let prNumber = envOrDefault("APPLITOOLS_PR_NUMBER") - let batchId = envOrDefault("APPLITOOLS_BATCH_ID") - if let key = fromEnv("APPLITOOLS_API_KEY") { - eyes.apiKey = key - self.key = key - } else { - print("Unable to fetch APPLITOOLS_API_KEY from environment") - } - - let info = BatchInfo(name: "reference-assets@\(prNumber)") - info?.batchId = batchId - eyes.addProperty("platform", value: "ios") - eyes.batch = info - - eyes.configuration.appName = "iOS Reference Assets" - - super.setUp() - } - - override func tearDown() { - super.tearDown() - guard key != nil else { return } - do { - try eyes.close() - } catch { - eyes.abortIfNotClosed() - } - } - - func withEyes(_ mockName: String, testName: String? = nil, body: (ApplitoolsCheck) -> Void) { - openFlow(mockName) - guard key != nil else { return body({ _ in }) } - eyes.open(withApplicationName: "iOS Reference Assets", testName: "\(testName ?? mockName)") - body({ tag in - XCTWaiter.delay() - eyes.checkApp(withTag: tag) - }) - } - - func withOutEyes(_ mockName: String, body: () -> Void) { - openFlow(mockName) - body() - } - - public typealias ApplitoolsCheck = (String) -> Void - // AssetCollectionView uses a List which wont register elements if they aren't on screen override func openFlow(_ mockName: String) { guard !app.buttons[mockName].exists else { return super.openFlow(mockName) } @@ -103,12 +30,6 @@ class BaseTestCase: AssetUITestCase { } } -extension Eyes { - func checkApp(withTag tag: String) { - self.check(withTag: "[iOS] \(tag)", andSettings: Target.window().statusBarExists(true)) - } -} - extension XCTWaiter { @discardableResult static func delay(ms duration: TimeInterval = 0.5) -> XCTWaiter.Result { diff --git a/plugins/reference-assets/swiftui/UITests/CollectionAssetUITests.swift b/plugins/reference-assets/swiftui/UITests/CollectionAssetUITests.swift index a00e39b7d..e15c4fc05 100644 --- a/plugins/reference-assets/swiftui/UITests/CollectionAssetUITests.swift +++ b/plugins/reference-assets/swiftui/UITests/CollectionAssetUITests.swift @@ -2,14 +2,12 @@ import XCTest class CollectionAssetUITests: BaseTestCase { func testBasicCollection() { - withEyes("collection basic") { check in - waitFor(app.otherElements["view-1"]) - check("Page Load") - let value1 = app.staticTexts["text-1"].label - let value2 = app.staticTexts["text-2"].label + openFlow("collection basic") + waitFor(app.otherElements["view-1"]) + let value1 = app.staticTexts["text-1"].label + let value2 = app.staticTexts["text-2"].label - XCTAssertEqual(value1, "This is the first item in the collection") - XCTAssertEqual(value2, "This is the second item in the collection") - } + XCTAssertEqual(value1, "This is the first item in the collection") + XCTAssertEqual(value2, "This is the second item in the collection") } } diff --git a/plugins/reference-assets/swiftui/UITests/InfoAssetUITests.swift b/plugins/reference-assets/swiftui/UITests/InfoAssetUITests.swift index aaf0460ca..6df2908aa 100644 --- a/plugins/reference-assets/swiftui/UITests/InfoAssetUITests.swift +++ b/plugins/reference-assets/swiftui/UITests/InfoAssetUITests.swift @@ -3,14 +3,14 @@ import XCTest class InfoAssetUITests: BaseTestCase { func testInfoBasic() { - withEyes("info basic") { check in - waitFor(app.buttons["next-action"]) + openFlow("info basic") + waitFor(app.buttons["next-action"]) - check("Page Load") + tap(app.buttons["next-action"]) - tap(app.buttons["next-action"]) + XCTAssertTrue(app.alerts["Flow Finished"].exists) + + XCTAssertTrue(app.alerts["Flow Finished"].staticTexts.element(boundBy: 1).label.contains("done")) - check("Flow End") - } } } diff --git a/plugins/reference-assets/swiftui/UITests/InputAssetUITests.swift b/plugins/reference-assets/swiftui/UITests/InputAssetUITests.swift index c49410930..8c2a975aa 100644 --- a/plugins/reference-assets/swiftui/UITests/InputAssetUITests.swift +++ b/plugins/reference-assets/swiftui/UITests/InputAssetUITests.swift @@ -2,49 +2,40 @@ import XCTest class InputAssetUITests: BaseTestCase { func testBasicInput() { - withEyes("input basic") { check in - let enteredValue = "Hello World" + openFlow("input basic") + let enteredValue = "Hello World" - waitFor(app.textFields["input"]) - check("Page Load") - app.textFields["input"].firstMatch.tap() - app.textFields["input"].firstMatch.typeText(enteredValue) - app.textFields["input"].firstMatch.typeText("\n") + waitFor(app.textFields["input"]) - waitFor(app.textFields["input"]) + app.textFields["input"].firstMatch.tap() + app.textFields["input"].firstMatch.typeText(enteredValue) + app.textFields["input"].firstMatch.typeText("\n") - check("Text Entered") + waitFor(app.textFields["input"]) - let labelValue = app.textFields["input"].firstMatch.value as? String + let labelValue = app.textFields["input"].firstMatch.value as? String - XCTAssertEqual(labelValue, enteredValue) - } + XCTAssertEqual(labelValue, enteredValue) } func testInputValidation() { - withEyes("input validation") { check in - let enteredValue = "Hello World" + openFlow("input validation") + let enteredValue = "Hello World" - waitFor(app.textFields["input-1"]) + waitFor(app.textFields["input-1"]) - check("Page Load") + app.textFields["input-1"].firstMatch.tap() + app.textFields["input-1"].firstMatch.typeText(enteredValue) + app.textFields["input-1"].firstMatch.typeText("\n") - app.textFields["input-1"].firstMatch.tap() - app.textFields["input-1"].firstMatch.typeText(enteredValue) - app.textFields["input-1"].firstMatch.typeText("\n") + waitFor(app.textFields["input-1"]) + XCTAssertTrue(app.staticTexts["input-1-validation"].firstMatch.exists) - waitFor(app.textFields["input-1"]) - XCTAssertTrue(app.staticTexts["input-1-validation"].firstMatch.exists) + app.textFields["input-1"].firstMatch.tap() + app.textFields["input-1"].firstMatch.typeText("55") + app.textFields["input-1"].firstMatch.typeText("\n") - check("input 1 validation active") - - app.textFields["input-1"].firstMatch.tap() - app.textFields["input-1"].firstMatch.typeText("55") - app.textFields["input-1"].firstMatch.typeText("\n") - - waitFor(app.textFields["input-1"]) - XCTAssertFalse(app.staticTexts["input-1-validation"].firstMatch.exists) - check("input 1 validation inactive") - } + waitFor(app.textFields["input-1"]) + XCTAssertFalse(app.staticTexts["input-1-validation"].firstMatch.exists) } } diff --git a/plugins/reference-assets/swiftui/UITests/TextAssetUITests.swift b/plugins/reference-assets/swiftui/UITests/TextAssetUITests.swift index 758965e3b..0f7244093 100644 --- a/plugins/reference-assets/swiftui/UITests/TextAssetUITests.swift +++ b/plugins/reference-assets/swiftui/UITests/TextAssetUITests.swift @@ -2,14 +2,12 @@ import XCTest class TextAssetUITests: BaseTestCase { func testBasicText() { - withEyes("text basic") { check in - waitFor(app.staticTexts["text-1"]) - check("Page Load") - let text = app.staticTexts["text-1"].label - XCTAssertEqual(text, "This is some text.") + openFlow("text basic") + waitFor(app.staticTexts["text-1"]) + let text = app.staticTexts["text-1"].label + XCTAssertEqual(text, "This is some text.") - let label = app.staticTexts["text-2"] - XCTAssertEqual(label.label, "This is some text that is a link") - } + let label = app.staticTexts["text-2"] + XCTAssertEqual(label.label, "This is some text that is a link") } } diff --git a/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/ActionAssetTests.swift b/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/ActionAssetTests.swift index 5c29d86c4..04f5ca9fa 100644 --- a/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/ActionAssetTests.swift +++ b/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/ActionAssetTests.swift @@ -17,8 +17,6 @@ import ViewInspector @testable import PlayerUISwiftUI @testable import PlayerUIBeaconPlugin -extension ActionAssetView: Inspectable {} - class ActionAssetTests: SwiftUIAssetUnitTestCase { override func register(registry: SwiftUIRegistry) { registry.register("action", asset: ActionAsset.self) diff --git a/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/CollectionAssetTests.swift b/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/CollectionAssetTests.swift index f14aa3b3c..bd5dbb563 100644 --- a/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/CollectionAssetTests.swift +++ b/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/CollectionAssetTests.swift @@ -16,8 +16,6 @@ import SwiftUI @testable import PlayerUIReferenceAssets @testable import PlayerUISwiftUI -extension CollectionAssetView: Inspectable {} - class CollectionAssetTests: SwiftUIAssetUnitTestCase { override func register(registry: SwiftUIRegistry) { registry.register("collection", asset: CollectionAsset.self) diff --git a/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/InfoAssetTests.swift b/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/InfoAssetTests.swift index 9ec6a9245..ad793daa2 100644 --- a/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/InfoAssetTests.swift +++ b/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/InfoAssetTests.swift @@ -16,8 +16,6 @@ import XCTest @testable import PlayerUIReferenceAssets @testable import PlayerUISwiftUI -extension InfoAssetView: Inspectable {} - class InfoAssetTests: SwiftUIAssetUnitTestCase { override func register(registry: SwiftUIRegistry) { registry.register("info", asset: InfoAsset.self) diff --git a/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/InputAssetTests.swift b/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/InputAssetTests.swift index f413cd5ab..d57b6a474 100644 --- a/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/InputAssetTests.swift +++ b/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/InputAssetTests.swift @@ -18,8 +18,6 @@ import JavaScriptCore @testable import PlayerUIReferenceAssets @testable import PlayerUISwiftUI -extension InputAssetView: Inspectable {} -extension ValidationView: Inspectable {} class InputAssetTests: SwiftUIAssetUnitTestCase { override func register(registry: SwiftUIRegistry) { @@ -235,12 +233,12 @@ class InputAssetTests: SwiftUIAssetUnitTestCase { let stack = try view.inspect().vStack() - let field = try stack.textField(1) - model.text = "new text" - try field.callOnEditingChanged() -// model.set() + // When iOS 15 is the minimum and we can use @FocusState in the InputAsset + // we can update and call through ViewInspector for the new APIs + // for some reason it only ever calls it with true as it stands + view.onEditingChanged(false) wait(for: [setExpectation], timeout: 1) } diff --git a/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/TextAssetTests.swift b/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/TextAssetTests.swift index 0517bfe18..688d340b8 100644 --- a/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/TextAssetTests.swift +++ b/plugins/reference-assets/swiftui/ViewInspector/SwiftUI/TextAssetTests.swift @@ -15,9 +15,6 @@ import SwiftUI @testable import PlayerUISwiftUI @testable import PlayerUITestUtilities -extension TextAssetView: Inspectable {} -extension LinkModifier: Inspectable {} - class TextAssetTests: SwiftUIAssetUnitTestCase { override func register(registry: SwiftUIRegistry) { registry.register("text", asset: TextAsset.self) diff --git a/swift_deps.bzl b/swift_deps.bzl index 44e885f1c..dcd649317 100644 --- a/swift_deps.bzl +++ b/swift_deps.bzl @@ -12,7 +12,7 @@ def swift_dependencies(): # version: 8.9.1 swift_package( name = "swiftpkg_eyes_xcui_swift_package", - commit = "ba8bc9221d1f5ca733d794d9c85ad017df9e0423", + commit = "8e968bc753f298bdc8836dae95ef8862bb6fa4bc", dependencies_index = "@//:swift_deps_index.json", remote = "https://github.com/applitools/eyes-xcui-swift-package.git", ) @@ -84,7 +84,7 @@ def swift_dependencies(): # version: 0.9.8 swift_package( name = "swiftpkg_viewinspector", - commit = "07c090d73e0169c342a4ed46e9010be2781eca1e", + commit = "67319287749b83f39dcc2f20edd520c610c012fd", dependencies_index = "@//:swift_deps_index.json", remote = "https://github.com/nalexn/ViewInspector", ) diff --git a/swift_deps_index.json b/swift_deps_index.json index f33b0831b..7e54ddf9e 100644 --- a/swift_deps_index.json +++ b/swift_deps_index.json @@ -1,112 +1,9 @@ { "direct_dep_identities": [ - "eyes-xcui-swift-package", "swift-hooks", - "viewinspector", - "xcodegen" + "viewinspector" ], "modules": [ - { - "name": "AEXML", - "c99name": "AEXML", - "src_type": "swift", - "label": "@swiftpkg_aexml//:Sources_AEXML", - "package_identity": "aexml", - "product_memberships": [ - "AEXML" - ] - }, - { - "name": "EyesXCUI", - "c99name": "EyesXCUI", - "src_type": "binary", - "label": "@swiftpkg_eyes_xcui_swift_package//:remote_archive_EyesXCUI.xcframework.zip_EyesXCUI", - "package_identity": "eyes-xcui-swift-package", - "product_memberships": [ - "EyesXCUI" - ] - }, - { - "name": "DOT", - "c99name": "DOT", - "src_type": "swift", - "label": "@swiftpkg_graphviz//:Sources_DOT", - "package_identity": "graphviz", - "product_memberships": [ - "GraphViz" - ] - }, - { - "name": "GraphViz", - "c99name": "GraphViz", - "src_type": "swift", - "label": "@swiftpkg_graphviz//:Sources_GraphViz", - "package_identity": "graphviz", - "product_memberships": [ - "GraphViz", - "GraphVizBuilder" - ] - }, - { - "name": "GraphVizBuilder", - "c99name": "GraphVizBuilder", - "src_type": "swift", - "label": "@swiftpkg_graphviz//:Sources_GraphVizBuilder", - "package_identity": "graphviz", - "product_memberships": [ - "GraphVizBuilder" - ] - }, - { - "name": "Tools", - "c99name": "Tools", - "src_type": "swift", - "label": "@swiftpkg_graphviz//:Sources_Tools", - "package_identity": "graphviz", - "product_memberships": [ - "GraphViz" - ] - }, - { - "name": "JSONUtilities", - "c99name": "JSONUtilities", - "src_type": "swift", - "label": "@swiftpkg_jsonutilities//:Sources_JSONUtilities", - "package_identity": "jsonutilities", - "product_memberships": [ - "JSONUtilities" - ] - }, - { - "name": "PathKit", - "c99name": "PathKit", - "src_type": "swift", - "label": "@swiftpkg_pathkit//:Sources_PathKit", - "package_identity": "pathkit", - "product_memberships": [ - "PathKit" - ] - }, - { - "name": "Rainbow", - "c99name": "Rainbow", - "src_type": "swift", - "label": "@swiftpkg_rainbow//:Sources_Rainbow", - "package_identity": "rainbow", - "product_memberships": [ - "Rainbow" - ] - }, - { - "name": "Spectre", - "c99name": "Spectre", - "src_type": "swift", - "label": "@swiftpkg_spectre//:Sources_Spectre", - "package_identity": "spectre", - "product_memberships": [ - "Spectre" - ] - }, { "name": "SwiftHooks", "c99name": "SwiftHooks", @@ -117,26 +14,6 @@ "SwiftHooks" ] }, - { - "name": "SwiftCLI", - "c99name": "SwiftCLI", - "src_type": "swift", - "label": "@swiftpkg_swiftcli//:Sources_SwiftCLI", - "package_identity": "swiftcli", - "product_memberships": [ - "SwiftCLI" - ] - }, - { - "name": "Version", - "c99name": "Version", - "src_type": "swift", - "label": "@swiftpkg_version//:Sources_Version", - "package_identity": "version", - "product_memberships": [ - "Version" - ] - }, { "name": "ViewInspector", "c99name": "ViewInspector", @@ -147,160 +24,9 @@ "product_memberships": [ "ViewInspector" ] - }, - { - "name": "ProjectSpec", - "c99name": "ProjectSpec", - "src_type": "swift", - "label": "@swiftpkg_xcodegen//:Sources_ProjectSpec", - "package_identity": "xcodegen", - "product_memberships": [ - "xcodegen", - "XcodeGenKit", - "ProjectSpec" - ] - }, - { - "name": "XcodeGen", - "c99name": "XcodeGen", - "src_type": "swift", - "label": "@swiftpkg_xcodegen//:Sources_XcodeGen", - "package_identity": "xcodegen", - "product_memberships": [ - "xcodegen" - ] - }, - { - "name": "XcodeGenCLI", - "c99name": "XcodeGenCLI", - "src_type": "swift", - "label": "@swiftpkg_xcodegen//:Sources_XcodeGenCLI", - "package_identity": "xcodegen", - "product_memberships": [ - "xcodegen" - ] - }, - { - "name": "XcodeGenCore", - "c99name": "XcodeGenCore", - "src_type": "swift", - "label": "@swiftpkg_xcodegen//:Sources_XcodeGenCore", - "package_identity": "xcodegen", - "product_memberships": [ - "xcodegen", - "XcodeGenKit", - "ProjectSpec" - ] - }, - { - "name": "XcodeGenKit", - "c99name": "XcodeGenKit", - "src_type": "swift", - "label": "@swiftpkg_xcodegen//:Sources_XcodeGenKit", - "package_identity": "xcodegen", - "product_memberships": [ - "xcodegen", - "XcodeGenKit" - ] - }, - { - "name": "XcodeProj", - "c99name": "XcodeProj", - "src_type": "swift", - "label": "@swiftpkg_xcodeproj//:Sources_XcodeProj", - "package_identity": "xcodeproj", - "product_memberships": [ - "XcodeProj" - ] - }, - { - "name": "CYaml", - "c99name": "CYaml", - "src_type": "clang", - "label": "@swiftpkg_yams//:Sources_CYaml", - "package_identity": "yams", - "product_memberships": [ - "Yams" - ] - }, - { - "name": "Yams", - "c99name": "Yams", - "src_type": "swift", - "label": "@swiftpkg_yams//:Sources_Yams", - "package_identity": "yams", - "product_memberships": [ - "Yams" - ] } ], "products": [ - { - "identity": "aexml", - "name": "AEXML", - "type": "library", - "target_labels": [ - "@swiftpkg_aexml//:Sources_AEXML" - ] - }, - { - "identity": "eyes-xcui-swift-package", - "name": "EyesXCUI", - "type": "library", - "target_labels": [ - "@swiftpkg_eyes_xcui_swift_package//:remote_archive_EyesXCUI.xcframework.zip_EyesXCUI" - ] - }, - { - "identity": "graphviz", - "name": "GraphViz", - "type": "library", - "target_labels": [ - "@swiftpkg_graphviz//:Sources_GraphViz", - "@swiftpkg_graphviz//:Sources_DOT", - "@swiftpkg_graphviz//:Sources_Tools" - ] - }, - { - "identity": "graphviz", - "name": "GraphVizBuilder", - "type": "library", - "target_labels": [ - "@swiftpkg_graphviz//:Sources_GraphVizBuilder" - ] - }, - { - "identity": "jsonutilities", - "name": "JSONUtilities", - "type": "library", - "target_labels": [ - "@swiftpkg_jsonutilities//:Sources_JSONUtilities" - ] - }, - { - "identity": "pathkit", - "name": "PathKit", - "type": "library", - "target_labels": [ - "@swiftpkg_pathkit//:Sources_PathKit" - ] - }, - { - "identity": "rainbow", - "name": "Rainbow", - "type": "library", - "target_labels": [ - "@swiftpkg_rainbow//:Sources_Rainbow" - ] - }, - { - "identity": "spectre", - "name": "Spectre", - "type": "library", - "target_labels": [ - "@swiftpkg_spectre//:Sources_Spectre" - ] - }, { "identity": "swift-hooks", "name": "SwiftHooks", @@ -309,22 +35,6 @@ "@swiftpkg_swift_hooks//:Sources_SwiftHooks" ] }, - { - "identity": "swiftcli", - "name": "SwiftCLI", - "type": "library", - "target_labels": [ - "@swiftpkg_swiftcli//:Sources_SwiftCLI" - ] - }, - { - "identity": "version", - "name": "Version", - "type": "library", - "target_labels": [ - "@swiftpkg_version//:Sources_Version" - ] - }, { "identity": "viewinspector", "name": "ViewInspector", @@ -332,112 +42,9 @@ "target_labels": [ "@swiftpkg_viewinspector//:Sources_ViewInspector" ] - }, - { - "identity": "xcodegen", - "name": "ProjectSpec", - "type": "library", - "target_labels": [ - "@swiftpkg_xcodegen//:Sources_ProjectSpec" - ] - }, - { - "identity": "xcodegen", - "name": "XcodeGenKit", - "type": "library", - "target_labels": [ - "@swiftpkg_xcodegen//:Sources_XcodeGenKit" - ] - }, - { - "identity": "xcodegen", - "name": "xcodegen", - "type": "executable", - "target_labels": [ - "@swiftpkg_xcodegen//:Sources_XcodeGen" - ] - }, - { - "identity": "xcodeproj", - "name": "XcodeProj", - "type": "library", - "target_labels": [ - "@swiftpkg_xcodeproj//:Sources_XcodeProj" - ] - }, - { - "identity": "yams", - "name": "Yams", - "type": "library", - "target_labels": [ - "@swiftpkg_yams//:Sources_Yams" - ] } ], "packages": [ - { - "name": "swiftpkg_aexml", - "identity": "aexml", - "remote": { - "commit": "38f7d00b23ecd891e1ee656fa6aeebd6ba04ecc3", - "remote": "https://github.com/tadija/AEXML.git", - "version": "4.6.1" - } - }, - { - "name": "swiftpkg_eyes_xcui_swift_package", - "identity": "eyes-xcui-swift-package", - "remote": { - "commit": "ba8bc9221d1f5ca733d794d9c85ad017df9e0423", - "remote": "https://github.com/applitools/eyes-xcui-swift-package.git", - "version": "8.9.1" - } - }, - { - "name": "swiftpkg_graphviz", - "identity": "graphviz", - "remote": { - "commit": "70bebcf4597b9ce33e19816d6bbd4ba9b7bdf038", - "remote": "https://github.com/SwiftDocOrg/GraphViz.git", - "version": "0.2.0" - } - }, - { - "name": "swiftpkg_jsonutilities", - "identity": "jsonutilities", - "remote": { - "commit": "128d2ffc22467f69569ef8ff971683e2393191a0", - "remote": "https://github.com/yonaskolb/JSONUtilities.git", - "version": "4.2.0" - } - }, - { - "name": "swiftpkg_pathkit", - "identity": "pathkit", - "remote": { - "commit": "3bfd2737b700b9a36565a8c94f4ad2b050a5e574", - "remote": "https://github.com/kylef/PathKit.git", - "version": "1.0.1" - } - }, - { - "name": "swiftpkg_rainbow", - "identity": "rainbow", - "remote": { - "commit": "626c3d4b6b55354b4af3aa309f998fae9b31a3d9", - "remote": "https://github.com/onevcat/Rainbow.git", - "version": "3.2.0" - } - }, - { - "name": "swiftpkg_spectre", - "identity": "spectre", - "remote": { - "commit": "26cc5e9ae0947092c7139ef7ba612e34646086c7", - "remote": "https://github.com/kylef/Spectre.git", - "version": "0.10.1" - } - }, { "name": "swiftpkg_swift_hooks", "identity": "swift-hooks", @@ -447,58 +54,13 @@ "version": "0.1.0" } }, - { - "name": "swiftpkg_swiftcli", - "identity": "swiftcli", - "remote": { - "commit": "2e949055d9797c1a6bddcda0e58dada16cc8e970", - "remote": "https://github.com/jakeheis/SwiftCLI.git", - "version": "6.0.3" - } - }, - { - "name": "swiftpkg_version", - "identity": "version", - "remote": { - "commit": "1fe824b80d89201652e7eca7c9252269a1d85e25", - "remote": "https://github.com/mxcl/Version", - "version": "2.0.1" - } - }, { "name": "swiftpkg_viewinspector", "identity": "viewinspector", "remote": { - "commit": "07c090d73e0169c342a4ed46e9010be2781eca1e", + "commit": "67319287749b83f39dcc2f20edd520c610c012fd", "remote": "https://github.com/nalexn/ViewInspector", - "version": "0.9.8" - } - }, - { - "name": "swiftpkg_xcodegen", - "identity": "xcodegen", - "remote": { - "commit": "87a275fb0852bb231550e66473804de57063c957", - "remote": "https://github.com/yonaskolb/XcodeGen.git", - "version": "2.38.0" - } - }, - { - "name": "swiftpkg_xcodeproj", - "identity": "xcodeproj", - "remote": { - "commit": "447c159b0c5fb047a024fd8d942d4a76cf47dde0", - "remote": "https://github.com/tuist/XcodeProj.git", - "version": "8.16.0" - } - }, - { - "name": "swiftpkg_yams", - "identity": "yams", - "remote": { - "commit": "0d9ee7ea8c4ebd4a489ad7a73d5c6cad55d6fed3", - "remote": "https://github.com/jpsim/Yams.git", - "version": "5.0.6" + "version": "0.9.10" } } ] diff --git a/tools/ios/BUILD.bazel b/tools/ios/BUILD.bazel index 0da427379..846f94855 100644 --- a/tools/ios/BUILD.bazel +++ b/tools/ios/BUILD.bazel @@ -1,3 +1,4 @@ exports_files([ - "ResourceShimTemplate.swift" + "ResourceShimTemplate.swift", + "Info.plist" ]) \ No newline at end of file diff --git a/tools/ios/Info.plist b/tools/ios/Info.plist new file mode 100644 index 000000000..23f4271da --- /dev/null +++ b/tools/ios/Info.plist @@ -0,0 +1,41 @@ + + + + + CFBundleIdentifier + com.intuit.ios.player.ReferenceAssets + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ReferenceAssets + CFBundlePackageType + BNDL + CFBundleSignature + ???? + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 20E238 + DTPlatformName + iphonesimulator + DTPlatformVersion + 16.4 + DTSDKBuild + 20E238 + DTSDKName + iphonesimulator16.4 + DTXcode + 1431 + DTXcodeBuild + 14E300c + MinimumOSVersion + 13.0 + UIDeviceFamily + + 1 + 2 + + + \ No newline at end of file diff --git a/xcode/Package.resolved b/xcode/Package.resolved index f2a27e95f..383fb2ba5 100644 --- a/xcode/Package.resolved +++ b/xcode/Package.resolved @@ -1,68 +1,5 @@ { "pins" : [ - { - "identity" : "aexml", - "kind" : "remoteSourceControl", - "location" : "https://github.com/tadija/AEXML.git", - "state" : { - "revision" : "38f7d00b23ecd891e1ee656fa6aeebd6ba04ecc3", - "version" : "4.6.1" - } - }, - { - "identity" : "eyes-xcui-swift-package", - "kind" : "remoteSourceControl", - "location" : "https://github.com/applitools/eyes-xcui-swift-package.git", - "state" : { - "revision" : "ba8bc9221d1f5ca733d794d9c85ad017df9e0423", - "version" : "8.9.1" - } - }, - { - "identity" : "graphviz", - "kind" : "remoteSourceControl", - "location" : "https://github.com/SwiftDocOrg/GraphViz.git", - "state" : { - "revision" : "70bebcf4597b9ce33e19816d6bbd4ba9b7bdf038", - "version" : "0.2.0" - } - }, - { - "identity" : "jsonutilities", - "kind" : "remoteSourceControl", - "location" : "https://github.com/yonaskolb/JSONUtilities.git", - "state" : { - "revision" : "128d2ffc22467f69569ef8ff971683e2393191a0", - "version" : "4.2.0" - } - }, - { - "identity" : "pathkit", - "kind" : "remoteSourceControl", - "location" : "https://github.com/kylef/PathKit.git", - "state" : { - "revision" : "3bfd2737b700b9a36565a8c94f4ad2b050a5e574", - "version" : "1.0.1" - } - }, - { - "identity" : "rainbow", - "kind" : "remoteSourceControl", - "location" : "https://github.com/onevcat/Rainbow.git", - "state" : { - "revision" : "626c3d4b6b55354b4af3aa309f998fae9b31a3d9", - "version" : "3.2.0" - } - }, - { - "identity" : "spectre", - "kind" : "remoteSourceControl", - "location" : "https://github.com/kylef/Spectre.git", - "state" : { - "revision" : "26cc5e9ae0947092c7139ef7ba612e34646086c7", - "version" : "0.10.1" - } - }, { "identity" : "swift-hooks", "kind" : "remoteSourceControl", @@ -72,58 +9,13 @@ "version" : "0.1.0" } }, - { - "identity" : "swiftcli", - "kind" : "remoteSourceControl", - "location" : "https://github.com/jakeheis/SwiftCLI.git", - "state" : { - "revision" : "2e949055d9797c1a6bddcda0e58dada16cc8e970", - "version" : "6.0.3" - } - }, - { - "identity" : "version", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mxcl/Version", - "state" : { - "revision" : "1fe824b80d89201652e7eca7c9252269a1d85e25", - "version" : "2.0.1" - } - }, { "identity" : "viewinspector", "kind" : "remoteSourceControl", "location" : "https://github.com/nalexn/ViewInspector", "state" : { - "revision" : "07c090d73e0169c342a4ed46e9010be2781eca1e", - "version" : "0.9.8" - } - }, - { - "identity" : "xcodegen", - "kind" : "remoteSourceControl", - "location" : "https://github.com/yonaskolb/XcodeGen.git", - "state" : { - "revision" : "87a275fb0852bb231550e66473804de57063c957", - "version" : "2.38.0" - } - }, - { - "identity" : "xcodeproj", - "kind" : "remoteSourceControl", - "location" : "https://github.com/tuist/XcodeProj.git", - "state" : { - "revision" : "447c159b0c5fb047a024fd8d942d4a76cf47dde0", - "version" : "8.16.0" - } - }, - { - "identity" : "yams", - "kind" : "remoteSourceControl", - "location" : "https://github.com/jpsim/Yams.git", - "state" : { - "revision" : "0d9ee7ea8c4ebd4a489ad7a73d5c6cad55d6fed3", - "version" : "5.0.6" + "revision" : "67319287749b83f39dcc2f20edd520c610c012fd", + "version" : "0.9.10" } } ], diff --git a/xcode/Package.swift b/xcode/Package.swift index 3cde9e82a..2bbb01ee6 100644 --- a/xcode/Package.swift +++ b/xcode/Package.swift @@ -20,13 +20,8 @@ let package = Package( // Actual Dependencies .package(url: "https://github.com/intuit/swift-hooks.git", .upToNextMajor(from: "0.1.0")), - - // Tools - .package(url: "https://github.com/yonaskolb/XcodeGen.git", .upToNextMajor(from: "2.38.0")), - - // Testing - .package(url: "https://github.com/applitools/eyes-xcui-swift-package.git", exact: "8.9.1"), - .package(url: "https://github.com/nalexn/viewinspector.git", .upToNextMajor(from: "0.9.7")) + // Testing Dependencies + .package(url: "https://github.com/nalexn/viewinspector.git", .upToNextMajor(from: "0.9.10")) ], targets: [] )