Add units tests for Notebook Actions (#8595)

This commit is contained in:
Cory Rivera
2019-12-09 15:37:40 -08:00
committed by GitHub
parent 4fc6f4a13e
commit 184d4bbe27
6 changed files with 327 additions and 117 deletions

View File

@@ -5,7 +5,7 @@
import * as azdata from 'azdata';
import { Event } from 'vs/base/common/event';
import * as vsEvent from 'vs/base/common/event';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { URI } from 'vs/base/common/uri';
import { RenderMimeRegistry } from 'sql/workbench/contrib/notebook/browser/outputs/registry';
@@ -14,7 +14,7 @@ import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
import { NotebookInput } from 'sql/workbench/contrib/notebook/browser/models/notebookInput';
import { ISingleNotebookEditOperation } from 'sql/workbench/api/common/sqlExtHostTypes';
import { ICellModel, INotebookModel } from 'sql/workbench/contrib/notebook/browser/models/modelInterfaces';
import { NotebookChangeType } from 'sql/workbench/contrib/notebook/common/models/contracts';
import { NotebookChangeType, CellType } from 'sql/workbench/contrib/notebook/common/models/contracts';
import { IBootstrapParams } from 'sql/workbench/services/bootstrap/common/bootstrapParams';
export const SERVICE_ID = 'notebookService';
@@ -35,9 +35,9 @@ export interface ILanguageMagic {
export interface INotebookService {
_serviceBrand: undefined;
readonly onNotebookEditorAdd: Event<INotebookEditor>;
readonly onNotebookEditorRemove: Event<INotebookEditor>;
onNotebookEditorRename: Event<INotebookEditor>;
readonly onNotebookEditorAdd: vsEvent.Event<INotebookEditor>;
readonly onNotebookEditorRemove: vsEvent.Event<INotebookEditor>;
onNotebookEditorRename: vsEvent.Event<INotebookEditor>;
readonly isRegistrationComplete: boolean;
readonly registrationComplete: Promise<void>;
@@ -159,6 +159,7 @@ export interface INotebookEditor {
clearAllOutputs(): Promise<boolean>;
getSections(): INotebookSection[];
navigateToSection(sectionId: string): void;
addCell(cellType: CellType, index?: number, event?: Event);
}
export interface INavigationProvider {