mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Add utility to run UI tests for Screen states, add screen states for template and finish unit test.
This commit is contained in:
+2
-2
@@ -38,12 +38,12 @@ class TemplateUserProfileViewModelTests: XCTestCase {
|
||||
XCTAssertEqual(viewModel.viewState.presence, Constants.presenceInitialValue)
|
||||
}
|
||||
|
||||
func testFirstPresenceRecieved() throws {
|
||||
func testFirstPresenceReceived() throws {
|
||||
let presencePublisher = viewModel.$viewState.map(\.presence).removeDuplicates().collect(1).first()
|
||||
XCTAssertEqual(try xcAwait(presencePublisher), [Constants.presenceInitialValue])
|
||||
}
|
||||
|
||||
func testPresenceUpdatesRecieved() throws {
|
||||
func testPresenceUpdatesReceived() throws {
|
||||
let presencePublisher = viewModel.$viewState.map(\.presence).removeDuplicates().collect(3).first()
|
||||
let newPresenceValue1: TemplateUserProfilePresence = .online
|
||||
let newPresenceValue2: TemplateUserProfilePresence = .idle
|
||||
|
||||
Reference in New Issue
Block a user