Skip to content

Commit 1201415

Browse files
author
Siddharth Saladi
committed
last test
1 parent e45a415 commit 1201415

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

src/test/MavenTestServerXmlLCLS.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,15 @@ describe('Liberty Config Language Server Tests for Maven Project', function () {
5959
// making subsequent editor operations unreliable.
6060
await new BottomBarPanel().toggle(false);
6161
editor = await editorView.openEditor('server.xml') as TextEditor;
62-
// Wait until the editor is truly focused — getText() returning non-empty content
63-
// confirms the inputArea has keyboard focus and Ctrl+A will land correctly
62+
// Wait until getText() returns the actual server.xml content — not just any
63+
// non-empty string. After the Output/Problems panel, the clipboard can still
64+
// hold panel text, making getText() return stale content immediately.
65+
// Checking for a known string from the file confirms the editor inputArea
66+
// truly has focus and is returning its own content.
6467
await utils.waitForCondition(async () => {
6568
const text = await editor.getText();
66-
return text.length > 0 ? true : undefined;
67-
}, 10);
69+
return text.includes('<server') ? true : undefined;
70+
}, 15);
6871

6972
// Restore original content so each test starts from a clean slate
7073
if (originalContent) {
@@ -202,8 +205,8 @@ describe('Liberty Config Language Server Tests for Maven Project', function () {
202205
editor = await editorView.openEditor('server.xml') as TextEditor;
203206
await utils.waitForCondition(async () => {
204207
const text = await editor.getText();
205-
return text.length > 0 ? true : undefined;
206-
}, 10);
208+
return text.includes('<server') ? true : undefined;
209+
}, 15);
207210
logger.stepSuccess(2, 'Diagnostic confirmed');
208211

209212
logger.step(3, 'Selecting invalid feature text');

0 commit comments

Comments
 (0)