UNPKG

@redhat-developer/page-objects

Version:

Page Object API implementation for a VS Code editor used by ExTester framework.

86 lines (85 loc) 3.13 kB
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License", destination); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { AbstractElement } from '../AbstractElement'; import { TitleBar } from '../menu/TitleBar'; import { SideBarView } from '../sidebar/SideBarView'; import { ActivityBar } from '../activityBar/ActivityBar'; import { StatusBar } from '../statusBar/StatusBar'; import { EditorView } from '../editor/EditorView'; import { BottomBarPanel } from '../bottomBar/BottomBarPanel'; import { Notification } from './Notification'; import { NotificationsCenter } from './NotificationsCenter'; import { QuickOpenBox } from './input/QuickOpenBox'; import { SettingsEditor } from '../editor/SettingsEditor'; import { InputBox } from './input/InputBox'; /** * Handler for general workbench related actions */ export declare class Workbench extends AbstractElement { constructor(); /** * Get a title bar handle */ getTitleBar(): TitleBar; /** * Get a side bar handle */ getSideBar(): SideBarView; /** * Get an activity bar handle */ getActivityBar(): ActivityBar; /** * Get a status bar handle */ getStatusBar(): StatusBar; /** * Get a bottom bar handle */ getBottomBar(): BottomBarPanel; /** * Get a handle for the editor view */ getEditorView(): EditorView; /** * Get all standalone notifications (notifications outside the notifications center) * @returns Promise resolving to array of Notification objects */ getNotifications(): Promise<Notification[]>; /** * Opens the notifications center * @returns Promise resolving to NotificationsCenter object */ openNotificationsCenter(): Promise<NotificationsCenter>; /** * Opens the settings editor * * @returns promise that resolves to a SettingsEditor instance */ openSettings(): Promise<SettingsEditor>; /** * Open the VS Code command line prompt * @returns Promise resolving to InputBox (vscode 1.44+) or QuickOpenBox (vscode up to 1.43) object */ openCommandPrompt(): Promise<QuickOpenBox | InputBox>; /** * Open the command prompt, type in a command and execute * @param command text of the command to be executed * @returns Promise resolving when the command prompt is confirmed */ executeCommand(command: string): Promise<void>; }