diff --git a/test/e2e/extensions/test-extension/extension.ts b/test/e2e/extensions/test-extension/extension.ts index ea962efbdd84..ea4a1f896ce6 100644 --- a/test/e2e/extensions/test-extension/extension.ts +++ b/test/e2e/extensions/test-extension/extension.ts @@ -2,6 +2,7 @@ import * as vscode from "vscode" export function activate(context: vscode.ExtensionContext) { vscode.window.showInformationMessage("test extension loaded") + // Test extension context.subscriptions.push( vscode.commands.registerCommand("codeServerTest.proxyUri", () => { if (process.env.VSCODE_PROXY_URI) { @@ -11,4 +12,20 @@ export function activate(context: vscode.ExtensionContext) { } }), ) + + // asExternalUri extension + context.subscriptions.push( + vscode.commands.registerCommand("codeServerTest.asExternalUri", async () => { + const input = await vscode.window.showInputBox({ + prompt: "URL to pass through to asExternalUri", + }) + + if (input) { + const output = await vscode.env.asExternalUri(vscode.Uri.parse(input)) + vscode.window.showInformationMessage(`input: ${input} output: ${output}`) + } else { + vscode.window.showErrorMessage(`Failed to run test case. No input provided.`) + } + }), + ) } diff --git a/test/e2e/extensions/test-extension/package.json b/test/e2e/extensions/test-extension/package.json index 8aca8815ac9f..77482689f4c4 100644 --- a/test/e2e/extensions/test-extension/package.json +++ b/test/e2e/extensions/test-extension/package.json @@ -17,6 +17,11 @@ "command": "codeServerTest.proxyUri", "title": "Get proxy URI", "category": "code-server" + }, + { + "command": "codeServerTest.asExternalUri", + "title": "asExternalUri test", + "category": "code-server" } ] },