mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 09:35:37 -05:00
Fixes notebook integration tests + running parameterized notebook (#15107)
* fix interface * fix run all cells on new parameterized notebook * add getNotebookUri function
This commit is contained in:
@@ -9,8 +9,8 @@ import { IContentManager } from 'sql/workbench/services/notebook/browser/models/
|
||||
import { IStandardKernelWithProvider } from 'sql/workbench/services/notebook/browser/models/notebookUtils';
|
||||
|
||||
export interface INotebookInput {
|
||||
defaultKernel: azdata.nb.IKernelSpec,
|
||||
connectionProfile: azdata.IConnectionProfile,
|
||||
defaultKernel?: azdata.nb.IKernelSpec,
|
||||
connectionProfile?: azdata.IConnectionProfile,
|
||||
isDirty(): boolean;
|
||||
setDirty(boolean);
|
||||
readonly notebookUri: URI;
|
||||
@@ -22,12 +22,13 @@ export interface INotebookInput {
|
||||
}
|
||||
|
||||
export function isINotebookInput(value: any): value is INotebookInput {
|
||||
if (typeof value.defaultKernel === 'object' &&
|
||||
typeof value.connectionProfile === 'object' &&
|
||||
typeof value.isDirty === 'boolean' &&
|
||||
value.notebookUri instanceof URI &&
|
||||
if (
|
||||
(typeof value.defaultKernel === 'object' || value.defaultKernel === undefined) &&
|
||||
(typeof value.connectionProfile === 'object' || value.connectionProfile === undefined) &&
|
||||
typeof value.notebookUri === 'object' &&
|
||||
typeof value.isDirty === 'function' &&
|
||||
typeof value.layoutChanged === 'function' &&
|
||||
typeof value.editorOpenedTimestamp === 'number' &&
|
||||
typeof value.layoutChanged === 'object' &&
|
||||
typeof value.contentManager === 'object' &&
|
||||
typeof value.standardKernels === 'object') {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user