@@ -876,25 +876,22 @@ suite('regression', () => {
876876 await vscode . commands . executeCommand ( 'vscode.openWith' , resource , 'default' ) ;
877877 assert . equal ( vscode . window . activeTextEditor ?. document . uri . path , resource . path ) ;
878878
879- await vscode . commands . executeCommand ( 'workbench.action.revertAndCloseActiveEditor' ) ;
880879 await vscode . commands . executeCommand ( 'workbench.action.closeAllEditors' ) ;
881880 } ) ;
882881
883882 // open text editor, pin, and then open a notebook
884883 test ( '#96105 - dirty editors' , async function ( ) {
885884 const resource = vscode . Uri . file ( join ( vscode . workspace . rootPath || '' , './empty.vsctestnb' ) ) ;
886885 await vscode . commands . executeCommand ( 'vscode.openWith' , resource , 'default' ) ;
887- await vscode . commands . executeCommand ( 'notebook.cell.insertCodeCellBelow' ) ;
888886 const edit = new vscode . WorkspaceEdit ( ) ;
889- edit . insert ( vscode . notebook . activeNotebookEditor ! . selection ! . uri , new vscode . Position ( 0 , 0 ) , 'var abc = 0;' ) ;
887+ edit . insert ( resource , new vscode . Position ( 0 , 0 ) , 'var abc = 0;' ) ;
890888 await vscode . workspace . applyEdit ( edit ) ;
891889
892890 // now it's dirty, open the resource with notebook editor should open a new one
893891 await vscode . commands . executeCommand ( 'vscode.openWith' , resource , 'notebookCoreTest' ) ;
894892 assert . notEqual ( vscode . notebook . activeNotebookEditor , undefined , 'notebook first' ) ;
895893 assert . notEqual ( vscode . window . activeTextEditor , undefined ) ;
896894
897- await vscode . commands . executeCommand ( 'workbench.action.revertAndCloseActiveEditor' ) ;
898895 await vscode . commands . executeCommand ( 'workbench.action.closeAllEditors' ) ;
899896 } ) ;
900897
0 commit comments