Skip to content

Commit 6d8875c

Browse files
Siddharth SaladiSiddharth Saladi
authored andcommitted
more timeouts and retry confirm()
1 parent d12b396 commit 6d8875c

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

src/test/utils/testUtils.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -329,18 +329,19 @@ export async function launchDashboardAction(item: DefaultTreeItem, action: strin
329329
export async function setCustomParameter(customParam: string) {
330330

331331
logger.info("Setting custom Parameter");
332-
332+
const wait = getWaitHelper();
333+
334+
// Find the input box and set text once.
335+
const input = new InputBox();
336+
await input.click();
337+
await input.setText(customParam);
338+
339+
// confirm() targets a button/Enter that may not be interactable immediately
340+
// after setText (the input animation is still running on macOS CI).
341+
// Retry only confirm() — don't re-create the InputBox on each attempt.
333342
await waitForSuccess(async () => {
334-
const input = new InputBox();
335-
await input.click();
336-
await input.setText(customParam);
337-
338-
// Wait for input to be fully ready before confirming
339-
const wait = getWaitHelper();
340-
await wait.sleep(2000);
341-
342343
await input.confirm();
343-
});
344+
}, 15); // 15 s budget for the confirm to become interactable
344345

345346
}
346347

@@ -550,7 +551,7 @@ export async function waitForDashboardToLoad(section: any): Promise<void> {
550551
}
551552
return;
552553
}, {
553-
timeout: 240000, // 4 minutes — matches the 275 s Mocha cap on "Liberty Tools shows items"
554+
timeout: 265000, // stay inside the 275 s Mocha cap on "Liberty Tools shows items"
554555
pollInterval: 5000, // check every 5 seconds
555556
message: 'Dashboard items did not load'
556557
});

0 commit comments

Comments
 (0)