From 8c4467e221a2da9b01208f6572987df7b5b7c277 Mon Sep 17 00:00:00 2001 From: wenytang-ms Date: Sat, 10 Oct 2026 16:35:03 +0800 Subject: [PATCH] test: make super implementation navigation state-driven --- .../java-go-to-super-implementation.yaml | 46 ++++++++----------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/test-plans/java-go-to-super-implementation.yaml b/test-plans/java-go-to-super-implementation.yaml index 12e84376..269d5c82 100644 --- a/test-plans/java-go-to-super-implementation.yaml +++ b/test-plans/java-go-to-super-implementation.yaml @@ -4,7 +4,8 @@ # "Go to super implementation" link in the hover popup of an overriding # method was not clickable in 1.55.0. This plan hovers the overriding # method, clicks the hover link, and verifies the editor navigates to the -# super (base-class) implementation. +# super (base-class) implementation. The product fix is +# redhat-developer/vscode-java#4440; this plan still exercises the actual link. # # Verifies: LS ready -> hover overriding method -> "Go to super # implementation" hover link is present and clickable -> editor opens @@ -12,6 +13,7 @@ # # Prerequisites: # - JDK 11+ installed and available on PATH (the workflow installs JDK 21) +# - AutoTest 0.7.32+ for state-driven hover and active editor tab verification # # Usage: autotest run test-plans/java-go-to-super-implementation.yaml @@ -25,8 +27,7 @@ setup: extension: "redhat.java" extensions: - "vscjava.vscode-java-pack" - # vscode-java 1.55.0 stable contains the #4438 regression covered by this - # plan; use the pre-release carrying the fix on PR runs as schedules do. + # Keep pre-release regression coverage; --vsix selects release bits explicitly. preRelease: true vscodeVersion: "stable" workspace: "../test-fixtures/super-implementation" @@ -53,41 +54,32 @@ steps: verify: "Derived.java is open in the editor and shows the overriding greet() method" verifyEditor: contains: "public void greet" + verifyEditorTab: + title: "Derived.java" + active: true waitBefore: 5 timeout: 15 - # ── Hover the overriding method ─────────────────────────────── - # The first "greet" occurrence in the visible editor is the overriding - # declaration. Hovering it renders vscode-java's hover popup which - # includes the "Go to super implementation" link. The after-step - # screenshot captures the open popup; the LLM verify confirms the link - # is actually shown (the regression for #4438 is exactly this link - # being absent / not rendered as a clickable link). - - id: "hover-greet" - action: "hoverOnText greet" - verify: "A hover popup is open over the overriding greet() method, ready for the following link action" - waitBefore: 5 - timeout: 30 - # The popup can still show "Loading..." when the screenshot is captured on - # macOS. The next step deterministically proves that the link is available. - skipLlmVerify: true - - # ── Click the hover link ────────────────────────────────────── - # This is the regression assertion for #4438: the link must be a - # clickable element that triggers navigation to the super method. + # Wait for the actual clickable link, restoring a dismissed hover in the + # same operation. Loading text and a merely visible popup are not readiness. - id: "click-super-link" - action: "clickHoverAction Go to super implementation" + action: 'hoverAndClickAction "greet" "Go to Super Implementation"' verify: "The 'Go to super implementation' hover link was clicked and the editor navigated from Derived.java to the base class — Base.java is now opening with the cursor moving onto Base#greet()" - timeout: 15 + verifyEditorTab: + title: "Base.java" + active: true + timeout: 30 # ── Verify navigation landed on Base#greet() ────────────────── - id: "verify-base-open" - action: "wait 2 seconds" + action: "wait 0 seconds" verify: "Base.java is the active editor tab and the cursor sits on the base greet() method (Hello from Base body visible) — navigation to the super implementation succeeded via the hover link" verifyEditor: - fileName: "Base.java" contains: "Hello from Base" + verifyEditorTab: + title: "Base.java" + active: true timeout: 15 - # Navigation completed in the previous step, so this settle-and-assert + # Navigation completed in the previous step, so this assertion # step is visually unchanged by design. verifyEditor is authoritative. skipLlmVerify: true