Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Serverless] make parent nav item into breadcrumb link #183189

Merged
merged 4 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const navigationTree: NavigationTreeDefinition = {
{
id: 'aiops',
title: 'AIOps',
link: 'ml:anomalyDetection',
renderAs: 'accordion',
spaceBefore: null,
children: [
Expand All @@ -80,6 +81,7 @@ export const navigationTree: NavigationTreeDefinition = {
defaultMessage: 'Anomaly detection',
}),
link: 'ml:anomalyDetection',
id: 'ml:anomalyDetection',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added an ID to this link because now that we have more than one link in the same page, the test-subj values end up being the same as it uses the link value. The wrong link then gets clicked. I used the same value as the "deepLinkId" in link which I hope isn't confusing.

renderAs: 'item',
children: [
{
Expand Down Expand Up @@ -124,6 +126,7 @@ export const navigationTree: NavigationTreeDefinition = {
title: i18n.translate('xpack.serverlessObservability.nav.applications', {
defaultMessage: 'Applications',
}),
link: 'apm:services',
renderAs: 'accordion',
children: [
{
Expand Down Expand Up @@ -156,6 +159,7 @@ export const navigationTree: NavigationTreeDefinition = {
title: i18n.translate('xpack.serverlessObservability.nav.infrastructure', {
defaultMessage: 'Infrastructure',
}),
link: 'metrics:inventory',
renderAs: 'accordion',
children: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ export default function ({ getPageObject, getService }: FtrProviderContext) {

// check the aiops subsection
await svlCommonNavigation.sidenav.openSection('observability_project_nav.aiops'); // open ai ops subsection
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'ml:anomalyDetection' });
await svlCommonNavigation.sidenav.expectLinkActive({ deepLinkId: 'ml:anomalyDetection' });
await svlCommonNavigation.sidenav.clickLink({ navId: 'ml:anomalyDetection' });
await svlCommonNavigation.sidenav.expectLinkActive({ navId: 'ml:anomalyDetection' });
await svlCommonNavigation.breadcrumbs.expectBreadcrumbExists({ text: 'AIOps' });
await svlCommonNavigation.breadcrumbs.expectBreadcrumbExists({
deepLinkId: 'ml:anomalyDetection',
Expand Down