File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ export class ProjectBase extends EE {
180180 } )
181181 }
182182
183- if ( ! cfg . isTextTerminal && this . testingType === 'e2e' ) {
183+ if ( ( ! cfg . isTextTerminal || process . env . CYPRESS_INTERNAL_SIMULATE_OPEN_MODE ) && this . testingType === 'e2e' ) {
184184 const studioLifecycleManager = new StudioLifecycleManager ( )
185185
186186 studioLifecycleManager . initializeStudioManager ( {
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ let ctx
2727describe ( 'lib/project-base' , ( ) => {
2828 beforeEach ( async function ( ) {
2929 delete process . env . CYPRESS_LOCAL_STUDIO_PATH
30+ delete process . env . CYPRESS_INTERNAL_SIMULATE_OPEN_MODE
3031
3132 ctx = getCtx ( )
3233 Fixtures . scaffold ( )
@@ -646,6 +647,21 @@ This option will not have an effect in Some-other-name. Tests that rely on web s
646647
647648 expect ( this . project . ctx . coreData . studioLifecycleManager ) . to . not . be . undefined
648649 } )
650+
651+ it ( 'creates studio lifecycle manager when CYPRESS_INTERNAL_SIMULATE_OPEN_MODE is set even in text terminal mode' , async function ( ) {
652+ this . project . cfg . isTextTerminal = true
653+ process . env . CYPRESS_INTERNAL_SIMULATE_OPEN_MODE = '1'
654+
655+ sinon . stub ( this . project , 'saveState' ) . resolves ( )
656+ sinon . stub ( process , 'chdir' )
657+
658+ await this . project . open ( )
659+
660+ expect ( this . project . ctx . coreData . studioLifecycleManager ) . to . not . be . undefined
661+
662+ // Clean up environment variable
663+ delete process . env . CYPRESS_INTERNAL_SIMULATE_OPEN_MODE
664+ } )
649665 } )
650666 } )
651667
You can’t perform that action at this time.
0 commit comments