Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions common/types/notebooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

export interface OptionsType {
baseUrl: string;
payload?: any;

Check warning on line 8 in common/types/notebooks.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
headers?: any;

Check warning on line 9 in common/types/notebooks.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
redirects?: number;
beforeRedirect?: any;

Check warning on line 11 in common/types/notebooks.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
redirected?: any;

Check warning on line 12 in common/types/notebooks.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
timeout?: number; // default: unlimited
maxBytes?: number; // default: unlimited
rejectUnauthorized?: boolean;
Expand Down Expand Up @@ -39,7 +39,7 @@
baselineTo: number;
};
source?: NoteBookSource;
filters?: Array<Record<string, any>>; // For phase 1, we only support DSL filter

Check warning on line 42 in common/types/notebooks.ts

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
summary?: string;
PPLFilters?: string[];
variables?: {
Expand Down Expand Up @@ -177,3 +177,7 @@
hypothesis: PERAgentHypothesisItem;
operation: 'CREATE' | 'REPLACE';
}

export interface NotebookComponentProps {
showPageHeader?: boolean;
}

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import {
notebookPutResponse,
runCodeBlockResponse,
} from '../../../../../test/notebooks_constants';
import { Notebook, NotebookProps } from '../notebook';
import { ClassicNotebook, ClassicNotebookProps } from '../classic_notebook';
import {
applicationServiceMock,
chromeServiceMock,
notificationServiceMock,
savedObjectsServiceMock,
Expand Down Expand Up @@ -138,7 +139,8 @@ jest.mock('../../../../../public/services', () => ({
})),
}));

const ContextAwareNotebook = (props: NotebookProps & { dataSourceEnabled?: boolean }) => {
const ContextAwareNotebook = (props: ClassicNotebookProps & { dataSourceEnabled?: boolean }) => {
const applicationMock = applicationServiceMock.createStartContract();
return (
<OpenSearchDashboardsContextProvider
services={{
Expand Down Expand Up @@ -170,13 +172,19 @@ const ContextAwareNotebook = (props: NotebookProps & { dataSourceEnabled?: boole
ParagraphComponent: () => <div data-test-subj="mock-paragraph" />,
}),
},
updateContext: jest.fn(),
findingService: {
initialize: jest.fn(),
application: {
...applicationMock,
capabilities: {
...applicationMock.capabilities,
investigation: {
...applicationMock.capabilities.investigation,
agenticFeaturesEnabled: true,
},
},
},
}}
>
<Notebook {...props} />
<ClassicNotebook {...props} />
</OpenSearchDashboardsContextProvider>
);
};
Expand All @@ -189,7 +197,7 @@ describe('<Notebook /> spec', () => {
const history = jest.fn() as any;
history.replace = jest.fn();
history.push = jest.fn();
const defaultProps: NotebookProps = {
const defaultProps: ClassicNotebookProps = {
openedNoteId: '458e1320-3f05-11ef-bd29-e58626f102c0',
showPageHeader: true,
};
Expand Down
Loading
Loading