mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-05 07:27:42 +02:00
Add tests to onboarding personalisation.
This commit is contained in:
+20
-4
@@ -31,10 +31,26 @@ class OnboardingCongratulationsUITests: MockScreenTest {
|
||||
func verifyOnboardingCongratulationsScreen() throws {
|
||||
guard let screenState = screenState as? MockOnboardingCongratulationsScreenState else { fatalError("no screen") }
|
||||
switch screenState {
|
||||
case .congratulations:
|
||||
// There isn't anything to test here
|
||||
break
|
||||
case .regular:
|
||||
verifyButtons()
|
||||
case .personalizationDisabled:
|
||||
verifyButtonsWhenPersonalizationIsDisabled()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func verifyButtons() {
|
||||
let personalizeButton = app.buttons["personalizeButton"]
|
||||
XCTAssertTrue(personalizeButton.exists, "The personalization button should be shown.")
|
||||
|
||||
let homeButton = app.buttons["homeButton"]
|
||||
XCTAssertTrue(homeButton.exists, "The home button should always be shown.")
|
||||
}
|
||||
|
||||
func verifyButtonsWhenPersonalizationIsDisabled() {
|
||||
let personalizeButton = app.buttons["personalizeButton"]
|
||||
XCTAssertFalse(personalizeButton.exists, "The personalization button should be hidden.")
|
||||
|
||||
let homeButton = app.buttons["homeButton"]
|
||||
XCTAssertTrue(homeButton.exists, "The home button should always be shown.")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user