mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 18:42:47 +02:00
Prefix test in-front of UI test methods.
This commit is contained in:
+7
-22
@@ -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.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user