You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 68fc676
Browse filesBrowse the repository at this point in the historyBrowse files
refactor: replace fixed sleep() with polling helpers in UI tests
Replace 12 fixed sleep() calls with condition-based polling:
- waitForTreeItem / waitForTreeItemGone: poll tree view for item presence
- waitForFileExists / waitForFileGone: poll filesystem for file state
- waitForModalDialog: poll for dialog appearance with graceful fallback
- waitForEditorTitle: poll for editor to show expected file title
This makes tests resilient to CI timing variations instead of relying
on hardcoded delays that may be too short on slow machines.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
assert.ok(awaitfse.pathExists(path.join(currentProjectPath!,"src","main","java","com","mycompany","app2")),`New package should be created in correct path`);
174
+
assert.ok(awaitwaitForFileExists(path.join(currentProjectPath!,"src","main","java","com","mycompany","app2")),`New package should be created in correct path`);
assert.ok(deleteItem,`"Delete" item should be found`);
244
241
awaitdeleteItem!.click();
245
-
constdialog=newModalDialog();
246
-
constbuttons=awaitdialog.getButtons();
247
-
for(constbuttonofbuttons){
248
-
if(awaitbutton.getText()==="Move to Recycle Bin"){
249
-
awaitbutton.click();
250
-
break;
242
+
constdialog=awaitwaitForModalDialog();
243
+
if(dialog){
244
+
constbuttons=awaitdialog.getButtons();
245
+
for(constbuttonofbuttons){
246
+
consttext=awaitbutton.getText();
247
+
if(text==="Move to Recycle Bin"||text==="Delete"){
248
+
awaitbutton.click();
249
+
break;
250
+
}
251
251
}
252
252
}
253
-
awaitsleep(1000);
254
-
assert.ok(!awaitfse.pathExists(path.join(currentProjectPath!,"src","main","java","AppToDelete.java")),`The source file "AppToDelete.java" should be deleted`);
253
+
assert.ok(awaitwaitForFileGone(path.join(currentProjectPath!,"src","main","java","AppToDelete.java")),`The source file "AppToDelete.java" should be deleted`);
255
254
});
256
255
257
256
it("Test change to invisible project",asyncfunction(){
0 commit comments