added view in timeline action, added tests

This commit is contained in:
Flavio Alescio
2023-01-27 15:07:32 +01:00
parent 0188075f57
commit 5ea70aacd8
15 changed files with 141 additions and 87 deletions
@@ -18,21 +18,17 @@ import RiotSwiftUI
import XCTest
class PollHistoryDetailUITests: MockScreenTestCase {
func testPollHistoryDetailPromptRegular() {
let promptType = PollHistoryDetailPromptType.regular
app.goToScreenWithIdentifier(MockPollHistoryDetailScreenState.promptType(promptType).title)
let title = app.staticTexts["title"]
XCTAssert(title.exists)
XCTAssertEqual(title.label, promptType.title)
func testPollHistoryDetailOpenPoll() {
app.goToScreenWithIdentifier(MockPollHistoryDetailScreenState.openDisclosed.title)
XCTAssert(app.staticTexts["Active polls"].exists)
XCTAssert(app.staticTexts["1/1/01"].exists)
XCTAssert(app.buttons["View poll in timeline"].exists)
}
func testPollHistoryDetailPromptUpgrade() {
let promptType = PollHistoryDetailPromptType.upgrade
app.goToScreenWithIdentifier(MockPollHistoryDetailScreenState.promptType(promptType).title)
let title = app.staticTexts["title"]
XCTAssert(title.exists)
XCTAssertEqual(title.label, promptType.title)
func testPollHistoryDetailClosedPoll() {
app.goToScreenWithIdentifier(MockPollHistoryDetailScreenState.closedDisclosed.title)
XCTAssert(app.staticTexts["Past polls"].exists)
XCTAssert(app.staticTexts["1/1/01"].exists)
XCTAssert(app.buttons["View poll in timeline"].exists)
}
}