Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,16 @@ interface Props {
button: EuiCollapsibleNavProps['button'];
}

const overviewIDsToHide = ['kibanaOverview'];
const overviewIDsToHide = [
'kibanaOverview',
'securitySolutionUI:get_started',
'securitySolutionUI:ai_value',
'securitySolutionUI:siem_migrations',
'securitySolutionUI:siem_readiness',
];
const overviewIDs = [
...overviewIDsToHide,
'observability-overview',
'securitySolutionUI:get_started',
'management',
'enterpriseSearch',
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ export class DetectionsAttackDiscoveryPage {
}

async expandDetectionsSection() {
await this.detectionsNavItemButton.click();
await this.detectionsNavItem.click();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('LandingLinksImageCard', () => {
/>
);

expect(getByTestId('LandingImageCard-image')).toHaveStyle({
expect(getByTestId(`LandingImageCard-image-${DEFAULT_NAV_ITEM.id}`)).toHaveStyle({
backgroundImage: `url(${landingImage})`,
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const LandingLinksImageCard: React.FC<LandingLinksImageCardProps> = React
);

return (
<EuiFlexItem data-test-subj="LandingImageCard-item" grow={false}>
<EuiFlexItem data-test-subj={`LandingImageCard-item-${item.id}`} grow={false}>
<EuiPanelWithLink {...linkProps} hasBorder paddingSize="s" css={styles.card}>
<EuiFlexGroup
gutterSize="s"
Expand All @@ -77,7 +77,7 @@ export const LandingLinksImageCard: React.FC<LandingLinksImageCardProps> = React
<EuiFlexItem grow={false}>
{landingImage && (
<EuiPanel
data-test-subj="LandingImageCard-image"
data-test-subj={`LandingImageCard-image-${item.id}`}
paddingSize="none"
hasShadow={false}
hasBorder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('LandingLinksImageCards', () => {
});

it('should render LandingLinksImageCard item', () => {
const landingLinksCardTestId = 'LandingImageCard-item';
const landingLinksCardTestId = `LandingImageCard-item-${DEFAULT_NAV_ITEM.id}`;

const { queryByTestId } = render(<LandingLinksImageCards items={[{ ...DEFAULT_NAV_ITEM }]} />);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,9 @@ export const allowedExperimentalValues = Object.freeze({

/**
* Classic chrome only: refreshed Security side nav (Launchpad, Manage footer; unified row + panel behavior).
* Release: 9.4
*/
securityClassicNavUpdate: false,
securityClassicNavUpdate: true,
});

type ExperimentalConfigKeys = Array<keyof ExperimentalFeatures>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,15 @@ describe('Dashboards landing', () => {
});
await renderDashboardLanding();

const renderedItems = screen.queryAllByTestId('LandingImageCard-item');
const overviewItem = screen.queryByTestId(
`LandingImageCard-item-${SecurityPageName.overview}`
);
const detectionItem = screen.queryByTestId(
`LandingImageCard-item-${SecurityPageName.detectionAndResponse}`
);

expect(renderedItems[0]).toHaveTextContent(OVERVIEW_ITEM_LABEL);
expect(renderedItems[1]).toHaveTextContent(DETECTION_RESPONSE_ITEM_LABEL);
expect(overviewItem).toHaveTextContent(OVERVIEW_ITEM_LABEL);
expect(detectionItem).toHaveTextContent(DETECTION_RESPONSE_ITEM_LABEL);
});

it('should not render items if all items filtered', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,34 @@ import {
ENDPOINTS,
ARTIFACTS,
NETWORK,
OVERVIEW,
TIMELINES,
RULES,
EXCEPTIONS,
USERS,
DETECTION_RESPONSE,
DASHBOARDS,
CSP_DASHBOARD,
INDICATORS,
CSP_BENCHMARKS,
CSP_FINDINGS,
POLICIES,
EXPLORE,
SETTINGS,
ENTITY_ANALYTICS,
SOLUTION_SIDE_NAV_PANEL,
RULES_NAV_LINK,
LAUNCHPAD_PANEL_BTN,
GET_STARTED_TEST_SUBJ,
SIEM_READINESS_TEST_SUBJ,
VALUE_REPORTS_TEST_SUBJ,
MANAGE_AUTOMATIC_MIGRATIONS_TEST_SUBJ,
LAUNCHPAD_TRANSLATED_RULES_PAGE,
TRANSLATED_DASHBOARDS_PAGE,
} from '../../../screens/security_header';
import * as ServerlessHeaders from '../../../screens/serverless_security_header';

import { login } from '../../../tasks/login';
import { visit, visitGetStartedPage, visitWithTimeRange } from '../../../tasks/navigation';
import { navigateFromHeaderTo } from '../../../tasks/security_header';
import {
verifyNavigatesFromDashboardLandingTo,
navigateFromHeaderTo,
} from '../../../tasks/security_header';

import {
ALERTS_URL,
Expand Down Expand Up @@ -65,6 +72,15 @@ import {
ENDPOINT_EXCEPTIONS_URL,
HOST_ISOLATION_EXCEPTIONS_URL,
TRUSTED_DEVICES_URL,
CLOUD_NATIVE_VULN_MGMT_URL,
DATA_QUALITY_URL,
KUBERNETES_URL,
GET_STARTED_URL,
SIEM_READINESS_URL,
VALUE_REPORTS_URL,
MANAGE_AUTOMATIC_MIGRATIONS_URL,
TRANSLATED_RULES_PAGE_URL,
TRANSLATED_DASHBOARDS_PAGE_URL,
} from '../../../urls/navigation';
import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management';
import {
Expand All @@ -80,6 +96,7 @@ import {
TIMELINES_PAGE,
FINDINGS_PAGE,
THREAT_INTELLIGENCE_PAGE,
LAUNCHPAD_PAGE,
} from '../../../screens/kibana_navigation';

describe('top-level navigation common to all pages in the Security app', { tags: '@ess' }, () => {
Expand All @@ -93,24 +110,44 @@ describe('top-level navigation common to all pages in the Security app', { tags:
cy.url().should('include', DASHBOARDS_URL);
});

it('navigates to the Overview page', () => {
navigateFromHeaderTo(OVERVIEW);
cy.url().should('include', OVERVIEW_URL);
it('navigates to the Overview page from dashboard', () => {
cy.visit(DASHBOARDS_URL);
verifyNavigatesFromDashboardLandingTo('overview', OVERVIEW_URL);
});

it('navigates to the Detection & Response page from dashboard', () => {
cy.visit(DASHBOARDS_URL);
verifyNavigatesFromDashboardLandingTo('detection_response', DETECTION_AND_RESPONSE_URL);
});

it('navigates to Kubernetes page from dashboard', () => {
cy.visit(DASHBOARDS_URL);
verifyNavigatesFromDashboardLandingTo('kubernetes', KUBERNETES_URL);
});

it('navigates to the CSP page from dashboard', () => {
cy.visit(DASHBOARDS_URL);
verifyNavigatesFromDashboardLandingTo('cloud_security_posture-dashboard', CSP_DASHBOARD_URL);
});

it('navigates to the Detection & Response page', () => {
navigateFromHeaderTo(DETECTION_RESPONSE);
cy.url().should('include', DETECTION_AND_RESPONSE_URL);
it('navigates to the Cloud Native Vulnerability Management page from dashboard', () => {
cy.visit(DASHBOARDS_URL);
verifyNavigatesFromDashboardLandingTo(
'cloud_security_posture-vulnerability_dashboard',
CLOUD_NATIVE_VULN_MGMT_URL
);
});

it('navigates to the Entity Analytics page', () => {
navigateFromHeaderTo(ENTITY_ANALYTICS);
it('navigates to the Entity Analytics page from dashboard', () => {
cy.visit(DASHBOARDS_URL);
verifyNavigatesFromDashboardLandingTo('entity_analytics', ENTITY_ANALYTICS_URL);
cy.url().should('include', ENTITY_ANALYTICS_URL);
});

it('navigates to the CSP dashboard page', () => {
navigateFromHeaderTo(CSP_DASHBOARD);
cy.url().should('include', CSP_DASHBOARD_URL);
it('navigates to Data quality page from dashboard', () => {
cy.visit(DASHBOARDS_URL);
verifyNavigatesFromDashboardLandingTo('data_quality', DATA_QUALITY_URL);
cy.url().should('include', DATA_QUALITY_URL);
});

it('navigates to the Alerts page', () => {
Expand All @@ -128,9 +165,12 @@ describe('top-level navigation common to all pages in the Security app', { tags:
cy.url().should('include', TIMELINES_URL);
});

it('navigates to the Explore landing page', () => {
it('opens the Explore sub nav panel', () => {
navigateFromHeaderTo(EXPLORE);
cy.url().should('include', EXPLORE_URL);
cy.get(SOLUTION_SIDE_NAV_PANEL).should('be.visible');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'Hosts');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'Network');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'Users');
});

it('navigates to the Hosts page', () => {
Expand All @@ -153,9 +193,13 @@ describe('top-level navigation common to all pages in the Security app', { tags:
cy.url().should('include', INDICATORS_URL);
});

it('navigates to the Rules page', () => {
navigateFromHeaderTo(RULES);
cy.url().should('include', RULES_MANAGEMENT_URL);
it('opens the Rules sub nav panel', () => {
navigateFromHeaderTo(RULES_NAV_LINK);
cy.get(SOLUTION_SIDE_NAV_PANEL).should('be.visible');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'Detection rules (SIEM)');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'Benchmarks');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'Shared exception lists');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'MITRE ATT&CK® Coverage');
});

it('navigates to the Exceptions page', () => {
Expand All @@ -168,9 +212,65 @@ describe('top-level navigation common to all pages in the Security app', { tags:
cy.url().should('include', CASES_URL);
});

it('navigates to the Manage landing page', () => {
it('opens Launchpad sub nav panel', () => {
navigateFromHeaderTo(LAUNCHPAD_PANEL_BTN);
cy.get(SOLUTION_SIDE_NAV_PANEL).should('be.visible');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'Get started');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'SIEM Readiness');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'Value report');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'Manage Automatic Migrations');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'Translated rules');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'Translated dashboards');
});

it('navigates to the Get Started page from Launchpad', () => {
navigateFromHeaderTo(LAUNCHPAD_PANEL_BTN);
cy.get(SOLUTION_SIDE_NAV_PANEL).should('be.visible');
cy.get(GET_STARTED_TEST_SUBJ).click();
cy.url().should('include', GET_STARTED_URL);
});

it('navigates to SIEM Readiness page from Launchpad', () => {
navigateFromHeaderTo(LAUNCHPAD_PANEL_BTN);
cy.get(SOLUTION_SIDE_NAV_PANEL).should('be.visible');
cy.get(SIEM_READINESS_TEST_SUBJ).click();
cy.url().should('include', SIEM_READINESS_URL);
});

it('navigates to the Value Report page from Launchpad', () => {
navigateFromHeaderTo(LAUNCHPAD_PANEL_BTN);
cy.get(SOLUTION_SIDE_NAV_PANEL).should('be.visible');
cy.get(VALUE_REPORTS_TEST_SUBJ).click();
cy.url().should('include', VALUE_REPORTS_URL);
});

it('navigates to the Manage Automatic Migrations page from Launchpad', () => {
navigateFromHeaderTo(LAUNCHPAD_PANEL_BTN);
cy.get(SOLUTION_SIDE_NAV_PANEL).should('be.visible');
cy.get(MANAGE_AUTOMATIC_MIGRATIONS_TEST_SUBJ).click();
cy.url().should('include', MANAGE_AUTOMATIC_MIGRATIONS_URL);
});

it('navigates to the Translated Rules page from Launchpad', () => {
navigateFromHeaderTo(LAUNCHPAD_PANEL_BTN);
cy.get(SOLUTION_SIDE_NAV_PANEL).should('be.visible');
cy.get(LAUNCHPAD_TRANSLATED_RULES_PAGE).click();
cy.url().should('include', TRANSLATED_RULES_PAGE_URL);
});

it('navigates to Translated Dashboards page from Launchpad', () => {
navigateFromHeaderTo(LAUNCHPAD_PANEL_BTN);
cy.get(SOLUTION_SIDE_NAV_PANEL).should('be.visible');
cy.get(TRANSLATED_DASHBOARDS_PAGE).click();
cy.url().should('include', TRANSLATED_DASHBOARDS_PAGE_URL);
});

it('opens the Manage sub nav panel', () => {
navigateFromHeaderTo(SETTINGS);
cy.url().should('include', MANAGE_URL);
cy.get(SOLUTION_SIDE_NAV_PANEL).should('be.visible');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'Entity analytics');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'Endpoints');
cy.get(SOLUTION_SIDE_NAV_PANEL).should('contain.text', 'Investigations');
});

it('navigates to the Endpoints page', () => {
Expand Down Expand Up @@ -250,6 +350,11 @@ describe('Kibana navigation to all pages in the Security app ', { tags: '@ess' }
navigateFromKibanaCollapsibleTo(MANAGE_PAGE);
cy.url().should('include', MANAGE_URL);
});

it('navigates to Launchpad - Get started page', () => {
navigateFromKibanaCollapsibleTo(LAUNCHPAD_PAGE);
cy.url().should('include', GET_STARTED_URL);
});
});

describe('Serverless side navigation links', { tags: '@serverless' }, () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { HOSTS_NAMES } from '../../../screens/hosts/all_hosts';
import { ANOMALIES_TAB } from '../../../screens/hosts/main';
import {
BREADCRUMBS,
EXPLORE_PANEL_BTN,
EXPLORE,
HOSTS,
KQL_INPUT,
LOADING_INDICATOR,
Expand Down Expand Up @@ -230,7 +230,7 @@ describe('url state', { tags: ['@ess', '@skipInServerless'] }, () => {
kqlSearch('source.ip: "10.142.0.9" {enter}');
navigateFromHeaderTo(HOSTS);

toggleNavigationPanel(EXPLORE_PANEL_BTN);
toggleNavigationPanel(EXPLORE);
cy.get(NETWORK)
.should('have.attr', 'href')
.and(
Expand All @@ -246,7 +246,7 @@ describe('url state', { tags: ['@ess', '@skipInServerless'] }, () => {
openAllHosts();
waitForAllHostsToBeLoaded();

toggleNavigationPanel(EXPLORE_PANEL_BTN);
toggleNavigationPanel(EXPLORE);
cy.get(HOSTS)
.should('have.attr', 'href')
.and(
Expand All @@ -263,7 +263,7 @@ describe('url state', { tags: ['@ess', '@skipInServerless'] }, () => {
"&timeline=(activeTab:query,isOpen:!f,query:(expression:'',kind:kuery))" +
"&timerange=(global:(linkTo:!(timeline),timerange:(from:'2019-08-01T20:03:29.186Z',kind:absolute,to:'2023-01-01T21:33:29.186Z')),timeline:(linkTo:!(global),timerange:(from:'2019-08-01T20:03:29.186Z',kind:absolute,to:'2023-01-01T21:33:29.186Z')),valueReport:(linkTo:!(),timerange:(from:'2019-08-01T20:03:29.186Z',kind:absolute,to:'2019-08-01T20:33:29.186Z')))"
);
toggleNavigationPanel(EXPLORE_PANEL_BTN);
toggleNavigationPanel(EXPLORE);
cy.get(HOSTS_NAMES).first().should('have.text', 'siem-kibana');

openFirstHostDetails();
Expand Down
Loading
Loading