mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 08:15:24 +00:00
Make the AnalyticsServiceMock default a variable as well, for consistency.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
extension AnalyticsServiceMock {
|
||||
static func `default`() -> AnalyticsServiceMock {
|
||||
static var `default`: AnalyticsServiceMock {
|
||||
let mock = AnalyticsServiceMock()
|
||||
mock.isEnabled = false
|
||||
mock.shouldShowAnalyticsPrompt = false
|
||||
|
||||
@@ -162,7 +162,7 @@ struct LoginScreen_Previews: PreviewProvider, TestablePreview {
|
||||
loginHint: nil,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
appSettings: AppSettings(),
|
||||
analytics: AnalyticsServiceMock.default())
|
||||
analytics: AnalyticsServiceMock.default)
|
||||
|
||||
if withCredentials {
|
||||
viewModel.context.username = "alice"
|
||||
|
||||
@@ -375,7 +375,7 @@ struct CallScreen_Previews: PreviewProvider {
|
||||
allowPictureInPicture: false,
|
||||
appHooks: AppHooks(),
|
||||
appSettings: AppSettings(),
|
||||
analyticsService: AnalyticsServiceMock.default())
|
||||
analyticsService: AnalyticsServiceMock.default)
|
||||
}()
|
||||
|
||||
static var previews: some View {
|
||||
|
||||
@@ -227,7 +227,7 @@ struct PollFormScreen_Previews: PreviewProvider, TestablePreview {
|
||||
static func makeViewModel(mode: PollFormMode) -> PollFormScreenViewModel {
|
||||
PollFormScreenViewModel(mode: mode,
|
||||
timelineController: MockTimelineController(),
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@ struct CreateRoom_Previews: PreviewProvider, TestablePreview {
|
||||
spaceSelectionMode: selectionMode,
|
||||
shouldShowCancelButton: isSpace,
|
||||
userSession: userSession,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appSettings: appSettings)
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ struct CreateRoomSpaceSelectionSheet_Previews: PreviewProvider, TestablePreview
|
||||
spaceSelectionMode: .editableSpacesList(preSelectedSpace: nil),
|
||||
shouldShowCancelButton: false,
|
||||
userSession: userSession,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appSettings: appSettings)
|
||||
}()
|
||||
|
||||
@@ -225,7 +225,7 @@ struct HomeScreen_Previews: PreviewProvider, TestablePreview {
|
||||
return HomeScreenViewModel(userSession: userSession,
|
||||
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
|
||||
appSettings: AppSettings(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
notificationManager: NotificationManagerMock(),
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ struct HomeScreenEmptyStateView_Previews: PreviewProvider, TestablePreview {
|
||||
return HomeScreenViewModel(userSession: userSession,
|
||||
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
|
||||
appSettings: AppSettings(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
notificationManager: NotificationManagerMock(),
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
}()
|
||||
|
||||
@@ -203,7 +203,7 @@ struct HomeScreenInviteCell_Previews: PreviewProvider, TestablePreview {
|
||||
return HomeScreenViewModel(userSession: userSession,
|
||||
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
|
||||
appSettings: AppSettings(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
notificationManager: NotificationManagerMock(),
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ struct HomeScreenKnockedCell_Previews: PreviewProvider, TestablePreview {
|
||||
return HomeScreenViewModel(userSession: userSession,
|
||||
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
|
||||
appSettings: AppSettings(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
notificationManager: NotificationManagerMock(),
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
}
|
||||
|
||||
+1
-1
@@ -124,7 +124,7 @@ struct HomeScreenRecoveryKeyConfirmationBanner_Previews: PreviewProvider, Testab
|
||||
return HomeScreenViewModel(userSession: userSession,
|
||||
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
|
||||
appSettings: AppSettings(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
notificationManager: NotificationManagerMock(),
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ struct HomeScreenRoomCell_Previews: PreviewProvider, TestablePreview {
|
||||
return HomeScreenViewModel(userSession: userSession,
|
||||
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
|
||||
appSettings: AppSettings(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
notificationManager: NotificationManagerMock(),
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ extension LocationSharingScreenViewModel {
|
||||
roomProxy: roomProxy,
|
||||
timelineController: MockTimelineController(),
|
||||
liveLocationManager: LiveLocationManagerMock(),
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
mediaProvider: MediaProviderMock(configuration: .init()))
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ private extension ManageRoomMemberSheetViewModel {
|
||||
ownPowerLevel: powerLevel),
|
||||
roomProxy: JoinedRoomProxyMock(.init()),
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
mediaProvider: MediaProviderMock(configuration: .init()))
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -318,7 +318,7 @@ struct MediaEventsTimelineScreen_Previews: PreviewProvider, TestablePreview {
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
|
||||
+2
-2
@@ -69,7 +69,7 @@ struct PinnedEventsTimelineScreen_Previews: PreviewProvider, TestablePreview {
|
||||
static let viewModel = PinnedEventsTimelineScreenViewModel(roomProxy: JoinedRoomProxyMock(.init()),
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
appSettings: AppSettings(),
|
||||
analyticsService: AnalyticsServiceMock.default())
|
||||
analyticsService: AnalyticsServiceMock.default)
|
||||
|
||||
static let emptyTimelineViewModel: TimelineViewModel = {
|
||||
let timelineController = MockTimelineController(timelineKind: .pinned)
|
||||
@@ -83,7 +83,7 @@ struct PinnedEventsTimelineScreen_Previews: PreviewProvider, TestablePreview {
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
|
||||
+1
-1
@@ -91,6 +91,6 @@ struct RoomChangePermissionsScreen_Previews: PreviewProvider, TestablePreview {
|
||||
ownPowerLevel: ownPowerLevel,
|
||||
roomProxy: JoinedRoomProxyMock(.init(isSpace: isSpace)),
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
analytics: AnalyticsServiceMock.default())
|
||||
analytics: AnalyticsServiceMock.default)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,6 +151,6 @@ struct RoomChangeRolesScreen_Previews: PreviewProvider, TestablePreview {
|
||||
roomProxy: JoinedRoomProxyMock(.init(members: members)),
|
||||
mediaProvider: MediaProviderMock(configuration: .init()),
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
analytics: AnalyticsServiceMock.default())
|
||||
analytics: AnalyticsServiceMock.default)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ struct RoomDetailsScreen_Previews: PreviewProvider, TestablePreview {
|
||||
|
||||
return .init(roomProxy: roomProxy,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: notificationSettingsProxy,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -448,7 +448,7 @@ struct RoomDetailsScreen_Previews: PreviewProvider, TestablePreview {
|
||||
|
||||
return .init(roomProxy: roomProxy,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: notificationSettingsProxy,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -486,7 +486,7 @@ struct RoomDetailsScreen_Previews: PreviewProvider, TestablePreview {
|
||||
|
||||
return .init(roomProxy: roomProxy,
|
||||
userSession: UserSessionMock(.init(clientProxy: clientProxyMock)),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: notificationSettingsProxy,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
|
||||
@@ -240,7 +240,7 @@ struct RoomMemberDetailsScreen_Previews: PreviewProvider, TestablePreview {
|
||||
roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init(clientProxy: clientProxyMock)),
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
appSettings: AppSettings())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,6 +262,6 @@ struct RoomMembersListScreen_Previews: PreviewProvider, TestablePreview {
|
||||
ownUserID: ownUserID,
|
||||
powerLevelsConfiguration: .init(canUserInvite: false))),
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
analytics: AnalyticsServiceMock.default())
|
||||
analytics: AnalyticsServiceMock.default)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -132,7 +132,7 @@ struct RoomMembersListMemberCell_Previews: PreviewProvider, TestablePreview {
|
||||
static let viewModel = RoomMembersListScreenViewModel(userSession: UserSessionMock(.init()),
|
||||
roomProxy: JoinedRoomProxyMock(.init(name: "Some room", members: [])),
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
analytics: AnalyticsServiceMock.default())
|
||||
analytics: AnalyticsServiceMock.default)
|
||||
static var previews: some View {
|
||||
VStack(spacing: 0) {
|
||||
Section("Invited/Joined") {
|
||||
|
||||
+2
-2
@@ -121,12 +121,12 @@ struct RoomRolesAndPermissionsScreen_Previews: PreviewProvider, TestablePreview
|
||||
static let viewModel = RoomRolesAndPermissionsScreenViewModel(initialPermissions: RoomPermissions(powerLevels: .mock),
|
||||
roomProxy: JoinedRoomProxyMock(.init(members: .allMembersAsAdmin)),
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
analytics: AnalyticsServiceMock.default())
|
||||
analytics: AnalyticsServiceMock.default)
|
||||
|
||||
static let creatorViewModel = RoomRolesAndPermissionsScreenViewModel(initialPermissions: RoomPermissions(powerLevels: .mock),
|
||||
roomProxy: JoinedRoomProxyMock(.init(members: .allMembersAsCreator)),
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
analytics: AnalyticsServiceMock.default())
|
||||
analytics: AnalyticsServiceMock.default)
|
||||
static var previews: some View {
|
||||
ElementNavigationStack {
|
||||
RoomRolesAndPermissionsScreen(context: viewModel.context)
|
||||
|
||||
@@ -827,7 +827,7 @@ extension ComposerToolbarViewModel {
|
||||
mediaProvider: MediaProviderMock(configuration: .init()),
|
||||
mentionDisplayHelper: ComposerMentionDisplayHelper.mock,
|
||||
appSettings: AppSettings(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
composerDraftService: ComposerDraftServiceMock(.init()))
|
||||
viewModel.state.bindings.composerFocused = focused
|
||||
viewModel.state.bindings.plainComposerText = NSAttributedString(string: message)
|
||||
|
||||
@@ -89,7 +89,7 @@ struct RoomAttachmentPicker_Previews: PreviewProvider, TestablePreview {
|
||||
mediaProvider: MediaProviderMock(configuration: .init()),
|
||||
mentionDisplayHelper: ComposerMentionDisplayHelper.mock,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
composerDraftService: ComposerDraftServiceMock(.init()))
|
||||
}
|
||||
|
||||
|
||||
@@ -463,7 +463,7 @@ extension RoomScreenViewModel {
|
||||
ongoingCallRoomIDPublisher: .init(.init(nil)),
|
||||
appSettings: AppSettings(),
|
||||
appHooks: appHooks,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ struct RoomScreen_Previews: PreviewProvider, TestablePreview {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
|
||||
+1
-1
@@ -164,7 +164,7 @@ struct AdvancedSettingsScreen_Previews: PreviewProvider, TestablePreview {
|
||||
AppSettings.resetAllSettings()
|
||||
let appSettings = AppSettings()
|
||||
return AdvancedSettingsScreenViewModel(advancedSettings: appSettings,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
clientProxy: ClientProxyMock(.init()),
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
}()
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ struct AnalyticsSettingsScreen_Previews: PreviewProvider, TestablePreview {
|
||||
static var previews: some View {
|
||||
let appSettings = AppSettings()
|
||||
let viewModel = AnalyticsSettingsScreenViewModel(appSettings: appSettings,
|
||||
analytics: AnalyticsServiceMock.default())
|
||||
analytics: AnalyticsServiceMock.default)
|
||||
AnalyticsSettingsScreen(context: viewModel.context)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -313,7 +313,7 @@ struct NotificationSettingsScreen_Previews: PreviewProvider, TestablePreview {
|
||||
|
||||
var viewModel = NotificationSettingsScreenViewModel(appSettings: appSettings,
|
||||
userNotificationCenter: notificationCenter,
|
||||
notificationToneManager: NotificationToneManagerMock(),
|
||||
notificationToneManager: NotificationToneManagerMock.default,
|
||||
notificationSettingsProxy: notificationSettingsProxy,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
isModallyPresented: true)
|
||||
|
||||
@@ -132,7 +132,7 @@ struct SpaceSettingsScreen_Previews: PreviewProvider, TestablePreview {
|
||||
canonicalAlias: "#space:matrix.org",
|
||||
members: members)),
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
|
||||
@@ -84,7 +84,7 @@ struct JoinRoomByAddressView_Previews: PreviewProvider, TestablePreview {
|
||||
userDiscoveryService.searchProfilesWithReturnValue = .success([.mockAlice])
|
||||
|
||||
return StartChatScreenViewModel(userSession: userSession,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
userDiscoveryService: userDiscoveryService,
|
||||
appSettings: AppSettings())
|
||||
|
||||
@@ -159,7 +159,7 @@ struct StartChatScreen_Previews: PreviewProvider, TestablePreview {
|
||||
let userDiscoveryService = UserDiscoveryServiceMock()
|
||||
userDiscoveryService.searchProfilesWithReturnValue = .success([.mockAlice])
|
||||
return StartChatScreenViewModel(userSession: userSession,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
userDiscoveryService: userDiscoveryService,
|
||||
appSettings: appSettings)
|
||||
|
||||
@@ -1067,7 +1067,7 @@ extension TimelineViewModel {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
|
||||
@@ -54,7 +54,7 @@ struct ReadReceiptsSummaryView_Previews: PreviewProvider, TestablePreview {
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
|
||||
@@ -346,7 +346,7 @@ struct TimelineItemBubbledStylerView_Previews: PreviewProvider, TestablePreview
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -365,7 +365,7 @@ struct TimelineItemBubbledStylerView_Previews: PreviewProvider, TestablePreview
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
|
||||
@@ -88,7 +88,7 @@ struct TimelineReadReceiptsView_Previews: PreviewProvider, TestablePreview {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ struct HighlightedTimelineItemTimeline_Previews: PreviewProvider {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
|
||||
@@ -155,7 +155,7 @@ struct TimelineView_Previews: PreviewProvider { // Not testable as this preview
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
|
||||
@@ -147,7 +147,7 @@ struct UserProfileScreen_Previews: PreviewProvider, TestablePreview {
|
||||
isPresentedModally: false,
|
||||
userSession: UserSessionMock(.init(clientProxy: clientProxyMock)),
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
appSettings: AppSettings())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class UITestsAppCoordinator: AppCoordinatorProtocol, SecureWindowManagerDelegate
|
||||
let analyticsClient = AnalyticsClientMock()
|
||||
analyticsClient.isRunning = false
|
||||
|
||||
analytics = AnalyticsServiceMock.default()
|
||||
analytics = AnalyticsServiceMock.default
|
||||
userIndicatorController = UserIndicatorController()
|
||||
|
||||
windowManager.delegate = self
|
||||
|
||||
@@ -48,7 +48,7 @@ struct ChatsTabFlowCoordinatorTests {
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
notificationManager: notificationManager,
|
||||
stateMachineFactory: stateMachineFactory)
|
||||
|
||||
@@ -97,7 +97,7 @@ final class ComposerToolbarViewModelTests {
|
||||
mediaProvider: MediaProviderMock(configuration: .init()),
|
||||
mentionDisplayHelper: ComposerMentionDisplayHelper.mock,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
composerDraftService: draftServiceMock)
|
||||
|
||||
#expect(viewModel.state.suggestions == suggestions)
|
||||
@@ -716,7 +716,7 @@ final class ComposerToolbarViewModelTests {
|
||||
mediaProvider: MediaProviderMock(configuration: .init()),
|
||||
mentionDisplayHelper: ComposerMentionDisplayHelper.mock,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
composerDraftService: draftServiceMock)
|
||||
|
||||
var fulfillment = deferFulfillment(viewModel.context.$viewState, message: "Composer is disabled") { $0.canSend == false }
|
||||
@@ -763,7 +763,7 @@ final class ComposerToolbarViewModelTests {
|
||||
mediaProvider: MediaProviderMock(configuration: .init()),
|
||||
mentionDisplayHelper: ComposerMentionDisplayHelper.mock,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
composerDraftService: draftServiceMock)
|
||||
|
||||
var fulfillment = deferFulfillment(viewModel.context.$viewState, message: "Composer is disabled") { $0.canSend == false }
|
||||
@@ -799,7 +799,7 @@ final class ComposerToolbarViewModelTests {
|
||||
mediaProvider: MediaProviderMock(configuration: .init()),
|
||||
mentionDisplayHelper: ComposerMentionDisplayHelper.mock,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
composerDraftService: draftServiceMock)
|
||||
|
||||
let deferred = deferFulfillment(viewModel.context.$viewState, message: "Composer should be enabled") { $0.canSend == true }
|
||||
@@ -825,7 +825,7 @@ final class ComposerToolbarViewModelTests {
|
||||
mediaProvider: MediaProviderMock(configuration: .init()),
|
||||
mentionDisplayHelper: ComposerMentionDisplayHelper.mock,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
composerDraftService: draftServiceMock)
|
||||
viewModel.context.composerFormattingEnabled = true
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ final class CreateRoomScreenViewModelTests {
|
||||
spaceSelectionMode: .none,
|
||||
shouldShowCancelButton: false,
|
||||
userSession: userSession,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
appSettings: appSettings)
|
||||
self.viewModel = viewModel
|
||||
@@ -343,7 +343,7 @@ final class CreateRoomScreenViewModelTests {
|
||||
spaceSelectionMode: spacesSelectionMode,
|
||||
shouldShowCancelButton: false,
|
||||
userSession: userSession,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
appSettings: appSettings)
|
||||
self.viewModel = viewModel
|
||||
|
||||
@@ -440,7 +440,7 @@ final class HomeScreenViewModelTests {
|
||||
viewModel = HomeScreenViewModel(userSession: userSession,
|
||||
selectedRoomPublisher: CurrentValueSubject<String?, Never>(nil).asCurrentValuePublisher(),
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
notificationManager: notificationManager,
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
}
|
||||
|
||||
@@ -401,7 +401,7 @@ struct LocationSharingScreenViewModelTests {
|
||||
roomProxy: roomProxyMock,
|
||||
timelineController: MockTimelineController(timelineProxy: TimelineProxyMock(.init())),
|
||||
liveLocationManager: LiveLocationManagerMock(.init()),
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
mediaProvider: MediaProviderMock(configuration: .init()))
|
||||
|
||||
@@ -436,7 +436,7 @@ struct LocationSharingScreenViewModelTests {
|
||||
roomProxy: JoinedRoomProxyMock(.init(members: members)),
|
||||
timelineController: MockTimelineController(timelineProxy: timelineProxy),
|
||||
liveLocationManager: LiveLocationManagerMock(liveLocationManagerConfiguration),
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
mediaProvider: MediaProviderMock(configuration: .init()))
|
||||
viewModel.state.bindings.isLocationAuthorized = true
|
||||
@@ -451,7 +451,7 @@ struct LocationSharingScreenViewModelTests {
|
||||
roomProxy: JoinedRoomProxyMock(.init(members: members)),
|
||||
timelineController: MockTimelineController(timelineProxy: timelineProxy),
|
||||
liveLocationManager: liveLocationManagerMock,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
mediaProvider: MediaProviderMock(configuration: .init()))
|
||||
viewModel.state.bindings.isLocationAuthorized = true
|
||||
@@ -473,7 +473,7 @@ struct LocationSharingScreenViewModelTests {
|
||||
roomProxy: roomProxyMock,
|
||||
timelineController: MockTimelineController(timelineProxy: TimelineProxyMock(.init())),
|
||||
liveLocationManager: LiveLocationManagerMock(.init()),
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
mediaProvider: MediaProviderMock(configuration: .init()))
|
||||
}
|
||||
|
||||
@@ -247,6 +247,6 @@ struct LoginScreenViewModelTests {
|
||||
loginHint: loginHint,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
appSettings: appSettings,
|
||||
analytics: AnalyticsServiceMock.default())
|
||||
analytics: AnalyticsServiceMock.default)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ struct ManageRoomMemberSheetViewModelTests {
|
||||
permissions: .init(canKick: true, canBan: true, ownPowerLevel: RoomMemberProxyMock.mockAdmin.powerLevel),
|
||||
roomProxy: roomProxy,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
mediaProvider: MediaProviderMock(configuration: .init()))
|
||||
|
||||
let deferred = deferFulfillment(context.observe(\.viewState.bindings.alertInfo)) { $0 != nil }
|
||||
@@ -64,7 +64,7 @@ struct ManageRoomMemberSheetViewModelTests {
|
||||
permissions: .init(canKick: true, canBan: true, ownPowerLevel: RoomMemberProxyMock.mockAdmin.powerLevel),
|
||||
roomProxy: roomProxy,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
mediaProvider: MediaProviderMock(configuration: .init()))
|
||||
|
||||
let deferred = deferFulfillment(context.observe(\.viewState.bindings.alertInfo)) { $0 != nil }
|
||||
@@ -87,7 +87,7 @@ struct ManageRoomMemberSheetViewModelTests {
|
||||
permissions: .init(canKick: true, canBan: true, ownPowerLevel: RoomMemberProxyMock.mockAdmin.powerLevel),
|
||||
roomProxy: roomProxy,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
mediaProvider: MediaProviderMock(configuration: .init()))
|
||||
|
||||
let deferredAction = deferFulfillment(viewModel.actions) { action in
|
||||
|
||||
@@ -29,7 +29,7 @@ struct PillContextTests {
|
||||
userIndicatorController: userIndicatorController,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -63,7 +63,7 @@ struct PillContextTests {
|
||||
userIndicatorController: userIndicatorController,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -90,7 +90,7 @@ struct PillContextTests {
|
||||
userIndicatorController: userIndicatorController,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -117,7 +117,7 @@ struct PillContextTests {
|
||||
userIndicatorController: userIndicatorController,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -143,7 +143,7 @@ struct PillContextTests {
|
||||
userIndicatorController: userIndicatorController,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -173,7 +173,7 @@ struct PillContextTests {
|
||||
userIndicatorController: userIndicatorController,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -199,7 +199,7 @@ struct PillContextTests {
|
||||
userIndicatorController: userIndicatorController,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -227,7 +227,7 @@ struct PillContextTests {
|
||||
userIndicatorController: userIndicatorController,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -253,7 +253,7 @@ struct PillContextTests {
|
||||
userIndicatorController: userIndicatorController,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -283,7 +283,7 @@ struct PillContextTests {
|
||||
userIndicatorController: userIndicatorController,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -309,7 +309,7 @@ struct PillContextTests {
|
||||
userIndicatorController: userIndicatorController,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
|
||||
@@ -179,7 +179,7 @@ struct PollFormScreenViewModelTests {
|
||||
private mutating func setupViewModel(mode: PollFormMode = .new) {
|
||||
viewModel = PollFormScreenViewModel(mode: mode,
|
||||
timelineController: MockTimelineController(timelineProxy: timelineProxy),
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,6 +125,6 @@ struct RoomChangePermissionsScreenViewModelTests {
|
||||
ownPowerLevel: ownPowerLevel,
|
||||
roomProxy: roomProxy,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
analytics: AnalyticsServiceMock.default())
|
||||
analytics: AnalyticsServiceMock.default)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,6 +197,6 @@ struct RoomChangeRolesScreenViewModelTests {
|
||||
roomProxy: roomProxy,
|
||||
mediaProvider: MediaProviderMock(configuration: .init()),
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
analytics: AnalyticsServiceMock.default())
|
||||
analytics: AnalyticsServiceMock.default)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
notificationSettingsProxyMock = NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration())
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: notificationSettingsProxyMock,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -44,7 +44,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
roomProxyMock = JoinedRoomProxyMock(.init(name: "Test", members: mockedMembers, joinRule: .public))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -64,7 +64,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
roomProxyMock = JoinedRoomProxyMock(.init(name: "Test", members: mockedMembers))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -85,7 +85,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
roomProxyMock = JoinedRoomProxyMock(.init(name: "Test", members: mockedMembers))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -143,7 +143,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
roomProxyMock = JoinedRoomProxyMock(.init(name: "Test", isDirect: true, isEncrypted: true, members: mockedMembers))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -164,7 +164,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
roomProxyMock = JoinedRoomProxyMock(.init(name: "Test", isDirect: true, isEncrypted: true, members: mockedMembers))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -195,7 +195,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
roomProxyMock = JoinedRoomProxyMock(.init(name: "Test", isDirect: true, isEncrypted: true, members: mockedMembers))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init(clientProxy: clientProxy)),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -225,7 +225,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
roomProxyMock = JoinedRoomProxyMock(.init(name: "Test", isDirect: true, isEncrypted: true, members: mockedMembers))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -256,7 +256,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
roomProxyMock = JoinedRoomProxyMock(.init(name: "Test", isDirect: true, isEncrypted: true, members: mockedMembers))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init(clientProxy: clientProxy)),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -288,7 +288,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
powerLevelsConfiguration: .init(canUserInvite: false)))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -305,7 +305,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
roomProxyMock = JoinedRoomProxyMock(.init(name: "Test", members: mockedMembers, joinRule: .public))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -357,7 +357,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -396,7 +396,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -435,7 +435,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -455,7 +455,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
roomProxyMock = JoinedRoomProxyMock(.init(name: "Test", isDirect: false, members: mockedMembers))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -475,7 +475,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
roomProxyMock = JoinedRoomProxyMock(.init(name: "Test", isDirect: true, members: mockedMembers))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: NotificationSettingsProxyMock(with: NotificationSettingsProxyMockConfiguration()),
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -493,7 +493,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
notificationSettingsProxyMock.getNotificationSettingsRoomIdIsEncryptedIsOneToOneThrowableError = NotificationSettingsError.Generic(msg: "error")
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: notificationSettingsProxyMock,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -701,7 +701,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
roomProxyMock = JoinedRoomProxyMock(.init(name: "Test", isDirect: false, knockRequestsState: .loaded(mockedRequests), joinRule: .knock))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: notificationSettingsProxyMock,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -722,7 +722,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
roomProxyMock = JoinedRoomProxyMock(.init(name: "Test", isDirect: false, knockRequestsState: .loading, joinRule: .knock))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: notificationSettingsProxyMock,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -745,7 +745,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
powerLevelsConfiguration: .init(canUserInvite: false)))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: notificationSettingsProxyMock,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -768,7 +768,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
roomProxyMock = JoinedRoomProxyMock(.init(name: "Test", isDirect: true, members: mockedMembers, knockRequestsState: .loaded(mockedRequests), joinRule: .knock))
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: notificationSettingsProxyMock,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
@@ -795,7 +795,7 @@ struct RoomDetailsScreenViewModelTests {
|
||||
|
||||
viewModel = RoomDetailsScreenViewModel(roomProxy: roomProxyMock,
|
||||
userSession: UserSessionMock(.init()),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationSettingsProxy: notificationSettingsProxyMock,
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
|
||||
@@ -490,7 +490,7 @@ final class RoomFlowCoordinatorTests {
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
notificationManager: NotificationManagerMock(),
|
||||
stateMachineFactory: StateMachineFactory())
|
||||
|
||||
@@ -212,7 +212,7 @@ struct RoomMemberDetailsViewModelTests {
|
||||
roomProxy: roomProxyMock,
|
||||
userSession: userSession,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
appSettings: AppSettings())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ struct RoomMembersFlowCoordinatorTests {
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
notificationManager: NotificationManagerMock(),
|
||||
stateMachineFactory: stateMachineFactory)
|
||||
|
||||
@@ -278,7 +278,7 @@ struct RoomMembersListScreenViewModelTests {
|
||||
viewModel = RoomMembersListScreenViewModel(userSession: UserSessionMock(.init()),
|
||||
roomProxy: roomProxy,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
analytics: AnalyticsServiceMock.default())
|
||||
analytics: AnalyticsServiceMock.default)
|
||||
|
||||
let context = viewModel.context
|
||||
|
||||
@@ -298,6 +298,6 @@ struct RoomMembersListScreenViewModelTests {
|
||||
viewModel = RoomMembersListScreenViewModel(userSession: UserSessionMock(.init()),
|
||||
roomProxy: roomProxy,
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
analytics: AnalyticsServiceMock.default())
|
||||
analytics: AnalyticsServiceMock.default)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,6 +84,6 @@ struct RoomRolesAndPermissionsScreenViewModelTests {
|
||||
roomProxy = JoinedRoomProxyMock(.init(members: members))
|
||||
viewModel = RoomRolesAndPermissionsScreenViewModel(roomProxy: roomProxy,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
analytics: AnalyticsServiceMock.default())
|
||||
analytics: AnalyticsServiceMock.default)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ final class RoomScreenViewModelTests {
|
||||
ongoingCallRoomIDPublisher: .init(.init(nil)),
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
self.viewModel = viewModel
|
||||
|
||||
@@ -131,7 +131,7 @@ final class RoomScreenViewModelTests {
|
||||
ongoingCallRoomIDPublisher: .init(.init(nil)),
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
self.viewModel = viewModel
|
||||
|
||||
@@ -192,7 +192,7 @@ final class RoomScreenViewModelTests {
|
||||
ongoingCallRoomIDPublisher: .init(.init(nil)),
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
self.viewModel = viewModel
|
||||
|
||||
@@ -251,7 +251,7 @@ final class RoomScreenViewModelTests {
|
||||
ongoingCallRoomIDPublisher: .init(.init(nil)),
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
self.viewModel = viewModel
|
||||
|
||||
@@ -288,7 +288,7 @@ final class RoomScreenViewModelTests {
|
||||
ongoingCallRoomIDPublisher: ongoingCallRoomIDSubject.asCurrentValuePublisher(),
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
self.viewModel = viewModel
|
||||
#expect(viewModel.state.shouldShowCallButton)
|
||||
@@ -333,7 +333,7 @@ final class RoomScreenViewModelTests {
|
||||
ongoingCallRoomIDPublisher: .init(.init(nil)),
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
self.viewModel = viewModel
|
||||
viewModel.stop()
|
||||
@@ -354,7 +354,7 @@ final class RoomScreenViewModelTests {
|
||||
ongoingCallRoomIDPublisher: .init(.init(nil)),
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
self.viewModel = viewModel
|
||||
|
||||
@@ -388,7 +388,7 @@ final class RoomScreenViewModelTests {
|
||||
ongoingCallRoomIDPublisher: .init(.init(nil)),
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
self.viewModel = viewModel
|
||||
|
||||
@@ -417,7 +417,7 @@ final class RoomScreenViewModelTests {
|
||||
ongoingCallRoomIDPublisher: .init(.init(nil)),
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
self.viewModel = viewModel
|
||||
|
||||
@@ -437,7 +437,7 @@ final class RoomScreenViewModelTests {
|
||||
ongoingCallRoomIDPublisher: .init(.init(nil)),
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
self.viewModel = viewModel
|
||||
|
||||
@@ -464,7 +464,7 @@ final class RoomScreenViewModelTests {
|
||||
ongoingCallRoomIDPublisher: .init(.init(nil)),
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
self.viewModel = viewModel
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ struct StartChatScreenViewModelTests {
|
||||
userDiscoveryService.searchProfilesWithReturnValue = .success([])
|
||||
let userSession = UserSessionMock(.init(clientProxy: clientProxy))
|
||||
viewModel = StartChatScreenViewModel(userSession: userSession,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: UserIndicatorControllerMock(),
|
||||
userDiscoveryService: userDiscoveryService,
|
||||
appSettings: appSettings)
|
||||
|
||||
@@ -316,7 +316,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -345,7 +345,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -372,7 +372,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -411,7 +411,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -450,7 +450,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -495,7 +495,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -526,7 +526,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
@@ -598,7 +598,7 @@ final class TimelineViewModelTests {
|
||||
userIndicatorController: UserIndicatorControllerMock.default,
|
||||
appMediator: AppMediatorMock.default,
|
||||
appSettings: appSettings,
|
||||
analyticsService: AnalyticsServiceMock.default(),
|
||||
analyticsService: AnalyticsServiceMock.default,
|
||||
emojiProvider: EmojiProvider(appSettings: appSettings),
|
||||
linkMetadataProvider: LinkMetadataProvider(),
|
||||
timelineControllerFactory: TimelineControllerFactoryMock(.init()))
|
||||
|
||||
@@ -23,7 +23,7 @@ struct UserProfileScreenViewModelTests {
|
||||
isPresentedModally: false,
|
||||
userSession: UserSessionMock(.init(clientProxy: clientProxy)),
|
||||
userIndicatorController: userIndicatorController,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
appSettings: AppSettings())
|
||||
let context = viewModel.context
|
||||
|
||||
@@ -47,7 +47,7 @@ struct UserProfileScreenViewModelTests {
|
||||
isPresentedModally: false,
|
||||
userSession: UserSessionMock(.init(clientProxy: clientProxy)),
|
||||
userIndicatorController: userIndicatorController,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
appSettings: AppSettings())
|
||||
let context = viewModel.context
|
||||
|
||||
@@ -73,7 +73,7 @@ struct UserProfileScreenViewModelTests {
|
||||
isPresentedModally: false,
|
||||
userSession: UserSessionMock(.init(clientProxy: clientProxy)),
|
||||
userIndicatorController: userIndicatorController,
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
appSettings: AppSettings())
|
||||
|
||||
let context = viewModel.context
|
||||
|
||||
@@ -61,7 +61,7 @@ struct UserSessionFlowCoordinatorTests {
|
||||
appMediator: appMediator,
|
||||
appSettings: appSettings,
|
||||
appHooks: AppHooks(),
|
||||
analytics: AnalyticsServiceMock.default(),
|
||||
analytics: AnalyticsServiceMock.default,
|
||||
userIndicatorController: userIndicatorController,
|
||||
notificationManager: NotificationManagerMock(),
|
||||
stateMachineFactory: stateMachineFactory)
|
||||
|
||||
Reference in New Issue
Block a user