Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/linuxUI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
sudo /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
# Use 1920x1080 so the Java Projects view (rendered inside the Explorer
# sidebar) gets enough vertical space. With 1024x768 the sticky
# pane-header overlapped tree rows and intercepted click events.
sudo /usr/bin/Xvfb :99 -screen 0 1920x1080x24 > /dev/null 2>&1 &
sleep 3
- name: Set up JDK 21
Expand Down
37 changes: 36 additions & 1 deletion test/e2e-plans/java-dep-file-operations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,32 @@ setup:
timeout: 180
settings:
java.configuration.checkProjectSettingsExclusions: false
workbench.startupEditor: "none"

steps:
# ── Setup: wait for LS, focus Java Projects ──
# ── Setup: wait for LS, free Explorer space, focus Java Projects ──
- id: "ls-ready"
action: "waitForLanguageServer"
verify: "Java Language Server is ready"
timeout: 180

# Free horizontal space (Chat panel can take ~210px on right side)
- id: "close-aux-bar"
action: "executeVSCodeCommand workbench.action.closeAuxiliaryBar"
verify: "Auxiliary bar (Chat) closed"

# Free vertical space inside Explorer so JAVA PROJECTS gets room.
# Without this the Java Projects pane-header overlaps tree rows on
# 1024x768 CI displays and click events get intercepted by the sticky header.
- id: "collapse-outline"
action: "collapseSidebarSection OUTLINE"

- id: "collapse-timeline"
action: "collapseSidebarSection TIMELINE"

- id: "collapse-workspace-root"
action: "collapseWorkspaceRoot"

- id: "focus-java-projects"
action: "run command Java Projects: Focus on Java Projects View"
verify: "Java Projects view is focused"
Expand Down Expand Up @@ -68,11 +86,22 @@ steps:
timeout: 15

# ── Test 2: create new package ──
# Close the editor opened by the previous step. With link-with-editor on,
# an open editor causes the JAVA PROJECTS tree to auto-expand, pushing
# my-app right under the sticky pane-header where clicks get intercepted.
- id: "close-editors-before-pkg"
action: "run command View: Close All Editors"

- id: "collapse-workspace-root-2"
action: "collapseWorkspaceRoot"

- id: "focus-java-projects-2"
action: "run command Java Projects: Focus on Java Projects View"
waitBefore: 1

- id: "click-project-node-2"
action: "click my-app tree item"
waitBefore: 1

- id: "trigger-new-resource-2"
action: "clickTreeItemAction my-app New..."
Expand All @@ -99,6 +128,9 @@ steps:
action: "open file AppToRename.java"
waitBefore: 3

- id: "collapse-workspace-root-3"
action: "collapseWorkspaceRoot"

- id: "focus-java-projects-3"
action: "run command Java Projects: Focus on Java Projects View"
waitBefore: 3
Expand Down Expand Up @@ -146,6 +178,9 @@ steps:
action: "open file AppToDelete.java"
waitBefore: 5

- id: "collapse-workspace-root-4"
action: "collapseWorkspaceRoot"

- id: "focus-java-projects-4"
action: "run command Java Projects: Focus on Java Projects View"
waitBefore: 2
Expand Down
36 changes: 29 additions & 7 deletions test/e2e-plans/java-dep-project-explorer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ setup:
timeout: 180
settings:
java.configuration.checkProjectSettingsExclusions: false
workbench.startupEditor: "none"

steps:
# ── Wait for LS ready ──
Expand All @@ -29,6 +30,20 @@ steps:
verify: "Java Language Server is ready"
timeout: 180

# Free horizontal & vertical space so JAVA PROJECTS gets enough room.
- id: "close-aux-bar"
action: "executeVSCodeCommand workbench.action.closeAuxiliaryBar"
verify: "Auxiliary bar (Chat) closed"

- id: "collapse-outline"
action: "collapseSidebarSection OUTLINE"

- id: "collapse-timeline"
action: "collapseSidebarSection TIMELINE"

- id: "collapse-workspace-root"
action: "collapseWorkspaceRoot"

# ── Test 1: javaProjectExplorer.focus ──
- id: "focus-java-projects"
action: "run command Java Projects: Focus on Java Projects View"
Expand All @@ -45,11 +60,13 @@ steps:
timeout: 15

# ── Test 2: linkWithFolderExplorer ──
# NOTE: action resolver only matches "expandTreeItem <name>" — strings like
# "expand my-app tree item" silently fall back to command palette and no-op.
- id: "expand-project"
action: "expand my-app tree item"
action: "expandTreeItem my-app"

- id: "expand-src"
action: "expand src/main/java tree item"
action: "expandTreeItem src/main/java"
waitBefore: 2

- id: "verify-package"
Expand All @@ -60,7 +77,7 @@ steps:
timeout: 15

- id: "expand-package"
action: "expand com.mycompany.app tree item"
action: "expandTreeItem com.mycompany.app"
waitBefore: 2

- id: "verify-app-class"
Expand All @@ -72,8 +89,12 @@ steps:
timeout: 15

# ── Test 3: unlinkWithFolderExplorer ──
# Click the title-bar action ("Unlink with Editor") in the JAVA PROJECTS pane.
# When `config.java.dependency.syncWithFolderExplorer == true` (the default),
# the package contributes the Unlink button to overflow_10@20 — clickViewTitleAction
# locates it directly or via the "Views and More Actions..." overflow menu.
- id: "unlink-editor"
action: "run command Java: Unlink with Editor"
action: 'clickViewTitleAction "Java Projects" "Unlink with Editor"'
verify: "Editor unlinked from tree"

- id: "open-rename-file"
Expand All @@ -84,11 +105,12 @@ steps:
verify: "Tree should not auto-expand to AppToRename"

- id: "relink-editor"
action: "run command Java: Link with Editor"
action: 'clickViewTitleAction "Java Projects" "Link with Editor"'
verify: "Editor re-linked with tree"

# ── Test 4: revealInProjectExplorer ──
# Collapse all tree nodes, then reveal App.java from editor
# Collapse all tree nodes, then reveal App.java by right-clicking the editor tab
# → "Reveal in Java Project Explorer" (contributed to editor/title/context).
- id: "collapse-all"
action: "run command View: Collapse All"
verify: "Collapse tree to reset state"
Expand All @@ -98,7 +120,7 @@ steps:
waitBefore: 2

- id: "reveal-in-project-explorer"
action: "run command Java: Reveal in Java Project Explorer"
action: 'contextMenuOnEditorTab "App.java" "Reveal in Java Project Explorer"'
waitBefore: 2

- id: "verify-revealed"
Expand Down
Loading