Skip to content

Commit 66c5485

Browse files
committed
Set up vscode integration test
1 parent 657e237 commit 66c5485

File tree

7 files changed

+387
-15
lines changed

7 files changed

+387
-15
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ roo-cline-*.vsix
1111

1212
# Local prompts and rules
1313
/local-prompts
14+
15+
# Test environment
16+
.test_env

.vscode-test.mjs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
import { defineConfig } from "@vscode/test-cli"
1+
import { defineConfig } from '@vscode/test-cli';
22

33
export default defineConfig({
4-
files: "out/test/**/*.test.js",
5-
})
4+
files: 'src/test/extension.test.ts',
5+
workspaceFolder: '.',
6+
mocha: {
7+
timeout: 60000,
8+
ui: 'tdd'
9+
},
10+
launchArgs: [
11+
'--enable-proposed-api=RooVeterinaryInc.roo-cline',
12+
'--disable-extensions'
13+
]
14+
});

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"url": "https://github.com/RooVetGit/Roo-Cline"
2121
},
2222
"homepage": "https://github.com/RooVetGit/Roo-Cline",
23+
"enabledApiProposals": [
24+
"extensionRuntime"
25+
],
2326
"categories": [
2427
"AI",
2528
"Chat",
@@ -159,6 +162,7 @@
159162
"start:webview": "cd webview-ui && npm run start",
160163
"test": "jest && npm run test:webview",
161164
"test:webview": "cd webview-ui && npm run test",
165+
"test:extension": "vscode-test",
162166
"prepare": "husky",
163167
"publish:marketplace": "vsce publish",
164168
"publish": "npm run build && changeset publish && npm install --package-lock-only",

src/exports/cline.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,9 @@ export interface ClineAPI {
3434
* Simulates pressing the secondary button in the chat interface.
3535
*/
3636
pressSecondaryButton(): Promise<void>
37+
38+
/**
39+
* The sidebar provider instance.
40+
*/
41+
sidebarProvider: ClineSidebarProvider
3742
}

src/exports/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ export function createClineAPI(outputChannel: vscode.OutputChannel, sidebarProvi
5656
invoke: "secondaryButtonClick",
5757
})
5858
},
59+
60+
sidebarProvider: sidebarProvider,
5961
}
6062

6163
return api

0 commit comments

Comments
 (0)