mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Fix smoke tests not running (#18027)
* Bump sqlite for new electron version * distro * Fix tests * distro
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "azuredatastudio",
|
"name": "azuredatastudio",
|
||||||
"version": "1.35.0",
|
"version": "1.35.0",
|
||||||
"distro": "8a2c23c492956322639d994a215dd196d00cf016",
|
"distro": "8607d90cebf220aefaaf0998f87d5e9c746e48b0",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Microsoft Corporation"
|
"name": "Microsoft Corporation"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ after(async function () {
|
|||||||
await new Promise((c, e) => rimraf(testDataPath, { maxBusyTries: 10 }, err => err ? e(err) : c(undefined)));
|
await new Promise((c, e) => rimraf(testDataPath, { maxBusyTries: 10 }, err => err ? e(err) : c(undefined)));
|
||||||
});
|
});
|
||||||
|
|
||||||
sqlMain(opts.web);
|
sqlMain(opts);
|
||||||
|
|
||||||
if (screenshotsPath) {
|
if (screenshotsPath) {
|
||||||
afterEach(async function () {
|
afterEach(async function () {
|
||||||
|
|||||||
@@ -4,9 +4,13 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { Application } from '../../../../../automation';
|
import { Application } from '../../../../../automation';
|
||||||
|
import * as minimist from 'minimist';
|
||||||
|
import { afterSuite, beforeSuite } from '../../../utils';
|
||||||
|
|
||||||
export function setup() {
|
export function setup(opts: minimist.ParsedArgs) {
|
||||||
describe('Import', () => {
|
describe('Import', () => {
|
||||||
|
beforeSuite(opts);
|
||||||
|
afterSuite(opts);
|
||||||
|
|
||||||
it('Opening import wizard without connection opens connection dialog', async function () {
|
it('Opening import wizard without connection opens connection dialog', async function () {
|
||||||
const app = this.app as Application;
|
const app = this.app as Application;
|
||||||
|
|||||||
@@ -7,14 +7,17 @@ import { Application } from '../../../../../automation';
|
|||||||
import { promises as fs } from 'fs';
|
import { promises as fs } from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import { assert } from 'console';
|
import { assert } from 'console';
|
||||||
|
import * as minimist from 'minimist';
|
||||||
|
import { afterSuite, beforeSuite } from '../../../utils';
|
||||||
|
|
||||||
const AddRemoteBookCommand = 'Jupyter Books: Add Remote Jupyter Book';
|
const AddRemoteBookCommand = 'Jupyter Books: Add Remote Jupyter Book';
|
||||||
const JUPYTER_BOOK = 'CU';
|
const JUPYTER_BOOK = 'CU';
|
||||||
const VERSION = '1.0';
|
const VERSION = '1.0';
|
||||||
const LANGUAGE = 'EN';
|
const LANGUAGE = 'EN';
|
||||||
export function setup() {
|
export function setup(opts: minimist.ParsedArgs) {
|
||||||
|
|
||||||
describe('AddRemoteBookDialog', () => {
|
describe('AddRemoteBookDialog', () => {
|
||||||
|
beforeSuite(opts);
|
||||||
|
afterSuite(opts);
|
||||||
|
|
||||||
it.skip('can open remote book', async function () { // Skip until the rate limit issue can be fixed
|
it.skip('can open remote book', async function () { // Skip until the rate limit issue can be fixed
|
||||||
const app = this.app as Application;
|
const app = this.app as Application;
|
||||||
|
|||||||
@@ -9,13 +9,16 @@ import * as rimraf from 'rimraf';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import { assert } from 'console';
|
import { assert } from 'console';
|
||||||
import * as tmp from 'tmp';
|
import * as tmp from 'tmp';
|
||||||
|
import * as minimist from 'minimist';
|
||||||
|
import { afterSuite, beforeSuite } from '../../../utils';
|
||||||
|
|
||||||
const CreateBookCommand = 'Jupyter Books: Create Jupyter Book';
|
const CreateBookCommand = 'Jupyter Books: Create Jupyter Book';
|
||||||
const bookName = 'my-book';
|
const bookName = 'my-book';
|
||||||
|
|
||||||
export function setup() {
|
export function setup(opts: minimist.ParsedArgs) {
|
||||||
|
|
||||||
describe('CreateBookDialog', () => {
|
describe('CreateBookDialog', () => {
|
||||||
|
beforeSuite(opts);
|
||||||
|
afterSuite(opts);
|
||||||
|
|
||||||
let tmpDir = '';
|
let tmpDir = '';
|
||||||
it('can create new book with default content folder', async function () {
|
it('can create new book with default content folder', async function () {
|
||||||
|
|||||||
@@ -4,9 +4,13 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { Application } from '../../../../../automation';
|
import { Application } from '../../../../../automation';
|
||||||
|
import * as minimist from 'minimist';
|
||||||
|
import { afterSuite, beforeSuite } from '../../../utils';
|
||||||
|
|
||||||
export function setup() {
|
export function setup(opts: minimist.ParsedArgs) {
|
||||||
describe('Notebook', () => {
|
describe('Notebook', () => {
|
||||||
|
beforeSuite(opts);
|
||||||
|
afterSuite(opts);
|
||||||
|
|
||||||
it('can perform basic text cell functionality', async function () {
|
it('can perform basic text cell functionality', async function () {
|
||||||
const app = this.app as Application;
|
const app = this.app as Application;
|
||||||
|
|||||||
@@ -5,9 +5,14 @@
|
|||||||
|
|
||||||
import { assert } from 'console';
|
import { assert } from 'console';
|
||||||
import { Application } from '../../../../../automation';
|
import { Application } from '../../../../../automation';
|
||||||
|
import * as minimist from 'minimist';
|
||||||
|
import { afterSuite, beforeSuite } from '../../../utils';
|
||||||
|
|
||||||
export function setup() {
|
export function setup(opts: minimist.ParsedArgs) {
|
||||||
describe('NotebookView', () => {
|
describe('NotebookView', () => {
|
||||||
|
beforeSuite(opts);
|
||||||
|
afterSuite(opts);
|
||||||
|
|
||||||
it('Pin a notebook', async function () {
|
it('Pin a notebook', async function () {
|
||||||
const app = this.app as Application;
|
const app = this.app as Application;
|
||||||
await app.workbench.sqlNotebook.view.focusNotebooksView();
|
await app.workbench.sqlNotebook.view.focusNotebooksView();
|
||||||
|
|||||||
@@ -4,10 +4,12 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { Application } from '../../../../../automation';
|
import { Application } from '../../../../../automation';
|
||||||
|
import * as minimist from 'minimist';
|
||||||
|
import { afterSuite, beforeSuite } from '../../../utils';
|
||||||
|
|
||||||
export function setup() {
|
export function setup(opts: minimist.ParsedArgs) {
|
||||||
describe('Query Editor', () => {
|
describe('Query Editor', () => {
|
||||||
setupWeb();
|
setupCommonTests(opts);
|
||||||
|
|
||||||
it('can new file, connect and execute', async function () {
|
it('can new file, connect and execute', async function () {
|
||||||
const app = this.app as Application;
|
const app = this.app as Application;
|
||||||
@@ -27,7 +29,15 @@ export function setup() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setupWeb() {
|
export function setupWeb(opts: minimist.ParsedArgs) {
|
||||||
|
describe('Query Editor', () => {
|
||||||
|
setupCommonTests(opts);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function setupCommonTests(opts: minimist.ParsedArgs): void {
|
||||||
|
beforeSuite(opts);
|
||||||
|
afterSuite(opts);
|
||||||
afterEach(async function (): Promise<void> {
|
afterEach(async function (): Promise<void> {
|
||||||
const app = this.app as Application;
|
const app = this.app as Application;
|
||||||
await app.workbench.quickaccess.runCommand('workbench.action.closeAllEditors');
|
await app.workbench.quickaccess.runCommand('workbench.action.closeAllEditors');
|
||||||
|
|||||||
@@ -15,19 +15,20 @@ import * as fs from 'fs';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import { request } from 'https';
|
import { request } from 'https';
|
||||||
import * as mkdirp from 'mkdirp';
|
import * as mkdirp from 'mkdirp';
|
||||||
|
import * as minimist from 'minimist';
|
||||||
|
|
||||||
export function main(isWeb: boolean = false): void {
|
export function main(opts: minimist.ParsedArgs): void {
|
||||||
if (isWeb) {
|
if (opts.web) {
|
||||||
setupQueryEditorWebTests();
|
setupQueryEditorWebTests(opts);
|
||||||
setupNotebookViewTests();
|
setupNotebookViewTests(opts);
|
||||||
setupAddRemoteBookDialogTests();
|
setupAddRemoteBookDialogTests(opts);
|
||||||
} else {
|
} else {
|
||||||
setupQueryEditorTests();
|
setupQueryEditorTests(opts);
|
||||||
setupNotebookTests();
|
setupNotebookTests(opts);
|
||||||
setupNotebookViewTests();
|
setupNotebookViewTests(opts);
|
||||||
setupCreateBookDialogTests();
|
setupCreateBookDialogTests(opts);
|
||||||
setupAddRemoteBookDialogTests();
|
setupAddRemoteBookDialogTests(opts);
|
||||||
setupImportTests();
|
setupImportTests(opts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +43,7 @@ const sqliteUrl = `https://github.com/Microsoft/azuredatastudio-sqlite/releases/
|
|||||||
|
|
||||||
export async function setup(app: ApplicationOptions): Promise<void> {
|
export async function setup(app: ApplicationOptions): Promise<void> {
|
||||||
console.log('*** Downloading test extensions');
|
console.log('*** Downloading test extensions');
|
||||||
const releaseVersion = app.web ? '1.6.0' : '1.5.0';
|
const releaseVersion = '1.7.0';
|
||||||
const requestUrl = sqliteUrl.replace(RELEASE_VERSION, releaseVersion).replace(PLATFORM, process.platform).replace(RUNTIME, getRuntime(app.web || app.remote || false)).replace(VERSION, getVersion(app.web || app.remote || false));
|
const requestUrl = sqliteUrl.replace(RELEASE_VERSION, releaseVersion).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);
|
const zip = await fetch(requestUrl);
|
||||||
if (!zip) {
|
if (!zip) {
|
||||||
|
|||||||
Reference in New Issue
Block a user