Skip to content

Commit

Permalink
fixup! Convert ConfirmationView form UIKit to SwiftUI
Browse files Browse the repository at this point in the history
Make orientation manager a part of 'SecureConversations.ConfirmationViewSwiftUI.Model'.
  • Loading branch information
rasmustautsglia committed Sep 21, 2023
1 parent dc39037 commit 54d5356
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ extension EngagementCoordinator.Environment {
createSendMessagePayload: { _, _ in
fail("\(Self.self).createSendMessagePayload")
return .mock()
}
},
orientationManager: .mock()
)
}
3 changes: 2 additions & 1 deletion GliaWidgetsTests/Glia.Environment.Failing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ extension Glia.Environment {
return .mock()
},
screenShareHandler: .mock,
messagesWithUnreadCountLoaderScheduler: CoreSdkClient.reactiveSwiftDateSchedulerMock
messagesWithUnreadCountLoaderScheduler: CoreSdkClient.reactiveSwiftDateSchedulerMock,
orientationManager: .mock()
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ final class SecureConversationsConfirmationViewModelTests: XCTestCase {

var viewModel: ConfirmationViewModel = .init(
environment: .init(
uiApplication: .mock,
uiDevice: .mock,
notificationCenter: .mock
orientationManager: .mock(), uiApplication: .mock
),
style: Theme().defaultSecureConversationsConfirmationStyle,
delegate: nil
Expand All @@ -28,9 +26,7 @@ extension SecureConversationsConfirmationViewModelTests {
let title = "Test"
viewModel = .init(
environment: .init(
uiApplication: .mock,
uiDevice: .mock,
notificationCenter: .mock
orientationManager: .mock(), uiApplication: .mock
),
style: .mock(title: title),
delegate: nil
Expand Down Expand Up @@ -62,9 +58,7 @@ extension SecureConversationsConfirmationViewModelTests {

viewModel = .init(
environment: .init(
uiApplication: .mock,
uiDevice: .mock,
notificationCenter: .mock
orientationManager: .mock(), uiApplication: .mock
),
style: .mock(),
delegate: { event in
Expand All @@ -85,9 +79,7 @@ extension SecureConversationsConfirmationViewModelTests {

viewModel = .init(
environment: .init(
uiApplication: .mock,
uiDevice: .mock,
notificationCenter: .mock
orientationManager: .mock(), uiApplication: .mock
),
style: .mock(),
delegate: { event in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ final class SecureConversationsConfirmationScreenDynamicTypeFontTests: SnapshotT
func test_confirmationView_extra3Large() {
let model: SecureConversations.ConfirmationViewSwiftUI.Model = .init(
environment: .init(
uiApplication: .mock,
uiDevice: .mock,
notificationCenter: .mock
orientationManager: .mock(), uiApplication: .mock
),
style: theme.defaultSecureConversationsConfirmationStyle,
delegate: nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ class SecureConversationsConfirmationScreenLayoutTests: SnapshotTestCase {
func test_confirmationView() {
let model: SecureConversations.ConfirmationViewSwiftUI.Model = .init(
environment: .init(
uiApplication: .mock,
uiDevice: .mock,
notificationCenter: .mock
orientationManager: .mock(), uiApplication: .mock
),
style: theme.defaultSecureConversationsConfirmationStyle,
delegate: nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ class SecureConversationsConfirmationScreenTests: SnapshotTestCase {
func test_confirmationView() {
let model: SecureConversations.ConfirmationViewSwiftUI.Model = .init(
environment: .init(
uiApplication: .mock,
uiDevice: .mock,
notificationCenter: .mock
orientationManager: .mock(), uiApplication: .mock
),
style: theme.defaultSecureConversationsConfirmationStyle,
delegate: nil
Expand Down

0 comments on commit 54d5356

Please sign in to comment.