From e6eac49e189a5a3d68a18858fe682f9ff55b76e8 Mon Sep 17 00:00:00 2001 From: Ian Maia Date: Thu, 20 Feb 2025 16:34:23 +0100 Subject: [PATCH 1/3] Add back failing test to run it on CI --- .../PointOfSaleAggregateModelTests.swift | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/WooCommerce/WooCommerceTests/POS/Models/PointOfSaleAggregateModelTests.swift b/WooCommerce/WooCommerceTests/POS/Models/PointOfSaleAggregateModelTests.swift index 66f7f8fdf8e..c282ad8815e 100644 --- a/WooCommerce/WooCommerceTests/POS/Models/PointOfSaleAggregateModelTests.swift +++ b/WooCommerce/WooCommerceTests/POS/Models/PointOfSaleAggregateModelTests.swift @@ -166,6 +166,24 @@ struct PointOfSaleAggregateModelTests { #expect(sut.cart.isEmpty) } + @available(iOS 17.0, *) + @Test func removeAllItemsFromCart_when_tapped_then_tracks_event() { + // Given + let sut = PointOfSaleAggregateModel( + itemsController: MockPointOfSaleItemsController(), + cardPresentPaymentService: MockCardPresentPaymentService(), + orderController: MockPointOfSaleOrderController(), + analytics: analytics, + collectOrderPaymentAnalyticsTracker: MockPOSCollectOrderPaymentAnalyticsTracker() + ) + + //When + sut.removeAllItemsFromCart() + + // Then + #expect(analyticsProvider.receivedEvents.first(where: { $0 == "clear_cart_tapped" }) != nil) + } + @available(iOS 17.0, *) @Test(.disabled( """ From 0bf07e82bd90d73ab0b86812a7d034ced5010e13 Mon Sep 17 00:00:00 2001 From: Ian Maia Date: Thu, 20 Feb 2025 17:37:20 +0100 Subject: [PATCH 2/3] Force failure --- .../POS/Models/PointOfSaleAggregateModelTests.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WooCommerce/WooCommerceTests/POS/Models/PointOfSaleAggregateModelTests.swift b/WooCommerce/WooCommerceTests/POS/Models/PointOfSaleAggregateModelTests.swift index c282ad8815e..6fe72b9e53c 100644 --- a/WooCommerce/WooCommerceTests/POS/Models/PointOfSaleAggregateModelTests.swift +++ b/WooCommerce/WooCommerceTests/POS/Models/PointOfSaleAggregateModelTests.swift @@ -18,6 +18,9 @@ struct PointOfSaleAggregateModelTests { collectOrderPaymentAnalyticsTracker: MockPOSCollectOrderPaymentAnalyticsTracker()) // Then #expect(sut.orderStage == .building) + + // Then + #expect(sut.orderStage != .building) } @available(iOS 17.0, *) From b58557901d3b49b85a98a18e07ab599acbecec90 Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Thu, 13 Mar 2025 15:01:34 +0100 Subject: [PATCH 3/3] Update to latest fastlane Which contains the fix for trainer to support SwiftTesting and correctly report test failures on those --- Gemfile | 2 +- Gemfile.lock | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Gemfile b/Gemfile index b2251322020..2c6e8c90b23 100644 --- a/Gemfile +++ b/Gemfile @@ -11,7 +11,7 @@ gem 'cocoapods-catalyst-support', '~> 0.1' gem 'danger-dangermattic', '~> 1.2' gem 'dotenv' # 2.217.0 includes a fix for Xcode 15 test results parsing in CI -gem 'fastlane', '~> 2.217' +gem 'fastlane', '~> 2.227' gem 'fastlane-plugin-appcenter', '~> 2.0' gem 'fastlane-plugin-sentry', '~> 1.0' # This comment avoids typing to switch to a development version for testing. diff --git a/Gemfile.lock b/Gemfile.lock index c5fddd25f82..63a1b2dae89 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,21 +25,22 @@ GEM artifactory (3.0.17) ast (2.4.2) atomos (0.1.3) - aws-eventstream (1.3.0) - aws-partitions (1.1029.0) - aws-sdk-core (3.214.1) + aws-eventstream (1.3.2) + aws-partitions (1.1065.0) + aws-sdk-core (3.220.1) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.992.0) aws-sigv4 (~> 1.9) + base64 jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.96.0) - aws-sdk-core (~> 3, >= 3.210.0) + aws-sdk-kms (1.99.0) + aws-sdk-core (~> 3, >= 3.216.0) aws-sigv4 (~> 1.5) - aws-sdk-s3 (1.176.1) - aws-sdk-core (~> 3, >= 3.210.0) + aws-sdk-s3 (1.182.0) + aws-sdk-core (~> 3, >= 3.216.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.5) - aws-sigv4 (1.10.1) + aws-sigv4 (1.11.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) base64 (0.2.0) @@ -167,8 +168,8 @@ GEM faraday-retry (1.0.3) faraday_middleware (1.2.1) faraday (~> 1.0) - fastimage (2.3.1) - fastlane (2.226.0) + fastimage (2.4.0) + fastlane (2.227.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) @@ -359,7 +360,7 @@ GEM ruby-macho (2.5.1) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - rubyzip (2.3.2) + rubyzip (2.4.1) sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) @@ -415,7 +416,7 @@ DEPENDENCIES cocoapods-catalyst-support (~> 0.1) danger-dangermattic (~> 1.2) dotenv - fastlane (~> 2.217) + fastlane (~> 2.227) fastlane-plugin-appcenter (~> 2.0) fastlane-plugin-sentry (~> 1.0) fastlane-plugin-wpmreleasetoolkit (~> 12.5)