@salesforce/salesforcedx-vscode-test-tools
Version:
Test automation framework for Salesforce Extensions for VS Code
52 lines (51 loc) • 1.87 kB
TypeScript
import { WebDriver, Workbench } from 'vscode-extension-tester';
import { Duration } from '../core/miscellaneous';
import { PredicateWithTimeout } from '../testing/predicates';
/**
* Gets a reference to the VSCode workbench
* @returns The workbench instance for interacting with the VSCode UI
*/
export declare function getWorkbench(): Workbench;
/**
* Gets a reference to the WebDriver controlling the browser
* @returns The WebDriver instance used for browser automation
*/
export declare function getBrowser(): WebDriver;
/**
* Reloads the VSCode window
* @param predicateOrWait - Either a predicate with timeout or a duration to wait after reload
*/
export declare function reloadWindow(predicateOrWait?: PredicateWithTimeout | Duration): Promise<void>;
/**
* Closes the currently active editor tab
*/
export declare function closeCurrentEditor(): Promise<void>;
/**
* Closes all open editor tabs
*/
export declare function closeAllEditors(): Promise<void>;
/**
* Enables all VSCode extensions
*/
export declare function enableAllExtensions(): Promise<void>;
/**
* Opens the Explorer view in the Activity Bar
* @throws Error if the Explorer view cannot be opened
*/
export declare function showExplorerView(): Promise<void>;
/**
* Zooms the editor view in or out by a specified level
* @param zoomIn - Direction to zoom, either 'In' or 'Out'
* @param zoomLevel - Number of zoom steps to perform
* @param wait - Duration to wait between zoom operations
*/
export declare function zoom(zoomIn: 'In' | 'Out', zoomLevel: number, wait?: Duration): Promise<void>;
/**
* Resets the editor zoom level to the default
* @param wait - Duration to wait after resetting zoom
*/
export declare function zoomReset(wait?: Duration): Promise<void>;
/**
* Opens a new terminal in the bottom panel
*/
export declare function openNewTerminal(): Promise<void>;