mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-26 17:23:15 -05:00
* make sure dialog buttons are not disabled * use 'enter' to close connect dialog * retry clikcing the Connect button * wait for dialog gone after reclicking * pr comments + add logging * use debug to log * close toasts before clicking dialog buttons * await close notification toast call * click python wizard buttons instead of enter
28 lines
1.0 KiB
TypeScript
28 lines
1.0 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';
|
|
|
|
export class NotificationToast {
|
|
|
|
constructor(private readonly code: Code) { }
|
|
|
|
async closeNotificationToasts() {
|
|
const notificationToastSelector = 'div[class="notifications-toasts visible"]';
|
|
const notificationToastCloseButton = `a[class="action-label codicon codicon-notifications-clear"][role="button"]`;
|
|
let numberOfToasts = 0;
|
|
|
|
await this.code.waitForElements(notificationToastSelector, false, result => {
|
|
numberOfToasts = result.length;
|
|
return true;
|
|
});
|
|
|
|
for (let i = 0; i < numberOfToasts; i++) {
|
|
await this.code.waitAndClick(notificationToastSelector);
|
|
await this.code.waitAndClick(notificationToastCloseButton);
|
|
}
|
|
}
|
|
}
|