mirror of
https://github.com/Microsoft/vscode
synced 2024-09-19 10:40:41 +00:00
make notebook integration test more stable, fixes https://github.com/microsoft/vscode/issues/118889
This commit is contained in:
parent
84fe402d65
commit
819cb01e0e
|
@ -67,4 +67,12 @@ suite('Notebook Editor', function () {
|
|||
assert.strictEqual(count1 + 1, count2);
|
||||
|
||||
});
|
||||
|
||||
test('Opening a notebook should fire activeNotebook event changed only once', async function () {
|
||||
const openedEditor = utils.asPromise(vscode.window.onDidChangeActiveNotebookEditor);
|
||||
const resource = await utils.createRandomFile(undefined, undefined, '.vsctestnb');
|
||||
const editor = await vscode.window.showNotebookDocument(resource);
|
||||
assert.ok(await openedEditor);
|
||||
assert.strictEqual(editor.document.uri.toString(), resource.toString());
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1132,12 +1132,8 @@ suite('Notebook API tests', function () {
|
|||
assert.strictEqual(document.cells[0].metadata.executionOrder, executionOrder);
|
||||
assert.strictEqual(document.cells[0].metadata.runState, vscode.NotebookCellRunState.Success);
|
||||
});
|
||||
test('Opening a notebook should fire activeNotebook event changed only once', async function () {
|
||||
const openedEditor = asPromise(vscode.window.onDidChangeActiveNotebookEditor);
|
||||
const resource = await createRandomFile('', undefined, '.vsctestnb');
|
||||
await vscode.notebook.openNotebookDocument(resource);
|
||||
assert.ok(await openedEditor);
|
||||
});
|
||||
|
||||
|
||||
|
||||
// });
|
||||
|
||||
|
|
Loading…
Reference in a new issue