@salesforce/salesforcedx-vscode-test-tools
Version:
Test automation framework for Salesforce Extensions for VS Code
23 lines (22 loc) • 1.07 kB
TypeScript
import { TerminalView, Workbench } from 'vscode-extension-tester';
/**
* Gets the terminal view from the workbench
* @param workbench - The VSCode workbench instance
* @returns A promise that resolves to the terminal view
*/
export declare function getTerminalView(workbench: Workbench): Promise<TerminalView>;
/**
* Gets the text content from the terminal view
* @param workbench - The VSCode workbench instance
* @param seconds - Number of seconds to wait before getting the text (allows time for terminal output)
* @returns A promise that resolves to the text content of the terminal
*/
export declare function getTerminalViewText(workbench: Workbench, seconds: number): Promise<string>;
/**
* Executes a command in the terminal
* @param workbench - The VSCode workbench instance
* @param command - The command to execute in the terminal
* @returns A promise that resolves to the terminal view
* @throws Error if the terminal view cannot be obtained
*/
export declare function executeCommand(workbench: Workbench, command: string): Promise<TerminalView>;