test: add E2E plans for view modes, new types, and build lifecycle#1019
Open
wenytang-ms wants to merge 4 commits into
Open
test: add E2E plans for view modes, new types, and build lifecycle#1019wenytang-ms wants to merge 4 commits into
wenytang-ms wants to merge 4 commits into
Conversation
Adds three new YAML test plans driven by @vscjava/vscode-autotest to
cover Java Project Manager commands that were not previously exercised
by the existing e2e plans.
- java-dep-view-modes.yaml (33 steps)
Hierarchical / Flat package view, Refresh, Hide / Show non-Java
resources. Scopes verifyTreeItem to the Java Projects pane to avoid
cross-view contamination from the File Explorer.
- java-dep-new-types.yaml (66 steps)
New Interface / Enum / Annotation / Abstract Class / File / Folder
via the Java: New... quick-pick. Verifies file creation, opened
editor tab, and tree-item presence under the source folder.
- java-dep-build-lifecycle.yaml (20 steps)
Build All / Rebuild All (workspace) and Build Project / Rebuild
Project (per project context menu) and Reload Project From Active
File (pom.xml editor title). Each build is followed by
waitForLanguageServer to confirm the LS returns to Ready.
java.project.clean.workspace is intentionally skipped because it
triggers a VS Code window reload.
All three plans pass locally against the packaged extension VSIX.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Updates the three Java Project Manager E2E plans based on feedback that the setup steps were redundant and that build commands should exercise the actual UI affordances rather than short-circuiting via the keybinding bridge. Setup simplification (applied to all three plans): - Drop the no-op collapseSidebarSection OUTLINE / TIMELINE steps. Both panes are collapsed by default in a fresh VS Code session, so the steps did nothing and only produced confusing identical before/after screenshots. - Replace collapseWorkspaceRoot (which only collapsed the file tree inside the MAVEN pane) with collapseSidebarSection maven (which collapses the entire MAVEN pane). This gives JAVA PROJECTS the full vertical space. Build lifecycle plan — switch to real UI paths: - "Build All" now goes through clickViewTitleAction "Java Projects" "Build All" — clicks the $(tools) icon in the Java Projects view title bar, exercising the full button-rendering + when-clause + command-dispatch chain instead of bypassing it. - "Rebuild All" now goes through clickViewTitleAction "Java Projects" "Rebuild All" — the helper automatically falls through to the "Views and More Actions..." overflow menu when the action is not in the toolbar's navigation group. - "Build Project" / "Rebuild Project" already used the project context menu — unchanged. - "Reload Java Project" stays on executeVSCodeCommand: its editor title-bar button is conditional on java:reloadProjectActive, which is set by JDT.LS in a racy way that doesn't reliably flip for synthetic edits. The comment in the plan now documents the trade-off. Local results: view-modes 30/30 new-types 64/64 build-lifecycle 18/18 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The four toggle steps (switch-to-hierarchical, switch-to-flat, hide-non-java, show-non-java) previously fired their commands via executeVSCodeCommand (keybinding bridge), which sidestepped the actual user-facing entry point in the Java Projects view title-bar overflow menu. The `before`/`after` screenshots were nearly identical since no mouse interaction was modeled and the tree refresh is async, which gave no visual evidence the user-facing toggle actually works. Switch to clickViewTitleAction so each toggle goes through the real overflow menu. Combined with the driver-side pre-click sub-screenshots (autotest c24658f), each step now produces two click-evidence frames: the `...` overflow button hovered (with tooltip) and the menu item highlighted (e.g. "Hierarchical View" focused). Menu labels match package.nls.json: - "Hierarchical View" / "Flat View" - "Hide Non-Java Resources" / "Show Non-Java Resources" The Hide/Show labels mirror each other based on the config.java.project.explorer.showNonJavaResources context key, so the plan alternates between "Hide" (when currently shown) and "Show" (when currently hidden). Comments document this. Verified: java-dep-view-modes 30/30 passing locally.
The five between-cycle collapseAll steps previously fired through executeVSCodeCommand (keybinding bridge), which exercised the command but skipped any UI verification. The Collapse All icon button in the Java Projects view title-bar is a real navigation-group toolbar action that users see and click — drive it through clickViewTitleAction so the click target is verified. With the driver-side pre-click sub-screenshot (autotest c24658f), each cycle now produces one frame showing the Collapse All button hovered with its tooltip rendered, proving the mouse landed on the right element. Other executeVSCodeCommand uses are kept as-is: - saveAll (Ctrl+S) — legitimate user keyboard path - closeAuxiliaryBar / javaProjectExplorer.focus — non-test-target setup Verified: java-dep-new-types 64/64 passing locally.
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.
Summary
Adds three new YAML E2E test plans driven by
@vscjava/vscode-autotestcovering Java Project Manager commands that were not previously exercised. All three plans pass locally against the packaged extension VSIX.New plans
java-dep-view-modes.yamljava-dep-new-types.yamlJava: New...quick-pickjava-dep-build-lifecycle.yamlNotes
java-dep-view-modes.yamlscopesverifyTreeItemto the Java Projects pane to avoid cross-view contamination from the File Explorer (wherepom.xmlis also rendered).java-dep-new-types.yamlexercises every option of theJava: New...quick-pick; verification combines tree-item presence under the source folder and the opened editor tab.java-dep-build-lifecycle.yamldoes not use LLM screenshot verification (build commands have no visible side-effect beyond a brief status-bar flash). Each build is followed bywaitForLanguageServerto confirm the LS returns toReady— the test asserts that the command does not leave the LS hung or in an error state.java.project.clean.workspaceis intentionally skipped because the JDT.LS clean command triggers a VS Code window reload and tears down the autotest browser session.Local results
How to run