Skip to content

Commit

Permalink
Cases-visualizations test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Apr 5, 2024
1 parent 53edd51 commit 5c69f2c
Showing 1 changed file with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,16 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import type { CoreTheme, PublicAppInfo } from '@kbn/core/public';
import { BehaviorSubject, of } from 'rxjs';
import type { TypedLensByValueInput } from '@kbn/lens-plugin/public';
import { createBrowserHistory } from 'history';
import type { CasesUIActionProps } from './types';

const mockTheme: CoreTheme = {
darkMode: false,
};
import { createBrowserHistory } from 'history';
import { BehaviorSubject } from 'rxjs';

const createThemeMock = (): CoreTheme => {
return { ...mockTheme };
};
import type { PublicAppInfo } from '@kbn/core/public';
import { coreMock } from '@kbn/core/public/mocks';
import type { TypedLensByValueInput } from '@kbn/lens-plugin/public';
import type { CasesUIActionProps } from './types';

export const createTheme$Mock = () => {
return of(createThemeMock());
};
const coreStart = coreMock.createStart();

export class MockEmbeddable {
public type;
Expand Down Expand Up @@ -76,8 +69,8 @@ export const getMockApplications$ = () =>

export const getMockCaseUiActionProps = () => {
const core = {
...coreStart,
application: { currentAppId$: getMockCurrentAppId$(), capabilities: {} },
theme: { theme$: createTheme$Mock() },
uiSettings: {
get: jest.fn().mockReturnValue(true),
},
Expand Down

0 comments on commit 5c69f2c

Please sign in to comment.