Skip to content

Commit

Permalink
Remove profile dep
Browse files Browse the repository at this point in the history
  • Loading branch information
maryam-saeidi committed Dec 19, 2024
1 parent a3d3799 commit 2eb6c49
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
7 changes: 0 additions & 7 deletions packages/react/kibana_context/root/root_provider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,16 @@ import type { ExecutionContextStart } from '@kbn/core-execution-context-browser'
import { executionContextServiceMock } from '@kbn/core-execution-context-browser-mocks';
import { i18nServiceMock } from '@kbn/core-i18n-browser-mocks';
import { I18nStart } from '@kbn/core-i18n-browser';
import type { UserProfileService } from '@kbn/core-user-profile-browser';
import { userProfileServiceMock } from '@kbn/core-user-profile-browser-mocks';
import { KibanaRootContextProvider } from './root_provider';
import { I18nStart } from '@kbn/core-i18n-browser';

describe('KibanaRootContextProvider', () => {
let euiTheme: UseEuiTheme | undefined;
let i18nMock: I18nStart;
let userProfile: UserProfileService;
let executionContext: ExecutionContextStart;

beforeEach(() => {
euiTheme = undefined;
i18nMock = i18nServiceMock.createStartContract();
userProfile = userProfileServiceMock.createStart();
executionContext = executionContextServiceMock.createStartContract();
});

Expand Down Expand Up @@ -68,7 +63,6 @@ describe('KibanaRootContextProvider', () => {
const wrapper = mountWithIntl(
<KibanaRootContextProvider
i18n={i18nMock}
userProfile={userProfile}
executionContext={executionContext}
theme={{ theme$: of(coreTheme) }}
>
Expand All @@ -87,7 +81,6 @@ describe('KibanaRootContextProvider', () => {
const wrapper = mountWithIntl(
<KibanaRootContextProvider
i18n={i18nMock}
userProfile={userProfile}
executionContext={executionContext}
theme={{ theme$: coreTheme$ }}
>
Expand Down
7 changes: 1 addition & 6 deletions packages/react/kibana_context/root/root_provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ export const KibanaRootContextProvider: FC<PropsWithChildren<KibanaRootContextPr
);
return rootContextProvider;
} else {
const { theme, userProfile, globalStyles, colorMode, modify } = props;
return (
<KibanaEuiProvider {...{ theme, userProfile, globalStyles, colorMode, modify }}>
{rootContextProvider}
</KibanaEuiProvider>
);
return <KibanaEuiProvider {...props}>{rootContextProvider}</KibanaEuiProvider>;
}
};
2 changes: 0 additions & 2 deletions packages/react/kibana_context/root/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
"@kbn/core-i18n-browser",
"@kbn/core-base-common",
"@kbn/core-analytics-browser",
"@kbn/core-user-profile-browser",
"@kbn/core-user-profile-browser-mocks",
"@kbn/core-execution-context-browser",
"@kbn/core-execution-context-browser-mocks",
"@kbn/shared-ux-router"
Expand Down

0 comments on commit 2eb6c49

Please sign in to comment.