Add Import smoke test (#15111)

* Add smoke test

* Add wait for service

* Also revert liveshare

* fixes

* Use custom extensions dir

* fix

* compile extensions

* Use build extensions dir

* test break

* revert

* revert yarn.lock

* Add comment

* Add comments
This commit is contained in:
Charles Gagnon
2021-04-14 08:43:45 -07:00
committed by GitHub
parent 5e8ac017a6
commit 5922047f6b
6 changed files with 43 additions and 8 deletions

View File

@@ -53,7 +53,8 @@ const opts = minimist(args, {
'wait-time',
'test-repo',
'screenshots',
'log'
'log',
'extensionsDir' // {{SQL CARBON EDIT}} Let callers control extensions dir for non-packaged extensions
],
boolean: [
'verbose',
@@ -67,8 +68,14 @@ const opts = minimist(args, {
const testRepoUrl = 'https://github.com/Microsoft/azuredatastudio-smoke-test-repo.git';
const workspacePath = path.join(testDataPath, 'azuredatastudio-smoke-test-repo');
const extensionsPath = path.join(testDataPath, 'extensions-dir');
mkdirp.sync(extensionsPath);
// {{SQL CARBON EDIT}} Let callers control extensions dir for non-packaged extensions
let extensionsPath = opts.extensionsDir;
if (!extensionsPath) {
extensionsPath = path.join(testDataPath, 'extensions-dir');
mkdirp.sync(extensionsPath);
}
console.log(`Using extensions dir : ${extensionsPath}`);
const screenshotsPath = opts.screenshots ? path.resolve(opts.screenshots) : null;
if (screenshotsPath) {

View File

@@ -0,0 +1,19 @@
/*---------------------------------------------------------------------------------------------
* 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('Import', () => {
it('Opening import wizard without connection opens connection dialog', async function () {
const app = this.app as Application;
await app.workbench.quickaccess.runCommand('Flat File Import: Import Wizard');
// Wait for the service to be downloaded and installed. This can take a while so set timeout to 5min (retryInterval default is 100ms)
await app.workbench.statusbar.waitForStatusbarText('', 'Flat File Import Service Started', 5 * 60 * 10);
await app.workbench.connectionDialog.waitForConnectionDialog();
});
});
}

View File

@@ -6,6 +6,7 @@
import { setup as setupQueryEditorTests, setupWeb as setupQueryEditorWebTests } from './areas/queryEditor/queryEditor.test';
import { setup as setupNotebookTests } from './areas/notebook/notebook.test';
import { setup as setupNotebookViewTests } from './areas/notebook/notebookView.test';
import { setup as setupImportTests } from './areas/import/import.test';
import { ApplicationOptions } from '../../../automation';
import * as yazl from 'yauzl';
import * as fs from 'fs';
@@ -21,6 +22,7 @@ export function main(isWeb: boolean = false): void {
}
setupNotebookTests();
setupNotebookViewTests();
setupImportTests();
}
/* eslint-disable no-sync */