@@ -7,8 +7,21 @@ import * as vscode from 'vscode';
77
88import { CLIENT_E2E_CONFIG } from '../client-e2e-config.interface' ;
99import { RunnerFunction } from '../runner.interface' ;
10+ import { CompareCellOutputs } from './helpers/compare-cells' ;
11+ import { ICompareCellOutputs } from './helpers/compare-cells.interface' ;
1012import { CompareNotebookJSONOutputs } from './helpers/compare-notebook-json-outputs' ;
1113
14+ /**
15+ * Types of outputs from cells that we expect to have
16+ */
17+ export const CELL_OUTPUT : ICompareCellOutputs [ ] = [
18+ {
19+ idx : 0 ,
20+ success : false ,
21+ mimeTypes : [ 'text/plain' ] ,
22+ } ,
23+ ] ;
24+
1225/**
1326 * Verifies we replace paths when we stop
1427 */
@@ -36,6 +49,34 @@ export const NotebooksReplaceCellPathsOnStop: RunnerFunction = async (init) => {
3649 // wait
3750 await Sleep ( CLIENT_E2E_CONFIG . DELAYS . PROBLEMS_NOTEBOOK ) ;
3851
52+ // compare cells
53+ await CompareCellOutputs ( nb , CELL_OUTPUT ) ;
54+
55+ /**
56+ * ==================================================================
57+ * Run all cells again and compare the outputs to make sure
58+ * we catch stopping right
59+ * ==================================================================
60+ */
61+
62+ // run all cells
63+ await vscode . commands . executeCommand ( VSCODE_COMMANDS . NOTEBOOK_RUN_ALL ) ;
64+
65+ // save to disk
66+ await nb . save ( ) ;
67+
68+ // wait
69+ await Sleep ( CLIENT_E2E_CONFIG . DELAYS . PROBLEMS_NOTEBOOK ) ;
70+
71+ // compare cells
72+ await CompareCellOutputs ( nb , CELL_OUTPUT ) ;
73+
74+ /**
75+ * ==================================================================
76+ * Make sure JSON paths match
77+ * ==================================================================
78+ */
79+
3980 // compare outputs
4081 await CompareNotebookJSONOutputs ( expectedUri , nbUri ) ;
4182
0 commit comments