mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Serverless] Improve fleet and integrations serverless breadcrumbs (#169772)
## Summary This fixes deeper context breadcrumbs in serverless navigation for fleet and integration apps. This builds on top of https://github.com/elastic/kibana/pull/169513 where we added merging of navigational project breadcrumbs with deeper context breadcrumbs set by `chrome.setBreadcrumbs`. The merging is based on `deepLinkId`, so we're adding it to base breadcrumbs. The `deepLinkId` is type checked. Example Before/After: Before:   After:  
This commit is contained in:
parent
1fdcb41f29
commit
f378b87cad
3 changed files with 18 additions and 0 deletions
|
@ -24,6 +24,7 @@ const BASE_BREADCRUMB: Breadcrumb = {
|
|||
text: i18n.translate('xpack.fleet.breadcrumbs.appTitle', {
|
||||
defaultMessage: 'Fleet',
|
||||
}),
|
||||
deepLinkId: 'fleet',
|
||||
};
|
||||
|
||||
const INTEGRATIONS_BASE_BREADCRUMB: Breadcrumb = {
|
||||
|
@ -32,6 +33,7 @@ const INTEGRATIONS_BASE_BREADCRUMB: Breadcrumb = {
|
|||
defaultMessage: 'Integrations',
|
||||
}),
|
||||
useIntegrationsBasePath: true,
|
||||
deepLinkId: 'integrations',
|
||||
};
|
||||
|
||||
const breadcrumbGetters: {
|
||||
|
|
|
@ -19,6 +19,7 @@ const BASE_BREADCRUMB: ChromeBreadcrumb = {
|
|||
text: i18n.translate('xpack.fleet.breadcrumbs.integrationsAppTitle', {
|
||||
defaultMessage: 'Integrations',
|
||||
}),
|
||||
deepLinkId: 'integrations',
|
||||
};
|
||||
|
||||
const breadcrumbGetters: {
|
||||
|
|
|
@ -128,5 +128,20 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {
|
|||
});
|
||||
await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Cases', 'Settings']);
|
||||
});
|
||||
|
||||
it('navigates to integrations', async () => {
|
||||
await svlCommonNavigation.sidenav.openSection('project_settings_project_nav');
|
||||
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'integrations' });
|
||||
await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts([
|
||||
'Integrations',
|
||||
'Browse integrations',
|
||||
]);
|
||||
});
|
||||
|
||||
it('navigates to fleet', async () => {
|
||||
await svlCommonNavigation.sidenav.openSection('project_settings_project_nav');
|
||||
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'fleet' });
|
||||
await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Fleet', 'Agents']);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue