@@ -93,6 +93,9 @@ define(function (require, exports, module) {
9393 } ) ;
9494
9595 it ( "should show a problem when both .phcode.json and .brackets.json are present in project" , async function ( ) {
96+ const CommandManager = testWindow . brackets . test . CommandManager ;
97+ const Commands = testWindow . brackets . test . Commands ;
98+
9699 await SpecRunnerUtils . loadProjectInTestWindow ( testPathBothPrefs ) ;
97100 await awaitsForDone ( SpecRunnerUtils . openProjectFiles ( ".phcode.json" ) ) ;
98101 await awaitsFor ( ( ) => {
@@ -101,20 +104,26 @@ define(function (require, exports, module) {
101104
102105 // there will be an error in problems panel if both present
103106 await awaitsForDone ( SpecRunnerUtils . openProjectFiles ( ".phcode.json" ) ) ;
107+ // The panel no longer auto-shows; ensure it is visible to check content
108+ await awaitsFor ( ( ) => {
109+ return testWindow . $ ( "#status-inspection" ) . hasClass ( "inspection-errors" ) ;
110+ } , "lint errors detected on .phcode.json" ) ;
111+ if ( ! testWindow . $ ( "#problems-panel" ) . is ( ":visible" ) ) {
112+ CommandManager . execute ( Commands . VIEW_TOGGLE_PROBLEMS ) ;
113+ }
104114 await awaitsFor ( ( ) => {
105- return testWindow . $ ( "#problems-panel" ) . is ( ":visible" ) &&
106- testWindow . $ ( "#problems-panel" ) . text ( ) . includes ( Strings . ERROR_PREFS_PROJECT_LINT_MESSAGE ) ;
115+ return testWindow . $ ( "#problems-panel" ) . text ( ) . includes ( Strings . ERROR_PREFS_PROJECT_LINT_MESSAGE ) ;
107116 } , "problem panel on .phcode.json" ) ;
108117
109118 await awaitsForDone ( SpecRunnerUtils . openProjectFiles ( "test.json" ) ) ;
119+ // The panel no longer auto-hides; check status bar for no-errors state instead
110120 await awaitsFor ( ( ) => {
111- return ! testWindow . $ ( "#problems-panel " ) . is ( ":visible ") ;
112- } , "problem panel should not be there for normal test.json file" ) ;
121+ return ! testWindow . $ ( "#status-inspection " ) . hasClass ( "inspection-errors ") ;
122+ } , "no lint errors for normal test.json file" ) ;
113123
114124 await awaitsForDone ( SpecRunnerUtils . openProjectFiles ( ".brackets.json" ) ) ;
115125 await awaitsFor ( ( ) => {
116- return testWindow . $ ( "#problems-panel" ) . is ( ":visible" ) &&
117- testWindow . $ ( "#problems-panel" ) . text ( ) . includes ( Strings . ERROR_PREFS_PROJECT_LINT_MESSAGE ) ;
126+ return testWindow . $ ( "#problems-panel" ) . text ( ) . includes ( Strings . ERROR_PREFS_PROJECT_LINT_MESSAGE ) ;
118127 } , "problem panel on .brackets.json" ) ;
119128 } ) ;
120129
0 commit comments