web smoke tests (#11280)

* distro

* renable web smoke

* add missing script

* update node version

* update node version everywhere

* ensure playwright drivers are installed

* fix screenshot capture

* try this

* rewrite connection dialog code

* fix permissions

* more wip

* replace more $ with ^

* revert changes

* refactor and revert more changes

* add screen shot functionality to playwright

* fix compile

* fix profiler compile

* don't run new files for web

* continue on error for web

* continue on error for web not normal

* revert some changes
This commit is contained in:
Anthony Dresser
2020-07-10 22:12:45 -07:00
committed by GitHub
parent e2b52b97c8
commit d2bdd2bace
16 changed files with 87 additions and 207 deletions

View File

@@ -7,19 +7,7 @@ import { Application } from '../../../../../automation';
export function setup() {
describe('Query Editor', () => {
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.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.run();
await app.workbench.queryEditor.waitForResults();
await app.workbench.quickaccess.runCommand('workbench.action.closeAllEditors');
});
setupWeb();
it('can new file, connect and execute', async function () {
const app = this.app as Application;
@@ -37,3 +25,18 @@ export function setup() {
});
});
}
export function setupWeb() {
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.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.run();
await app.workbench.queryEditor.waitForResults();
await app.workbench.quickaccess.runCommand('workbench.action.closeAllEditors');
});
}

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { setup as setupQueryEditorTests } from './areas/queryEditor/queryEditor.test';
import { setup as setupQueryEditorTests, setupWeb as setupQueryEditorWebTests } from './areas/queryEditor/queryEditor.test';
import { setup as setupNotebookTests } from './areas/notebook/notebook.test';
import { ApplicationOptions } from '../../../automation';
import * as yazl from 'yauzl';
@@ -12,12 +12,17 @@ import * as path from 'path';
import { request } from 'https';
import * as mkdirp from 'mkdirp';
export function main(): void {
setupQueryEditorTests();
export function main(isWeb: boolean = false): void {
if (isWeb) {
setupQueryEditorWebTests();
} else {
setupQueryEditorTests();
}
setupNotebookTests();
}
/* eslint-disable no-sync */
/* eslint-disable no-console */
const PLATFORM = '${PLATFORM}';
const RUNTIME = '${RUNTIME}';
const VERSION = '${VERSION}';
@@ -25,6 +30,7 @@ const VERSION = '${VERSION}';
const sqliteUrl = `https://github.com/anthonydresser/azuredatastudio-sqlite/releases/download/1.0.12/azuredatastudio-sqlite-${PLATFORM}-${RUNTIME}-${VERSION}.zip`;
export async function setup(app: ApplicationOptions): Promise<void> {
console.log('*** Downloading test extensions');
const requestUrl = sqliteUrl.replace(PLATFORM, process.platform).replace(RUNTIME, getRuntime(app.web || app.remote || false)).replace(VERSION, getVersion(app.web || app.remote || false));
const zip = await fetch(requestUrl);
if (!zip) {