mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
Add simple notebook smoke test (#12898)
* add simple notebook smoke test * add id for notebook dropdown elements
This commit is contained in:
39
test/automation/src/sql/configurePythonDialog.ts
Normal file
39
test/automation/src/sql/configurePythonDialog.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* 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 { Dialog } from './dialog';
|
||||
|
||||
const CONFIGURE_PYTHON_DIALOG_TITLE = 'Configure Python to run Python 3 kernel';
|
||||
|
||||
export class ConfigurePythonDialog extends Dialog {
|
||||
|
||||
constructor(code: Code) {
|
||||
super(CONFIGURE_PYTHON_DIALOG_TITLE, code);
|
||||
}
|
||||
|
||||
async waitForConfigurePythonDialog(): Promise<void> {
|
||||
await this.waitForNewDialog();
|
||||
}
|
||||
|
||||
async installPython(): Promise<void> {
|
||||
const dialog = '.modal .modal-dialog';
|
||||
await this.code.waitAndClick(dialog);
|
||||
|
||||
const newPythonInstallation = '.modal .modal-body input[aria-label="New Python installation"]';
|
||||
await this.code.waitAndClick(newPythonInstallation);
|
||||
|
||||
const nextButton = '.modal-dialog .modal-content .modal-footer .right-footer .footer-button a[aria-label="Next"][aria-disabled="false"]';
|
||||
await this.code.waitForElement(nextButton);
|
||||
await this.code.dispatchKeybinding('enter');
|
||||
|
||||
const installButton = '.modal-dialog .modal-content .modal-footer .right-footer .footer-button a[aria-label="Install"][aria-disabled="false"]';
|
||||
await this.code.waitForElement(installButton);
|
||||
await this.code.dispatchKeybinding('enter');
|
||||
|
||||
return this.waitForDialogGone();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user