Notebook: Add smoke test for trusted notebooks (#13330)

* add smoke test for trusted notebooks

* change repo

* update trustNotebook method

* pr comment
This commit is contained in:
Lucy Zhang
2020-11-12 06:45:20 -08:00
committed by GitHub
parent 850422164c
commit 07df54ee61
2 changed files with 56 additions and 0 deletions

View File

@@ -40,5 +40,20 @@ export function setup() {
await app.workbench.sqlNotebook.waitForKernel('Python 3');
await app.workbench.sqlNotebook.waitForAllResults();
});
it('can open untrusted notebook, trust, save, and reopen trusted notebook', async function () {
const app = this.app as Application;
await app.workbench.sqlNotebook.openFile('untrusted.ipynb');
await app.workbench.sqlNotebook.waitForKernel('SQL');
await app.workbench.sqlNotebook.waitForNotTrustedIcon();
await app.workbench.sqlNotebook.trustNotebook();
await app.workbench.sqlNotebook.waitForTrustedIcon();
await app.workbench.quickaccess.runCommand('workbench.action.files.save');
await app.workbench.quickaccess.runCommand('workbench.action.closeActiveEditor');
await app.workbench.sqlNotebook.openFile('untrusted.ipynb');
await app.workbench.sqlNotebook.waitForTrustedIcon();
await app.workbench.quickaccess.runCommand('workbench.action.closeActiveEditor');
});
});
}