Skip to content

Commit

Permalink
fix UI test
Browse files Browse the repository at this point in the history
  • Loading branch information
vegaro committed Dec 4, 2024
1 parent 9340e05 commit f1eeadd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class CustomerCenterViewModelTests: TestCase {
viewModel.trackImpression(darkMode: darkMode, displayMode: displayMode)

expect(mockPurchases.trackedEvents.count) == 1
let trackedEvent = try XCTUnwrap(mockPurchases.trackedEvents.first)
let trackedEvent = try XCTUnwrap(mockPurchases.trackedEvents.first as? CustomerCenterEvent)

expect(trackedEvent.data.darkMode) == darkMode
expect(trackedEvent.data.displayMode) == displayMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ final class MockCustomerCenterPurchases: @unchecked Sendable, CustomerCenterPurc

var trackCallCount = 0
var trackError: Error?
var trackedEvents: [CustomerCenterEvent] = []
func track(customerCenterEvent: CustomerCenterEvent) {
var trackedEvents: [CustomerCenterEventType] = []
func track(customerCenterEvent: any CustomerCenterEventType) {
trackCallCount += 1
trackedEvents.append(customerCenterEvent)
}
Expand Down

0 comments on commit f1eeadd

Please sign in to comment.