Merge remote-tracking branch 'origin/main' into tyriar/116467_2
This commit is contained in:
commit
1e7fbfa767
|
@ -421,29 +421,6 @@ suite('Notebook API tests', function () {
|
|||
await saveFileAndCloseAll(resource);
|
||||
});
|
||||
|
||||
test.skip('change cell language', async function () {
|
||||
const resource = await createRandomFile('', undefined, '.vsctestnb');
|
||||
await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest');
|
||||
|
||||
assert.strictEqual(vscode.window.activeNotebookEditor?.document.cells[0].language, 'typescript');
|
||||
assert.strictEqual(vscode.window.activeNotebookEditor?.document.cells[0].cellKind, vscode.NotebookCellKind.Code);
|
||||
await withEvent(vscode.notebook.onDidChangeCellLanguage, async event => {
|
||||
await vscode.commands.executeCommand('notebook.cell.changeLanguage', { start: 0, end: 1 }, 'javascript');
|
||||
await event;
|
||||
assert.strictEqual(vscode.window.activeNotebookEditor?.document.cells[0].language, 'javascript');
|
||||
});
|
||||
|
||||
// switch to markdown will change the cell kind
|
||||
await withEvent(vscode.notebook.onDidChangeNotebookCells, async event => {
|
||||
await vscode.commands.executeCommand('notebook.cell.changeLanguage', { start: 0, end: 1 }, 'markdown');
|
||||
await event;
|
||||
assert.strictEqual(vscode.window.activeNotebookEditor?.document.cells[0].language, 'markdown');
|
||||
assert.strictEqual(vscode.window.activeNotebookEditor?.document.cells[0].cellKind, vscode.NotebookCellKind.Markdown);
|
||||
});
|
||||
|
||||
await saveAllFilesAndCloseAll(resource);
|
||||
});
|
||||
|
||||
test('edit API (replaceMetadata)', async function () {
|
||||
const resource = await createRandomFile('', undefined, '.vsctestnb');
|
||||
await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest');
|
||||
|
|
1
src/vs/vscode.proposed.d.ts
vendored
1
src/vs/vscode.proposed.d.ts
vendored
|
@ -1558,6 +1558,7 @@ declare module 'vscode' {
|
|||
}
|
||||
|
||||
// todo@API use openNotebookDOCUMENT to align with openCustomDocument etc?
|
||||
// todo@API rename to NotebookDocumentContentProvider
|
||||
export interface NotebookContentProvider {
|
||||
|
||||
readonly options?: NotebookDocumentContentOptions;
|
||||
|
|
Loading…
Reference in a new issue