mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 01:25:37 -05:00
rewrite some automation; add notebook tests (#10853)
This commit is contained in:
15
test/smoke/src/sql/areas/notebook/notebook.test.ts
Normal file
15
test/smoke/src/sql/areas/notebook/notebook.test.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application } from '../../../../../automation';
|
||||
|
||||
export function setup() {
|
||||
describe('Notebook', () => {
|
||||
it('open ', async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.sqlNotebbok.openFile('hello.ipynb');
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -11,14 +11,14 @@ export function setup() {
|
||||
it('can open, connect and execute file', async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.quickaccess.openFile('test.sql');
|
||||
await app.workbench.queryEditor.commandBar.clickButton(3);
|
||||
await app.workbench.queryEditor.commandBar.connect();
|
||||
await app.workbench.connectionDialog.waitForConnectionDialog();
|
||||
await app.workbench.connectionDialog.setProvider('Sqlite');
|
||||
await app.workbench.connectionDialog.setTarget('File', 'chinook.db');
|
||||
await app.workbench.connectionDialog.connect();
|
||||
await app.workbench.queryEditor.commandBar.clickButton(1);
|
||||
await app.workbench.queryEditor.commandBar.run();
|
||||
await app.workbench.queryEditor.waitForResults();
|
||||
await app.workbench.quickaccess.runCommand('workbench.action.closeActiveEditor');
|
||||
await app.workbench.quickaccess.runCommand('workbench.action.closeAllEditors');
|
||||
});
|
||||
|
||||
it('can new file, connect and execute', async function () {
|
||||
@@ -26,14 +26,14 @@ export function setup() {
|
||||
await app.workbench.queryEditors.newUntitledQuery();
|
||||
const untitled = 'SQLQuery_1';
|
||||
await app.workbench.editor.waitForTypeInEditor(untitled, 'select * from employees');
|
||||
await app.workbench.queryEditor.commandBar.clickButton(3);
|
||||
await app.workbench.queryEditor.commandBar.connect();
|
||||
await app.workbench.connectionDialog.waitForConnectionDialog();
|
||||
await app.workbench.connectionDialog.setProvider('Sqlite');
|
||||
await app.workbench.connectionDialog.setTarget('File', 'chinook.db');
|
||||
await app.workbench.connectionDialog.connect();
|
||||
await app.workbench.queryEditor.commandBar.clickButton(1);
|
||||
await app.workbench.queryEditor.commandBar.run();
|
||||
await app.workbench.queryEditor.waitForResults();
|
||||
await app.workbench.quickaccess.runCommand('workbench.action.closeActiveEditor');
|
||||
await app.workbench.quickaccess.runCommand('workbench.action.closeAllEditors');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { setup as setupQueryEditorTest } from './areas/queryEditor/queryEditor.test';
|
||||
import { setup as setupQueryEditorTests } from './areas/queryEditor/queryEditor.test';
|
||||
import { setup as setupNotebookTests } from './areas/notebook/notebook.test';
|
||||
import { ApplicationOptions } from '../../../automation';
|
||||
import * as yazl from 'yauzl';
|
||||
import * as fs from 'fs';
|
||||
@@ -12,7 +13,8 @@ import { request } from 'https';
|
||||
import * as mkdirp from 'mkdirp';
|
||||
|
||||
export function main(): void {
|
||||
setupQueryEditorTest();
|
||||
setupQueryEditorTests();
|
||||
setupNotebookTests();
|
||||
}
|
||||
|
||||
/* eslint-disable no-sync */
|
||||
|
||||
Reference in New Issue
Block a user