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:
Lucy Zhang
2021-04-27 16:53:17 -04:00
committed by GitHub
parent c66a8ca171
commit 7e1c0076ba
6 changed files with 61 additions and 9 deletions

View File

@@ -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();
}
}