mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 17:23:56 -05:00
Notebooks: Add smoke test (#13196)
* add new smoketest * change repro * rename methods * add waitforallresults method * pr comment
This commit is contained in:
@@ -8,7 +8,6 @@ import { Application } from '../../../../../automation';
|
||||
export function setup() {
|
||||
describe('Notebook', () => {
|
||||
|
||||
|
||||
it('can open new notebook, configure Python, and execute one cell', async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.sqlNotebook.newUntitledNotebook();
|
||||
@@ -21,8 +20,25 @@ export function setup() {
|
||||
await app.workbench.sqlNotebook.waitForKernel('Python 3');
|
||||
|
||||
await app.workbench.sqlNotebook.runActiveCell();
|
||||
await app.workbench.sqlNotebook.waitForResults();
|
||||
await app.workbench.sqlNotebook.waitForActiveCellResults();
|
||||
});
|
||||
|
||||
it('can open ipynb file, run all, and save notebook with outputs', async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.sqlNotebook.openFile('hello.ipynb');
|
||||
await app.workbench.sqlNotebook.waitForKernel('Python 3');
|
||||
|
||||
await app.workbench.sqlNotebook.clearResults();
|
||||
await app.workbench.sqlNotebook.waitForAllResultsGone();
|
||||
await app.workbench.sqlNotebook.runAllCells();
|
||||
await app.workbench.sqlNotebook.waitForAllResults();
|
||||
|
||||
await app.workbench.quickaccess.runCommand('workbench.action.files.save');
|
||||
await app.workbench.quickaccess.runCommand('workbench.action.closeActiveEditor');
|
||||
|
||||
await app.workbench.sqlNotebook.openFile('hello.ipynb');
|
||||
await app.workbench.sqlNotebook.waitForKernel('Python 3');
|
||||
await app.workbench.sqlNotebook.waitForAllResults();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user