@@ -917,6 +917,34 @@ define(function (require, exports, module) {
917917 await endPreviewSession ( ) ;
918918 } , 30000 ) ;
919919
920+ it ( "should custom server banner appear on SSR files only if live preview panel is open" , async function ( ) {
921+ const testPath = await SpecRunnerUtils . getTempTestDirectory (
922+ "/spec/LiveDevelopment-MultiBrowser-test-files" , true ) ;
923+ await SpecRunnerUtils . loadProjectInTestWindow ( testPath ) ;
924+ await awaitsForDone ( SpecRunnerUtils . openProjectFiles ( [ "simple1.html" ] ) ,
925+ "open simple1.html" ) ;
926+ await waitsForLiveDevelopmentToOpen ( ) ;
927+
928+ // now close the live preview panel by clicking on live preview extension icon
929+ let livePreviewBtn = testWindow . $ ( testWindow . document . getElementById ( "toolbar-go-live" ) ) ;
930+ livePreviewBtn . click ( ) ;
931+ expect ( WorkspaceManager . isPanelVisible ( 'live-preview-panel' ) ) . toBeFalse ( ) ;
932+ const serverFile = `php.php` ;
933+ await _createAnOpenFile ( testPath , serverFile ) ;
934+ await awaits ( 50 ) ;
935+ // the banner should not be shown
936+ expect ( testWindow . $ ( ".live-preview-settings" ) . is ( ":visible" ) ) . toBeFalse ( ) ;
937+
938+ // now bring back the live preview panel, the banner should become visible
939+ livePreviewBtn . click ( ) ;
940+ expect ( WorkspaceManager . isPanelVisible ( 'live-preview-panel' ) ) . toBeTrue ( ) ;
941+ await _forBannerAppear ( serverFile ) ;
942+ testWindow . $ ( ".close-icon" ) . click ( ) ;
943+ await _forBannerClose ( serverFile ) ;
944+
945+ await endPreviewSession ( ) ;
946+ } , 30000 ) ;
947+
920948 it ( "should custom server banner close on project switch" , async function ( ) {
921949 const testPath = await SpecRunnerUtils . getTempTestDirectory (
922950 "/spec/LiveDevelopment-MultiBrowser-test-files" , true ) ;
0 commit comments