mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
(cherry picked from commit 57ab388060
)
Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
This commit is contained in:
parent
ecdf3722c9
commit
b2b31bcca3
4 changed files with 142 additions and 43 deletions
|
@ -19,6 +19,16 @@ import {
|
|||
EXCEPTIONS,
|
||||
USERS,
|
||||
DETECTION_RESPONSE,
|
||||
DASHBOARDS,
|
||||
CSP_DASHBOARD,
|
||||
KUBERNETES,
|
||||
THREAT_INTELLIGENCE,
|
||||
BLOCKLIST,
|
||||
CSP_BENCHMARKS,
|
||||
CSP_FINDINGS,
|
||||
POLICIES,
|
||||
EXPLORE,
|
||||
MANAGE,
|
||||
} from '../../screens/security_header';
|
||||
|
||||
import { login, visit } from '../../tasks/login';
|
||||
|
@ -42,6 +52,13 @@ import {
|
|||
DETECTION_RESPONSE_URL,
|
||||
EXPLORE_URL,
|
||||
MANAGE_URL,
|
||||
CSP_DASHBOARD_URL,
|
||||
KUBERNETES_URL,
|
||||
THREAT_INTELLIGENCE_URL,
|
||||
BLOCKLIST_URL,
|
||||
CSP_BENCHMARKS_URL,
|
||||
CSP_FINDINGS_URL,
|
||||
POLICIES_URL,
|
||||
} from '../../urls/navigation';
|
||||
import {
|
||||
openKibanaNavigation,
|
||||
|
@ -54,6 +71,7 @@ import {
|
|||
MANAGE_PAGE,
|
||||
DASHBOARDS_PAGE,
|
||||
TIMELINES_PAGE,
|
||||
FINDINGS_PAGE,
|
||||
} from '../../screens/kibana_navigation';
|
||||
|
||||
before(() => {
|
||||
|
@ -65,6 +83,11 @@ describe('top-level navigation common to all pages in the Security app', () => {
|
|||
visit(TIMELINES_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Dashboards landing page', () => {
|
||||
navigateFromHeaderTo(DASHBOARDS);
|
||||
cy.url().should('include', DASHBOARDS_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Overview page', () => {
|
||||
navigateFromHeaderTo(OVERVIEW);
|
||||
cy.url().should('include', OVERVIEW_URL);
|
||||
|
@ -75,11 +98,36 @@ describe('top-level navigation common to all pages in the Security app', () => {
|
|||
cy.url().should('include', DETECTION_RESPONSE_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Kubernetes page', () => {
|
||||
navigateFromHeaderTo(KUBERNETES);
|
||||
cy.url().should('include', KUBERNETES_URL);
|
||||
});
|
||||
|
||||
it('navigates to the CSP dashboard page', () => {
|
||||
navigateFromHeaderTo(CSP_DASHBOARD);
|
||||
cy.url().should('include', CSP_DASHBOARD_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Alerts page', () => {
|
||||
navigateFromHeaderTo(ALERTS);
|
||||
cy.url().should('include', ALERTS_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Findings page', () => {
|
||||
navigateFromHeaderTo(CSP_FINDINGS);
|
||||
cy.url().should('include', CSP_FINDINGS_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Timelines page', () => {
|
||||
navigateFromHeaderTo(TIMELINES);
|
||||
cy.url().should('include', TIMELINES_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Explore landing page', () => {
|
||||
navigateFromHeaderTo(EXPLORE);
|
||||
cy.url().should('include', EXPLORE_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Hosts page', () => {
|
||||
navigateFromHeaderTo(HOSTS);
|
||||
cy.url().should('include', HOSTS_URL);
|
||||
|
@ -95,6 +143,11 @@ describe('top-level navigation common to all pages in the Security app', () => {
|
|||
cy.url().should('include', USERS_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Threat Intelligence page', () => {
|
||||
navigateFromHeaderTo(THREAT_INTELLIGENCE);
|
||||
cy.url().should('include', THREAT_INTELLIGENCE_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Rules page', () => {
|
||||
navigateFromHeaderTo(RULES);
|
||||
cy.url().should('include', DETECTIONS_RULE_MANAGEMENT_URL);
|
||||
|
@ -105,20 +158,24 @@ describe('top-level navigation common to all pages in the Security app', () => {
|
|||
cy.url().should('include', EXCEPTIONS_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Timelines page', () => {
|
||||
navigateFromHeaderTo(TIMELINES);
|
||||
cy.url().should('include', TIMELINES_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Cases page', () => {
|
||||
navigateFromHeaderTo(CASES);
|
||||
cy.url().should('include', CASES_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Manage landing page', () => {
|
||||
navigateFromHeaderTo(MANAGE);
|
||||
cy.url().should('include', MANAGE_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Endpoints page', () => {
|
||||
navigateFromHeaderTo(ENDPOINTS);
|
||||
cy.url().should('include', ENDPOINTS_URL);
|
||||
});
|
||||
it('navigates to the Policies page', () => {
|
||||
navigateFromHeaderTo(POLICIES);
|
||||
cy.url().should('include', POLICIES_URL);
|
||||
});
|
||||
it('navigates to the Trusted Apps page', () => {
|
||||
navigateFromHeaderTo(TRUSTED_APPS);
|
||||
cy.url().should('include', TRUSTED_APPS_URL);
|
||||
|
@ -127,6 +184,14 @@ describe('top-level navigation common to all pages in the Security app', () => {
|
|||
navigateFromHeaderTo(EVENT_FILTERS);
|
||||
cy.url().should('include', EVENT_FILTERS_URL);
|
||||
});
|
||||
it('navigates to the Blocklist page', () => {
|
||||
navigateFromHeaderTo(BLOCKLIST);
|
||||
cy.url().should('include', BLOCKLIST_URL);
|
||||
});
|
||||
it('navigates to the CSP Benchmarks page', () => {
|
||||
navigateFromHeaderTo(CSP_BENCHMARKS);
|
||||
cy.url().should('include', CSP_BENCHMARKS_URL);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Kibana navigation to all pages in the Security app ', () => {
|
||||
|
@ -146,6 +211,11 @@ describe('Kibana navigation to all pages in the Security app ', () => {
|
|||
cy.url().should('include', ALERTS_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Findings page', () => {
|
||||
navigateFromKibanaCollapsibleTo(FINDINGS_PAGE);
|
||||
cy.url().should('include', CSP_FINDINGS_URL);
|
||||
});
|
||||
|
||||
it('navigates to the Timelines page', () => {
|
||||
navigateFromKibanaCollapsibleTo(TIMELINES_PAGE);
|
||||
cy.url().should('include', TIMELINES_URL);
|
||||
|
|
|
@ -11,6 +11,9 @@ export const DASHBOARDS_PAGE =
|
|||
export const ALERTS_PAGE =
|
||||
'[data-test-subj="collapsibleNavGroup-securitySolution"] [title="Alerts"]';
|
||||
|
||||
export const FINDINGS_PAGE =
|
||||
'[data-test-subj="collapsibleNavGroup-securitySolution"] [title="Findings"]';
|
||||
|
||||
export const TIMELINES_PAGE =
|
||||
'[data-test-subj="collapsibleNavGroup-securitySolution"] [title="Timelines"]';
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@ export const DASHBOARDS = '[data-test-subj="groupedNavItemLink-dashboards"]';
|
|||
|
||||
export const ALERTS = '[data-test-subj="groupedNavItemLink-alerts"]';
|
||||
|
||||
export const CSP_FINDINGS = '[data-test-subj="groupedNavItemLink-cloud_security_posture-findings"]';
|
||||
|
||||
export const CASES = '[data-test-subj="groupedNavItemLink-cases"]';
|
||||
|
||||
export const TIMELINES = '[data-test-subj="groupedNavItemLink-timelines"]';
|
||||
|
@ -23,18 +25,32 @@ export const OVERVIEW = '[data-test-subj="groupedNavPanelLink-overview"]';
|
|||
|
||||
export const DETECTION_RESPONSE = '[data-test-subj="groupedNavPanelLink-detection_response"]';
|
||||
|
||||
export const KUBERNETES = '[data-test-subj="groupedNavPanelLink-kubernetes"]';
|
||||
|
||||
export const CSP_DASHBOARD =
|
||||
'[data-test-subj="groupedNavPanelLink-cloud_security_posture-dashboard"]';
|
||||
|
||||
export const HOSTS = '[data-test-subj="groupedNavPanelLink-hosts"]';
|
||||
|
||||
export const ENDPOINTS = '[data-test-subj="groupedNavPanelLink-endpoints"]';
|
||||
|
||||
export const POLICIES = '[data-test-subj="groupedNavPanelLink-policy"]';
|
||||
|
||||
export const TRUSTED_APPS = '[data-test-subj="groupedNavPanelLink-trusted_apps"]';
|
||||
|
||||
export const EVENT_FILTERS = '[data-test-subj="groupedNavPanelLink-event_filters"]';
|
||||
|
||||
export const BLOCKLIST = '[data-test-subj="groupedNavPanelLink-blocklist"]';
|
||||
|
||||
export const CSP_BENCHMARKS =
|
||||
'[data-test-subj="groupedNavPanelLink-cloud_security_posture-benchmarks"]';
|
||||
|
||||
export const NETWORK = '[data-test-subj="groupedNavPanelLink-network"]';
|
||||
|
||||
export const USERS = '[data-test-subj="groupedNavPanelLink-users"]';
|
||||
|
||||
export const THREAT_INTELLIGENCE = '[data-test-subj="groupedNavPanelLink-threat-intelligence"]';
|
||||
|
||||
export const RULES = '[data-test-subj="groupedNavPanelLink-rules"]';
|
||||
|
||||
export const EXCEPTIONS = '[data-test-subj="groupedNavPanelLink-exceptions"]';
|
||||
|
@ -53,13 +69,16 @@ export const openNavigationPanelFor = (page: string) => {
|
|||
let panel;
|
||||
switch (page) {
|
||||
case OVERVIEW:
|
||||
case DETECTION_RESPONSE: {
|
||||
case DETECTION_RESPONSE:
|
||||
case KUBERNETES:
|
||||
case CSP_DASHBOARD: {
|
||||
panel = DASHBOARDS;
|
||||
break;
|
||||
}
|
||||
case HOSTS:
|
||||
case NETWORK:
|
||||
case USERS: {
|
||||
case USERS:
|
||||
case THREAT_INTELLIGENCE: {
|
||||
panel = EXPLORE;
|
||||
break;
|
||||
}
|
||||
|
@ -67,7 +86,10 @@ export const openNavigationPanelFor = (page: string) => {
|
|||
case TRUSTED_APPS:
|
||||
case EVENT_FILTERS:
|
||||
case RULES:
|
||||
case EXCEPTIONS: {
|
||||
case POLICIES:
|
||||
case EXCEPTIONS:
|
||||
case BLOCKLIST:
|
||||
case CSP_BENCHMARKS: {
|
||||
panel = MANAGE;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -5,57 +5,61 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
export const KIBANA_HOME = '/app/home#/';
|
||||
export const KIBANA_SAVED_OBJECTS = '/app/management/kibana/objects';
|
||||
|
||||
export const ALERTS_URL = 'app/security/alerts';
|
||||
export const DETECTIONS_RULE_MANAGEMENT_URL = 'app/security/rules';
|
||||
export const ruleDetailsUrl = (ruleId: string) => `app/security/rules/id/${ruleId}`;
|
||||
export const detectionsRuleDetailsUrl = (ruleId: string) =>
|
||||
`app/security/detections/rules/id/${ruleId}`;
|
||||
|
||||
export const ruleEditUrl = (ruleId: string) => `${ruleDetailsUrl(ruleId)}/edit`;
|
||||
export const detectionRuleEditUrl = (ruleId: string) => `${detectionsRuleDetailsUrl(ruleId)}/edit`;
|
||||
|
||||
export const ENDPOINTS_URL = '/app/security/administration/endpoints';
|
||||
export const POLICIES_URL = '/app/security/administration/policy';
|
||||
export const USERS_URL = '/app/security/users/allUsers';
|
||||
export const DETECTIONS_RESPONSE_URL = '/app/security/detection_response';
|
||||
export const TRUSTED_APPS_URL = '/app/security/administration/trusted_apps';
|
||||
export const EVENT_FILTERS_URL = '/app/security/administration/event_filters';
|
||||
export const BLOCKLIST_URL = '/app/security/administration/blocklist';
|
||||
export const CSP_BENCHMARKS_URL = '/app/security/cloud_security_posture/benchmarks';
|
||||
export const NETWORK_URL = '/app/security/network';
|
||||
export const OVERVIEW_URL = '/app/security/overview';
|
||||
export const DASHBOARDS_URL = '/app/security/dashboards';
|
||||
export const DETECTION_RESPONSE_URL = '/app/security/detection_response';
|
||||
export const KUBERNETES_URL = '/app/security/kubernetes';
|
||||
export const CSP_DASHBOARD_URL = '/app/security/cloud_security_posture/dashboard';
|
||||
export const THREAT_INTELLIGENCE_URL = '/app/security/threat_intelligence';
|
||||
export const EXPLORE_URL = '/app/security/explore';
|
||||
export const MANAGE_URL = '/app/security/manage';
|
||||
export const RULE_CREATION = 'app/security/rules/create';
|
||||
export const TIMELINES_URL = '/app/security/timelines';
|
||||
export const TIMELINE_TEMPLATES_URL = '/app/security/timelines/template';
|
||||
export const CASES_URL = '/app/security/cases';
|
||||
export const EXCEPTIONS_URL = 'app/security/exceptions';
|
||||
export const HOSTS_URL = '/app/security/hosts/allHosts';
|
||||
export const CSP_FINDINGS_URL = 'app/security/cloud_security_posture/findings';
|
||||
export const DETECTIONS_RULE_MANAGEMENT_URL = 'app/security/rules';
|
||||
export const DETECTIONS = '/app/siem#/detections';
|
||||
export const SECURITY_DETECTIONS_URL = '/app/security/detections';
|
||||
export const SECURITY_DETECTIONS_RULES_URL = '/app/security/detections/rules';
|
||||
export const SECURITY_DETECTIONS_RULES_CREATION_URL = '/app/security/detections/rules/create';
|
||||
|
||||
export const EXCEPTIONS_URL = 'app/security/exceptions';
|
||||
|
||||
export const HOSTS_URL = '/app/security/hosts/allHosts';
|
||||
|
||||
export const hostDetailsUrl = (hostName: string) =>
|
||||
`/app/security/hosts/${hostName}/authentications`;
|
||||
|
||||
export const USERS_URL = '/app/security/users/allUsers';
|
||||
|
||||
export const DETECTIONS_RESPONSE_URL = '/app/security/detection_response';
|
||||
|
||||
export const userDetailsUrl = (userName: string) => `/app/security/users/${userName}/allUsers`;
|
||||
|
||||
export const HOSTS_PAGE_TAB_URLS = {
|
||||
allHosts: '/app/security/hosts/allHosts',
|
||||
anomalies: '/app/security/hosts/anomalies',
|
||||
events: '/app/security/hosts/events',
|
||||
uncommonProcesses: '/app/security/hosts/uncommonProcesses',
|
||||
};
|
||||
export const KIBANA_HOME = '/app/home#/';
|
||||
export const KIBANA_SAVED_OBJECTS = '/app/management/kibana/objects';
|
||||
export const ENDPOINTS_URL = '/app/security/administration/endpoints';
|
||||
export const TRUSTED_APPS_URL = '/app/security/administration/trusted_apps';
|
||||
export const EVENT_FILTERS_URL = '/app/security/administration/event_filters';
|
||||
export const NETWORK_URL = '/app/security/network';
|
||||
export const OVERVIEW_URL = '/app/security/overview';
|
||||
export const DASHBOARDS_URL = '/app/security/dashboards';
|
||||
export const DETECTION_RESPONSE_URL = '/app/security/detection_response';
|
||||
export const EXPLORE_URL = '/app/security/explore';
|
||||
export const MANAGE_URL = '/app/security/manage';
|
||||
export const RULE_CREATION = 'app/security/rules/create';
|
||||
export const TIMELINES_URL = '/app/security/timelines';
|
||||
export const TIMELINE_TEMPLATES_URL = '/app/security/timelines/template';
|
||||
export const LOGOUT_URL = '/logout';
|
||||
|
||||
export const DISCOVER_WITH_FILTER_URL =
|
||||
"/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now%2Fd,to:now%2Fd))&_a=(columns:!(),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:security-solution-default,key:host.name,negate:!f,params:(query:test-host),type:phrase),query:(match_phrase:(host.name:test-host)))),index:security-solution-default,interval:auto,query:(language:kuery,query:''),sort:!(!('@timestamp',desc)))";
|
||||
export const DISCOVER_WITH_PINNED_FILTER_URL =
|
||||
"/app/discover#/?_g=(filters:!(('$state':(store:globalState),meta:(alias:!n,disabled:!f,index:security-solution-default,key:host.name,negate:!f,params:(query:test-host),type:phrase),query:(match_phrase:(host.name:test-host)))),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(),filters:!(),index:security-solution-default,interval:auto,query:(language:kuery,query:''),sort:!(!('@timestamp',desc)))";
|
||||
|
||||
export const ruleDetailsUrl = (ruleId: string) => `app/security/rules/id/${ruleId}`;
|
||||
export const detectionsRuleDetailsUrl = (ruleId: string) =>
|
||||
`app/security/detections/rules/id/${ruleId}`;
|
||||
|
||||
export const ruleEditUrl = (ruleId: string) => `${ruleDetailsUrl(ruleId)}/edit`;
|
||||
export const detectionRuleEditUrl = (ruleId: string) => `${detectionsRuleDetailsUrl(ruleId)}/edit`;
|
||||
|
||||
export const hostDetailsUrl = (hostName: string) =>
|
||||
`/app/security/hosts/${hostName}/authentications`;
|
||||
|
||||
export const userDetailsUrl = (userName: string) => `/app/security/users/${userName}/allUsers`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue