@@ -9,6 +9,7 @@ import * as sinon from 'sinon';
9
9
import { commands , Uri } from 'vscode' ;
10
10
import { ICommandManager , IVSCodeNotebook } from '../../../client/common/application/types' ;
11
11
import { IDisposable } from '../../../client/common/types' ;
12
+ import { JupyterNotebookView } from '../../../client/datascience/notebook/constants' ;
12
13
import { NotebookEditor } from '../../../client/datascience/notebook/notebookEditor' ;
13
14
import { INotebookEditorProvider } from '../../../client/datascience/types' ;
14
15
import { createEventHandler , IExtensionTestApi , waitForCondition } from '../../common' ;
@@ -125,7 +126,7 @@ suite('DataScience - VSCode Notebook', function () {
125
126
await modelDisposed . assertFired ( ) ;
126
127
} ) ;
127
128
test ( 'Opening an nb multiple times will result in a single (our) INotebookEditor being created' , async ( ) => {
128
- await commandManager . executeCommand ( 'vscode.open ' , Uri . file ( templateIPynb ) ) ;
129
+ await commandManager . executeCommand ( 'vscode.openWith ' , Uri . file ( templateIPynb ) , JupyterNotebookView ) ;
129
130
await waitForCondition ( async ( ) => ! ! editorProvider . activeEditor , 2_000 , 'Editor not created' ) ;
130
131
131
132
// Open a duplicate editor.
@@ -137,7 +138,7 @@ suite('DataScience - VSCode Notebook', function () {
137
138
assert . lengthOf ( editorProvider . editors , 1 ) ;
138
139
} ) ;
139
140
test ( 'Closing one of the duplicate notebooks will not dispose (our) INotebookEditor until all VSC Editors are closed' , async ( ) => {
140
- await commandManager . executeCommand ( 'vscode.open ' , Uri . file ( templateIPynb ) ) ;
141
+ await commandManager . executeCommand ( 'vscode.openWith ' , Uri . file ( templateIPynb ) , JupyterNotebookView ) ;
141
142
await waitForCondition ( async ( ) => ! ! editorProvider . activeEditor , 2_000 , 'Editor not created' ) ;
142
143
143
144
const editorDisposed = createEventHandler ( editorProvider . activeEditor ! , 'closed' , disposables ) ;
@@ -221,7 +222,7 @@ suite('DataScience - VSCode Notebook', function () {
221
222
assert . isUndefined ( editorProvider . activeEditor ) ;
222
223
assert . equal ( editorProvider . editors . length , 0 ) ;
223
224
224
- await commandManager . executeCommand ( 'vscode.open ' , testIPynb ) ;
225
+ await commandManager . executeCommand ( 'vscode.openWith ' , testIPynb , JupyterNotebookView ) ;
225
226
226
227
assert . equal ( editorProvider . editors . length , 1 ) ;
227
228
assert . isOk ( vscodeNotebook . activeNotebookEditor ) ;
@@ -232,7 +233,7 @@ suite('DataScience - VSCode Notebook', function () {
232
233
assert . isUndefined ( editorProvider . activeEditor ) ;
233
234
assert . equal ( editorProvider . editors . length , 0 ) ;
234
235
235
- await commandManager . executeCommand ( 'vscode.open ' , testIPynb ) ;
236
+ await commandManager . executeCommand ( 'vscode.openWith ' , testIPynb , JupyterNotebookView ) ;
236
237
237
238
assert . equal ( editorProvider . editors . length , 1 ) ;
238
239
assert . isOk ( vscodeNotebook . activeNotebookEditor ) ;
@@ -295,7 +296,7 @@ suite('DataScience - VSCode Notebook', function () {
295
296
await activeNotebookChanged . assertFiredExactly ( 1 ) ;
296
297
297
298
// Open another notebook.
298
- await commandManager . executeCommand ( 'vscode.open ' , testIPynb ) ;
299
+ await commandManager . executeCommand ( 'vscode.openWith ' , testIPynb , JupyterNotebookView ) ;
299
300
300
301
await notebookOpened . assertFiredExactly ( 2 ) ;
301
302
await activeNotebookChanged . assertFiredExactly ( 2 ) ;
0 commit comments