From b213f93f26a6e736b4386de223dca9c72289a392 Mon Sep 17 00:00:00 2001 From: Wojciech Boman Date: Tue, 5 Nov 2024 14:39:38 +0100 Subject: [PATCH] Add test steps for the issue: Opening particular onboarding pages from a link and going back --- contributingGuides/NAVIGATION.md | 21 ++++++++++++++++++- .../linkingConfig/getAdaptedStateFromPath.ts | 1 + 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/contributingGuides/NAVIGATION.md b/contributingGuides/NAVIGATION.md index 9828601c8559..2f45b4c450a0 100644 --- a/contributingGuides/NAVIGATION.md +++ b/contributingGuides/NAVIGATION.md @@ -459,4 +459,23 @@ Linked issue: https://github.com/Expensify/App/pull/49539#issuecomment-243332160 4. Click Private notes. 5. Enter anything and click Save. 6. Click on the RHP back button. -7. Verify if the Profile RHP Page is opened (URL in the format /a/:accountID). \ No newline at end of file +7. Verify if the Profile RHP Page is opened (URL in the format /a/:accountID). + +#### Opening particular onboarding pages from a link and going back + +Linked issue: https://github.com/Expensify/App/issues/50177 + +1. Sign in as a new user. +2. Select Something else from the onboarding flow. +3. Reopen/refresh the app. +4. Verify the Personal detail step is shown. +5. Go back. +6. Verify you are navigated back to the Purpose step. +7. Select Manage my team. +8. Choose the employee size. +9. Reopen/refresh the app. +10. Verify the connection integration step is shown. +11. Go back. +12. Verify you are navigated back to the employee size step. +13. Go back. +14. Verify you are navigated back to the Purpose step. \ No newline at end of file diff --git a/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts b/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts index c86635fb18bd..d7728f35ba5f 100644 --- a/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts +++ b/src/libs/Navigation/linkingConfig/getAdaptedStateFromPath.ts @@ -194,6 +194,7 @@ function getAdaptedState(state: PartialState const defaultFullScreenRoute = getDefaultFullScreenRoute(focusedRoute, policyID); + // The onboarding flow consists of several screens. If we open any of the screens, the previous screens from that flow should be in the state. if (onboardingNavigator?.state) { const adaptedOnboardingNavigator = { ...onboardingNavigator,