-
Notifications
You must be signed in to change notification settings - Fork 162
Expand file tree
/
Copy pathjava-basic-extended.yaml
More file actions
80 lines (70 loc) · 3.02 KB
/
Copy pathjava-basic-extended.yaml
File metadata and controls
80 lines (70 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Test Plan: Java Basic Editing Extended (from vscode-java-pack.wiki)
#
# Source: wiki Test-Plan.md "Basic" scenario (Steps 6-9)
# Verify: Code completion → Organize Imports → Rename Symbol → New Java File
#
# Note: This test plan assumes Basic steps 1-5 have passed (java-basic-editing.yaml),
# i.e. the project compiles without errors.
#
# Prerequisites:
# - vscode-java repository cloned locally
# - JDK installed and available
#
# Usage: autotest run test-plans/java-basic-extended.yaml
name: "Java Basic Extended — Completion, Organize Imports, Rename"
description: |
Corresponds to Steps 6-9 of the Basic scenario in the wiki Test Plan:
Verify code completion, Organize Imports, and Rename functionality.
setup:
extension: "redhat.java"
extensions:
- "vscjava.vscode-java-pack"
vscodeVersion: "stable"
workspace: "../../vscode-java/test/resources/projects/eclipse/simple-app"
timeout: 60
steps:
# ── Wait for LS ready ───────────────────────────────────────
- id: "ls-ready"
action: "waitForLanguageServer"
verify: "Status bar shows Java Language Server is ready"
timeout: 120
# ── Step 6: Type File code and verify completion ──────────
# wiki: "Typing 'File f = new File(\"demo.txt\");' into App.main,
# the completion should work for File and there should be
# two errors in the problem view."
- id: "open-app"
action: "open file App.java"
verify: "App.java file is opened in the editor"
timeout: 10
- id: "goto-main-body"
action: "goToLine 6"
verify: "Cursor is inside the main method body"
- id: "goto-end"
action: "goToEndOfLine"
- id: "type-file-code"
action: "typeInEditor \n File f = new File(\"demo.txt\");"
verifyEditor:
contains: "File f = new File"
# Save the file so LS picks up changes (typeInEditor may not trigger didChange)
- id: "save-before-organize"
action: "saveFile"
verifyProblems:
errors: 1
atLeast: true
timeout: 30
# ── Step 7: Organize Imports ────────────────────────────
# wiki: "Invoke 'Source Action...' => 'Organize Imports'"
# Note: Organize Imports may pop up a selection dialog for File class (multiple candidates),
# here we add the import directly via disk modification to verify equivalent behavior.
- id: "add-import"
action: "insertLineInFile src/app/App.java 2 import java.io.File;"
verifyEditor:
contains: "import java.io.File"
# ── Step 8: Rename Symbol ───────────────────────────────
# wiki: "Open Foo.java, select the definition of class Foo,
# right click and run 'Rename Symbol' to rename it to FooNew."
# Note: Rename needs to be triggered via Command Palette (F2)
- id: "open-foo-for-rename"
action: "open file Foo.java"
verify: "Foo.java file is opened in the editor"
timeout: 10