Files
azuredatastudio/test/automation/src/sql/taskPanel.ts
Lucy Zhang 2547754d0f Fix manage python packages smoke test (#19232)
* make sure cell is ran

* make sure dialog is gone before runing cell again

* ensure package is done installing

* show task panel

* remove comment

* pr comments

* pr comments

* add 7.0.0 package version
2022-05-04 06:19:51 -07:00

30 lines
1.1 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Code } from '../code';
import { QuickAccess } from '../quickaccess';
export class TaskPanel {
private static readonly taskPanelSelector = 'div.pane-body.task-history';
constructor(private code: Code, private quickAccess: QuickAccess) {
}
async showTaskPanel(): Promise<void> {
await this.quickAccess.runCommand('workbench.panel.tasks.view.focus');
}
/**
* Wait for the given task message in the task panel.
* @param task The task completed message.
* @param waitTime The amount of time to wait for the task to complete. By default, this is 1 minute.
*/
async waitForTaskComplete(task: string, waitTime: number = 600): Promise<void> {
await this.code.waitForElement(`${TaskPanel.taskPanelSelector} div.label[title="${task}"]`, undefined, waitTime);
}
}