Skip to content

test: add E2E plans for view modes, new types, and build lifecycle#1019

Open
wenytang-ms wants to merge 2 commits into
microsoft:mainfrom
wenytang-ms:add-java-manager-e2e-plans
Open

test: add E2E plans for view modes, new types, and build lifecycle#1019
wenytang-ms wants to merge 2 commits into
microsoft:mainfrom
wenytang-ms:add-java-manager-e2e-plans

Conversation

@wenytang-ms
Copy link
Copy Markdown
Contributor

Summary

Adds three new YAML E2E test plans driven by @vscjava/vscode-autotest covering Java Project Manager commands that were not previously exercised. All three plans pass locally against the packaged extension VSIX.

New plans

Plan Steps Commands covered
java-dep-view-modes.yaml 33 Hierarchical / Flat package view, Refresh, Hide / Show non-Java resources
java-dep-new-types.yaml 66 New Interface / Enum / Annotation / Abstract Class / File / Folder via Java: New... quick-pick
java-dep-build-lifecycle.yaml 20 Build / Rebuild workspace + project, Reload Project From Active File

Notes

  • java-dep-view-modes.yaml scopes verifyTreeItem to the Java Projects pane to avoid cross-view contamination from the File Explorer (where pom.xml is also rendered).
  • java-dep-new-types.yaml exercises every option of the Java: New... quick-pick; verification combines tree-item presence under the source folder and the opened editor tab.
  • java-dep-build-lifecycle.yaml does not use LLM screenshot verification (build commands have no visible side-effect beyond a brief status-bar flash). Each build is followed by waitForLanguageServer to confirm the LS returns to Ready — the test asserts that the command does not leave the LS hung or in an error state. java.project.clean.workspace is intentionally skipped because the JDT.LS clean command triggers a VS Code window reload and tears down the autotest browser session.

Local results

java-dep-view-modes        33/33
java-dep-new-types         66/66
java-dep-build-lifecycle   20/20
                          ───────
                          119/119

How to run

npx autotest run test/e2e-plans/java-dep-view-modes.yaml      --vsix ./extension.vsix
npx autotest run test/e2e-plans/java-dep-new-types.yaml       --vsix ./extension.vsix
npx autotest run test/e2e-plans/java-dep-build-lifecycle.yaml --vsix ./extension.vsix

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant