mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-25 02:52:45 +02:00
Prefix test in-front of UI test methods.
This commit is contained in:
+10
-25
@@ -17,29 +17,10 @@
|
||||
import XCTest
|
||||
import RiotSwiftUI
|
||||
|
||||
class AuthenticationForgotPasswordUITests: MockScreenTest {
|
||||
|
||||
override class var screenType: MockScreenState.Type {
|
||||
return MockAuthenticationForgotPasswordScreenState.self
|
||||
}
|
||||
|
||||
override class func createTest() -> MockScreenTest {
|
||||
return AuthenticationForgotPasswordUITests(selector: #selector(verifyAuthenticationForgotPasswordScreen))
|
||||
}
|
||||
|
||||
func verifyAuthenticationForgotPasswordScreen() throws {
|
||||
guard let screenState = screenState as? MockAuthenticationForgotPasswordScreenState else { fatalError("no screen") }
|
||||
switch screenState {
|
||||
case .emptyAddress:
|
||||
verifyEmptyAddress()
|
||||
case .enteredAddress:
|
||||
verifyEnteredAddress()
|
||||
case .hasSentEmail:
|
||||
verifyWaitingForEmailLink()
|
||||
}
|
||||
}
|
||||
|
||||
func verifyEmptyAddress() {
|
||||
class AuthenticationForgotPasswordUITests: MockScreenTestCase {
|
||||
func testEmptyAddress() {
|
||||
app.goToScreenWithIdentifier(MockAuthenticationForgotPasswordScreenState.emptyAddress.title)
|
||||
|
||||
XCTAssertTrue(app.staticTexts["titleLabel"].exists, "The title should be shown before an email is sent.")
|
||||
XCTAssertTrue(app.staticTexts["messageLabel"].exists, "The message should be shown before an email is sent.")
|
||||
|
||||
@@ -66,7 +47,9 @@ class AuthenticationForgotPasswordUITests: MockScreenTest {
|
||||
XCTAssertEqual(cancelButton.label, "Cancel")
|
||||
}
|
||||
|
||||
func verifyEnteredAddress() {
|
||||
func testEnteredAddress() {
|
||||
app.goToScreenWithIdentifier(MockAuthenticationForgotPasswordScreenState.enteredAddress.title)
|
||||
|
||||
XCTAssertTrue(app.staticTexts["titleLabel"].exists, "The title should be shown before an email is sent.")
|
||||
XCTAssertTrue(app.staticTexts["messageLabel"].exists, "The message should be shown before an email is sent.")
|
||||
|
||||
@@ -92,7 +75,9 @@ class AuthenticationForgotPasswordUITests: MockScreenTest {
|
||||
XCTAssertEqual(cancelButton.label, "Cancel")
|
||||
}
|
||||
|
||||
func verifyWaitingForEmailLink() {
|
||||
func testWaitingForEmailLink() {
|
||||
app.goToScreenWithIdentifier(MockAuthenticationForgotPasswordScreenState.hasSentEmail.title)
|
||||
|
||||
XCTAssertFalse(app.staticTexts["titleLabel"].exists, "The title should be hidden once an email has been sent.")
|
||||
XCTAssertFalse(app.staticTexts["messageLabel"].exists, "The message should be hidden once an email has been sent.")
|
||||
XCTAssertFalse(app.textFields["addressTextField"].exists, "The text field should be hidden once an email has been sent.")
|
||||
|
||||
Reference in New Issue
Block a user