diff --git a/ElementX/Sources/Mocks/AnalyticsServiceMock.swift b/ElementX/Sources/Mocks/AnalyticsServiceMock.swift index d60c77d25..1606efa7c 100644 --- a/ElementX/Sources/Mocks/AnalyticsServiceMock.swift +++ b/ElementX/Sources/Mocks/AnalyticsServiceMock.swift @@ -6,7 +6,7 @@ // extension AnalyticsServiceMock { - static func `default`() -> AnalyticsServiceMock { + static var `default`: AnalyticsServiceMock { let mock = AnalyticsServiceMock() mock.isEnabled = false mock.shouldShowAnalyticsPrompt = false diff --git a/ElementX/Sources/Screens/Authentication/LoginScreen/View/LoginScreen.swift b/ElementX/Sources/Screens/Authentication/LoginScreen/View/LoginScreen.swift index a0feadced..a244cea7c 100644 --- a/ElementX/Sources/Screens/Authentication/LoginScreen/View/LoginScreen.swift +++ b/ElementX/Sources/Screens/Authentication/LoginScreen/View/LoginScreen.swift @@ -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" diff --git a/ElementX/Sources/Screens/CallScreen/View/CallScreen.swift b/ElementX/Sources/Screens/CallScreen/View/CallScreen.swift index 9f322fc96..d854171d7 100644 --- a/ElementX/Sources/Screens/CallScreen/View/CallScreen.swift +++ b/ElementX/Sources/Screens/CallScreen/View/CallScreen.swift @@ -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 { diff --git a/ElementX/Sources/Screens/CreatePollScreen/View/PollFormScreen.swift b/ElementX/Sources/Screens/CreatePollScreen/View/PollFormScreen.swift index f8724a1fc..60001c39b 100644 --- a/ElementX/Sources/Screens/CreatePollScreen/View/PollFormScreen.swift +++ b/ElementX/Sources/Screens/CreatePollScreen/View/PollFormScreen.swift @@ -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) } } diff --git a/ElementX/Sources/Screens/CreateRoomScreen/View/CreateRoomScreen.swift b/ElementX/Sources/Screens/CreateRoomScreen/View/CreateRoomScreen.swift index 6716a4d99..cdf351248 100644 --- a/ElementX/Sources/Screens/CreateRoomScreen/View/CreateRoomScreen.swift +++ b/ElementX/Sources/Screens/CreateRoomScreen/View/CreateRoomScreen.swift @@ -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) } diff --git a/ElementX/Sources/Screens/CreateRoomScreen/View/CreateRoomSpaceSelectionSheet.swift b/ElementX/Sources/Screens/CreateRoomScreen/View/CreateRoomSpaceSelectionSheet.swift index 4211ef54b..1510d92bf 100644 --- a/ElementX/Sources/Screens/CreateRoomScreen/View/CreateRoomSpaceSelectionSheet.swift +++ b/ElementX/Sources/Screens/CreateRoomScreen/View/CreateRoomSpaceSelectionSheet.swift @@ -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) }() diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift index f98c0b4cb..28a8b3362 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift @@ -225,7 +225,7 @@ struct HomeScreen_Previews: PreviewProvider, TestablePreview { return HomeScreenViewModel(userSession: userSession, selectedRoomPublisher: CurrentValueSubject(nil).asCurrentValuePublisher(), appSettings: AppSettings(), - analyticsService: AnalyticsServiceMock.default(), + analyticsService: AnalyticsServiceMock.default, notificationManager: NotificationManagerMock(), userIndicatorController: UserIndicatorControllerMock.default) } diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenEmptyStateView.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenEmptyStateView.swift index 9d2f084fd..e47564bcc 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenEmptyStateView.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenEmptyStateView.swift @@ -146,7 +146,7 @@ struct HomeScreenEmptyStateView_Previews: PreviewProvider, TestablePreview { return HomeScreenViewModel(userSession: userSession, selectedRoomPublisher: CurrentValueSubject(nil).asCurrentValuePublisher(), appSettings: AppSettings(), - analyticsService: AnalyticsServiceMock.default(), + analyticsService: AnalyticsServiceMock.default, notificationManager: NotificationManagerMock(), userIndicatorController: UserIndicatorControllerMock.default) }() diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenInviteCell.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenInviteCell.swift index 2e8b85444..3df3c17a8 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenInviteCell.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenInviteCell.swift @@ -203,7 +203,7 @@ struct HomeScreenInviteCell_Previews: PreviewProvider, TestablePreview { return HomeScreenViewModel(userSession: userSession, selectedRoomPublisher: CurrentValueSubject(nil).asCurrentValuePublisher(), appSettings: AppSettings(), - analyticsService: AnalyticsServiceMock.default(), + analyticsService: AnalyticsServiceMock.default, notificationManager: NotificationManagerMock(), userIndicatorController: UserIndicatorControllerMock.default) } diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenKnockedCell.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenKnockedCell.swift index dc982206b..ac66bf366 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenKnockedCell.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenKnockedCell.swift @@ -135,7 +135,7 @@ struct HomeScreenKnockedCell_Previews: PreviewProvider, TestablePreview { return HomeScreenViewModel(userSession: userSession, selectedRoomPublisher: CurrentValueSubject(nil).asCurrentValuePublisher(), appSettings: AppSettings(), - analyticsService: AnalyticsServiceMock.default(), + analyticsService: AnalyticsServiceMock.default, notificationManager: NotificationManagerMock(), userIndicatorController: UserIndicatorControllerMock.default) } diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRecoveryKeyConfirmationBanner.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRecoveryKeyConfirmationBanner.swift index 6206c2e45..acdf59d02 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRecoveryKeyConfirmationBanner.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRecoveryKeyConfirmationBanner.swift @@ -124,7 +124,7 @@ struct HomeScreenRecoveryKeyConfirmationBanner_Previews: PreviewProvider, Testab return HomeScreenViewModel(userSession: userSession, selectedRoomPublisher: CurrentValueSubject(nil).asCurrentValuePublisher(), appSettings: AppSettings(), - analyticsService: AnalyticsServiceMock.default(), + analyticsService: AnalyticsServiceMock.default, notificationManager: NotificationManagerMock(), userIndicatorController: UserIndicatorControllerMock.default) } diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomCell.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomCell.swift index 2e11c403a..fbfc33a2f 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomCell.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomCell.swift @@ -256,7 +256,7 @@ struct HomeScreenRoomCell_Previews: PreviewProvider, TestablePreview { return HomeScreenViewModel(userSession: userSession, selectedRoomPublisher: CurrentValueSubject(nil).asCurrentValuePublisher(), appSettings: AppSettings(), - analyticsService: AnalyticsServiceMock.default(), + analyticsService: AnalyticsServiceMock.default, notificationManager: NotificationManagerMock(), userIndicatorController: UserIndicatorControllerMock.default) } diff --git a/ElementX/Sources/Screens/LocationSharing/LocationSharingScreenViewModel.swift b/ElementX/Sources/Screens/LocationSharing/LocationSharingScreenViewModel.swift index a3db3f3cc..662874ad2 100644 --- a/ElementX/Sources/Screens/LocationSharing/LocationSharingScreenViewModel.swift +++ b/ElementX/Sources/Screens/LocationSharing/LocationSharingScreenViewModel.swift @@ -394,7 +394,7 @@ extension LocationSharingScreenViewModel { roomProxy: roomProxy, timelineController: MockTimelineController(), liveLocationManager: LiveLocationManagerMock(), - analytics: AnalyticsServiceMock.default(), + analytics: AnalyticsServiceMock.default, userIndicatorController: UserIndicatorControllerMock(), mediaProvider: MediaProviderMock(configuration: .init())) } diff --git a/ElementX/Sources/Screens/ManageRoomMemberSheet/View/ManageRoomMemberSheetView.swift b/ElementX/Sources/Screens/ManageRoomMemberSheet/View/ManageRoomMemberSheetView.swift index 741d4b24c..67bc7a328 100644 --- a/ElementX/Sources/Screens/ManageRoomMemberSheet/View/ManageRoomMemberSheetView.swift +++ b/ElementX/Sources/Screens/ManageRoomMemberSheet/View/ManageRoomMemberSheetView.swift @@ -120,7 +120,7 @@ private extension ManageRoomMemberSheetViewModel { ownPowerLevel: powerLevel), roomProxy: JoinedRoomProxyMock(.init()), userIndicatorController: UserIndicatorControllerMock(), - analyticsService: AnalyticsServiceMock.default(), + analyticsService: AnalyticsServiceMock.default, mediaProvider: MediaProviderMock(configuration: .init())) } } diff --git a/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/MediaEventsTimelineScreen.swift b/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/MediaEventsTimelineScreen.swift index c5dc46da9..6de94c208 100644 --- a/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/MediaEventsTimelineScreen.swift +++ b/ElementX/Sources/Screens/MediaEventsTimelineScreen/View/MediaEventsTimelineScreen.swift @@ -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())) diff --git a/ElementX/Sources/Screens/PinnedEventsTimelineScreen/View/PinnedEventsTimelineScreen.swift b/ElementX/Sources/Screens/PinnedEventsTimelineScreen/View/PinnedEventsTimelineScreen.swift index 954bcf0ea..acb87c789 100644 --- a/ElementX/Sources/Screens/PinnedEventsTimelineScreen/View/PinnedEventsTimelineScreen.swift +++ b/ElementX/Sources/Screens/PinnedEventsTimelineScreen/View/PinnedEventsTimelineScreen.swift @@ -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())) diff --git a/ElementX/Sources/Screens/RoomChangePermissionsScreen/View/RoomChangePermissionsScreen.swift b/ElementX/Sources/Screens/RoomChangePermissionsScreen/View/RoomChangePermissionsScreen.swift index 8e3f1350a..3fa00a1e3 100644 --- a/ElementX/Sources/Screens/RoomChangePermissionsScreen/View/RoomChangePermissionsScreen.swift +++ b/ElementX/Sources/Screens/RoomChangePermissionsScreen/View/RoomChangePermissionsScreen.swift @@ -91,6 +91,6 @@ struct RoomChangePermissionsScreen_Previews: PreviewProvider, TestablePreview { ownPowerLevel: ownPowerLevel, roomProxy: JoinedRoomProxyMock(.init(isSpace: isSpace)), userIndicatorController: UserIndicatorControllerMock(), - analytics: AnalyticsServiceMock.default()) + analytics: AnalyticsServiceMock.default) } } diff --git a/ElementX/Sources/Screens/RoomChangeRolesScreen/View/RoomChangeRolesScreen.swift b/ElementX/Sources/Screens/RoomChangeRolesScreen/View/RoomChangeRolesScreen.swift index 93bb13944..053858d88 100644 --- a/ElementX/Sources/Screens/RoomChangeRolesScreen/View/RoomChangeRolesScreen.swift +++ b/ElementX/Sources/Screens/RoomChangeRolesScreen/View/RoomChangeRolesScreen.swift @@ -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) } } diff --git a/ElementX/Sources/Screens/RoomDetailsScreen/View/RoomDetailsScreen.swift b/ElementX/Sources/Screens/RoomDetailsScreen/View/RoomDetailsScreen.swift index fca37bb44..b0f1d1fc2 100644 --- a/ElementX/Sources/Screens/RoomDetailsScreen/View/RoomDetailsScreen.swift +++ b/ElementX/Sources/Screens/RoomDetailsScreen/View/RoomDetailsScreen.swift @@ -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()), diff --git a/ElementX/Sources/Screens/RoomMemberDetailsScreen/View/RoomMemberDetailsScreen.swift b/ElementX/Sources/Screens/RoomMemberDetailsScreen/View/RoomMemberDetailsScreen.swift index 07fd5a596..962331403 100644 --- a/ElementX/Sources/Screens/RoomMemberDetailsScreen/View/RoomMemberDetailsScreen.swift +++ b/ElementX/Sources/Screens/RoomMemberDetailsScreen/View/RoomMemberDetailsScreen.swift @@ -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()) } } diff --git a/ElementX/Sources/Screens/RoomMemberListScreen/View/RoomMembersListScreen.swift b/ElementX/Sources/Screens/RoomMemberListScreen/View/RoomMembersListScreen.swift index aee4c28e3..82454f579 100644 --- a/ElementX/Sources/Screens/RoomMemberListScreen/View/RoomMembersListScreen.swift +++ b/ElementX/Sources/Screens/RoomMemberListScreen/View/RoomMembersListScreen.swift @@ -262,6 +262,6 @@ struct RoomMembersListScreen_Previews: PreviewProvider, TestablePreview { ownUserID: ownUserID, powerLevelsConfiguration: .init(canUserInvite: false))), userIndicatorController: UserIndicatorControllerMock.default, - analytics: AnalyticsServiceMock.default()) + analytics: AnalyticsServiceMock.default) } } diff --git a/ElementX/Sources/Screens/RoomMemberListScreen/View/RoomMembersListScreenMemberCell.swift b/ElementX/Sources/Screens/RoomMemberListScreen/View/RoomMembersListScreenMemberCell.swift index cb9fc5bf4..c85506108 100644 --- a/ElementX/Sources/Screens/RoomMemberListScreen/View/RoomMembersListScreenMemberCell.swift +++ b/ElementX/Sources/Screens/RoomMemberListScreen/View/RoomMembersListScreenMemberCell.swift @@ -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") { diff --git a/ElementX/Sources/Screens/RoomRolesAndPermissionsScreen/View/RoomRolesAndPermissionsScreen.swift b/ElementX/Sources/Screens/RoomRolesAndPermissionsScreen/View/RoomRolesAndPermissionsScreen.swift index d28755085..8bc94e74a 100644 --- a/ElementX/Sources/Screens/RoomRolesAndPermissionsScreen/View/RoomRolesAndPermissionsScreen.swift +++ b/ElementX/Sources/Screens/RoomRolesAndPermissionsScreen/View/RoomRolesAndPermissionsScreen.swift @@ -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) diff --git a/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/ComposerToolbarViewModel.swift b/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/ComposerToolbarViewModel.swift index 97395d88d..aab185972 100644 --- a/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/ComposerToolbarViewModel.swift +++ b/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/ComposerToolbarViewModel.swift @@ -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) diff --git a/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/View/RoomAttachmentPicker.swift b/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/View/RoomAttachmentPicker.swift index 4435f52f7..35b6ea08d 100644 --- a/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/View/RoomAttachmentPicker.swift +++ b/ElementX/Sources/Screens/RoomScreen/ComposerToolbar/View/RoomAttachmentPicker.swift @@ -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())) } diff --git a/ElementX/Sources/Screens/RoomScreen/RoomScreenViewModel.swift b/ElementX/Sources/Screens/RoomScreen/RoomScreenViewModel.swift index 8839c1540..e78723366 100644 --- a/ElementX/Sources/Screens/RoomScreen/RoomScreenViewModel.swift +++ b/ElementX/Sources/Screens/RoomScreen/RoomScreenViewModel.swift @@ -463,7 +463,7 @@ extension RoomScreenViewModel { ongoingCallRoomIDPublisher: .init(.init(nil)), appSettings: AppSettings(), appHooks: appHooks, - analyticsService: AnalyticsServiceMock.default(), + analyticsService: AnalyticsServiceMock.default, userIndicatorController: UserIndicatorControllerMock.default) } } diff --git a/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift b/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift index 07bee8733..55d667527 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift @@ -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())) diff --git a/ElementX/Sources/Screens/Settings/AdvancedSettingsScreen/View/AdvancedSettingsScreen.swift b/ElementX/Sources/Screens/Settings/AdvancedSettingsScreen/View/AdvancedSettingsScreen.swift index d99c96b9b..7aea59959 100644 --- a/ElementX/Sources/Screens/Settings/AdvancedSettingsScreen/View/AdvancedSettingsScreen.swift +++ b/ElementX/Sources/Screens/Settings/AdvancedSettingsScreen/View/AdvancedSettingsScreen.swift @@ -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) }() diff --git a/ElementX/Sources/Screens/Settings/AnalyticsSettingsScreen/View/AnalyticsSettingsScreen.swift b/ElementX/Sources/Screens/Settings/AnalyticsSettingsScreen/View/AnalyticsSettingsScreen.swift index 955f620d0..04038b59a 100644 --- a/ElementX/Sources/Screens/Settings/AnalyticsSettingsScreen/View/AnalyticsSettingsScreen.swift +++ b/ElementX/Sources/Screens/Settings/AnalyticsSettingsScreen/View/AnalyticsSettingsScreen.swift @@ -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) } } diff --git a/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift b/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift index 9cf06edad..9b28183f1 100644 --- a/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift +++ b/ElementX/Sources/Screens/Settings/NotificationSettingsScreen/View/NotificationSettingsScreen.swift @@ -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) diff --git a/ElementX/Sources/Screens/Spaces/SpaceSettingsScreen/View/SpaceSettingsScreen.swift b/ElementX/Sources/Screens/Spaces/SpaceSettingsScreen/View/SpaceSettingsScreen.swift index f20e2bb72..60f1bf76e 100644 --- a/ElementX/Sources/Screens/Spaces/SpaceSettingsScreen/View/SpaceSettingsScreen.swift +++ b/ElementX/Sources/Screens/Spaces/SpaceSettingsScreen/View/SpaceSettingsScreen.swift @@ -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()), diff --git a/ElementX/Sources/Screens/StartChatScreen/View/JoinRoomByAddressView.swift b/ElementX/Sources/Screens/StartChatScreen/View/JoinRoomByAddressView.swift index 45678e7ad..bbcc6ebc1 100644 --- a/ElementX/Sources/Screens/StartChatScreen/View/JoinRoomByAddressView.swift +++ b/ElementX/Sources/Screens/StartChatScreen/View/JoinRoomByAddressView.swift @@ -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()) diff --git a/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift b/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift index 1c6d49e01..32e762ecc 100644 --- a/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift +++ b/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift @@ -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) diff --git a/ElementX/Sources/Screens/Timeline/TimelineViewModel.swift b/ElementX/Sources/Screens/Timeline/TimelineViewModel.swift index 2ad843521..0b6262640 100644 --- a/ElementX/Sources/Screens/Timeline/TimelineViewModel.swift +++ b/ElementX/Sources/Screens/Timeline/TimelineViewModel.swift @@ -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())) diff --git a/ElementX/Sources/Screens/Timeline/View/ReadReceipts/ReadReceiptsSummaryView.swift b/ElementX/Sources/Screens/Timeline/View/ReadReceipts/ReadReceiptsSummaryView.swift index e51713c14..e47186f26 100644 --- a/ElementX/Sources/Screens/Timeline/View/ReadReceipts/ReadReceiptsSummaryView.swift +++ b/ElementX/Sources/Screens/Timeline/View/ReadReceipts/ReadReceiptsSummaryView.swift @@ -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())) diff --git a/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbledStylerView.swift b/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbledStylerView.swift index 7caf20306..38ef105b4 100644 --- a/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbledStylerView.swift +++ b/ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbledStylerView.swift @@ -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())) diff --git a/ElementX/Sources/Screens/Timeline/View/Supplementary/TimelineReadReceiptsView.swift b/ElementX/Sources/Screens/Timeline/View/Supplementary/TimelineReadReceiptsView.swift index f02ac40ca..91ca0df23 100644 --- a/ElementX/Sources/Screens/Timeline/View/Supplementary/TimelineReadReceiptsView.swift +++ b/ElementX/Sources/Screens/Timeline/View/Supplementary/TimelineReadReceiptsView.swift @@ -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())) diff --git a/ElementX/Sources/Screens/Timeline/View/TimelineItemViews/HighlightedTimelineItemModifier.swift b/ElementX/Sources/Screens/Timeline/View/TimelineItemViews/HighlightedTimelineItemModifier.swift index c2021b77f..5c10acc71 100644 --- a/ElementX/Sources/Screens/Timeline/View/TimelineItemViews/HighlightedTimelineItemModifier.swift +++ b/ElementX/Sources/Screens/Timeline/View/TimelineItemViews/HighlightedTimelineItemModifier.swift @@ -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())) diff --git a/ElementX/Sources/Screens/Timeline/View/TimelineView.swift b/ElementX/Sources/Screens/Timeline/View/TimelineView.swift index 8566164aa..7c06dfd57 100644 --- a/ElementX/Sources/Screens/Timeline/View/TimelineView.swift +++ b/ElementX/Sources/Screens/Timeline/View/TimelineView.swift @@ -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())) diff --git a/ElementX/Sources/Screens/UserProfileScreen/View/UserProfileScreen.swift b/ElementX/Sources/Screens/UserProfileScreen/View/UserProfileScreen.swift index 6a04340a6..2eb1559da 100644 --- a/ElementX/Sources/Screens/UserProfileScreen/View/UserProfileScreen.swift +++ b/ElementX/Sources/Screens/UserProfileScreen/View/UserProfileScreen.swift @@ -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()) } } diff --git a/ElementX/Sources/UITests/UITestsAppCoordinator.swift b/ElementX/Sources/UITests/UITestsAppCoordinator.swift index ea79e1378..261b4776f 100644 --- a/ElementX/Sources/UITests/UITestsAppCoordinator.swift +++ b/ElementX/Sources/UITests/UITestsAppCoordinator.swift @@ -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 diff --git a/UnitTests/Sources/ChatsTabFlowCoordinatorTests.swift b/UnitTests/Sources/ChatsTabFlowCoordinatorTests.swift index a7b8afcaa..bbf418b49 100644 --- a/UnitTests/Sources/ChatsTabFlowCoordinatorTests.swift +++ b/UnitTests/Sources/ChatsTabFlowCoordinatorTests.swift @@ -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) diff --git a/UnitTests/Sources/ComposerToolbarViewModelTests.swift b/UnitTests/Sources/ComposerToolbarViewModelTests.swift index 44d99c294..bb2fa2fcf 100644 --- a/UnitTests/Sources/ComposerToolbarViewModelTests.swift +++ b/UnitTests/Sources/ComposerToolbarViewModelTests.swift @@ -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 } diff --git a/UnitTests/Sources/CreateRoomViewModelTests.swift b/UnitTests/Sources/CreateRoomViewModelTests.swift index 05d93519a..5c7b2dcd0 100644 --- a/UnitTests/Sources/CreateRoomViewModelTests.swift +++ b/UnitTests/Sources/CreateRoomViewModelTests.swift @@ -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 diff --git a/UnitTests/Sources/HomeScreenViewModelTests.swift b/UnitTests/Sources/HomeScreenViewModelTests.swift index f6d9659d1..b41ad8dde 100644 --- a/UnitTests/Sources/HomeScreenViewModelTests.swift +++ b/UnitTests/Sources/HomeScreenViewModelTests.swift @@ -440,7 +440,7 @@ final class HomeScreenViewModelTests { viewModel = HomeScreenViewModel(userSession: userSession, selectedRoomPublisher: CurrentValueSubject(nil).asCurrentValuePublisher(), appSettings: appSettings, - analyticsService: AnalyticsServiceMock.default(), + analyticsService: AnalyticsServiceMock.default, notificationManager: notificationManager, userIndicatorController: UserIndicatorControllerMock.default) } diff --git a/UnitTests/Sources/LocationSharingScreenViewModelTests.swift b/UnitTests/Sources/LocationSharingScreenViewModelTests.swift index 2cab502fa..9ef2b2b20 100644 --- a/UnitTests/Sources/LocationSharingScreenViewModelTests.swift +++ b/UnitTests/Sources/LocationSharingScreenViewModelTests.swift @@ -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())) } diff --git a/UnitTests/Sources/LoginScreenViewModelTests.swift b/UnitTests/Sources/LoginScreenViewModelTests.swift index 2f97307ce..c57b4e4ae 100644 --- a/UnitTests/Sources/LoginScreenViewModelTests.swift +++ b/UnitTests/Sources/LoginScreenViewModelTests.swift @@ -247,6 +247,6 @@ struct LoginScreenViewModelTests { loginHint: loginHint, userIndicatorController: UserIndicatorControllerMock(), appSettings: appSettings, - analytics: AnalyticsServiceMock.default()) + analytics: AnalyticsServiceMock.default) } } diff --git a/UnitTests/Sources/ManageRoomMemberSheetViewModelTests.swift b/UnitTests/Sources/ManageRoomMemberSheetViewModelTests.swift index bed89be51..8e98dbb7d 100644 --- a/UnitTests/Sources/ManageRoomMemberSheetViewModelTests.swift +++ b/UnitTests/Sources/ManageRoomMemberSheetViewModelTests.swift @@ -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 diff --git a/UnitTests/Sources/PillContextTests.swift b/UnitTests/Sources/PillContextTests.swift index 8fbedcebd..028058800 100644 --- a/UnitTests/Sources/PillContextTests.swift +++ b/UnitTests/Sources/PillContextTests.swift @@ -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())) diff --git a/UnitTests/Sources/PollFormScreenViewModelTests.swift b/UnitTests/Sources/PollFormScreenViewModelTests.swift index f3dfdf907..fc8a7ef08 100644 --- a/UnitTests/Sources/PollFormScreenViewModelTests.swift +++ b/UnitTests/Sources/PollFormScreenViewModelTests.swift @@ -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()) } } diff --git a/UnitTests/Sources/RoomChangePermissionsScreenViewModelTests.swift b/UnitTests/Sources/RoomChangePermissionsScreenViewModelTests.swift index 0dfe574ee..b3da475a6 100644 --- a/UnitTests/Sources/RoomChangePermissionsScreenViewModelTests.swift +++ b/UnitTests/Sources/RoomChangePermissionsScreenViewModelTests.swift @@ -125,6 +125,6 @@ struct RoomChangePermissionsScreenViewModelTests { ownPowerLevel: ownPowerLevel, roomProxy: roomProxy, userIndicatorController: UserIndicatorControllerMock(), - analytics: AnalyticsServiceMock.default()) + analytics: AnalyticsServiceMock.default) } } diff --git a/UnitTests/Sources/RoomChangeRolesScreenViewModelTests.swift b/UnitTests/Sources/RoomChangeRolesScreenViewModelTests.swift index 0b9835a1c..03e4c2cf9 100644 --- a/UnitTests/Sources/RoomChangeRolesScreenViewModelTests.swift +++ b/UnitTests/Sources/RoomChangeRolesScreenViewModelTests.swift @@ -197,6 +197,6 @@ struct RoomChangeRolesScreenViewModelTests { roomProxy: roomProxy, mediaProvider: MediaProviderMock(configuration: .init()), userIndicatorController: UserIndicatorControllerMock(), - analytics: AnalyticsServiceMock.default()) + analytics: AnalyticsServiceMock.default) } } diff --git a/UnitTests/Sources/RoomDetailsScreenViewModelTests.swift b/UnitTests/Sources/RoomDetailsScreenViewModelTests.swift index c051ae850..7f8dde7f4 100644 --- a/UnitTests/Sources/RoomDetailsScreenViewModelTests.swift +++ b/UnitTests/Sources/RoomDetailsScreenViewModelTests.swift @@ -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()), diff --git a/UnitTests/Sources/RoomFlowCoordinatorTests.swift b/UnitTests/Sources/RoomFlowCoordinatorTests.swift index 24e8fbef6..a9685efd1 100644 --- a/UnitTests/Sources/RoomFlowCoordinatorTests.swift +++ b/UnitTests/Sources/RoomFlowCoordinatorTests.swift @@ -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()) diff --git a/UnitTests/Sources/RoomMemberDetailsViewModelTests.swift b/UnitTests/Sources/RoomMemberDetailsViewModelTests.swift index 6a7b7db77..5801fa582 100644 --- a/UnitTests/Sources/RoomMemberDetailsViewModelTests.swift +++ b/UnitTests/Sources/RoomMemberDetailsViewModelTests.swift @@ -212,7 +212,7 @@ struct RoomMemberDetailsViewModelTests { roomProxy: roomProxyMock, userSession: userSession, userIndicatorController: UserIndicatorControllerMock.default, - analytics: AnalyticsServiceMock.default(), + analytics: AnalyticsServiceMock.default, appSettings: AppSettings()) } } diff --git a/UnitTests/Sources/RoomMembersFlowCoordinatorTests.swift b/UnitTests/Sources/RoomMembersFlowCoordinatorTests.swift index a7ab4340a..18cd97675 100644 --- a/UnitTests/Sources/RoomMembersFlowCoordinatorTests.swift +++ b/UnitTests/Sources/RoomMembersFlowCoordinatorTests.swift @@ -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) diff --git a/UnitTests/Sources/RoomMembersListScreenViewModelTests.swift b/UnitTests/Sources/RoomMembersListScreenViewModelTests.swift index 44bf88b98..f42d70e45 100644 --- a/UnitTests/Sources/RoomMembersListScreenViewModelTests.swift +++ b/UnitTests/Sources/RoomMembersListScreenViewModelTests.swift @@ -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) } } diff --git a/UnitTests/Sources/RoomRolesAndPermissionsScreenViewModelTests.swift b/UnitTests/Sources/RoomRolesAndPermissionsScreenViewModelTests.swift index 83386f091..48547ba7f 100644 --- a/UnitTests/Sources/RoomRolesAndPermissionsScreenViewModelTests.swift +++ b/UnitTests/Sources/RoomRolesAndPermissionsScreenViewModelTests.swift @@ -84,6 +84,6 @@ struct RoomRolesAndPermissionsScreenViewModelTests { roomProxy = JoinedRoomProxyMock(.init(members: members)) viewModel = RoomRolesAndPermissionsScreenViewModel(roomProxy: roomProxy, userIndicatorController: UserIndicatorControllerMock(), - analytics: AnalyticsServiceMock.default()) + analytics: AnalyticsServiceMock.default) } } diff --git a/UnitTests/Sources/RoomScreenViewModelTests.swift b/UnitTests/Sources/RoomScreenViewModelTests.swift index 0dfa1030c..cd3c62a21 100644 --- a/UnitTests/Sources/RoomScreenViewModelTests.swift +++ b/UnitTests/Sources/RoomScreenViewModelTests.swift @@ -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 diff --git a/UnitTests/Sources/StartChatViewModelTests.swift b/UnitTests/Sources/StartChatViewModelTests.swift index f4dc92c28..9a2ea1e6a 100644 --- a/UnitTests/Sources/StartChatViewModelTests.swift +++ b/UnitTests/Sources/StartChatViewModelTests.swift @@ -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) diff --git a/UnitTests/Sources/TimelineViewModelTests.swift b/UnitTests/Sources/TimelineViewModelTests.swift index 26bd2dfc5..1de14dbde 100644 --- a/UnitTests/Sources/TimelineViewModelTests.swift +++ b/UnitTests/Sources/TimelineViewModelTests.swift @@ -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())) diff --git a/UnitTests/Sources/UserProfileScreenViewModelTests.swift b/UnitTests/Sources/UserProfileScreenViewModelTests.swift index 39593acc2..687f9f585 100644 --- a/UnitTests/Sources/UserProfileScreenViewModelTests.swift +++ b/UnitTests/Sources/UserProfileScreenViewModelTests.swift @@ -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 diff --git a/UnitTests/Sources/UserSessionFlowCoordinatorTests.swift b/UnitTests/Sources/UserSessionFlowCoordinatorTests.swift index d862175d4..3b402e1c3 100644 --- a/UnitTests/Sources/UserSessionFlowCoordinatorTests.swift +++ b/UnitTests/Sources/UserSessionFlowCoordinatorTests.swift @@ -61,7 +61,7 @@ struct UserSessionFlowCoordinatorTests { appMediator: appMediator, appSettings: appSettings, appHooks: AppHooks(), - analytics: AnalyticsServiceMock.default(), + analytics: AnalyticsServiceMock.default, userIndicatorController: userIndicatorController, notificationManager: NotificationManagerMock(), stateMachineFactory: stateMachineFactory)