mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-19 03:21:36 -04:00
Try to make smoke tests more stable (#15212)
* 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
This commit is contained in:
@@ -5,12 +5,13 @@
|
||||
|
||||
import { Code } from '../code';
|
||||
import { Dialog } from './dialog';
|
||||
import { NotificationToast } from './notificationToast';
|
||||
|
||||
const CONNECTION_DIALOG_TITLE = 'Connection';
|
||||
|
||||
export class ConnectionDialog extends Dialog {
|
||||
|
||||
constructor(code: Code) {
|
||||
constructor(code: Code, private notificationToast: NotificationToast) {
|
||||
super(CONNECTION_DIALOG_TITLE, code);
|
||||
}
|
||||
|
||||
@@ -30,8 +31,10 @@ export class ConnectionDialog extends Dialog {
|
||||
|
||||
private static readonly CONNECT_BUTTON_SELECTOR = '.modal .modal-footer a[aria-label="Connect"]:not(.disabled)';
|
||||
async connect(): Promise<void> {
|
||||
await this.notificationToast.closeNotificationToasts();
|
||||
|
||||
await this.code.waitAndClick(ConnectionDialog.CONNECT_BUTTON_SELECTOR);
|
||||
|
||||
return this.waitForDialogGone();
|
||||
await this.waitForDialogGone();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user