Skip to content

Commit

Permalink
(PC-33470) feat(tutorial): add AgeSelectionFork screen (#7441)
Browse files Browse the repository at this point in the history
* (PC-33470) feat(tutorial): rename AgeSelection > EligibleUserAgeSelection

* (PC-33470) feat(tutorial): add AgeSelectionFork screen

* (PC-33470) feat(tutorial): update OnboardingGeolocation

* (PC-33470) feat(tutorial): update EligibleUserAgeSelection snapshots

* (PC-33470) feat(tutorial): remove unused onBeforeNavigate in AgeSelectionFork

* (PC-33470) feat(tutorial): use userEvent instead fireEvent in tests
  • Loading branch information
lbeneston-pass authored Dec 24, 2024
1 parent 2e1c707 commit 2c80bd2
Show file tree
Hide file tree
Showing 23 changed files with 1,098 additions and 242 deletions.
Binary file added .yarn/install-state.gz
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AgeSelection with passForAll feature flag off onboarding should render correctly 1`] = `
exports[`EligibleUserAgeSelection with passForAll feature flag off onboarding should render correctly 1`] = `
[
<View
style={
Expand Down Expand Up @@ -325,9 +325,9 @@ exports[`AgeSelection with passForAll feature flag off onboarding should render
[
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 17,
"lineHeight": 27.2,
"fontFamily": "Montserrat-Medium",
"fontSize": 16,
"lineHeight": 25.6,
},
]
}
Expand All @@ -339,8 +339,8 @@ exports[`AgeSelection with passForAll feature flag off onboarding should render
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 19,
"lineHeight": 30.4,
"fontSize": 17,
"lineHeight": 27.2,
},
]
}
Expand Down Expand Up @@ -485,9 +485,9 @@ exports[`AgeSelection with passForAll feature flag off onboarding should render
[
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 17,
"lineHeight": 27.2,
"fontFamily": "Montserrat-Medium",
"fontSize": 16,
"lineHeight": 25.6,
},
]
}
Expand All @@ -499,8 +499,8 @@ exports[`AgeSelection with passForAll feature flag off onboarding should render
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 19,
"lineHeight": 30.4,
"fontSize": 17,
"lineHeight": 27.2,
},
]
}
Expand Down Expand Up @@ -645,9 +645,9 @@ exports[`AgeSelection with passForAll feature flag off onboarding should render
[
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 17,
"lineHeight": 27.2,
"fontFamily": "Montserrat-Medium",
"fontSize": 16,
"lineHeight": 25.6,
},
]
}
Expand All @@ -659,8 +659,8 @@ exports[`AgeSelection with passForAll feature flag off onboarding should render
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 19,
"lineHeight": 30.4,
"fontSize": 17,
"lineHeight": 27.2,
},
]
}
Expand Down Expand Up @@ -805,9 +805,9 @@ exports[`AgeSelection with passForAll feature flag off onboarding should render
[
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 17,
"lineHeight": 27.2,
"fontFamily": "Montserrat-Medium",
"fontSize": 16,
"lineHeight": 25.6,
},
]
}
Expand All @@ -819,8 +819,8 @@ exports[`AgeSelection with passForAll feature flag off onboarding should render
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 19,
"lineHeight": 30.4,
"fontSize": 17,
"lineHeight": 27.2,
},
]
}
Expand Down Expand Up @@ -1023,7 +1023,7 @@ exports[`AgeSelection with passForAll feature flag off onboarding should render
]
`;

exports[`AgeSelection with passForAll feature flag off profileTutorial should render correctly 1`] = `
exports[`EligibleUserAgeSelection with passForAll feature flag off profileTutorial should render correctly 1`] = `
[
<View
style={
Expand Down Expand Up @@ -1348,9 +1348,9 @@ exports[`AgeSelection with passForAll feature flag off profileTutorial should re
[
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 17,
"lineHeight": 27.2,
"fontFamily": "Montserrat-Medium",
"fontSize": 16,
"lineHeight": 25.6,
},
]
}
Expand All @@ -1362,8 +1362,8 @@ exports[`AgeSelection with passForAll feature flag off profileTutorial should re
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 19,
"lineHeight": 30.4,
"fontSize": 17,
"lineHeight": 27.2,
},
]
}
Expand Down Expand Up @@ -1508,9 +1508,9 @@ exports[`AgeSelection with passForAll feature flag off profileTutorial should re
[
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 17,
"lineHeight": 27.2,
"fontFamily": "Montserrat-Medium",
"fontSize": 16,
"lineHeight": 25.6,
},
]
}
Expand All @@ -1522,8 +1522,8 @@ exports[`AgeSelection with passForAll feature flag off profileTutorial should re
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 19,
"lineHeight": 30.4,
"fontSize": 17,
"lineHeight": 27.2,
},
]
}
Expand Down Expand Up @@ -1668,9 +1668,9 @@ exports[`AgeSelection with passForAll feature flag off profileTutorial should re
[
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 17,
"lineHeight": 27.2,
"fontFamily": "Montserrat-Medium",
"fontSize": 16,
"lineHeight": 25.6,
},
]
}
Expand All @@ -1682,8 +1682,8 @@ exports[`AgeSelection with passForAll feature flag off profileTutorial should re
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 19,
"lineHeight": 30.4,
"fontSize": 17,
"lineHeight": 27.2,
},
]
}
Expand Down Expand Up @@ -1828,9 +1828,9 @@ exports[`AgeSelection with passForAll feature flag off profileTutorial should re
[
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 17,
"lineHeight": 27.2,
"fontFamily": "Montserrat-Medium",
"fontSize": 16,
"lineHeight": 25.6,
},
]
}
Expand All @@ -1842,8 +1842,8 @@ exports[`AgeSelection with passForAll feature flag off profileTutorial should re
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 19,
"lineHeight": 30.4,
"fontSize": 17,
"lineHeight": 27.2,
},
]
}
Expand Down Expand Up @@ -2046,7 +2046,7 @@ exports[`AgeSelection with passForAll feature flag off profileTutorial should re
]
`;

exports[`AgeSelection with passForAll feature flag on onboarding should render correctly 1`] = `
exports[`EligibleUserAgeSelection with passForAll feature flag on onboarding should render correctly 1`] = `
[
<View
style={
Expand Down Expand Up @@ -2328,9 +2328,9 @@ exports[`AgeSelection with passForAll feature flag on onboarding should render c
[
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 17,
"lineHeight": 27.2,
"fontFamily": "Montserrat-Medium",
"fontSize": 16,
"lineHeight": 25.6,
},
]
}
Expand All @@ -2342,8 +2342,8 @@ exports[`AgeSelection with passForAll feature flag on onboarding should render c
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 19,
"lineHeight": 30.4,
"fontSize": 17,
"lineHeight": 27.2,
},
]
}
Expand Down Expand Up @@ -2469,9 +2469,9 @@ exports[`AgeSelection with passForAll feature flag on onboarding should render c
[
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 17,
"lineHeight": 27.2,
"fontFamily": "Montserrat-Medium",
"fontSize": 16,
"lineHeight": 25.6,
},
]
}
Expand All @@ -2483,8 +2483,8 @@ exports[`AgeSelection with passForAll feature flag on onboarding should render c
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 19,
"lineHeight": 30.4,
"fontSize": 17,
"lineHeight": 27.2,
},
]
}
Expand Down Expand Up @@ -2610,9 +2610,9 @@ exports[`AgeSelection with passForAll feature flag on onboarding should render c
[
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 17,
"lineHeight": 27.2,
"fontFamily": "Montserrat-Medium",
"fontSize": 16,
"lineHeight": 25.6,
},
]
}
Expand All @@ -2624,8 +2624,8 @@ exports[`AgeSelection with passForAll feature flag on onboarding should render c
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 19,
"lineHeight": 30.4,
"fontSize": 17,
"lineHeight": 27.2,
},
]
}
Expand Down Expand Up @@ -2751,9 +2751,9 @@ exports[`AgeSelection with passForAll feature flag on onboarding should render c
[
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 17,
"lineHeight": 27.2,
"fontFamily": "Montserrat-Medium",
"fontSize": 16,
"lineHeight": 25.6,
},
]
}
Expand All @@ -2765,8 +2765,8 @@ exports[`AgeSelection with passForAll feature flag on onboarding should render c
{
"color": "#320096",
"fontFamily": "Montserrat-Bold",
"fontSize": 19,
"lineHeight": 30.4,
"fontSize": 17,
"lineHeight": 27.2,
},
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ export function CheatcodesNavigationOnboarding(): React.JSX.Element {
<LinkToComponent name="OnboardingGeneralPublicWelcome" />
<LinkToComponent name="OnboardingWelcome" />
<LinkToComponent name="OnboardingGeolocation" />
<LinkToComponent name="AgeSelection" navigationParams={{ type: TutorialTypes.ONBOARDING }} />
<LinkToComponent
name="AgeSelectionFork"
navigationParams={{ type: TutorialTypes.ONBOARDING }}
/>
<LinkToComponent
name="EligibleUserAgeSelection"
navigationParams={{ type: TutorialTypes.ONBOARDING }}
/>
<LinkToComponent
name="AgeSelectionOther"
navigationParams={{ type: TutorialTypes.ONBOARDING }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ export function CheatcodesNavigationProfileTutorial(): React.JSX.Element {
return (
<CheatcodesTemplateScreen title="ProfileTutorial 👤">
<LinkToComponent
name="AgeSelection"
name="AgeSelectionFork"
navigationParams={{ type: TutorialTypes.PROFILE_TUTORIAL }}
/>
<LinkToComponent
name="EligibleUserAgeSelection"
navigationParams={{ type: TutorialTypes.PROFILE_TUTORIAL }}
/>
<LinkToComponent
Expand Down
2 changes: 1 addition & 1 deletion src/features/navigation/RootNavigator/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import { PageNotFound } from 'features/navigation/pages/PageNotFound'
import { accessibilityRoutes } from 'features/navigation/RootNavigator/accessibilityRoutes'
import { cheatcodesRoutes } from 'features/navigation/RootNavigator/cheatcodesRoutes'
import { culturalSurveyRoutes } from 'features/navigation/RootNavigator/culturalSurveyRoutes'
import { tutorialRoutes } from 'features/navigation/RootNavigator/onboardingRoutes'
import { subscriptionRoutes } from 'features/navigation/RootNavigator/subscriptionRoutes'
import { trustedDeviceRoutes } from 'features/navigation/RootNavigator/trustedDeviceRoutes'
import { tutorialRoutes } from 'features/navigation/RootNavigator/tutorialRoutes'
import { screenParamsParser, screenParamsStringifier } from 'features/navigation/screenParamsUtils'
import { tabNavigatorPathConfig } from 'features/navigation/TabBar/routes'
import { TabNavigator } from 'features/navigation/TabBar/TabNavigator'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { TutorialRootStackParamList, GenericRoute } from 'features/navigation/RootNavigator/types'
import { AgeSelection } from 'features/tutorial/pages/AgeSelection'
import { AgeSelectionFork } from 'features/tutorial/pages/AgeSelectionFork'
import { AgeSelectionOther } from 'features/tutorial/pages/AgeSelectionOther'
import { EligibleUserAgeSelection } from 'features/tutorial/pages/EligibleUserAgeSelection'
import { OnboardingAgeInformation } from 'features/tutorial/pages/onboarding/OnboardingAgeInformation'
import { OnboardingGeneralPublicWelcome } from 'features/tutorial/pages/onboarding/OnboardingGeneralPublicWelcome'
import { OnboardingGeolocation } from 'features/tutorial/pages/onboarding/OnboardingGeolocation'
Expand All @@ -9,11 +10,17 @@ import { ProfileTutorialAgeInformation } from 'features/tutorial/pages/profileTu

export const tutorialRoutes: GenericRoute<TutorialRootStackParamList>[] = [
{
name: 'AgeSelection',
component: AgeSelection,
path: 'selection-age',
name: 'AgeSelectionFork',
component: AgeSelectionFork,
path: 'selection-age/generique',
options: { title: 'Sélection d’âge' },
},
{
name: 'EligibleUserAgeSelection',
component: EligibleUserAgeSelection,
path: 'selection-age/eligible',
options: { title: 'Sélection d’âge éligible' },
},
{
name: 'AgeSelectionOther',
component: AgeSelectionOther,
Expand All @@ -23,7 +30,7 @@ export const tutorialRoutes: GenericRoute<TutorialRootStackParamList>[] = [
{
name: 'OnboardingAgeInformation',
component: OnboardingAgeInformation,
path: 'selection-age/eligible',
path: 'selection-age/information',
options: { title: 'Information d’âge' },
},
{
Expand Down
Loading

0 comments on commit 2c80bd2

Please sign in to comment.