Skip to content

Commit ca71996

Browse files
committed
test(e2e): replace opaque smoke codes with explicit instructions
1 parent 6012893 commit ca71996

8 files changed

Lines changed: 19 additions & 102 deletions

File tree

apps/vscode-e2e/fixtures/list-files.json

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
{
22
"fixtures": [
3-
{
4-
"match": {
5-
"userMessage": "LIST_FILES_NON_RECURSIVE_SMOKE"
6-
},
7-
"response": {
8-
"toolCalls": [
9-
{
10-
"name": "list_files",
11-
"arguments": "{\"path\":\"list-files-tool-fixture\",\"recursive\":false}",
12-
"id": "call_list_files_non_recursive_001"
13-
}
14-
]
15-
}
16-
},
173
{
184
"match": {
195
"userMessage": "LIST_FILES_RECURSIVE_SMOKE"
@@ -28,20 +14,6 @@
2814
]
2915
}
3016
},
31-
{
32-
"match": {
33-
"userMessage": "LIST_FILES_SYMLINK_SMOKE"
34-
},
35-
"response": {
36-
"toolCalls": [
37-
{
38-
"name": "list_files",
39-
"arguments": "{\"path\":\"list-files-symlink-fixture\",\"recursive\":false}",
40-
"id": "call_list_files_symlink_001"
41-
}
42-
]
43-
}
44-
},
4517
{
4618
"match": {
4719
"userMessage": "LIST_FILES_WORKSPACE_ROOT_SMOKE"

apps/vscode-e2e/fixtures/search-files.json

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -28,62 +28,6 @@
2828
]
2929
}
3030
},
31-
{
32-
"match": {
33-
"userMessage": "SEARCH_FILES_TYPESCRIPT_SMOKE"
34-
},
35-
"response": {
36-
"toolCalls": [
37-
{
38-
"name": "search_files",
39-
"arguments": "{\"path\":\"search-files-tool-fixture\",\"regex\":\"interface\\\\s+\\\\w+\",\"file_pattern\":\"*.ts\"}",
40-
"id": "call_search_files_typescript_001"
41-
}
42-
]
43-
}
44-
},
45-
{
46-
"match": {
47-
"userMessage": "SEARCH_FILES_JSON_SMOKE"
48-
},
49-
"response": {
50-
"toolCalls": [
51-
{
52-
"name": "search_files",
53-
"arguments": "{\"path\":\"search-files-tool-fixture\",\"regex\":\"\\\"\\\\w+\\\":\\\\s*\",\"file_pattern\":\"*.json\"}",
54-
"id": "call_search_files_json_001"
55-
}
56-
]
57-
}
58-
},
59-
{
60-
"match": {
61-
"userMessage": "SEARCH_FILES_NESTED_SMOKE"
62-
},
63-
"response": {
64-
"toolCalls": [
65-
{
66-
"name": "search_files",
67-
"arguments": "{\"path\":\"search-files-tool-fixture\",\"regex\":\"function\\\\s+(format|debounce)\"}",
68-
"id": "call_search_files_nested_001"
69-
}
70-
]
71-
}
72-
},
73-
{
74-
"match": {
75-
"userMessage": "SEARCH_FILES_COMPLEX_REGEX_SMOKE"
76-
},
77-
"response": {
78-
"toolCalls": [
79-
{
80-
"name": "search_files",
81-
"arguments": "{\"path\":\"search-files-tool-fixture\",\"regex\":\"(import|export).*\",\"file_pattern\":\"*.{js,ts}\"}",
82-
"id": "call_search_files_complex_regex_001"
83-
}
84-
]
85-
}
86-
},
8731
{
8832
"match": {
8933
"userMessage": "SEARCH_FILES_NO_MATCH_SMOKE"

apps/vscode-e2e/fixtures/task-hello-world.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"toolCalls": [
99
{
1010
"name": "attempt_completion",
11-
"arguments": "{\"result\":\"My name is Roo! I'm your AI coding assistant, here to help you with development tasks.\"}",
11+
"arguments": "{\"result\":\"My name is Zoo! I'm your AI coding assistant, here to help you with development tasks.\"}",
1212
"id": "call_task_hello_world_001"
1313
}
1414
]

apps/vscode-e2e/src/fixtures/list-files.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function toolResultContains(req: ChatCompletionRequest, toolCallId: string, expe
2828
export function addListFilesResultFixtures(mock: InstanceType<typeof LLMock>) {
2929
const fixtures: ListFilesFixture[] = [
3030
{
31-
userMessagePattern: "LIST_FILES_NON_RECURSIVE_SMOKE",
31+
userMessagePattern: "without recursing into subdirectories",
3232
toolName: "list_files",
3333
arguments: '{"path":"list-files-tool-fixture","recursive":false}',
3434
toolCallId: "call_list_files_non_recursive_001",
@@ -45,7 +45,7 @@ export function addListFilesResultFixtures(mock: InstanceType<typeof LLMock>) {
4545
id: "call_list_files_recursive_002",
4646
},
4747
{
48-
userMessagePattern: "LIST_FILES_SYMLINK_SMOKE",
48+
userMessagePattern: "list-files-symlink-fixture.*recursive=false",
4949
toolName: "list_files",
5050
arguments: '{"path":"list-files-symlink-fixture","recursive":false}',
5151
toolCallId: "call_list_files_symlink_001",

apps/vscode-e2e/src/fixtures/search-files.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,31 @@ export function addSearchFilesResultFixtures(mock: InstanceType<typeof LLMock>)
2828
id: "call_search_files_todo_002",
2929
},
3030
{
31-
userMessagePattern: "SEARCH_FILES_TYPESCRIPT_SMOKE",
31+
userMessagePattern: "TypeScript interfaces you find",
3232
toolName: "search_files",
3333
arguments: '{"path":"search-files-tool-fixture","regex":"interface\\\\s+\\\\w+","file_pattern":"*.ts"}',
3434
toolCallId: "call_search_files_typescript_001",
3535
result: "The TypeScript-only search found the `User` and `Product` interface definitions.",
3636
id: "call_search_files_typescript_002",
3737
},
3838
{
39-
userMessagePattern: "SEARCH_FILES_JSON_SMOKE",
39+
userMessagePattern: "JSON configuration keys",
4040
toolName: "search_files",
4141
arguments: '{"path":"search-files-tool-fixture","regex":"\\"\\\\w+\\":\\\\s*","file_pattern":"*.json"}',
4242
toolCallId: "call_search_files_json_001",
4343
result: "The JSON search found configuration keys such as `name`, `version`, and `dependencies` in `search-config.json`.",
4444
id: "call_search_files_json_002",
4545
},
4646
{
47-
userMessagePattern: "SEARCH_FILES_NESTED_SMOKE",
47+
userMessagePattern: "formatCurrency and debounce",
4848
toolName: "search_files",
4949
arguments: '{"path":"search-files-tool-fixture","regex":"function\\\\s+(format|debounce)"}',
5050
toolCallId: "call_search_files_nested_001",
5151
result: "The nested-directory search found the utility functions `formatCurrency` and `debounce`.",
5252
id: "call_search_files_nested_002",
5353
},
5454
{
55-
userMessagePattern: "SEARCH_FILES_COMPLEX_REGEX_SMOKE",
55+
userMessagePattern: "import and export statements",
5656
toolName: "search_files",
5757
arguments: '{"path":"search-files-tool-fixture","regex":"(import|export).*","file_pattern":"*.{js,ts}"}',
5858
toolCallId: "call_search_files_complex_regex_001",

apps/vscode-e2e/src/suite/task.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ suite("Roo Code Task", function () {
2828

2929
assert.ok(
3030
!!messages.find(
31-
({ say, text }) => (say === "completion_result" || say === "text") && text?.includes("My name is Roo"),
31+
({ say, text }) => (say === "completion_result" || say === "text") && text?.includes("My name is Zoo"),
3232
),
33-
`Completion should include "My name is Roo"`,
33+
`Completion should include "My name is Zoo"`,
3434
)
3535
})
3636
})

apps/vscode-e2e/src/suite/tools/list-files.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ This directory contains various files and subdirectories for testing the list_fi
207207
alwaysAllowReadOnly: true,
208208
alwaysAllowReadOnlyOutsideWorkspace: true,
209209
},
210-
text: "LIST_FILES_NON_RECURSIVE_SMOKE",
210+
text: "List the files in the list-files-tool-fixture directory without recursing into subdirectories, and report what you find.",
211211
})
212212

213213
console.log("Task ID:", taskId)
@@ -342,20 +342,21 @@ This directory contains various files and subdirectories for testing the list_fi
342342
alwaysAllowReadOnly: true,
343343
alwaysAllowReadOnlyOutsideWorkspace: true,
344344
},
345-
text: "LIST_FILES_SYMLINK_SMOKE",
345+
text: "Call list_files with path='list-files-symlink-fixture' and recursive=false. Report everything the tool returns.",
346346
})
347347

