@@ -350,11 +350,11 @@ suite("PowerShellNotebooks tests", () => {
350
350
// Allow some time to pass to render the Notebook
351
351
await utils . sleep ( 5000 ) ;
352
352
assert . strictEqual (
353
- vscode . notebook . activeNotebookEditor . document . uri . toString ( ) ,
353
+ vscode . window . activeNotebookEditor . document . uri . toString ( ) ,
354
354
notebookSimpleMixedComments . toString ( ) ) ;
355
355
356
356
// Save it as testFile.ps1 and reopen it using the feature.
357
- await notebookContentProvider . saveNotebookAs ( uri , vscode . notebook . activeNotebookEditor . document , null ) ;
357
+ await notebookContentProvider . saveNotebookAs ( uri , vscode . window . activeNotebookEditor . document , null ) ;
358
358
const newNotebook = await notebookContentProvider . openNotebook ( uri , { } ) ;
359
359
360
360
// Compare that saving as a file results in the same cell data as the existing one.
@@ -376,12 +376,12 @@ suite("PowerShellNotebooks tests", () => {
376
376
// Allow some time to pass to render the Notebook
377
377
await utils . sleep ( 5000 ) ;
378
378
assert . strictEqual (
379
- vscode . notebook . activeNotebookEditor . document . uri . toString ( ) ,
379
+ vscode . window . activeNotebookEditor . document . uri . toString ( ) ,
380
380
notebookBlockCommentsWithTextOnSameLine . toString ( ) ) ;
381
381
382
382
// Save it as testFile1.ps1
383
383
const contentOfBackingFileBefore = ( await vscode . workspace . fs . readFile ( notebookBlockCommentsWithTextOnSameLine ) ) . toString ( ) ;
384
- await notebookContentProvider . saveNotebookAs ( uri , vscode . notebook . activeNotebookEditor . document , null ) ;
384
+ await notebookContentProvider . saveNotebookAs ( uri , vscode . window . activeNotebookEditor . document , null ) ;
385
385
const contentOfBackingFileAfter = ( await vscode . workspace . fs . readFile ( uri ) ) . toString ( ) ;
386
386
387
387
// Verify that saving does not mutate result.
@@ -405,10 +405,10 @@ gci`,
405
405
406
406
test ( ".Notebook.ps1 files are opened automatically" , async ( ) => {
407
407
await vscode . commands . executeCommand ( "vscode.open" , notebookSimpleDotNotebook ) ;
408
- assert . strictEqual ( vscode . notebook . activeNotebookEditor . document . cells . length , 2 ) ;
409
- assert . strictEqual ( vscode . notebook . activeNotebookEditor . document . cells [ 0 ] . cellKind , vscode . CellKind . Markdown ) ;
410
- assert . strictEqual ( vscode . notebook . activeNotebookEditor . document . cells [ 0 ] . document . getText ( ) , "asdf" ) ;
411
- assert . strictEqual ( vscode . notebook . activeNotebookEditor . document . cells [ 1 ] . cellKind , vscode . CellKind . Code ) ;
412
- assert . strictEqual ( vscode . notebook . activeNotebookEditor . document . cells [ 1 ] . document . getText ( ) , "gci\n" ) ;
408
+ assert . strictEqual ( vscode . window . activeNotebookEditor . document . cells . length , 2 ) ;
409
+ assert . strictEqual ( vscode . window . activeNotebookEditor . document . cells [ 0 ] . cellKind , vscode . CellKind . Markdown ) ;
410
+ assert . strictEqual ( vscode . window . activeNotebookEditor . document . cells [ 0 ] . document . getText ( ) , "asdf" ) ;
411
+ assert . strictEqual ( vscode . window . activeNotebookEditor . document . cells [ 1 ] . cellKind , vscode . CellKind . Code ) ;
412
+ assert . strictEqual ( vscode . window . activeNotebookEditor . document . cells [ 1 ] . document . getText ( ) , "gci\n" ) ;
413
413
} ) . timeout ( 20000 ) ;
414
414
} ) ;
0 commit comments