mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-08 17:24:01 -05:00
Turn back on Notebook unit tests (#14237)
* Turn back on Notebook unit tests * Don't skip notebook tests * Remove done calls from tests
This commit is contained in:
@@ -55,7 +55,7 @@ suite('Notebook integration test suite', function () {
|
||||
assert(actualOutput2[0] === '1', `Expected result: 1, Actual: '${actualOutput2[0]}'`);
|
||||
});
|
||||
|
||||
test.skip('Sql NB multiple cells test', async function (done) {
|
||||
test('Sql NB multiple cells test', async function () {
|
||||
let notebook = await openNotebook(sqlNotebookMultipleCellsContent, sqlKernelMetadata, this.test.title + this.invocationCount++);
|
||||
await runCells(notebook);
|
||||
const expectedOutput0 = '(1 row affected)';
|
||||
@@ -82,10 +82,9 @@ suite('Notebook integration test suite', function () {
|
||||
assert(actualOutput2[0] === i.toString(), `Expected result: ${i.toString()}, Actual: '${actualOutput2[0]}'`);
|
||||
console.log('Sql multiple cells NB done');
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
||||
test.skip('Sql NB run cells above and below test', async function (done) {
|
||||
test('Sql NB run cells above and below test', async function () {
|
||||
let notebook = await openNotebook(sqlNotebookMultipleCellsContent, sqlKernelMetadata, this.test.title + this.invocationCount++);
|
||||
// When running all cells above a cell, ensure that only cells preceding current cell have output
|
||||
await runCells(notebook, true, undefined, notebook.document.cells[1]);
|
||||
@@ -100,24 +99,21 @@ suite('Notebook integration test suite', function () {
|
||||
assert(notebook.document.cells[0].contents.outputs.length === 0, `Expected length: '0', Actual: '${notebook.document.cells[0].contents.outputs.length}'`);
|
||||
assert(notebook.document.cells[1].contents.outputs.length === 3, `Expected length: '3', Actual: '${notebook.document.cells[1].contents.outputs.length}'`);
|
||||
assert(notebook.document.cells[2].contents.outputs.length === 3, `Expected length: '3', Actual: '${notebook.document.cells[2].contents.outputs.length}'`);
|
||||
done();
|
||||
});
|
||||
|
||||
test.skip('Clear cell output - SQL notebook', async function (done) {
|
||||
test('Clear cell output - SQL notebook', async function () {
|
||||
let notebook = await openNotebook(sqlNotebookContent, sqlKernelMetadata, this.test.title + this.invocationCount++);
|
||||
await runCell(notebook);
|
||||
await verifyClearOutputs(notebook);
|
||||
done();
|
||||
});
|
||||
|
||||
test.skip('Clear all outputs - SQL notebook', async function (done) {
|
||||
test('Clear all outputs - SQL notebook', async function () {
|
||||
let notebook = await openNotebook(sqlNotebookContent, sqlKernelMetadata, this.test.title + this.invocationCount++);
|
||||
await runCell(notebook);
|
||||
await verifyClearAllOutputs(notebook);
|
||||
done();
|
||||
});
|
||||
|
||||
test.skip('sql language test', async function (done) {
|
||||
test('sql language test', async function () {
|
||||
let language = 'sql';
|
||||
await cellLanguageTest(notebookContentForCellLanguageTest, this.test.title + this.invocationCount++, language, {
|
||||
'kernelspec': {
|
||||
@@ -130,10 +126,9 @@ suite('Notebook integration test suite', function () {
|
||||
'mimetype': ''
|
||||
}
|
||||
});
|
||||
done();
|
||||
});
|
||||
|
||||
test.skip('should not be dirty after saving notebook test', async function (done) {
|
||||
test('should not be dirty after saving notebook test', async function () {
|
||||
// Given a notebook that's been edited (in this case, open notebook runs the 1st cell and adds an output)
|
||||
let notebook = await openNotebook(sqlNotebookContent, sqlKernelMetadata, this.test.title);
|
||||
await runCell(notebook);
|
||||
@@ -166,7 +161,6 @@ suite('Notebook integration test suite', function () {
|
||||
await sleep(100);
|
||||
assert(saved === true, 'Expect save after edit to succeed');
|
||||
assert(notebook.document.isDirty === false, 'Notebook should not be dirty after 2nd save');
|
||||
done();
|
||||
});
|
||||
|
||||
if (process.env['RUN_PYTHON3_TEST'] === '1') {
|
||||
|
||||
Reference in New Issue
Block a user