fix(e2e): collapse JAVA PROJECTS tree before second click-project-node#1009
Merged
wenytang-ms merged 1 commit intomainfrom May 7, 2026
Merged
Conversation
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>
chagong
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
CI run #25422861436 failed on the merge of #1003 with
Java Dependency — File Operationsat 35/39:#1003had already addedcloseAuxiliaryBar,collapseSidebarSection OUTLINE/TIMELINE,collapseWorkspaceRoot, andfocus-java-projectsbefore the firstclick-project-node, which fixed the initial click. But the second click failed for a different reason.Root cause
Between Test 1 and Test 2 of the file-operations plan:
enter-class-name App2opensApp2.javain an editor.my-app → src/main/java → com.mycompany.app → App2.javato reveal the newly-created file.close-editors-before-pkg,collapse-workspace-root-2,focus-java-projects-2.collapseWorkspaceRootonly collapses the Explorer view's workspace folder — it does not collapse the JAVA PROJECTS view itself.click-project-node-2runs,my-appis no longer at row 0 of the JAVA PROJECTS view; it's been pushed deeper, gets scrolled, and ends up directly underneath the sticky.pane-header .title"Java Projects". The pane-header intercepts the click — CI log shows the actual hit target was thecodicon-collapse-allview-title button.Fix
Add a
clickViewTitleAction "Java Projects" "Collapse All"step beforeclick-project-node-2to reset the JAVA PROJECTS tree to its initial collapsed state, puttingmy-appback at row 0 (clearly below the sticky pane-header).Test 3 (rename) and Test 4 (delete) don't need this guard — they click leaf nodes (
AppToRename,AppToDelete) that link-with-editor freshly reveals at the bottom of the viewport, where the sticky pane-header isn't a concern. CI confirmed both passed (✅ select-rename-target,✅ delete-context-menu).Verification
Ran the full plan locally on Windows with
@vscjava/vscode-autotest@0.6.6against a freshly-builtvscode-java-dependency.vsix:Compatibility
clickViewTitleActionwas introduced in autotest 0.6.6, which is published on npm and what the workflow installs vianpm install -g @vscjava/vscode-autotest.