Skip to content

Commit a6ae00a

Browse files
committed
add regression test for #106657
1 parent 863acba commit a6ae00a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

extensions/vscode-notebook-tests/src/notebook.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,24 @@ suite('regression', () => {
12281228
// await vscode.commands.executeCommand('workbench.action.closeAllEditors');
12291229
// });
12301230

1231+
test('#106657. Opening a notebook from markers view is broken ', async function () {
1232+
assertInitalState();
1233+
const resource = await createRandomFile('', undefined, 'first', '.vsctestnb');
1234+
await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest');
1235+
1236+
const document = vscode.notebook.activeNotebookEditor?.document!;
1237+
const [cell] = document.cells;
1238+
1239+
await saveAllFilesAndCloseAll(document.uri);
1240+
assert.strictEqual(vscode.notebook.activeNotebookEditor, undefined);
1241+
1242+
// opening a cell-uri opens a notebook editor
1243+
await vscode.commands.executeCommand('vscode.open', cell.uri);
1244+
1245+
assert.strictEqual(!!vscode.notebook.activeNotebookEditor, true);
1246+
// assert.strictEqual(vscode.notebook.activeNotebookEditor?.document.uri.toString(), resource.toString());
1247+
});
1248+
12311249
test('#97830, #97764. Support switch to other editor types', async function () {
12321250
assertInitalState();
12331251
const resource = await createRandomFile('', undefined, 'empty', '.vsctestnb');

0 commit comments

Comments
 (0)