Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SECURE_NGROK_URL=https://secure-expensify-user.ngrok.io/
NGROK_URL=https://expensify-user.ngrok.io/
USE_NGROK=false
USE_WEB_PROXY=false
SKIP_ONBOARDING=false
USE_WDYR=false
USE_REDUX_DEVTOOLS=false
CAPTURE_METRICS=false
Expand Down
1 change: 1 addition & 0 deletions src/CONFIG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export default {
USE_REACT_STRICT_MODE_IN_DEV: false,
ELECTRON_DISABLE_SECURITY_WARNINGS: 'true',
IS_TEST_ENV: process.env.NODE_ENV === 'test',
SKIP_ONBOARDING: get(Config, 'SKIP_ONBOARDING', 'false') === 'true',
// eslint-disable-next-line no-restricted-properties
IS_HYBRID_APP: HybridAppModule.isHybridApp(),
SENTRY_DSN: get(Config, 'SENTRY_DSN', 'https://7b463fb4d4402d342d1166d929a62f4e@o4510228013121536.ingest.us.sentry.io/4510228107427840'),
Expand Down
3 changes: 2 additions & 1 deletion src/libs/Navigation/guards/OnboardingGuard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ const OnboardingGuard: NavigationGuard = {
return {type: 'REDIRECT', route: ROUTES.HOME};
}

const shouldSkipOnboarding = context.isLoading || isTransitioning || isOnboardingCompleted || isMigratedUser || isSingleEntry || needsExplanationModal || isInvitedOrGroupMember;
const shouldSkipOnboarding =
CONFIG.SKIP_ONBOARDING || context.isLoading || isTransitioning || isOnboardingCompleted || isMigratedUser || isSingleEntry || needsExplanationModal || isInvitedOrGroupMember;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Redirect onboarding-route actions when skip flag is enabled

When SKIP_ONBOARDING=true, this branch returns ALLOW for all actions, including actions that explicitly target ONBOARDING_MODAL_NAVIGATOR (for example, restoring a previously saved onboarding URL/deep link). Because the earlier redirect guard only runs when isOnboardingCompleted is true, users can still land on onboarding screens even though the skip flag is enabled, which undermines the stated goal of fully bypassing onboarding in automated browser runs.

Useful? React with 👍 / 👎.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only see this being a problem is asked to test onboarding?


if (shouldSkipOnboarding) {
return {type: 'ALLOW'};
Expand Down
Loading