CI: Fix UI tests to include new onboarding steps
Changelog-None Closes: https://github.com/damus-io/damus/issues/3124 Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
@@ -28,6 +28,15 @@ enum AppAccessibilityIdentifiers: String {
|
|||||||
// MARK: Onboarding
|
// MARK: Onboarding
|
||||||
// Prefix: `onboarding`
|
// Prefix: `onboarding`
|
||||||
|
|
||||||
|
/// Any interest option button on the "select your interests" page during onboarding
|
||||||
|
case onboarding_interest_option_button
|
||||||
|
|
||||||
|
/// The "next" button on the onboarding interest page
|
||||||
|
case onboarding_interest_page_next_page
|
||||||
|
|
||||||
|
/// The "next" button on the onboarding content settings page
|
||||||
|
case onboarding_content_settings_page_next_page
|
||||||
|
|
||||||
/// The skip button on the onboarding sheet
|
/// The skip button on the onboarding sheet
|
||||||
case onboarding_sheet_skip_button
|
case onboarding_sheet_skip_button
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ extension OnboardingSuggestionsView {
|
|||||||
.disabled(!isNextEnabled)
|
.disabled(!isNextEnabled)
|
||||||
.opacity(isNextEnabled ? 1.0 : 0.5)
|
.opacity(isNextEnabled ? 1.0 : 0.5)
|
||||||
.padding([.leading, .trailing, .bottom])
|
.padding([.leading, .trailing, .bottom])
|
||||||
|
.accessibilityIdentifier(AppAccessibilityIdentifiers.onboarding_interest_page_next_page.rawValue)
|
||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
}
|
}
|
||||||
@@ -82,6 +83,7 @@ extension OnboardingSuggestionsView {
|
|||||||
selectedInterests.insert(interest)
|
selectedInterests.insert(interest)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.accessibilityIdentifier(AppAccessibilityIdentifiers.onboarding_interest_option_button.rawValue)
|
||||||
.disabled(disabled)
|
.disabled(disabled)
|
||||||
.opacity(disabled ? 0.5 : 1.0)
|
.opacity(disabled ? 0.5 : 1.0)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ extension OnboardingSuggestionsView {
|
|||||||
.disabled(!isNextEnabled)
|
.disabled(!isNextEnabled)
|
||||||
.opacity(isNextEnabled ? 1.0 : 0.5)
|
.opacity(isNextEnabled ? 1.0 : 0.5)
|
||||||
.padding([.leading, .trailing, .bottom])
|
.padding([.leading, .trailing, .bottom])
|
||||||
|
.accessibilityIdentifier(AppAccessibilityIdentifiers.onboarding_content_settings_page_next_page.rawValue)
|
||||||
}
|
}
|
||||||
.padding()
|
.padding()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,9 @@ class damusUITests: XCTestCase {
|
|||||||
try self.login()
|
try self.login()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.buttons[AID.onboarding_interest_option_button.rawValue].firstMatch.tapIfExists(timeout: 5)
|
||||||
|
app.buttons[AID.onboarding_interest_page_next_page.rawValue].tapIfExists(timeout: 5)
|
||||||
|
app.buttons[AID.onboarding_content_settings_page_next_page.rawValue].tapIfExists(timeout: 5)
|
||||||
app.buttons[AID.onboarding_sheet_skip_button.rawValue].tapIfExists(timeout: 5)
|
app.buttons[AID.onboarding_sheet_skip_button.rawValue].tapIfExists(timeout: 5)
|
||||||
app.buttons[AID.post_composer_cancel_button.rawValue].tapIfExists(timeout: 5)
|
app.buttons[AID.post_composer_cancel_button.rawValue].tapIfExists(timeout: 5)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user