提交 f096f594 编写于 作者: J Johannes Rieken

refine test for https://github.com/microsoft/vscode/issues/106657 and document...

refine test for https://github.com/microsoft/vscode/issues/106657 and document issue with fragments and the editor opener
上级 98ee3762
......@@ -1240,10 +1240,29 @@ suite('regression', () => {
assert.strictEqual(vscode.notebook.activeNotebookEditor, undefined);
// opening a cell-uri opens a notebook editor
await vscode.commands.executeCommand('vscode.open', cell.uri);
await vscode.commands.executeCommand('vscode.open', cell.uri, vscode.ViewColumn.Active);
assert.strictEqual(!!vscode.notebook.activeNotebookEditor, true);
// assert.strictEqual(vscode.notebook.activeNotebookEditor?.document.uri.toString(), resource.toString());
assert.strictEqual(vscode.notebook.activeNotebookEditor?.document.uri.toString(), resource.toString());
});
test('Cannot open notebook from cell-uri with vscode.open-command', async function () {
this.skip();
assertInitalState();
const resource = await createRandomFile('', undefined, 'first', '.vsctestnb');
await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest');
const document = vscode.notebook.activeNotebookEditor?.document!;
const [cell] = document.cells;
await saveAllFilesAndCloseAll(document.uri);
assert.strictEqual(vscode.notebook.activeNotebookEditor, undefined);
// BUG is that the editor opener (https://github.com/microsoft/vscode/blob/8e7877bdc442f1e83a7fec51920d82b696139129/src/vs/editor/browser/services/openerService.ts#L69)
// removes the fragment if it matches something numeric. For notebooks that's not wanted...
await vscode.commands.executeCommand('vscode.open', cell.uri);
assert.strictEqual(vscode.notebook.activeNotebookEditor?.document.uri.toString(), resource.toString());
});
test('#97830, #97764. Support switch to other editor types', async function () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册