Skip to content

Commit 6fcc4ed

Browse files
wenytang-msCopilot
andauthored
ci: fix ui test on windows (#974)
* ci: fix ci * chore: update * ci: fix ui test case * fix: fix ui test on linux * fix: improve Windows UI test stability - 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> * fix: retry finding Java Projects section on Linux CI 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> * 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> * fix: address lint errors in UI test helpers - 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> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f5bc3ed commit 6fcc4ed

7 files changed

Lines changed: 5501 additions & 1630 deletions

File tree

.github/workflows/linuxUI.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
timeout-minutes: 30
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616

1717
- name: Setup Build Environment
1818
run: |
@@ -22,20 +22,21 @@ jobs:
2222
sleep 3
2323
2424
- name: Set up JDK 21
25-
uses: actions/setup-java@v1
25+
uses: actions/setup-java@v4
2626
with:
2727
java-version: '21'
28+
distribution: 'temurin'
2829

2930
- name: Setup Node.js environment
30-
uses: actions/setup-node@v2
31+
uses: actions/setup-node@v4
3132
with:
3233
node-version: 20
3334

3435
- name: Install Node.js modules
3536
run: npm install
3637

3738
- name: Install VSCE
38-
run: npm install -g vsce
39+
run: npm install -g @vscode/vsce
3940

4041
- name: Build OSGi bundle
4142
run: npm run build-server

.github/workflows/windowsUI.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,24 @@ jobs:
1212
runs-on: windows-latest
1313
timeout-minutes: 30
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616

1717
- name: Set up JDK 21
18-
uses: actions/setup-java@v1
18+
uses: actions/setup-java@v4
1919
with:
2020
java-version: '21'
21+
distribution: 'temurin'
2122

2223
- name: Setup Node.js environment
23-
uses: actions/setup-node@v2
24+
uses: actions/setup-node@v4
2425
with:
2526
node-version: 20
2627

2728
- name: Install Node.js modules
2829
run: npm install
2930

3031
- name: Install VSCE
31-
run: npm install -g vsce
32+
run: npm install -g @vscode/vsce
3233

3334
- name: Lint
3435
run: npm run tslint

0 commit comments

Comments
 (0)