mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -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:
@@ -46,8 +46,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- template: linux/sql-product-build-linux.yml
|
- template: linux/sql-product-build-linux.yml
|
||||||
parameters:
|
parameters:
|
||||||
# extensionsToUnitTest: ["admin-tool-ext-win", "agent", "azdata", "azurecore", "cms", "dacpac", "import", "schema-compare", "notebook", "resource-deployment", "machine-learning", "sql-database-projects", "data-workspace"]
|
extensionsToUnitTest: ["admin-tool-ext-win", "agent", "azdata", "azurecore", "cms", "dacpac", "import", "schema-compare", "notebook", "resource-deployment", "machine-learning", "sql-database-projects", "data-workspace"]
|
||||||
extensionsToUnitTest: ["admin-tool-ext-win", "agent", "azdata", "azurecore", "cms", "dacpac", "import", "schema-compare", "resource-deployment", "machine-learning", "sql-database-projects", "data-workspace"]
|
|
||||||
timeoutInMinutes: 70
|
timeoutInMinutes: 70
|
||||||
|
|
||||||
- job: LinuxWeb
|
- job: LinuxWeb
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ suite('Notebook integration test suite', function () {
|
|||||||
assert(actualOutput2[0] === '1', `Expected result: 1, Actual: '${actualOutput2[0]}'`);
|
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++);
|
let notebook = await openNotebook(sqlNotebookMultipleCellsContent, sqlKernelMetadata, this.test.title + this.invocationCount++);
|
||||||
await runCells(notebook);
|
await runCells(notebook);
|
||||||
const expectedOutput0 = '(1 row affected)';
|
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]}'`);
|
assert(actualOutput2[0] === i.toString(), `Expected result: ${i.toString()}, Actual: '${actualOutput2[0]}'`);
|
||||||
console.log('Sql multiple cells NB done');
|
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++);
|
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
|
// 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]);
|
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[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[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}'`);
|
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++);
|
let notebook = await openNotebook(sqlNotebookContent, sqlKernelMetadata, this.test.title + this.invocationCount++);
|
||||||
await runCell(notebook);
|
await runCell(notebook);
|
||||||
await verifyClearOutputs(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++);
|
let notebook = await openNotebook(sqlNotebookContent, sqlKernelMetadata, this.test.title + this.invocationCount++);
|
||||||
await runCell(notebook);
|
await runCell(notebook);
|
||||||
await verifyClearAllOutputs(notebook);
|
await verifyClearAllOutputs(notebook);
|
||||||
done();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test.skip('sql language test', async function (done) {
|
test('sql language test', async function () {
|
||||||
let language = 'sql';
|
let language = 'sql';
|
||||||
await cellLanguageTest(notebookContentForCellLanguageTest, this.test.title + this.invocationCount++, language, {
|
await cellLanguageTest(notebookContentForCellLanguageTest, this.test.title + this.invocationCount++, language, {
|
||||||
'kernelspec': {
|
'kernelspec': {
|
||||||
@@ -130,10 +126,9 @@ suite('Notebook integration test suite', function () {
|
|||||||
'mimetype': ''
|
'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)
|
// 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);
|
let notebook = await openNotebook(sqlNotebookContent, sqlKernelMetadata, this.test.title);
|
||||||
await runCell(notebook);
|
await runCell(notebook);
|
||||||
@@ -166,7 +161,6 @@ suite('Notebook integration test suite', function () {
|
|||||||
await sleep(100);
|
await sleep(100);
|
||||||
assert(saved === true, 'Expect save after edit to succeed');
|
assert(saved === true, 'Expect save after edit to succeed');
|
||||||
assert(notebook.document.isDirty === false, 'Notebook should not be dirty after 2nd save');
|
assert(notebook.document.isDirty === false, 'Notebook should not be dirty after 2nd save');
|
||||||
done();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (process.env['RUN_PYTHON3_TEST'] === '1') {
|
if (process.env['RUN_PYTHON3_TEST'] === '1') {
|
||||||
|
|||||||
Reference in New Issue
Block a user