From 796c4e3dd15257726a2cd0aa5d8a5bb22fedceee Mon Sep 17 00:00:00 2001 From: pgayvallet Date: Wed, 17 Nov 2021 13:57:00 +0100 Subject: [PATCH] fix more test usages --- .../management/api_keys/api_keys_management_app.test.tsx | 3 ++- .../role_mappings/role_mappings_management_app.test.tsx | 3 ++- .../public/management/roles/roles_management_app.test.tsx | 3 ++- .../public/management/users/users_management_app.test.tsx | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/security/public/management/api_keys/api_keys_management_app.test.tsx b/x-pack/plugins/security/public/management/api_keys/api_keys_management_app.test.tsx index 922fd59c56d1b..83fe807f9a3c6 100644 --- a/x-pack/plugins/security/public/management/api_keys/api_keys_management_app.test.tsx +++ b/x-pack/plugins/security/public/management/api_keys/api_keys_management_app.test.tsx @@ -11,7 +11,7 @@ jest.mock('./api_keys_grid', () => ({ import { act } from '@testing-library/react'; -import { coreMock, scopedHistoryMock } from 'src/core/public/mocks'; +import { coreMock, scopedHistoryMock, themeServiceMock } from 'src/core/public/mocks'; import type { Unmount } from 'src/plugins/management/public/types'; import { securityMock } from '../../mocks'; @@ -52,6 +52,7 @@ describe('apiKeysManagementApp', () => { element: container, setBreadcrumbs, history: scopedHistoryMock.create(), + theme$: themeServiceMock.createTheme$(), }); }); diff --git a/x-pack/plugins/security/public/management/role_mappings/role_mappings_management_app.test.tsx b/x-pack/plugins/security/public/management/role_mappings/role_mappings_management_app.test.tsx index f6d17327b7118..c6119caa44732 100644 --- a/x-pack/plugins/security/public/management/role_mappings/role_mappings_management_app.test.tsx +++ b/x-pack/plugins/security/public/management/role_mappings/role_mappings_management_app.test.tsx @@ -8,7 +8,7 @@ import { act } from '@testing-library/react'; import { noop } from 'lodash'; -import { coreMock, scopedHistoryMock } from 'src/core/public/mocks'; +import { coreMock, scopedHistoryMock, themeServiceMock } from 'src/core/public/mocks'; import type { Unmount } from 'src/plugins/management/public/types'; import { roleMappingsManagementApp } from './role_mappings_management_app'; @@ -46,6 +46,7 @@ async function mountApp(basePath: string, pathname: string) { element: container, setBreadcrumbs, history: scopedHistoryMock.create({ pathname }), + theme$: themeServiceMock.createTheme$(), }); }); diff --git a/x-pack/plugins/security/public/management/roles/roles_management_app.test.tsx b/x-pack/plugins/security/public/management/roles/roles_management_app.test.tsx index faab47a858d67..007c3e306372e 100644 --- a/x-pack/plugins/security/public/management/roles/roles_management_app.test.tsx +++ b/x-pack/plugins/security/public/management/roles/roles_management_app.test.tsx @@ -8,7 +8,7 @@ import { act } from '@testing-library/react'; import { noop } from 'lodash'; -import { coreMock, scopedHistoryMock } from 'src/core/public/mocks'; +import { coreMock, scopedHistoryMock, themeServiceMock } from 'src/core/public/mocks'; import type { Unmount } from 'src/plugins/management/public/types'; import { featuresPluginMock } from '../../../../features/public/mocks'; @@ -48,6 +48,7 @@ async function mountApp(basePath: string, pathname: string) { element: container, setBreadcrumbs, history: scopedHistoryMock.create({ pathname }), + theme$: themeServiceMock.createTheme$(), }); }); diff --git a/x-pack/plugins/security/public/management/users/users_management_app.test.tsx b/x-pack/plugins/security/public/management/users/users_management_app.test.tsx index f25fb211cb9de..84a6e82bf12ae 100644 --- a/x-pack/plugins/security/public/management/users/users_management_app.test.tsx +++ b/x-pack/plugins/security/public/management/users/users_management_app.test.tsx @@ -8,7 +8,7 @@ import { act } from '@testing-library/react'; import { noop } from 'lodash'; -import { coreMock, scopedHistoryMock } from 'src/core/public/mocks'; +import { coreMock, scopedHistoryMock, themeServiceMock } from 'src/core/public/mocks'; import type { Unmount } from 'src/plugins/management/public/types'; import { securityMock } from '../../mocks'; @@ -33,6 +33,7 @@ describe('usersManagementApp', () => { element, setBreadcrumbs, history, + theme$: themeServiceMock.createTheme$(), }); });