frontend: polish app launch and release experience
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { shouldShowIntroSplash } from '../introSplash'
|
||||
|
||||
describe('shouldShowIntroSplash', () => {
|
||||
it('skips intro on an already-onboarded node even without a browser intro flag', () => {
|
||||
expect(shouldShowIntroSplash({
|
||||
seenIntro: false,
|
||||
routePath: '/',
|
||||
fromBoot: false,
|
||||
onboardingComplete: true,
|
||||
})).toBe(false)
|
||||
})
|
||||
|
||||
it('shows intro for a fresh root visit when onboarding is not complete', () => {
|
||||
expect(shouldShowIntroSplash({
|
||||
seenIntro: false,
|
||||
routePath: '/',
|
||||
fromBoot: false,
|
||||
onboardingComplete: false,
|
||||
})).toBe(true)
|
||||
})
|
||||
|
||||
it('does not interrupt direct routes', () => {
|
||||
expect(shouldShowIntroSplash({
|
||||
seenIntro: false,
|
||||
routePath: '/dashboard/web5',
|
||||
fromBoot: false,
|
||||
onboardingComplete: null,
|
||||
})).toBe(false)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user