Skip to content

Commit acb0ded

Browse files
wenytang-msCopilot
andauthored
fix(e2e): collapse JAVA PROJECTS tree before second click-project-node (#1009)
The Test 1 `enter-class-name App2` step opens App2.java in the editor. With link-with-editor on (default), this auto-expands the JAVA PROJECTS tree to my-app → src/main/java → com.mycompany.app → App2.java to reveal the newly created file. When Test 2 then closes editors and tries to click the my-app root node again, the tree is still expanded so my-app is no longer at row 0. Even after `focus-java-projects`, the row gets scrolled, and the sticky JAVA PROJECTS pane-header (.pane-header .title) intercepts the click. CI logs show the click hit the codicon-collapse-all button on the view title bar instead of the my-app row, causing `click-project-node-2` to fail. `collapseWorkspaceRoot` only collapses the Explorer view's workspace root, not the JAVA PROJECTS view. Use the view's own `Collapse All` title-bar action via clickViewTitleAction (autotest 0.6.6+) to reset the tree state, putting my-app back at row 0 below the pane-header. Verified locally: 40/40 steps pass with the new collapse step. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 578059f commit acb0ded

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/e2e-plans/java-dep-file-operations.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ steps:
9999
action: "run command Java Projects: Focus on Java Projects View"
100100
waitBefore: 1
101101

102+
# Test 1 expanded my-app → src/main/java → com.mycompany.app to reveal the
103+
# newly-created App2.java. Reset the JAVA PROJECTS tree so my-app is back
104+
# at row 0 and not occluded by the sticky pane-header on the next click.
105+
- id: "collapse-java-projects-tree-2"
106+
action: 'clickViewTitleAction "Java Projects" "Collapse All"'
107+
waitBefore: 1
108+
102109
- id: "click-project-node-2"
103110
action: "click my-app tree item"
104111
waitBefore: 1

0 commit comments

Comments
 (0)