From 8e63aaf52ee56cdf8e502c35d546bb696cc9fff8 Mon Sep 17 00:00:00 2001 From: Jack Newcombe Date: Fri, 19 Apr 2024 22:00:17 +0100 Subject: [PATCH] Test fix --- .../Unit Tests/Modules/HUC_TokenizationViewModelTests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Debug App/Tests/Unit Tests/Modules/HUC_TokenizationViewModelTests.swift b/Debug App/Tests/Unit Tests/Modules/HUC_TokenizationViewModelTests.swift index cb842bd423..bc96c0e06f 100644 --- a/Debug App/Tests/Unit Tests/Modules/HUC_TokenizationViewModelTests.swift +++ b/Debug App/Tests/Unit Tests/Modules/HUC_TokenizationViewModelTests.swift @@ -404,7 +404,7 @@ final class HUC_TokenizationViewModelTests: XCTestCase { } if self.abortPayment { - DispatchQueue.main.asyncAfter(deadline: .now() + 2) { + DispatchQueue.main.asyncAfter(deadline: .now() + 8) { print(self.eventsCalled) if isSurchargeIncluded { @@ -417,7 +417,7 @@ final class HUC_TokenizationViewModelTests: XCTestCase { XCTAssert(self.eventsCalled[5] == "primerHeadlessUniversalCheckoutClientSessionDidUpdate", "'\(self.eventsCalled[5])' called instead if 'primerHeadlessUniversalCheckoutClientSessionDidUpdate'.") } else { - XCTAssert(self.eventsCalled.count == 2, "2 events should have been called.") + XCTAssert(self.eventsCalled.count == 2, "2 events should have been called but got \(self.eventsCalled.count).") XCTAssert(self.eventsCalled[0] == "primerHeadlessUniversalCheckoutPreparationDidStart", "'\(self.eventsCalled[0])' called instead if 'primerHeadlessUniversalCheckoutPreparationDidStart'.") XCTAssert(self.eventsCalled[1] == "primerHeadlessUniversalCheckoutWillCreatePaymentWithData", "'\(self.eventsCalled[1])' called instead if 'primerHeadlessUniversalCheckoutWillCreatePaymentWithData'.") }