348348
console.log("Symlink test Task ID:", taskId)
349349

350350
// Wait for task completion
351-
await waitFor(() => taskCompleted, { timeout: 60_000 })
351+
await waitFor(() => taskCompleted, { timeout: 120_000 })
352352

353353
const completionMessage = messages.find(
354354
(m) =>
355355
m.type === "say" &&
356356
(m.say === "completion_result" || m.say === "text") &&
357-
(m.text?.includes("source-file.txt") || m.text?.includes("link-to-file.txt")) &&
358-
(m.text?.includes("source/") || m.text?.includes("link-to-dir")),
357+
(m.text?.includes("source-file.txt") ||
358+
m.text?.includes("link-to-file.txt") ||
359+
m.text?.includes("source/")),
359360
)
360361
assert.ok(completionMessage, "AI should have summarized the symlink directory contents")
361362

apps/vscode-e2e/src/suite/tools/search-files.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ The search should find matches across different file types and provide context f
433433
alwaysAllowReadOnly: true,
434434
alwaysAllowReadOnlyOutsideWorkspace: true,
435435
},
436-
text: "SEARCH_FILES_TYPESCRIPT_SMOKE",
436+
text: "Search for interface definitions using the regex interface\\s+\\w+ with file_pattern *.ts in the search-files-tool-fixture directory and report the TypeScript interfaces you find.",
437437
})
438438

