Skip to content

Commit beedce5

Browse files
wenytang-msCopilot
andcommitted
feat: replace all e2e/UI tests with autotest, add revealInProjectExplorer
- Delete test/e2e/ (Playwright) and test/ui/ (vscode-extension-tester) - Remove @playwright/test and vscode-extension-tester deps - Remove test-ui script, update test-e2e to use autotest - Add revealInProjectExplorer test to project-explorer plan - Add Write Job Summary step to CI workflows - Add LLM env vars to CI for failure analysis Coverage: 48 steps across 2 plans covering 8 scenarios: - Project Explorer: focus, link, unlink, revealInProjectExplorer - File Operations: create class, create package, rename, delete Scenarios NOT migrated (require native OS file dialogs): - addLibraries, addLibraryFolders, java.project.create Local verification: 48/48 passed (31/31 + 17/17) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e166e69 commit beedce5

15 files changed

Lines changed: 42 additions & 1519 deletions

.github/workflows/linuxUI.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,10 @@ jobs:
6464
name: e2e-results-linux
6565
path: test-results/
6666
retention-days: 7
67+
68+
- name: Write Job Summary
69+
if: always()
70+
run: |
71+
if [ -f test-results/summary.md ]; then
72+
cat test-results/summary.md >> "$GITHUB_STEP_SUMMARY"
73+
fi

.github/workflows/windowsUI.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,11 @@ jobs:
6262
name: e2e-results-windows
6363
path: test-results/
6464
retention-days: 7
65+
66+
- name: Write Job Summary
67+
if: always()
68+
shell: bash
69+
run: |
70+
if [ -f test-results/summary.md ]; then
71+
cat test-results/summary.md >> "$GITHUB_STEP_SUMMARY"
72+
fi

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,8 +1150,7 @@
11501150
"compile": "tsc -p . && webpack --config webpack.config.js --mode development",
11511151
"watch": "webpack --mode development --watch",
11521152
"test": "tsc -p . && webpack --config webpack.config.js --mode development && node ./dist/test/index.js",
1153-
"test-ui": "tsc -p . && webpack --config webpack.config.js --mode development && node ./dist/test/ui/index.js",
1154-
"test-e2e": "npx playwright test --config test/e2e/playwright.config.ts",
1153+
"test-e2e": "autotest run-all test/e2e-plans --no-llm",
11551154
"build-server": "node scripts/buildJdtlsExt.js",
11561155
"vscode:prepublish": "tsc -p ./ && webpack --mode production",
11571156
"tslint": "tslint -t verbose --project tsconfig.json"
@@ -1172,8 +1171,6 @@
11721171
"ts-loader": "^9.4.2",
11731172
"tslint": "^6.1.3",
11741173
"typescript": "^4.9.4",
1175-
"vscode-extension-tester": "^8.23.0",
1176-
"@playwright/test": "^1.50.0",
11771174
"webpack": "^5.105.0",
11781175
"webpack-cli": "^4.10.0"
11791176
},

test/e2e-plans/java-dep-project-explorer.yaml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
# Test Plan: Java Dependency — Project Explorer
22
#
3-
# Covers projectExplorer.test.ts scenarios:
3+
# Covers scenarios:
44
# - javaProjectExplorer.focus shows Java Projects section
55
# - linkWithFolderExplorer reveals active file in tree
66
# - unlinkWithFolderExplorer stops auto-reveal
7+
# - revealInProjectExplorer reveals file from File Explorer context menu
78
#
89
# Usage:
910
# npx autotest run test/e2e-plans/java-dep-project-explorer.yaml --vsix <path-to-vsix>
1011

1112
name: "Java Dependency — Project Explorer"
1213
description: |
13-
Tests the Java Projects explorer view: focus, link/unlink with editor.
14-
Replaces test/e2e/tests/projectExplorer.test.ts.
14+
Tests the Java Projects explorer view: focus, link/unlink with editor,
15+
reveal in project explorer.
1516
1617
setup:
1718
extension: "redhat.java"
@@ -85,3 +86,25 @@ steps:
8586
- id: "relink-editor"
8687
action: "run command Java: Link with Editor"
8788
verify: "Editor re-linked with tree"
89+
90+
# ── Test 4: revealInProjectExplorer ──
91+
# Collapse all tree nodes, then reveal App.java from editor
92+
- id: "collapse-all"
93+
action: "run command View: Collapse All"
94+
verify: "Collapse tree to reset state"
95+
96+
- id: "open-app-file"
97+
action: "open file App.java"
98+
waitBefore: 2
99+
100+
- id: "reveal-in-project-explorer"
101+
action: "run command Java: Reveal in Java Project Explorer"
102+
waitBefore: 2
103+
104+
- id: "verify-revealed"
105+
action: "wait 2 seconds"
106+
verify: "App class should be revealed in Java Projects tree"
107+
verifyTreeItem:
108+
name: "App"
109+
exact: true
110+
timeout: 15

test/e2e/fixtures/baseTest.ts

Lines changed: 0 additions & 191 deletions
This file was deleted.

test/e2e/globalSetup.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

test/e2e/playwright.config.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)