Fix URI encoding for connection provider calls (#15177)

* Fix URI encoding for connection provider calls

* Update distro
This commit is contained in:
Charles Gagnon
2021-04-20 11:40:32 -07:00
committed by GitHub
parent 556dd9d2b1
commit a82be2f014
6 changed files with 73 additions and 37 deletions

View File

@@ -26,20 +26,17 @@ export function setup() {
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 openAndRunNotebook(app, 'hello.ipynb');
});
await app.workbench.sqlNotebook.clearResults();
await app.workbench.sqlNotebook.waitForAllResultsGone();
await app.workbench.sqlNotebook.runAllCells();
await app.workbench.sqlNotebook.waitForAllResults();
it('can open ipynb file from path with spaces, run all, and save notebook with outputs', async function () {
const app = this.app as Application;
await openAndRunNotebook(app, 'helloWithSpaces.ipynb');
});
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();
it('can open ipynb file from path with escaped spaces, run all, and save notebook with outputs', async function () {
const app = this.app as Application;
await openAndRunNotebook(app, 'helloWithEscapedSpaces.ipynb');
});
it('can open untrusted notebook, trust, save, and reopen trusted notebook', async function () {
@@ -64,3 +61,20 @@ export function setup() {
});
});
}
async function openAndRunNotebook(app: Application, filename: string): Promise<void> {
await app.workbench.sqlNotebook.openFile(filename);
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(filename);
await app.workbench.sqlNotebook.waitForKernel('Python 3');
await app.workbench.sqlNotebook.waitForAllResults();
}