From eede3944e8c980a1e628fad709136f5b67c416cf Mon Sep 17 00:00:00 2001 From: wenytang-ms Date: Thu, 7 May 2026 09:47:47 +0800 Subject: [PATCH] fix(e2e): collapse JAVA PROJECTS tree before second click-project-node MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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> --- test/e2e-plans/java-dep-file-operations.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/e2e-plans/java-dep-file-operations.yaml b/test/e2e-plans/java-dep-file-operations.yaml index bf8f1156..59032d51 100644 --- a/test/e2e-plans/java-dep-file-operations.yaml +++ b/test/e2e-plans/java-dep-file-operations.yaml @@ -99,6 +99,13 @@ steps: action: "run command Java Projects: Focus on Java Projects View" waitBefore: 1 + # Test 1 expanded my-app → src/main/java → com.mycompany.app to reveal the + # newly-created App2.java. Reset the JAVA PROJECTS tree so my-app is back + # at row 0 and not occluded by the sticky pane-header on the next click. + - id: "collapse-java-projects-tree-2" + action: 'clickViewTitleAction "Java Projects" "Collapse All"' + waitBefore: 1 + - id: "click-project-node-2" action: "click my-app tree item" waitBefore: 1