Skip to content

Commit

Permalink
[MOB-9233] Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeruchat committed Jan 3, 2025
1 parent c3139cc commit d45d830
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions tests/unit-tests/InAppTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,8 @@ class InAppTests: XCTestCase {
let messages = internalApi.inAppManager.getMessages()
XCTAssertEqual(messages.count, 1)

internalApi.inAppManager.show(message: messages[0], consume: true) { clickedUrl in
XCTAssertEqual(clickedUrl, TestInAppPayloadGenerator.getClickedUrl(index: 1))
expectation1.fulfill()
}
internalApi.inAppManager.show(message: messages[0], consume: true, callback: nil)
expectation1.fulfill()
}

wait(for: [expectation1, expectation2], timeout: testExpectationTimeout)
Expand Down Expand Up @@ -414,10 +412,8 @@ class InAppTests: XCTestCase {
let messages = internalApi.inAppManager.getMessages()
XCTAssertEqual(messages.count, 1)

internalApi.inAppManager.show(message: messages[0], consume: false) { clickedUrl in
XCTAssertEqual(clickedUrl, TestInAppPayloadGenerator.getClickedUrl(index: 1))
expectation1.fulfill()
}
internalApi.inAppManager.show(message: messages[0], consume: false, callback: nil)
expectation1.fulfill()
}

wait(for: [expectation1, expectation2], timeout: testExpectationTimeout)
Expand Down Expand Up @@ -461,10 +457,8 @@ class InAppTests: XCTestCase {
let messages = internalApi.inAppManager.getMessages()
XCTAssertEqual(messages.count, 1, "expected 1 messages here")

internalApi.inAppManager.show(message: messages[0], consume: true) { customActionUrl in
XCTAssertEqual(customActionUrl, TestInAppPayloadGenerator.getCustomActionUrl(index: 1))
expectation1.fulfill()
}
internalApi.inAppManager.show(message: messages[0], consume: true, callback: nil)
expectation1.fulfill()
}

wait(for: [expectation1, expectation2], timeout: testExpectationTimeout)
Expand Down Expand Up @@ -1470,7 +1464,7 @@ class InAppTests: XCTestCase {
let messages = internalApi.inAppManager.getMessages()
XCTAssertEqual(messages.count, 1)

internalApi.inAppManager.show(message: messages[0], consume: true)
internalApi.inAppManager.show(message: messages[0], consume: true, callback: nil)
expectation2.fulfill()
}

Expand Down

0 comments on commit d45d830

Please sign in to comment.