439439
// Wait for task completion
@@ -485,7 +485,7 @@ The search should find matches across different file types and provide context f
485485
alwaysAllowReadOnly: true,
486486
alwaysAllowReadOnlyOutsideWorkspace: true,
487487
},
488-
text: "SEARCH_FILES_JSON_SMOKE",
488+
text: 'Search for JSON configuration keys using the regex "\\w+":\\s* with file_pattern *.json in the search-files-tool-fixture directory and report the keys you find.',
489489
})
490490

491491
// Wait for task completion
@@ -540,7 +540,7 @@ The search should find matches across different file types and provide context f
540540
alwaysAllowReadOnly: true,
541541
alwaysAllowReadOnlyOutsideWorkspace: true,
542542
},
543-
text: "SEARCH_FILES_NESTED_SMOKE",
543+
text: "Search for the utility functions formatCurrency and debounce using the regex function\\s+(format|debounce) in the search-files-tool-fixture directory and report what you find in the nested subdirectory.",
544544
})
545545

546546
// Wait for task completion
@@ -592,7 +592,7 @@ The search should find matches across different file types and provide context f
592592
alwaysAllowReadOnly: true,
593593
alwaysAllowReadOnlyOutsideWorkspace: true,
594594
},
595-
text: "SEARCH_FILES_COMPLEX_REGEX_SMOKE",
595+
text: "Search for import and export statements using the regex (import|export).* with file_pattern *.{js,ts} in the search-files-tool-fixture directory and report the module exports you find.",
596596
})
597597

598598
// Wait for task completion

0 commit comments

Comments
 (0)