mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Fix UI Tests for OnboardingScreen, BugReportScreen, ServerSelectionScreen, and UserSessionFlows. (#549)
* Fix OnboardingScreen UI Tests Disable the swipe tests for now as there is only a single page. * Fix BugReportScreen UI Tests. Use snapshots more and remove manual validation method. * Fix ServerSelectionScreen UI Tests. * Fix SessionVerificationScreen UI Tests. * Fix UserSessionFlows UI Tests
This commit is contained in:
@@ -34,31 +34,10 @@ enum OnboardingViewModelAction {
|
||||
}
|
||||
|
||||
struct OnboardingViewState: BindableState {
|
||||
/// The colours of the background gradient shown behind the 4 pages.
|
||||
private let gradientColors = [
|
||||
Color(red: 0.95, green: 0.98, blue: 0.96),
|
||||
Color(red: 0.89, green: 0.96, blue: 0.97),
|
||||
Color(red: 0.95, green: 0.89, blue: 0.97),
|
||||
Color(red: 0.81, green: 0.95, blue: 0.91),
|
||||
Color(red: 0.95, green: 0.98, blue: 0.96)
|
||||
]
|
||||
|
||||
/// An array containing all content of the carousel pages
|
||||
let content: [OnboardingPageContent]
|
||||
var bindings: OnboardingBindings
|
||||
|
||||
/// The background gradient for all 4 pages and the hidden page at the start of the carousel.
|
||||
var backgroundGradient: Gradient {
|
||||
if Tests.isRunningUITests {
|
||||
return Gradient(colors: [.white])
|
||||
}
|
||||
// Include the extra stop for the hidden page at the start of the carousel.
|
||||
// (The last color is the right-hand stop, but we need the left-hand stop,
|
||||
// so take the last but one color from the array).
|
||||
let hiddenPageColor = gradientColors[gradientColors.count - 2]
|
||||
return Gradient(colors: [hiddenPageColor] + gradientColors)
|
||||
}
|
||||
|
||||
init() {
|
||||
content = [
|
||||
OnboardingPageContent(title: ElementL10n.ftueAuthCarouselWelcomeTitle.tinting(".", color: .element.accent),
|
||||
|
||||
Reference in New Issue
Block a user