Skip to content

Commit f7d685c

Browse files
author
Siddharth Saladi
committed
more debug
1 parent 47470cd commit f7d685c

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/test/MavenTestServerXmlLCLS.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,14 @@ describe('Liberty Config Language Server Tests for Maven Project', function () {
5454
logger.error(`Test failed: ${this.currentTest?.title}`);
5555
}
5656

57+
// Always close the bottom bar and re-focus the editor first — any test that
58+
// opens the Output or Problems panel leaves VS Code focus off the editor,
59+
// making the TextEditor handle stale. Re-acquire before touching editor content.
60+
await new BottomBarPanel().toggle(false);
61+
editor = await editorView.openEditor('server.xml') as TextEditor;
62+
5763
// Restore original content so each test starts from a clean slate
58-
if (editor && originalContent) {
64+
if (originalContent) {
5965
await editor.clearText();
6066
await editor.setText(originalContent);
6167
await editor.save();
@@ -76,10 +82,7 @@ describe('Liberty Config Language Server Tests for Maven Project', function () {
7682
pollInterval: 1000,
7783
message: 'Diagnostics did not clear after restoring server.xml'
7884
});
79-
// Close the bottom bar and re-focus the editor — opening the Problems panel
80-
// shifts VS Code focus away, leaving the TextEditor handle stale for the next test
8185
await new BottomBarPanel().toggle(false);
82-
editor = await editorView.openEditor('server.xml') as TextEditor;
8386
logger.info('Restored original server.xml content');
8487
}
8588
});

0 commit comments

Comments
 (0)