mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 08:15:24 +00:00
Retrofit deferFulfillment onto snapshot tests. (#3641)
* Retrofit `deferFulfillment` onto snapshot tests. * Convert a bunch of preview tests to the new fulfillment publisher * Convert more tests * Remove unneeded delays from the remaining tests * Remove snapshotting delay option.
This commit is contained in:
@@ -136,20 +136,23 @@ struct LoginScreen_Previews: PreviewProvider, TestablePreview {
|
||||
NavigationStack {
|
||||
LoginScreen(context: viewModel.context)
|
||||
}
|
||||
.snapshotPreferences(expect: viewModel.context.$viewState.map { state in
|
||||
state.homeserver.loginMode == .password
|
||||
})
|
||||
.previewDisplayName("matrix.org")
|
||||
.snapshotPreferences(delay: 1)
|
||||
|
||||
NavigationStack {
|
||||
LoginScreen(context: credentialsViewModel.context)
|
||||
}
|
||||
.snapshotPreferences(expect: credentialsViewModel.context.$viewState.map { state in
|
||||
state.homeserver.loginMode == .password
|
||||
})
|
||||
.previewDisplayName("Credentials Entered")
|
||||
.snapshotPreferences(delay: 1)
|
||||
|
||||
NavigationStack {
|
||||
LoginScreen(context: unconfiguredViewModel.context)
|
||||
}
|
||||
.previewDisplayName("Unsupported")
|
||||
.snapshotPreferences(delay: 1)
|
||||
}
|
||||
|
||||
static func makeViewModel(homeserverAddress: String = "matrix.org", withCredentials: Bool = false) -> LoginScreenViewModel {
|
||||
|
||||
Reference in New Issue
Block a user