mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
Add PollHistory view model UTs
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
import RiotSwiftUI
|
||||
import XCTest
|
||||
|
||||
class PollHistoryUITests: MockScreenTestCase {
|
||||
final class PollHistoryUITests: MockScreenTestCase {
|
||||
func testActivePollHistoryHasContent() {
|
||||
app.goToScreenWithIdentifier(MockPollHistoryScreenState.active.title)
|
||||
let title = app.navigationBars.firstMatch.identifier
|
||||
@@ -65,4 +65,15 @@ class PollHistoryUITests: MockScreenTestCase {
|
||||
XCTAssertEqual(selectedSegment.value as? String, VectorL10n.accessibilitySelected)
|
||||
XCTAssertFalse(winningOption.exists)
|
||||
}
|
||||
|
||||
func testLoaderIsShowing() {
|
||||
app.goToScreenWithIdentifier(MockPollHistoryScreenState.loading.title)
|
||||
let title = app.navigationBars.firstMatch.identifier
|
||||
let loadingText = app.staticTexts["PollHistory.loadingText"]
|
||||
let items = app.staticTexts["PollListItem.title"]
|
||||
|
||||
XCTAssertEqual(title, VectorL10n.pollHistoryTitle)
|
||||
XCTAssertFalse(items.exists)
|
||||
XCTAssertTrue(loadingText.exists)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user