Skip to content

Commit

Permalink
Test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewc committed Apr 19, 2024
1 parent 6ef8879 commit 8e63aaf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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'.")
}
Expand Down

0 comments on commit 8e63aaf

Please sign in to comment.