From b7dca2271b14988837524a30eb154d91eb5e4912 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 15:42:50 -0400 Subject: [PATCH] Add FXIOS-21837 [Onboarding] Add advance card to open iOS FX settings action in main onboarding flow (backport #22428) (#22432) Add FXIOS-21837 [Onboarding] Add advance card to open iOS FX settings action in main onboarding flow (#22428) (cherry picked from commit 8b5882d3fbe5766d406df8eca4ed9c2a39d11a4d) Co-authored-by: L. Meg Viar --- .../Client/Frontend/Onboarding/Views/IntroViewController.swift | 3 +++ .../OnboardingTests/Mocks/MockOnboardingCardDelegate.swift | 1 + firefox-ios/nimbus-features/onboardingFrameworkFeature.yaml | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/firefox-ios/Client/Frontend/Onboarding/Views/IntroViewController.swift b/firefox-ios/Client/Frontend/Onboarding/Views/IntroViewController.swift index fa3905a9ce19..85ff7113907e 100644 --- a/firefox-ios/Client/Frontend/Onboarding/Views/IntroViewController.swift +++ b/firefox-ios/Client/Frontend/Onboarding/Views/IntroViewController.swift @@ -338,6 +338,9 @@ extension IntroViewController: OnboardingCardDelegate { selector: #selector(dismissPrivacyPolicyViewController)) case .openIosFxSettings: DefaultApplicationHelper().openSettings() + advance(numberOfPages: 1, from: cardName) { + self.showNextPageCompletionForLastCard() + } case .endOnboarding: closeOnboarding() } diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/Mocks/MockOnboardingCardDelegate.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/Mocks/MockOnboardingCardDelegate.swift index 8c5c55a85a8c..6280fa0a0001 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/Mocks/MockOnboardingCardDelegate.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/OnboardingTests/Mocks/MockOnboardingCardDelegate.swift @@ -59,6 +59,7 @@ class MockOnboardinCardDelegateController: UIViewController, completion: {}) case .openIosFxSettings: DefaultApplicationHelper().openSettings() + showNextPage(numberOfCards: 1, from: cardName, completionIfLastCard: {}) case .endOnboarding: self.action = .endOnboarding } diff --git a/firefox-ios/nimbus-features/onboardingFrameworkFeature.yaml b/firefox-ios/nimbus-features/onboardingFrameworkFeature.yaml index e82a35521be4..94de55ba8cef 100644 --- a/firefox-ios/nimbus-features/onboardingFrameworkFeature.yaml +++ b/firefox-ios/nimbus-features/onboardingFrameworkFeature.yaml @@ -425,7 +425,7 @@ enums: Will request to allow notifications from the user set-default-browser: description: > - Will send the user to settings to set Firefox as their default browser + Will send the user to settings to set Firefox as their default browser and advance to next card open-instructions-popup: description: > Will open up a popup with instructions for something