-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[NoQA] Show the TestDrive demo to users if they migrated from Classic #67348
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
Merged
danieldoglas
merged 15 commits into
Expensify:main
from
callstack-internal:bugfix/start-test-drive-migrated-accounts
Aug 6, 2025
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1aceecf
Extract startTestDrive logic to its TourUtils
fabioh8010 8c8ed9f
Show the TestDrive demo to users if they migrated from Classic
fabioh8010 d15d5d9
Move startTestDrive function to action file
fabioh8010 d7b3653
Check if user is admin of workspace when is migrated user
fabioh8010 7060b32
Merge remote-tracking branch 'origin/main' into bugfix/start-test-dri…
fabioh8010 baf0ad1
Fix isUserPolicyAdmin function
fabioh8010 f4145a8
Merge remote-tracking branch 'origin/main' into bugfix/start-test-dri…
fabioh8010 2f15e7d
Merge remote-tracking branch 'origin/main' into bugfix/start-test-dri…
fabioh8010 e5b21a6
Merge branch 'main' into bugfix/start-test-drive-migrated-accounts
fabioh8010 4a6c409
Merge branch 'main' into bugfix/start-test-drive-migrated-accounts
fabioh8010 78ac2f6
Merge branch 'main' into bugfix/start-test-drive-migrated-accounts
fabioh8010 0f16811
Merge remote-tracking branch 'origin/main' into bugfix/start-test-dri…
fabioh8010 caa6b29
Fix duplicate migrated user modal
fabioh8010 26154a1
Fix TS
fabioh8010 9044135
Fix Prettier
fabioh8010 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import {InteractionManager} from 'react-native'; | ||
| import Navigation from '@libs/Navigation/Navigation'; | ||
| import CONST from '@src/CONST'; | ||
| import ROUTES from '@src/ROUTES'; | ||
| import type {IntroSelected} from './Report'; | ||
| import {completeTestDriveTask} from './Task'; | ||
|
|
||
| function startTestDrive(introSelected: IntroSelected | undefined, shouldUpdateSelfTourViewedOnlyLocally = false, hasUserBeenAddedToNudgeMigration = false) { | ||
| InteractionManager.runAfterInteractions(() => { | ||
| if ( | ||
| hasUserBeenAddedToNudgeMigration || | ||
| introSelected?.choice === CONST.ONBOARDING_CHOICES.MANAGE_TEAM || | ||
| introSelected?.choice === CONST.ONBOARDING_CHOICES.TEST_DRIVE_RECEIVER || | ||
| introSelected?.choice === CONST.ONBOARDING_CHOICES.TRACK_WORKSPACE || | ||
| (introSelected?.choice === CONST.ONBOARDING_CHOICES.SUBMIT && introSelected.inviteType === CONST.ONBOARDING_INVITE_TYPES.WORKSPACE) | ||
| ) { | ||
| completeTestDriveTask(shouldUpdateSelfTourViewedOnlyLocally); | ||
| Navigation.navigate(ROUTES.TEST_DRIVE_DEMO_ROOT); | ||
| } else { | ||
| Navigation.navigate(ROUTES.TEST_DRIVE_MODAL_ROOT.route); | ||
| } | ||
| }); | ||
| } | ||
|
|
||
| // eslint-disable-next-line import/prefer-default-export | ||
| export {startTestDrive}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.