mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 17:19:01 +01:00
💄
This commit is contained in:
@@ -118,7 +118,7 @@ suite('API tests', () => {
|
||||
]
|
||||
});
|
||||
|
||||
const moveCellEvent = getEventOncePromise<vscode.NotebookCellMoveEvent>(vscode.notebook.onDidChangeNotebookCells);
|
||||
const moveCellEvent = getEventOncePromise<vscode.NotebookCellsChangeEvent>(vscode.notebook.onDidChangeNotebookCells);
|
||||
await vscode.commands.executeCommand('notebook.cell.moveUp');
|
||||
const moveCellEventRet = await moveCellEvent;
|
||||
assert.deepEqual(moveCellEventRet, {
|
||||
|
||||
@@ -50,6 +50,26 @@ export function smokeTestActivate(context: vscode.ExtensionContext): any {
|
||||
|
||||
return dto;
|
||||
},
|
||||
saveNotebook: async (_document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) => {
|
||||
return;
|
||||
},
|
||||
saveNotebookAs: async (_targetResource: vscode.Uri, _document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) => {
|
||||
return;
|
||||
}
|
||||
}));
|
||||
|
||||
context.subscriptions.push(vscode.notebook.registerNotebookKernel('notebookSmokeTest', ['*.vsctestnb'], {
|
||||
label: 'notebookSmokeTest',
|
||||
executeAllCells: async (_document: vscode.NotebookDocument) => {
|
||||
for (let i = 0; i < _document.cells.length; i++) {
|
||||
_document.cells[i].outputs = [{
|
||||
outputKind: vscode.CellOutputKind.Rich,
|
||||
data: {
|
||||
'text/html': ['test output']
|
||||
}
|
||||
}];
|
||||
}
|
||||
},
|
||||
executeCell: async (_document: vscode.NotebookDocument, _cell: vscode.NotebookCell | undefined, _token: vscode.CancellationToken) => {
|
||||
if (!_cell) {
|
||||
_cell = _document.cells[0];
|
||||
@@ -63,11 +83,5 @@ export function smokeTestActivate(context: vscode.ExtensionContext): any {
|
||||
}];
|
||||
return;
|
||||
},
|
||||
saveNotebook: async (_document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) => {
|
||||
return;
|
||||
},
|
||||
saveNotebookAs: async (_targetResource: vscode.Uri, _document: vscode.NotebookDocument, _cancellation: vscode.CancellationToken) => {
|
||||
return;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user