Test empty state for UserOtherSessions

This commit is contained in:
Alfonso Grillo
2022-11-10 11:16:02 +01:00
parent 97292d43bd
commit 1ccd53b51b
3 changed files with 17 additions and 1 deletions
@@ -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,