@@ -8,6 +8,7 @@ vi.mock("@tauri-apps/api/core", () => ({
88
99import {
1010 getOnboardingNeeded ,
11+ isExperimentalShellPath ,
1112 isShellEntryPath ,
1213 normalizeAppPath ,
1314 resolveAppEntryPath ,
@@ -46,21 +47,25 @@ describe("app entry path resolution", () => {
4647 await expect ( resolveAppEntryPath ( ) ) . resolves . toBe ( "/app/onboarding" ) ;
4748 } ) ;
4849
49- it ( "routes to main2 when onboarding is complete and the flag is on" , async ( ) => {
50+ it ( "keeps classic main even when the old preview flag is on" , async ( ) => {
5051 vi . mocked ( commands . getCharV1p1Preview ) . mockResolvedValue ( {
5152 status : "ok" ,
5253 data : true ,
5354 } ) ;
5455
55- await expect ( resolveShellEntryPath ( ) ) . resolves . toBe ( "/app/main2" ) ;
56- await expect ( resolveAppEntryPath ( ) ) . resolves . toBe ( "/app/main2" ) ;
56+ await expect ( resolveShellEntryPath ( ) ) . resolves . toBe ( "/app/main" ) ;
57+ await expect ( resolveAppEntryPath ( ) ) . resolves . toBe ( "/app/main" ) ;
58+ expect ( commands . getCharV1p1Preview ) . not . toHaveBeenCalled ( ) ;
5759 } ) ;
5860
5961 it ( "normalizes and identifies shell entry paths" , ( ) => {
6062 expect ( normalizeAppPath ( "/app/main2/" ) ) . toBe ( "/app/main2" ) ;
6163 expect ( isShellEntryPath ( "/app" ) ) . toBe ( true ) ;
6264 expect ( isShellEntryPath ( "/app/main/" ) ) . toBe ( true ) ;
6365 expect ( isShellEntryPath ( "/app/main2" ) ) . toBe ( true ) ;
66+ expect ( isExperimentalShellPath ( "/app/main2/" ) ) . toBe ( true ) ;
67+ expect ( isExperimentalShellPath ( "/app/main2/sessions/session-1" ) ) . toBe ( true ) ;
68+ expect ( isExperimentalShellPath ( "/app/main" ) ) . toBe ( false ) ;
6469 expect ( isShellEntryPath ( "/app/onboarding" ) ) . toBe ( false ) ;
6570 } ) ;
6671} ) ;
0 commit comments