mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 10:32:46 +02:00
Test empty state for UserOtherSessions
This commit is contained in:
+7
-1
@@ -25,6 +25,7 @@ enum MockUserOtherSessionsScreenState: MockScreenState, CaseIterable {
|
||||
// mock that screen.
|
||||
|
||||
case all
|
||||
case none
|
||||
case inactiveSessions
|
||||
case unverifiedSessions
|
||||
case verifiedSessions
|
||||
@@ -37,7 +38,7 @@ enum MockUserOtherSessionsScreenState: MockScreenState, CaseIterable {
|
||||
/// A list of screen state definitions
|
||||
static var allCases: [MockUserOtherSessionsScreenState] {
|
||||
// Each of the presence statuses
|
||||
[.all, .inactiveSessions, .unverifiedSessions, .verifiedSessions]
|
||||
[.all, .none, .inactiveSessions, .unverifiedSessions, .verifiedSessions]
|
||||
}
|
||||
|
||||
/// Generate the view struct for the screen state.
|
||||
@@ -49,6 +50,11 @@ enum MockUserOtherSessionsScreenState: MockScreenState, CaseIterable {
|
||||
filter: .all,
|
||||
title: VectorL10n.userSessionsOverviewOtherSessionsSectionTitle,
|
||||
settingService: MockUserSessionSettings())
|
||||
case .none:
|
||||
viewModel = UserOtherSessionsViewModel(sessionInfos: [],
|
||||
filter: .all,
|
||||
title: VectorL10n.userSessionsOverviewOtherSessionsSectionTitle,
|
||||
settingService: MockUserSessionSettings())
|
||||
case .inactiveSessions:
|
||||
viewModel = UserOtherSessionsViewModel(sessionInfos: inactiveSessions(),
|
||||
filter: .inactive,
|
||||
|
||||
Reference in New Issue
Block a user