Prefix test in-front of UI test methods.

This commit is contained in:
Doug
2022-07-14 17:49:49 +01:00
committed by Doug
parent 0442342fc5
commit e6ea10f3a6
39 changed files with 404 additions and 757 deletions
@@ -17,27 +17,10 @@
import XCTest
import RiotSwiftUI
class OnboardingCongratulationsUITests: MockScreenTest {
override class var screenType: MockScreenState.Type {
return MockOnboardingCongratulationsScreenState.self
}
override class func createTest() -> MockScreenTest {
return OnboardingCongratulationsUITests(selector: #selector(verifyOnboardingCongratulationsScreen))
}
func verifyOnboardingCongratulationsScreen() throws {
guard let screenState = screenState as? MockOnboardingCongratulationsScreenState else { fatalError("no screen") }
switch screenState {
case .regular:
verifyButtons()
case .personalizationDisabled:
verifyButtonsWhenPersonalizationIsDisabled()
}
}
func verifyButtons() {
class OnboardingCongratulationsUITests: MockScreenTestCase {
func testButtons() {
app.goToScreenWithIdentifier(MockOnboardingCongratulationsScreenState.regular.title)
let personalizeButton = app.buttons["personalizeButton"]
XCTAssertTrue(personalizeButton.exists, "The personalization button should be shown.")
@@ -45,7 +28,9 @@ class OnboardingCongratulationsUITests: MockScreenTest {
XCTAssertTrue(homeButton.exists, "The home button should always be shown.")
}
func verifyButtonsWhenPersonalizationIsDisabled() {
func testButtonsWhenPersonalizationIsDisabled() {
app.goToScreenWithIdentifier(MockOnboardingCongratulationsScreenState.personalizationDisabled.title)
let personalizeButton = app.buttons["personalizeButton"]
XCTAssertFalse(personalizeButton.exists, "The personalization button should be hidden.")