From 11371f60d130df142c8866435d38331bfc0016b3 Mon Sep 17 00:00:00 2001 From: Jaclyn Chen Date: Tue, 10 Jan 2023 09:14:48 +0800 Subject: [PATCH] Temporarily disable two flaky `InAppPurchaseStoreTests` test cases that call `userIsEntitledToProduct`. --- WooCommerce/WooCommerceTests/UnitTests.xctestplan | 2 ++ .../WooCommerceTests/Yosemite/InAppPurchaseStoreTests.swift | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/WooCommerce/WooCommerceTests/UnitTests.xctestplan b/WooCommerce/WooCommerceTests/UnitTests.xctestplan index 2d4d3a4d676..e353c33e4b9 100644 --- a/WooCommerce/WooCommerceTests/UnitTests.xctestplan +++ b/WooCommerce/WooCommerceTests/UnitTests.xctestplan @@ -30,6 +30,8 @@ "testTargets" : [ { "skippedTests" : [ + "InAppPurchaseStoreTests\/test_user_is_entitled_to_product_returns_false_when_not_entitled()", + "InAppPurchaseStoreTests\/test_user_is_entitled_to_product_returns_true_when_entitled()", "StripeCardReaderIntegrationTests" ], "target" : { diff --git a/WooCommerce/WooCommerceTests/Yosemite/InAppPurchaseStoreTests.swift b/WooCommerce/WooCommerceTests/Yosemite/InAppPurchaseStoreTests.swift index a08b98033d1..e8d6779bf90 100644 --- a/WooCommerce/WooCommerceTests/Yosemite/InAppPurchaseStoreTests.swift +++ b/WooCommerce/WooCommerceTests/Yosemite/InAppPurchaseStoreTests.swift @@ -175,6 +175,8 @@ final class InAppPurchaseStoreTests: XCTestCase { XCTAssert(error is WordPressApiError) } + // TODO: re-enable the test case when it can pass consistently. More details: + // https://github.com/woocommerce/woocommerce-ios/pull/8256#pullrequestreview-1199236279 func test_user_is_entitled_to_product_returns_false_when_not_entitled() throws { // Given @@ -191,6 +193,8 @@ final class InAppPurchaseStoreTests: XCTestCase { XCTAssertFalse(isEntitled) } + // TODO: re-enable the test case when it can pass consistently. More details: + // https://github.com/woocommerce/woocommerce-ios/pull/8256#pullrequestreview-1199236279 func test_user_is_entitled_to_product_returns_true_when_entitled() throws { // Given try storeKitSession.buyProduct(productIdentifier: sampleProductID)