import { ChainablePromiseElement } from 'webdriverio'; import { SideBarView } from '../SideBarView.js'; import { ContextMenu } from '../../index.js'; import { ElementWithContextMenu, VSCodeLocatorMap, IPageDecorator, BasePage } from '../../utils.js'; import { ScmView as ScmViewLocators } from '../../../locators/1.73.0.js'; export interface ScmView extends IPageDecorator { } /** * Page object representing the Source Control view * * @category Sidebar */ export declare class ScmView extends SideBarView { /** * @private */ locatorKey: "ScmView"; /** * Get SCM provider (repository) by title * @param title name of the repository * @returns promise resolving to ScmProvider object */ getProvider(title?: string): Promise; /** * Get all SCM providers * @returns promise resolving to ScmProvider array */ getProviders(): Promise; /** * Initialize repository in the current folder if no SCM provider is found * @returns true if the action was completed succesfully, false if a provider already exists */ initializeRepository(): Promise; } export interface ScmProvider extends IPageDecorator { } /** * Page object representing a repository in the source control view * Maps roughly to a view section of the source control view * * @category Sidebar */ export declare class ScmProvider extends BasePage { view: ScmView; /** * @private */ locatorKey: "ScmView"; constructor(locators: VSCodeLocatorMap, element: ChainablePromiseElement, view: ScmView); /** * Get title of the scm provider */ getTitle(): Promise; /** * Get type of the scm provider (e.g. Git) */ getType(): Promise; /** * Find an action button for the SCM provider by title and click it. (e.g 'Commit') * @param title Title of the action button to click * @returns true if the given action could be performed, false if the button doesn't exist */ takeAction(title: string): Promise; /** * Open a context menu using the 'More Actions...' button * @returns Promise resolving to a ContextMenu object */ openMoreActions(): Promise; /** * Fill in the message field and send ctrl/cmd + enter to commit the changes * @param message the commit message to use * @returns promise resolving once the keypresses are sent */ commitChanges(message: string): Promise; /** * Get page objects for all tree items representing individual changes * @param staged when true, finds staged changes otherwise finds unstaged changes * @returns promise resolving to ScmChange object array */ getChanges(staged?: boolean): Promise; /** * Get the number of changes for a given section * @param staged when true, counts the staged changes, unstaged otherwise * @returns promise resolving to number of changes in the given subsection */ getChangeCount(staged?: boolean): Promise; } export interface ScmChange extends IPageDecorator { } /** * Page object representing a SCM change tree item * * @category Sidebar */ export declare class ScmChange extends ElementWithContextMenu { provider: ScmProvider; /** * @private */ locatorKey: "ScmView"; constructor(locators: VSCodeLocatorMap, row: ChainablePromiseElement, provider: ScmProvider); /** * Get label as a string */ getLabel(): Promise; /** * Get description as a string */ getDescription(): Promise; /** * Get the status string (e.g. 'Modified') */ getStatus(): Promise; /** * Find if the item is expanded * @returns promise resolving to true if change is expanded, to false otherwise */ isExpanded(): Promise; /** * Expand or collapse a change item if possible, only works for folders in hierarchical view mode * @param expand true to expand the item, false to collapse * @returns promise resolving to true if the item changed state, to false otherwise */ toggleExpand(expand: boolean): Promise; /** * Find and click an action button available to a given change tree item * @param title title of the action button (e.g 'Stage Changes') * @returns promise resolving to true if the action was performed successfully, * false if the given button does not exist */ takeAction(title: string): Promise; } export interface MoreAction extends IPageDecorator { } /** * More Action * * @category Sidebar */ export declare class MoreAction extends ElementWithContextMenu { scm: ScmProvider | ScmView; /** * @private */ locatorKey: "ScmView"; constructor(locators: VSCodeLocatorMap, scm: ScmProvider | ScmView); openContextMenu(): Promise; } //# sourceMappingURL=ScmView.d.ts.map