diff --git a/src/core/packages/chrome/browser-components/src/classic/collapsible_nav.tsx b/src/core/packages/chrome/browser-components/src/classic/collapsible_nav.tsx index 847eca5ffdea8..51d6bb01c13b8 100644 --- a/src/core/packages/chrome/browser-components/src/classic/collapsible_nav.tsx +++ b/src/core/packages/chrome/browser-components/src/classic/collapsible_nav.tsx @@ -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', ]; diff --git a/x-pack/solutions/security/packages/kbn-scout-security/src/playwright/fixtures/test/page_objects/detections_attack_discovery.ts b/x-pack/solutions/security/packages/kbn-scout-security/src/playwright/fixtures/test/page_objects/detections_attack_discovery.ts index b5f121c2c06b7..3fcdd9fa81815 100644 --- a/x-pack/solutions/security/packages/kbn-scout-security/src/playwright/fixtures/test/page_objects/detections_attack_discovery.ts +++ b/x-pack/solutions/security/packages/kbn-scout-security/src/playwright/fixtures/test/page_objects/detections_attack_discovery.ts @@ -64,6 +64,6 @@ export class DetectionsAttackDiscoveryPage { } async expandDetectionsSection() { - await this.detectionsNavItemButton.click(); + await this.detectionsNavItem.click(); } } diff --git a/x-pack/solutions/security/packages/navigation/src/landing_links/landing_links_image_card.test.tsx b/x-pack/solutions/security/packages/navigation/src/landing_links/landing_links_image_card.test.tsx index b55527146bbad..7fc46ee668250 100644 --- a/x-pack/solutions/security/packages/navigation/src/landing_links/landing_links_image_card.test.tsx +++ b/x-pack/solutions/security/packages/navigation/src/landing_links/landing_links_image_card.test.tsx @@ -51,7 +51,7 @@ describe('LandingLinksImageCard', () => { /> ); - expect(getByTestId('LandingImageCard-image')).toHaveStyle({ + expect(getByTestId(`LandingImageCard-image-${DEFAULT_NAV_ITEM.id}`)).toHaveStyle({ backgroundImage: `url(${landingImage})`, }); }); diff --git a/x-pack/solutions/security/packages/navigation/src/landing_links/landing_links_image_card.tsx b/x-pack/solutions/security/packages/navigation/src/landing_links/landing_links_image_card.tsx index fb03cf5386115..f0aa50e3b9b81 100644 --- a/x-pack/solutions/security/packages/navigation/src/landing_links/landing_links_image_card.tsx +++ b/x-pack/solutions/security/packages/navigation/src/landing_links/landing_links_image_card.tsx @@ -65,7 +65,7 @@ export const LandingLinksImageCard: React.FC = React ); return ( - + = React {landingImage && ( { }); it('should render LandingLinksImageCard item', () => { - const landingLinksCardTestId = 'LandingImageCard-item'; + const landingLinksCardTestId = `LandingImageCard-item-${DEFAULT_NAV_ITEM.id}`; const { queryByTestId } = render(); diff --git a/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts b/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts index 8c0c7408f124e..495773aaaca62 100644 --- a/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts @@ -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; diff --git a/x-pack/solutions/security/plugins/security_solution/public/dashboards/pages/landing_page/index.test.tsx b/x-pack/solutions/security/plugins/security_solution/public/dashboards/pages/landing_page/index.test.tsx index 5efa58d41233b..330b9b74dfa68 100644 --- a/x-pack/solutions/security/plugins/security_solution/public/dashboards/pages/landing_page/index.test.tsx +++ b/x-pack/solutions/security/plugins/security_solution/public/dashboards/pages/landing_page/index.test.tsx @@ -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 () => { diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/explore/navigation/navigation.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/explore/navigation/navigation.cy.ts index 9f6f65d0c18de..31f7ddf9b3600 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/explore/navigation/navigation.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/explore/navigation/navigation.cy.ts @@ -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, @@ -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 { @@ -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' }, () => { @@ -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', () => { @@ -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', () => { @@ -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', () => { @@ -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', () => { @@ -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' }, () => { diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/explore/urls/state.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/explore/urls/state.cy.ts index 1f83370b5cc5e..5f9b6227675b2 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/explore/urls/state.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/explore/urls/state.cy.ts @@ -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, @@ -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( @@ -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( @@ -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(); diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/investigations/siem_migrations/rules/translated_rules_page.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/investigations/siem_migrations/rules/translated_rules_page.cy.ts index 878cebf860812..9a81d62d82f44 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/investigations/siem_migrations/rules/translated_rules_page.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/investigations/siem_migrations/rules/translated_rules_page.cy.ts @@ -30,13 +30,19 @@ import { role } from '../common/role'; // TODO: https://github.com/elastic/kibana/issues/228940 remove @skipInServerlessMKI tag when privileges issue is fixed describe( - 'Rule Migrations - Translated Rules Page', - { tags: ['@ess', '@serverless', '@skipInServerlessMKI'] }, + 'Rule Migrations - Translated Rules Page (securityClassicNavUpdate enabled)', + { + tags: ['@ess', '@serverless', '@skipInServerlessMKI'], + }, () => { before(() => { role.setup(); }); + after(() => { + role.teardown(); + }); + beforeEach(() => { deleteConnectors(); cy.task('esArchiverLoad', { @@ -53,12 +59,10 @@ describe( suppressGlobalAnnouncements(); visit(`${GET_STARTED_URL}/siem_migrations`); selectMigrationConnector(); - navigateToTranslatedRulesPage(false); + navigateToTranslatedRulesPage(true); }); - after(() => { - role.teardown(); - + afterEach(() => { cy.task('esArchiverUnload', { archiveName: 'siem_migrations/rules', }); @@ -67,6 +71,7 @@ describe( archiveName: 'siem_migrations/rule_migrations', }); }); + it('should be able to see the result of the completed migration', () => { cy.get(TRANSLATED_RULES_RESULT_TABLE.ROWS).should('have.length', 6); cy.get(TRANSLATED_RULES_RESULT_TABLE.STATUS('partial')).should('have.length', 4); @@ -92,7 +97,6 @@ describe( url: '**/start', }).as('reprocessFailedRules'); openReprocessDialog(); - // cy.wait(50000); reprocessWithoutPrebuiltRulesMatching(); cy.wait('@reprocessFailedRules') .its('request.body.settings') diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/investigations/siem_migrations/rules/translated_rules_page_new_nav.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/investigations/siem_migrations/rules/translated_rules_page_new_nav.cy.ts deleted file mode 100644 index 94751e61351f5..0000000000000 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/investigations/siem_migrations/rules/translated_rules_page_new_nav.cy.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { - RULE_MIGRATION_PROGRESS_BAR, - RULE_MIGRATION_PROGRESS_BAR_TEXT, - TRANSLATED_RULE_EDIT_BTN, - TRANSLATED_RULE_QUERY_VIEWER, - TRANSLATED_RULE_RESULT_BADGE, - TRANSLATED_RULES_RESULT_TABLE, -} from '../../../../screens/siem_migrations'; -import { deleteConnectors, suppressGlobalAnnouncements } from '../../../../tasks/api_calls/common'; -import { createBedrockConnector } from '../../../../tasks/api_calls/connectors'; -import { visit } from '../../../../tasks/navigation'; -import { - editTranslatedRuleByRow, - saveUpdatedTranslatedRuleQuery, - selectMigrationConnector, - updateTranslatedRuleQuery, - navigateToTranslatedRulesPage, - openReprocessDialog, - reprocessWithoutPrebuiltRulesMatching, -} from '../../../../tasks/siem_migrations'; -import { GET_STARTED_URL } from '../../../../urls/navigation'; -import { role } from '../common/role'; - -// TODO: https://github.com/elastic/kibana/issues/228940 remove @skipInServerlessMKI tag when privileges issue is fixed -describe( - 'Rule Migrations - Translated Rules Page (securityClassicNavUpdate enabled)', - { - tags: ['@ess', '@serverless', '@skipInServerlessMKI'], - env: { - ftrConfig: { - kbnServerArgs: [ - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'securityClassicNavUpdate', - ])}`, - ], - }, - }, - }, - () => { - before(() => { - role.setup(); - }); - - after(() => { - role.teardown(); - }); - - beforeEach(() => { - deleteConnectors(); - cy.task('esArchiverLoad', { - archiveName: 'siem_migrations/rules', - }); - - cy.task('esArchiverLoad', { - archiveName: 'siem_migrations/rule_migrations', - }); - - createBedrockConnector(); - - role.login(); - suppressGlobalAnnouncements(); - visit(`${GET_STARTED_URL}/siem_migrations`); - selectMigrationConnector(); - navigateToTranslatedRulesPage(true); - }); - - afterEach(() => { - cy.task('esArchiverUnload', { - archiveName: 'siem_migrations/rules', - }); - - cy.task('esArchiverUnload', { - archiveName: 'siem_migrations/rule_migrations', - }); - }); - - it('should be able to see the result of the completed migration', () => { - cy.get(TRANSLATED_RULES_RESULT_TABLE.ROWS).should('have.length', 6); - cy.get(TRANSLATED_RULES_RESULT_TABLE.STATUS('partial')).should('have.length', 4); - cy.get(TRANSLATED_RULES_RESULT_TABLE.STATUS('full')).should('have.length', 1); - cy.get(TRANSLATED_RULES_RESULT_TABLE.STATUS('failed')).should('have.length', 1); - }); - - it('should be able to edit a rule with partial translation', () => { - cy.get(TRANSLATED_RULES_RESULT_TABLE.TABLE).should('be.visible'); - - editTranslatedRuleByRow(1); - const newESQLQuery = 'FROM auditbeat-* metadata _id, _version, _index'; - updateTranslatedRuleQuery(newESQLQuery); - saveUpdatedTranslatedRuleQuery(); - - cy.get(TRANSLATED_RULE_EDIT_BTN).should('be.visible'); - cy.get(TRANSLATED_RULE_QUERY_VIEWER).should('contain.text', newESQLQuery); - cy.get(TRANSLATED_RULE_RESULT_BADGE).should('have.text', 'Translated'); - }); - - it('should be able to reprocess a failed Rule', () => { - cy.intercept({ - url: '**/start', - }).as('reprocessFailedRules'); - openReprocessDialog(); - reprocessWithoutPrebuiltRulesMatching(); - cy.wait('@reprocessFailedRules') - .its('request.body.settings') - .should('have.property', 'skip_prebuilt_rules_matching', true); - cy.get(RULE_MIGRATION_PROGRESS_BAR).should('be.visible'); - cy.get(RULE_MIGRATION_PROGRESS_BAR_TEXT).should('contain.text', '83%'); - }); - } -); diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/screens/kibana_navigation.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/screens/kibana_navigation.ts index 03db93fe026e5..e6f49d2dbe345 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/screens/kibana_navigation.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/screens/kibana_navigation.ts @@ -25,6 +25,9 @@ export const EXPLORE_PAGE = export const THREAT_INTELLIGENCE_PAGE = '[data-test-subj="collapsibleNavGroup-securitySolution"] [title="Intelligence"]'; +export const LAUNCHPAD_PAGE = + '[data-test-subj="collapsibleNavGroup-securitySolution"] [title="Launchpad"]'; + export const MANAGE_PAGE = '[data-test-subj="collapsibleNavGroup-securitySolution"] [title="Manage"]'; diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/screens/security_header.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/screens/security_header.ts index 93092725b7ca4..c4dbfa8f6f739 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/screens/security_header.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/screens/security_header.ts @@ -10,7 +10,6 @@ import { GLOBAL_KQL_WRAPPER } from './search_bar'; // main links export const DASHBOARDS = '[data-test-subj="solutionSideNavItemLink-dashboards"]'; -export const DASHBOARDS_PANEL_BTN = '[data-test-subj="solutionSideNavItemButton-dashboards"]'; export const ALERTS = '[data-test-subj="solutionSideNavItemLink-alerts"]'; @@ -24,7 +23,7 @@ export const TIMELINES = '[data-test-subj="solutionSideNavItemLink-timelines"]'; export const EXPLORE = '[data-test-subj="solutionSideNavItemLink-explore"]'; export const EXPLORE_PANEL_BTN = '[data-test-subj="solutionSideNavItemButton-explore"]'; -export const RULES_PANEL_BTN = '[data-test-subj="solutionSideNavItemButton-rules-landing"]'; +export const RULES_NAV_LINK = '[data-test-subj="solutionSideNavItemLink-rules-landing"]'; export const SETTINGS = '[data-test-subj="solutionSideNavItemLink-administration"]'; export const SETTINGS_PANEL_BTN = '[data-test-subj="solutionSideNavItemButton-administration"]'; @@ -33,17 +32,6 @@ export const MIGRATIONS_LANDING = '[data-test-subj="solutionSideNavItemLink-siem export const MIGRATIONS_PANEL_BTN = '[data-test-subj="solutionSideNavItemButton-siem_migrations"]'; // nested links -export const OVERVIEW = '[data-test-subj="solutionSideNavPanelLink-overview"]'; - -export const DETECTION_RESPONSE = '[data-test-subj="solutionSideNavPanelLink-detection_response"]'; - -export const ENTITY_ANALYTICS = '[data-test-subj="solutionSideNavPanelLink-entity_analytics"]'; - -export const KUBERNETES = '[data-test-subj="solutionSideNavPanelLink-kubernetes"]'; - -export const CSP_DASHBOARD = - '[data-test-subj="solutionSideNavPanelLink-cloud_security_posture-dashboard"]'; - export const HOSTS = '[data-test-subj="solutionSideNavPanelLink-hosts"]'; export const ENDPOINTS = '[data-test-subj="solutionSideNavPanelLink-endpoints"]'; @@ -92,6 +80,19 @@ export const LAUNCHPAD_PANEL_BTN = getDataTestSubjectSelector( 'solutionSideNavItemLink-securityGroup:launchpad' ); +export const GET_STARTED_TEST_SUBJ = getDataTestSubjectSelector( + 'solutionSideNavPanelLink-get_started' +); +export const SIEM_READINESS_TEST_SUBJ = getDataTestSubjectSelector( + 'solutionSideNavPanelLink-siem_readiness' +); +export const VALUE_REPORTS_TEST_SUBJ = getDataTestSubjectSelector( + 'solutionSideNavPanelLink-ai_value' +); +export const MANAGE_AUTOMATIC_MIGRATIONS_TEST_SUBJ = getDataTestSubjectSelector( + 'solutionSideNavPanelLink-siem_migrations-manage' +); + export const LAUNCHPAD_TRANSLATED_RULES_PAGE = getDataTestSubjectSelector( 'solutionSideNavPanelLink-siem_migrations-rules' ); @@ -101,34 +102,28 @@ export const TRANSLATED_DASHBOARDS_PAGE = getDataTestSubjectSelector( 'solutionSideNavPanelLink-siem_migrations-dashboards' ); +export const SOLUTION_SIDE_NAV_PANEL = getDataTestSubjectSelector('solutionSideNavPanel'); + // opens the navigation panel for a given nested link export const openNavigationPanelFor = (page: string) => { let panel; switch (page) { - case OVERVIEW: - case DETECTION_RESPONSE: - case KUBERNETES: - case ENTITY_ANALYTICS: - case CSP_DASHBOARD: { - panel = DASHBOARDS_PANEL_BTN; - break; - } case HOSTS: case NETWORK: case USERS: { - panel = EXPLORE_PANEL_BTN; + panel = EXPLORE; break; } case RULES: case EXCEPTIONS: case CSP_BENCHMARKS: { - panel = RULES_PANEL_BTN; + panel = RULES_NAV_LINK; break; } case ENDPOINTS: case POLICIES: case ARTIFACTS: { - panel = SETTINGS_PANEL_BTN; + panel = SETTINGS; break; } } diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/tasks/security_header.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/tasks/security_header.ts index 0e9d9cb7085c5..1660d1f4923c4 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/tasks/security_header.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/tasks/security_header.ts @@ -27,6 +27,11 @@ export const navigateFromHeaderTo = (page: string, isServerless: boolean = false cy.get(page).click(); }; +export const verifyNavigatesFromDashboardLandingTo = (dashboardId: string, URL: string) => { + cy.get(`[data-test-subj="LandingImageCard-item-${dashboardId}"]`).click(); + cy.url().should('include', URL); +}; + export const refreshPage = () => { cy.get(REFRESH_BUTTON).click({ force: true }); cy.get(REFRESH_BUTTON).should('not.have.attr', 'aria-label', 'Needs updating'); diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/urls/navigation.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/urls/navigation.ts index 85046bc1f50ac..a909ad22d5211 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/urls/navigation.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/urls/navigation.ts @@ -9,7 +9,7 @@ export const KIBANA_HOME = '/app/home#/'; export const LOGOUT_URL = '/logout'; // Common -export const GET_STARTED_URL = '/app/security/get_started'; + export const MANAGE_URL = '/app/security/manage'; export const DASHBOARDS_URL = '/app/security/dashboards'; @@ -28,6 +28,8 @@ export const RESPONSE_ACTIONS_HISTORY = `app/security/administration/response_ac export const CSP_BENCHMARKS_URL = '/app/security/cloud_security_posture/benchmarks'; export const CSP_DASHBOARD_URL = '/app/security/cloud_security_posture/dashboard'; +export const CLOUD_NATIVE_VULN_MGMT_URL = + '/app/security/cloud_security_posture/vulnerability_dashboard'; export const CSP_FINDINGS_URL = '/app/security/cloud_security_posture/findings/configurations'; export const CSP_VULNERABILITIES_URL = '/app/security/cloud_security_posture/findings/vulnerabilities'; @@ -42,6 +44,10 @@ export const OVERVIEW_URL = '/app/security/overview'; export const ENTITY_ANALYTICS_URL = '/app/security/entity_analytics'; +export const KUBERNETES_URL = '/app/security/kubernetes'; + +export const DATA_QUALITY_URL = '/app/security/data_quality'; + export const THREAT_INTELLIGENCE_URL = '/app/security/threat_intelligence'; export const INDICATORS_URL = '/app/security/threat_intelligence/indicators'; export const EXPLORE_URL = '/app/security/explore'; @@ -117,3 +123,11 @@ export const CUSTOM_ROLES_URL = 'app/management/security/roles/edit'; // Alerting export const STACK_RULES_URL = 'app/management/insightsAndAlerting/triggersActions/rules'; export const MAINTENANCE_WINDOW_URL = 'app/management/insightsAndAlerting/maintenanceWindows'; + +// Launchpad +export const GET_STARTED_URL = '/app/security/get_started'; +export const SIEM_READINESS_URL = 'app/security/siem_readiness/visibility/coverage'; +export const VALUE_REPORTS_URL = 'app/security/reports/ai_value'; +export const MANAGE_AUTOMATIC_MIGRATIONS_URL = 'app/security/siem_migrations/manage'; +export const TRANSLATED_RULES_PAGE_URL = 'app/security/siem_migrations/rules'; +export const TRANSLATED_DASHBOARDS_PAGE_URL = 'app/security/siem_migrations/dashboards';