Skip to content

ci: fix ui test on windows#974

Merged
wenytang-ms merged 12 commits intomainfrom
wenyt/fixci
Mar 20, 2026
Merged

ci: fix ui test on windows#974
wenytang-ms merged 12 commits intomainfrom
wenyt/fixci

Conversation

@wenytang-ms
Copy link
Contributor

No description provided.

wenytang-ms and others added 9 commits March 18, 2026 15:40
- renameFile: use command palette to save instead of TextEditor.save()
  which fails with ElementNotInteractableError after rename dialog
- invisible project: add sleep after workspace switch for UI to settle
- Add dismissModalDialogIfPresent() helper to handle modal dialogs
  (e.g. workspace trust) that block sidebar clicks on Windows CI
- Call dialog dismissal in expandInJavaProjects, invisible project test,
  and java.project.create test

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The javaProjectExplorer.focus command may not render the section
immediately on Linux. Add retry loop with re-issuing the command.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@wenytang-ms wenytang-ms changed the title ci: fix ui test on windows and linux ci: fix ui test on windows Mar 20, 2026
@wenytang-ms wenytang-ms marked this pull request as ready for review March 20, 2026 05:14
chagong
chagong previously approved these changes Mar 20, 2026
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>
- Use const instead of let for simpleItem (prefer-const)
- Add braces to all single-line if statements (curly)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@wenytang-ms wenytang-ms merged commit 6fcc4ed into main Mar 20, 2026
5 of 6 checks passed
@wenytang-ms wenytang-ms deleted the wenyt/fixci branch March 20, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants