Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
  • Loading branch information
Hailong-am committed Jul 22, 2024
1 parent bb52213 commit f793f0e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/public/chrome/chrome_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export class ChromeService {
const helpExtension$ = new BehaviorSubject<ChromeHelpExtension | undefined>(undefined);
const breadcrumbs$ = new BehaviorSubject<ChromeBreadcrumb[]>([]);
const breadcrumbsEnricher$ = new BehaviorSubject<ChromeBreadcrumbEnricher | undefined>(
(breadcrumbs) => breadcrumbs
undefined
);
const badge$ = new BehaviorSubject<ChromeBadge | undefined>(undefined);
const customNavLink$ = new BehaviorSubject<ChromeNavLink | undefined>(undefined);
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/workspace/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { WorkspaceMenu } from './components/workspace_menu/workspace_menu';
import { getWorkspaceColumn } from './components/workspace_column';
import { DataSourceManagementPluginSetup } from '../../../plugins/data_source_management/public';
import {
enhanceBreadcrumbsWithUseCase,
enrichBreadcrumbsWithWorkspace,
filterWorkspaceConfigurableApps,
getFirstUseCaseOfFeatureConfigs,
isAppAccessibleInWorkspace,
Expand Down Expand Up @@ -459,7 +459,7 @@ export class WorkspacePlugin
this.registerGetStartedCardToNewHome(core, contentManagement);

// set breadcrumbs enricher for workspace
this.breadcrumbsSubscription = enhanceBreadcrumbsWithUseCase(core);
this.breadcrumbsSubscription = enrichBreadcrumbsWithWorkspace(core);
}
return {};
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/workspace/public/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ const isNotNull = <T extends unknown>(value: T | null): value is T => !!value;
export const getFirstUseCaseOfFeatureConfigs = (featureConfigs: string[]): string | undefined =>
featureConfigs.map(getUseCaseFromFeatureConfig).filter(isNotNull)[0];

export function enhanceBreadcrumbsWithUseCase(core: CoreStart) {
export function enrichBreadcrumbsWithWorkspace(core: CoreStart) {
return combineLatest([
core.workspaces.currentWorkspace$,
core.application.currentAppId$,
Expand Down

0 comments on commit f793f0e

Please sign in to comment.