Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing password-management maestro test #3413

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions DuckDuckGo/SyncPromoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@ import DuckUI
struct SyncPromoView: View {

let viewModel: SyncPromoViewModel
@State private var isAccessibilityHidden = true

var body: some View {
ZStack(alignment: .topTrailing) {
VStack(spacing: 8) {
Group {
Image(viewModel.image)
.scaledToFit()
.accessibilityHidden(true)

Text(viewModel.title)
.padding(.top, 4)
.frame(maxWidth: .infinity)
Expand All @@ -48,13 +51,15 @@ struct SyncPromoView: View {
Text(viewModel.secondaryButtonTitle)
}
.buttonStyle(SecondaryFillButtonStyle(compact: true, fullWidth: false))
.accessibilityLabel(viewModel.secondaryButtonTitle)

Button {
viewModel.primaryButtonAction?()
} label: {
Text(viewModel.primaryButtonTitle)
}
.buttonStyle(PrimaryButtonStyle(compact: true, fullWidth: false))
.accessibilityLabel(viewModel.primaryButtonTitle)

}
.padding(.top, 12)
Expand All @@ -81,13 +86,21 @@ struct SyncPromoView: View {
.alignmentGuide(.top) { dimension in
dimension[.top]
}
.accessibilityHidden(true)
}
.background(
RoundedRectangle(cornerRadius: 8)
.foregroundColor(Color(designSystemColor: .surface))
)
.padding(.horizontal, 20)
.padding(.bottom, 12)
.accessibilityHidden(isAccessibilityHidden)
.onAppear {
// Delay accessibility activation for maestro
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
isAccessibilityHidden = false
}
}
}
}

Expand Down
Loading