Fix test failure

This commit is contained in:
Matt Bierner 2021-08-19 15:01:38 -07:00
parent 23760f5234
commit d4a6ce7171
No known key found for this signature in database
GPG key ID: 099C331567E11888
4 changed files with 11 additions and 8 deletions

View file

@ -752,8 +752,8 @@ export interface BaseCellRenderTemplate {
betweenCellToolbar: ToolBar;
focusIndicatorLeft: HTMLElement;
focusIndicatorRight: HTMLElement;
disposables: DisposableStore;
elementDisposables: DisposableStore;
readonly disposables: DisposableStore;
readonly elementDisposables: DisposableStore;
bottomCellContainer: HTMLElement;
currentRenderedCell?: ICellViewModel;
statusBar: CellEditorStatusBar;

View file

@ -514,7 +514,7 @@ export class CellOutputContainer extends Disposable {
constructor(
private notebookEditor: INotebookEditor,
private viewCell: CodeCellViewModel,
private templateData: CodeCellRenderTemplate,
private readonly templateData: CodeCellRenderTemplate,
private options: { limit: number; },
@IOpenerService private readonly openerService: IOpenerService,
@IInstantiationService private readonly instantiationService: IInstantiationService,

View file

@ -31,9 +31,9 @@ export class CodeCell extends Disposable {
private _renderedOutputCollapseState: boolean | undefined;
constructor(
private notebookEditor: IActiveNotebookEditor,
private viewCell: CodeCellViewModel,
private templateData: CodeCellRenderTemplate,
private readonly notebookEditor: IActiveNotebookEditor,
private readonly viewCell: CodeCellViewModel,
private readonly templateData: CodeCellRenderTemplate,
@IInstantiationService private readonly instantiationService: IInstantiationService,
@INotebookCellStatusBarService readonly notebookCellStatusBarService: INotebookCellStatusBarService,
@IKeybindingService readonly keybindingService: IKeybindingService,

View file

@ -5,6 +5,7 @@
import * as assert from 'assert';
import * as DOM from 'vs/base/browser/dom';
import { DisposableStore } from 'vs/base/common/lifecycle';
import { mock } from 'vs/base/test/common/mock';
import { IMenuService } from 'vs/platform/actions/common/actions';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
@ -95,7 +96,8 @@ suite('NotebookViewModel Outputs', async () => {
getContentHeight: () => {
return 100;
}
}
},
disposables: new DisposableStore(),
} as unknown as CodeCellRenderTemplate, { limit: 5 }, openerService, instantiationService);
container.render(100);
assert.strictEqual(container.renderedOutputEntries.length, 4);
@ -173,7 +175,8 @@ suite('NotebookViewModel Outputs', async () => {
getContentHeight: () => {
return 100;
}
}
},
disposables: new DisposableStore(),
} as unknown as CodeCellRenderTemplate, { limit: 5 }, openerService, instantiationService);
container.render(100);
assert.strictEqual(container.renderedOutputEntries.length, 5);