mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +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 AuthenticationVerifyEmailUITests: MockScreenTest {
|
||||
|
||||
override class var screenType: MockScreenState.Type {
|
||||
return MockAuthenticationVerifyEmailScreenState.self
|
||||
}
|
||||
|
||||
override class func createTest() -> MockScreenTest {
|
||||
return AuthenticationVerifyEmailUITests(selector: #selector(verifyAuthenticationVerifyEmailScreen))
|
||||
}
|
||||
|
||||
func verifyAuthenticationVerifyEmailScreen() throws {
|
||||
guard let screenState = screenState as? MockAuthenticationVerifyEmailScreenState else { fatalError("no screen") }
|
||||
switch screenState {
|
||||
case .emptyAddress:
|
||||
verifyEmptyAddress()
|
||||
case .enteredAddress:
|
||||
verifyEnteredAddress()
|
||||
case .hasSentEmail:
|
||||
verifyWaitingForEmailLink()
|
||||
}
|
||||
}
|
||||
|
||||
func verifyEmptyAddress() {
|
||||
class AuthenticationVerifyEmailUITests: MockScreenTestCase {
|
||||
func testEmptyAddress() {
|
||||
app.goToScreenWithIdentifier(MockAuthenticationVerifyEmailScreenState.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.")
|
||||
|
||||
@@ -60,7 +41,9 @@ class AuthenticationVerifyEmailUITests: MockScreenTest {
|
||||
XCTAssertEqual(cancelButton.label, "Cancel")
|
||||
}
|
||||
|
||||
func verifyEnteredAddress() {
|
||||
func testEnteredAddress() {
|
||||
app.goToScreenWithIdentifier(MockAuthenticationVerifyEmailScreenState.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.")
|
||||
|
||||
@@ -80,7 +63,9 @@ class AuthenticationVerifyEmailUITests: MockScreenTest {
|
||||
XCTAssertEqual(cancelButton.label, "Cancel")
|
||||
}
|
||||
|
||||
func verifyWaitingForEmailLink() {
|
||||
func testWaitingForEmailLink() {
|
||||
app.goToScreenWithIdentifier(MockAuthenticationVerifyEmailScreenState.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