mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
re #105735. no more udpateMetadata api.
This commit is contained in:
@@ -718,11 +718,17 @@ suite('notebook workflow', () => {
|
||||
|
||||
const cell = editor.document.cells[0];
|
||||
assert.equal(cell.outputs.length, 0);
|
||||
let metadataChangeEvent = getEventOncePromise<vscode.NotebookDocumentMetadataChangeEvent>(vscode.notebook.onDidChangeNotebookDocumentMetadata);
|
||||
editor.document.metadata.runnable = false;
|
||||
await metadataChangeEvent;
|
||||
|
||||
await vscode.commands.executeCommand('notebook.execute');
|
||||
assert.equal(cell.outputs.length, 0, 'should not execute'); // not runnable, didn't work
|
||||
|
||||
metadataChangeEvent = getEventOncePromise<vscode.NotebookDocumentMetadataChangeEvent>(vscode.notebook.onDidChangeNotebookDocumentMetadata);
|
||||
editor.document.metadata.runnable = true;
|
||||
await metadataChangeEvent;
|
||||
|
||||
await vscode.commands.executeCommand('notebook.execute');
|
||||
assert.equal(cell.outputs.length, 1, 'should execute'); // runnable, it worked
|
||||
|
||||
|
||||
Reference in New Issue
Block a user