diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ed01e7203d5d6e0..02de10924092d9d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1113,17 +1113,19 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib /x-pack/plugins/stack_connectors/common/gen_ai @elastic/security-threat-hunting-explore ## Security Solution sub teams - Detection Rule Management +/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema @elastic/security-detection-rule-management @elastic/security-detection-engine /x-pack/plugins/security_solution/common/api/detection_engine/fleet_integrations @elastic/security-detection-rule-management /x-pack/plugins/security_solution/common/api/detection_engine/prebuilt_rules @elastic/security-detection-rule-management /x-pack/plugins/security_solution/common/api/detection_engine/rule_management @elastic/security-detection-rule-management /x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring @elastic/security-detection-rule-management -/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema @elastic/security-detection-rule-management @elastic/security-detection-engine - /x-pack/plugins/security_solution/common/detection_engine/fleet_integrations @elastic/security-detection-rule-management /x-pack/plugins/security_solution/common/detection_engine/prebuilt_rules @elastic/security-detection-rule-management /x-pack/plugins/security_solution/common/detection_engine/rule_management @elastic/security-detection-rule-management /x-pack/plugins/security_solution/common/detection_engine/rule_monitoring @elastic/security-detection-rule-management +/x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules @elastic/security-detection-rule-management +/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management @elastic/security-detection-rule-management + /x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules @elastic/security-detection-rule-management /x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/rule_management @elastic/security-detection-rule-management @@ -1144,15 +1146,12 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib /x-pack/plugins/security_solution/public/detections/mitre @elastic/security-detection-rule-management /x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules @elastic/security-detection-rule-management /x-pack/plugins/security_solution/public/rules @elastic/security-detection-rule-management -/x-pack/plugins/security_solution/public/entity_analytics @elastic/security-detection-engine - /x-pack/plugins/security_solution/server/lib/detection_engine/fleet_integrations @elastic/security-detection-rule-management /x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules @elastic/security-detection-rule-management /x-pack/plugins/security_solution/server/lib/detection_engine/rule_management @elastic/security-detection-rule-management /x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring @elastic/security-detection-rule-management /x-pack/plugins/security_solution/server/lib/detection_engine/rule_schema @elastic/security-detection-rule-management @elastic/security-detection-engine - /x-pack/plugins/security_solution/server/utils @elastic/security-detection-rule-management ## Security Solution sub teams - Detection Engine @@ -1162,6 +1161,7 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib /x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui @elastic/security-detection-engine /x-pack/plugins/security_solution/public/detections/pages/alerts @elastic/security-detection-engine +/x-pack/plugins/security_solution/public/entity_analytics @elastic/security-detection-engine /x-pack/plugins/security_solution/server/lib/detection_engine/migrations @elastic/security-detection-engine /x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview @elastic/security-detection-engine @@ -1170,9 +1170,11 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib /x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals @elastic/security-detection-engine /x-pack/plugins/security_solution/cypress/e2e/data_sources @elastic/security-detection-engine -/x-pack/plugins/security_solution/cypress/e2e/exceptions @elastic/security-detection-engine -/x-pack/plugins/security_solution/cypress/e2e/value_lists @elastic/security-detection-engine +/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation @elastic/security-detection-engine +/x-pack/plugins/security_solution/cypress/e2e/detection_response/value_lists @elastic/security-detection-engine /x-pack/plugins/security_solution/cypress/e2e/entity_analytics @elastic/security-detection-engine +/x-pack/plugins/security_solution/cypress/e2e/exceptions @elastic/security-detection-engine +/x-pack/plugins/security_solution/cypress/e2e/overview @elastic/security-detection-engine /x-pack/plugins/security_solution/common/detection_engine/rule_exceptions @elastic/security-detection-engine @@ -1186,8 +1188,6 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib /x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy @elastic/security-detection-engine /x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions @elastic/security-detection-engine /x-pack/plugins/security_solution/server/lib/sourcerer @elastic/security-detection-engine -/x-pack/plugins/security_solution/cypress/e2e/overview @elastic/security-detection-engine - ## Security Threat Intelligence - Under Security Platform /x-pack/plugins/security_solution/public/common/components/threat_match @elastic/security-detection-engine diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_install_update_authorization.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_install_update_authorization.cy.ts similarity index 87% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_install_update_authorization.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_install_update_authorization.cy.ts index d634d5b87e3b1cf..202fb6766fc6f7a 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_install_update_authorization.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_install_update_authorization.cy.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { APP_PATH, RULES_ADD_PATH, RULES_UPDATES } from '../../../common/constants'; -import { createRuleAssetSavedObject } from '../../helpers/rules'; -import { waitForRulesTableToBeLoaded } from '../../tasks/alerts_detection_rules'; -import { createAndInstallMockedPrebuiltRules } from '../../tasks/api_calls/prebuilt_rules'; -import { resetRulesTableState, deleteAlertsAndRules } from '../../tasks/common'; -import { login, waitForPageWithoutDateRange } from '../../tasks/login'; -import { SECURITY_DETECTIONS_RULES_URL } from '../../urls/navigation'; -import { ROLES } from '../../../common/test'; +import { APP_PATH, RULES_ADD_PATH, RULES_UPDATES } from '../../../../common/constants'; +import { createRuleAssetSavedObject } from '../../../helpers/rules'; +import { waitForRulesTableToBeLoaded } from '../../../tasks/alerts_detection_rules'; +import { createAndInstallMockedPrebuiltRules } from '../../../tasks/api_calls/prebuilt_rules'; +import { resetRulesTableState, deleteAlertsAndRules } from '../../../tasks/common'; +import { login, waitForPageWithoutDateRange } from '../../../tasks/login'; +import { SECURITY_DETECTIONS_RULES_URL } from '../../../urls/navigation'; +import { ROLES } from '../../../../common/test'; import { ADD_ELASTIC_RULES_BTN, getInstallSingleRuleButtonByRuleId, @@ -21,7 +21,7 @@ import { RULES_UPDATES_TAB, RULE_CHECKBOX, UPGRADE_ALL_RULES_BUTTON, -} from '../../screens/alerts_detection_rules'; +} from '../../../screens/alerts_detection_rules'; const RULE_1_ID = 'rule_1'; const RULE_2_ID = 'rule_2'; diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_install_update_error_handling.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_install_update_error_handling.cy.ts similarity index 90% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_install_update_error_handling.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_install_update_error_handling.cy.ts index ef83ea231796673..901681658961079 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_install_update_error_handling.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_install_update_error_handling.cy.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { createRuleAssetSavedObject } from '../../helpers/rules'; -import { waitForRulesTableToBeLoaded } from '../../tasks/alerts_detection_rules'; -import { createAndInstallMockedPrebuiltRules } from '../../tasks/api_calls/prebuilt_rules'; -import { resetRulesTableState, deleteAlertsAndRules, reload } from '../../tasks/common'; -import { login, visitWithoutDateRange } from '../../tasks/login'; -import { SECURITY_DETECTIONS_RULES_URL } from '../../urls/navigation'; +import { createRuleAssetSavedObject } from '../../../helpers/rules'; +import { waitForRulesTableToBeLoaded } from '../../../tasks/alerts_detection_rules'; +import { createAndInstallMockedPrebuiltRules } from '../../../tasks/api_calls/prebuilt_rules'; +import { resetRulesTableState, deleteAlertsAndRules, reload } from '../../../tasks/common'; +import { login, visitWithoutDateRange } from '../../../tasks/login'; +import { SECURITY_DETECTIONS_RULES_URL } from '../../../urls/navigation'; import { addElasticRulesButtonClick, assertRuleAvailableForInstallAndInstallOne, @@ -22,7 +22,7 @@ import { assertRuleUpgradeAvailableAndUpgradeAllInPage, assertRuleUpgradeAvailableAndUpgradeAll, ruleUpdatesTabClick, -} from '../../tasks/prebuilt_rules'; +} from '../../../tasks/prebuilt_rules'; describe('Detection rules, Prebuilt Rules Installation and Update - Error handling', () => { beforeEach(() => { diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_install_update_workflows.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_install_update_workflows.cy.ts similarity index 94% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_install_update_workflows.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_install_update_workflows.cy.ts index 01d839a0bb3a399..4957d6edc3371b0 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_install_update_workflows.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_install_update_workflows.cy.ts @@ -6,8 +6,8 @@ */ import type { BulkInstallPackageInfo } from '@kbn/fleet-plugin/common'; -import type { Rule } from '../../../public/detection_engine/rule_management/logic/types'; -import { createRuleAssetSavedObject } from '../../helpers/rules'; +import type { Rule } from '../../../../public/detection_engine/rule_management/logic/types'; +import { createRuleAssetSavedObject } from '../../../helpers/rules'; import { GO_BACK_TO_RULES_TABLE_BUTTON, INSTALL_ALL_RULES_BUTTON, @@ -18,15 +18,15 @@ import { RULE_CHECKBOX, SELECT_ALL_RULES_ON_PAGE_CHECKBOX, TOASTER, -} from '../../screens/alerts_detection_rules'; -import { waitForRulesTableToBeLoaded } from '../../tasks/alerts_detection_rules'; +} from '../../../screens/alerts_detection_rules'; +import { waitForRulesTableToBeLoaded } from '../../../tasks/alerts_detection_rules'; import { getRuleAssets, createAndInstallMockedPrebuiltRules, -} from '../../tasks/api_calls/prebuilt_rules'; -import { resetRulesTableState, deleteAlertsAndRules, reload } from '../../tasks/common'; -import { login, visitWithoutDateRange } from '../../tasks/login'; -import { SECURITY_DETECTIONS_RULES_URL } from '../../urls/navigation'; +} from '../../../tasks/api_calls/prebuilt_rules'; +import { resetRulesTableState, deleteAlertsAndRules, reload } from '../../../tasks/common'; +import { login, visitWithoutDateRange } from '../../../tasks/login'; +import { SECURITY_DETECTIONS_RULES_URL } from '../../../urls/navigation'; import { addElasticRulesButtonClick, assertRuleAvailableForInstallAndInstallOne, @@ -38,7 +38,7 @@ import { assertRuleUpgradeAvailableAndUpgradeAllInPage, assertRuleUpgradeAvailableAndUpgradeAll, ruleUpdatesTabClick, -} from '../../tasks/prebuilt_rules'; +} from '../../../tasks/prebuilt_rules'; describe('Detection rules, Prebuilt Rules Installation and Update workflow', () => { beforeEach(() => { diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_management.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_management.cy.ts similarity index 92% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_management.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_management.cy.ts index eea13a4def02b30..b24f62704fe46c6 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_management.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_management.cy.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { createRuleAssetSavedObject } from '../../helpers/rules'; +import { createRuleAssetSavedObject } from '../../../helpers/rules'; import { COLLAPSED_ACTION_BTN, ELASTIC_RULES_BTN, @@ -17,7 +17,7 @@ import { RULE_SWITCH, SELECT_ALL_RULES_ON_PAGE_CHECKBOX, INSTALL_ALL_RULES_BUTTON, -} from '../../screens/alerts_detection_rules'; +} from '../../../screens/alerts_detection_rules'; import { confirmRulesDelete, deleteFirstRule, @@ -25,19 +25,23 @@ import { selectNumberOfRules, waitForPrebuiltDetectionRulesToBeLoaded, waitForRuleToUpdate, -} from '../../tasks/alerts_detection_rules'; +} from '../../../tasks/alerts_detection_rules'; import { deleteSelectedRules, disableSelectedRules, enableSelectedRules, -} from '../../tasks/rules_bulk_actions'; +} from '../../../tasks/rules_bulk_actions'; import { createAndInstallMockedPrebuiltRules, getAvailablePrebuiltRulesCount, -} from '../../tasks/api_calls/prebuilt_rules'; -import { cleanKibana, deleteAlertsAndRules, deletePrebuiltRulesAssets } from '../../tasks/common'; -import { login, visitWithoutDateRange } from '../../tasks/login'; -import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation'; +} from '../../../tasks/api_calls/prebuilt_rules'; +import { + cleanKibana, + deleteAlertsAndRules, + deletePrebuiltRulesAssets, +} from '../../../tasks/common'; +import { login, visitWithoutDateRange } from '../../../tasks/login'; +import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../../urls/navigation'; const rules = Array.from(Array(5)).map((_, i) => { return createRuleAssetSavedObject({ diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_notifications.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_notifications.cy.ts similarity index 94% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_notifications.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_notifications.cy.ts index 9648d565e5f7386..9fb1dcf16cbfe61 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/prebuilt_rules_notifications.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_notifications.cy.ts @@ -5,21 +5,24 @@ * 2.0. */ -import { createRuleAssetSavedObject } from '../../helpers/rules'; -import { ADD_ELASTIC_RULES_BTN, RULES_UPDATES_TAB } from '../../screens/alerts_detection_rules'; -import { deleteFirstRule, waitForRulesTableToBeLoaded } from '../../tasks/alerts_detection_rules'; +import { createRuleAssetSavedObject } from '../../../helpers/rules'; +import { ADD_ELASTIC_RULES_BTN, RULES_UPDATES_TAB } from '../../../screens/alerts_detection_rules'; +import { + deleteFirstRule, + waitForRulesTableToBeLoaded, +} from '../../../tasks/alerts_detection_rules'; import { installAllPrebuiltRulesRequest, createAndInstallMockedPrebuiltRules, -} from '../../tasks/api_calls/prebuilt_rules'; +} from '../../../tasks/api_calls/prebuilt_rules'; import { resetRulesTableState, deleteAlertsAndRules, reload, deletePrebuiltRulesAssets, -} from '../../tasks/common'; -import { login, visitWithoutDateRange } from '../../tasks/login'; -import { SECURITY_DETECTIONS_RULES_URL } from '../../urls/navigation'; +} from '../../../tasks/common'; +import { login, visitWithoutDateRange } from '../../../tasks/login'; +import { SECURITY_DETECTIONS_RULES_URL } from '../../../urls/navigation'; const RULE_1 = createRuleAssetSavedObject({ name: 'Test rule 1', diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rule_actions.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_actions/rule_actions.cy.ts similarity index 82% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/rule_actions.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_actions/rule_actions.cy.ts index 04ff3adb7865590..58bf0726918c099 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rule_actions.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_actions/rule_actions.cy.ts @@ -5,27 +5,27 @@ * 2.0. */ -import { getIndexConnector } from '../../objects/connector'; -import { getSimpleCustomQueryRule } from '../../objects/rule'; +import { getIndexConnector } from '../../../objects/connector'; +import { getSimpleCustomQueryRule } from '../../../objects/rule'; -import { goToRuleDetails } from '../../tasks/alerts_detection_rules'; -import { deleteIndex, waitForNewDocumentToBeIndexed } from '../../tasks/api_calls/elasticsearch'; +import { goToRuleDetails } from '../../../tasks/alerts_detection_rules'; +import { deleteIndex, waitForNewDocumentToBeIndexed } from '../../../tasks/api_calls/elasticsearch'; import { cleanKibana, deleteAlertsAndRules, deleteConnectors, deleteDataView, -} from '../../tasks/common'; +} from '../../../tasks/common'; import { createAndEnableRule, fillAboutRuleAndContinue, fillDefineCustomRuleAndContinue, fillRuleAction, fillScheduleRuleAndContinue, -} from '../../tasks/create_new_rule'; -import { login, visit } from '../../tasks/login'; +} from '../../../tasks/create_new_rule'; +import { login, visit } from '../../../tasks/login'; -import { RULE_CREATION } from '../../urls/navigation'; +import { RULE_CREATION } from '../../../urls/navigation'; describe('Rule actions during detection rule creation', () => { const indexConnector = getIndexConnector(); diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/custom_query_rule.cy.ts similarity index 93% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/custom_query_rule.cy.ts index d6eb89cee13d8cd..eb1abd71cd43e2c 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/custom_query_rule.cy.ts @@ -5,10 +5,15 @@ * 2.0. */ -import { ruleFields } from '../../data/detection_engine'; -import { getNewRule, getExistingRule, getEditedRule, getNewOverrideRule } from '../../objects/rule'; -import { getTimeline } from '../../objects/timeline'; -import { ALERTS_COUNT, ALERT_GRID_CELL } from '../../screens/alerts'; +import { ruleFields } from '../../../data/detection_engine'; +import { + getNewRule, + getExistingRule, + getEditedRule, + getNewOverrideRule, +} from '../../../objects/rule'; +import { getTimeline } from '../../../objects/timeline'; +import { ALERTS_COUNT, ALERT_GRID_CELL } from '../../../screens/alerts'; import { CUSTOM_RULES_BTN, @@ -18,11 +23,11 @@ import { RULES_MANAGEMENT_TABLE, RULE_SWITCH, SEVERITY, -} from '../../screens/alerts_detection_rules'; +} from '../../../screens/alerts_detection_rules'; import { ACTIONS_NOTIFY_WHEN_BUTTON, ACTIONS_SUMMARY_BUTTON, -} from '../../screens/common/rule_actions'; +} from '../../../screens/common/rule_actions'; import { ABOUT_CONTINUE_BTN, ABOUT_EDIT_BUTTON, @@ -39,7 +44,7 @@ import { SEVERITY_DROPDOWN, TAGS_CLEAR_BUTTON, TAGS_FIELD, -} from '../../screens/create_new_rule'; +} from '../../../screens/create_new_rule'; import { ADDITIONAL_LOOK_BACK_DETAILS, ABOUT_DETAILS, @@ -64,7 +69,7 @@ import { THREAT_TACTIC, THREAT_TECHNIQUE, THREAT_SUBTECHNIQUE, -} from '../../screens/rule_details'; +} from '../../../screens/rule_details'; import { deleteFirstRule, @@ -72,12 +77,12 @@ import { editFirstRule, goToRuleDetails, selectNumberOfRules, -} from '../../tasks/alerts_detection_rules'; -import { deleteSelectedRules } from '../../tasks/rules_bulk_actions'; -import { createRule } from '../../tasks/api_calls/rules'; -import { createTimeline } from '../../tasks/api_calls/timelines'; -import { cleanKibana, deleteAlertsAndRules, deleteConnectors } from '../../tasks/common'; -import { addEmailConnectorAndRuleAction } from '../../tasks/common/rule_actions'; +} from '../../../tasks/alerts_detection_rules'; +import { deleteSelectedRules } from '../../../tasks/rules_bulk_actions'; +import { createRule } from '../../../tasks/api_calls/rules'; +import { createTimeline } from '../../../tasks/api_calls/timelines'; +import { cleanKibana, deleteAlertsAndRules, deleteConnectors } from '../../../tasks/common'; +import { addEmailConnectorAndRuleAction } from '../../../tasks/common/rule_actions'; import { createAndEnableRule, expandAdvancedSettings, @@ -100,12 +105,12 @@ import { importSavedQuery, waitForAlertsToPopulate, waitForTheRuleToBeExecuted, -} from '../../tasks/create_new_rule'; -import { saveEditedRule } from '../../tasks/edit_rule'; -import { login, visit } from '../../tasks/login'; -import { enablesRule, getDetails } from '../../tasks/rule_details'; +} from '../../../tasks/create_new_rule'; +import { saveEditedRule } from '../../../tasks/edit_rule'; +import { login, visit } from '../../../tasks/login'; +import { enablesRule, getDetails } from '../../../tasks/rule_details'; -import { RULE_CREATION, DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation'; +import { RULE_CREATION, DETECTIONS_RULE_MANAGEMENT_URL } from '../../../urls/navigation'; describe('Custom query rules', () => { before(() => { diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule_data_view.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/custom_query_rule_data_view.cy.ts similarity index 89% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule_data_view.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/custom_query_rule_data_view.cy.ts index 3298cbb32adcc39..b1bcf1336670a67 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_query_rule_data_view.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/custom_query_rule_data_view.cy.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { formatMitreAttackDescription, getHumanizedDuration } from '../../helpers/rules'; -import { getDataViewRule } from '../../objects/rule'; -import { ALERTS_COUNT, ALERT_GRID_CELL } from '../../screens/alerts'; +import { formatMitreAttackDescription, getHumanizedDuration } from '../../../helpers/rules'; +import { getDataViewRule } from '../../../objects/rule'; +import { ALERTS_COUNT, ALERT_GRID_CELL } from '../../../screens/alerts'; import { CUSTOM_RULES_BTN, @@ -17,12 +17,12 @@ import { RULES_MANAGEMENT_TABLE, RULE_SWITCH, SEVERITY, -} from '../../screens/alerts_detection_rules'; +} from '../../../screens/alerts_detection_rules'; import { ABOUT_CONTINUE_BTN, RULE_DESCRIPTION_INPUT, RULE_NAME_INPUT, -} from '../../screens/create_new_rule'; +} from '../../../screens/create_new_rule'; import { ADDITIONAL_LOOK_BACK_DETAILS, @@ -48,10 +48,10 @@ import { TIMELINE_TEMPLATE_DETAILS, DATA_VIEW_DETAILS, EDIT_RULE_SETTINGS_LINK, -} from '../../screens/rule_details'; +} from '../../../screens/rule_details'; -import { goToRuleDetails } from '../../tasks/alerts_detection_rules'; -import { postDataView } from '../../tasks/common'; +import { goToRuleDetails } from '../../../tasks/alerts_detection_rules'; +import { postDataView } from '../../../tasks/common'; import { createAndEnableRule, createRuleWithoutEnabling, @@ -60,12 +60,12 @@ import { fillScheduleRuleAndContinue, waitForAlertsToPopulate, waitForTheRuleToBeExecuted, -} from '../../tasks/create_new_rule'; +} from '../../../tasks/create_new_rule'; -import { login, visit } from '../../tasks/login'; -import { getDetails } from '../../tasks/rule_details'; +import { login, visit } from '../../../tasks/login'; +import { getDetails } from '../../../tasks/rule_details'; -import { RULE_CREATION } from '../../urls/navigation'; +import { RULE_CREATION } from '../../../urls/navigation'; describe('Custom query rules', () => { describe('Custom detection rules creation with data views', () => { diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_saved_query_rule.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/custom_saved_query_rule.cy.ts similarity index 91% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_saved_query_rule.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/custom_saved_query_rule.cy.ts index 3d5d0ec7252698d..3c43bca29260220 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/custom_saved_query_rule.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/custom_saved_query_rule.cy.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { getNewRule, getSavedQueryRule } from '../../objects/rule'; +import { getNewRule, getSavedQueryRule } from '../../../objects/rule'; import { DEFINE_CONTINUE_BUTTON, CUSTOM_QUERY_BAR, LOAD_QUERY_DYNAMICALLY_CHECKBOX, QUERY_BAR, -} from '../../screens/create_new_rule'; -import { TOASTER } from '../../screens/alerts_detection_rules'; +} from '../../../screens/create_new_rule'; +import { TOASTER } from '../../../screens/alerts_detection_rules'; import { RULE_NAME_HEADER, SAVED_QUERY_NAME_DETAILS, @@ -21,11 +21,11 @@ import { SAVED_QUERY_FILTERS_DETAILS, DEFINE_RULE_PANEL_PROGRESS, CUSTOM_QUERY_DETAILS, -} from '../../screens/rule_details'; +} from '../../../screens/rule_details'; -import { goToRuleDetails, editFirstRule } from '../../tasks/alerts_detection_rules'; -import { createSavedQuery, deleteSavedQueries } from '../../tasks/api_calls/saved_queries'; -import { cleanKibana, deleteAlertsAndRules } from '../../tasks/common'; +import { goToRuleDetails, editFirstRule } from '../../../tasks/alerts_detection_rules'; +import { createSavedQuery, deleteSavedQueries } from '../../../tasks/api_calls/saved_queries'; +import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common'; import { createAndEnableRule, fillAboutRuleAndContinue, @@ -34,13 +34,13 @@ import { getCustomQueryInput, checkLoadQueryDynamically, uncheckLoadQueryDynamically, -} from '../../tasks/create_new_rule'; -import { saveEditedRule } from '../../tasks/edit_rule'; -import { login, visit } from '../../tasks/login'; -import { getDetails } from '../../tasks/rule_details'; -import { createRule } from '../../tasks/api_calls/rules'; +} from '../../../tasks/create_new_rule'; +import { saveEditedRule } from '../../../tasks/edit_rule'; +import { login, visit } from '../../../tasks/login'; +import { getDetails } from '../../../tasks/rule_details'; +import { createRule } from '../../../tasks/api_calls/rules'; -import { RULE_CREATION, SECURITY_DETECTIONS_RULES_URL } from '../../urls/navigation'; +import { RULE_CREATION, SECURITY_DETECTIONS_RULES_URL } from '../../../urls/navigation'; const savedQueryName = 'custom saved query'; const savedQueryQuery = 'process.name: test'; diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/event_correlation_rule.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/event_correlation_rule.cy.ts similarity index 91% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/event_correlation_rule.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/event_correlation_rule.cy.ts index bc7d9c2bea863bc..a470a322b18316e 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/event_correlation_rule.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/event_correlation_rule.cy.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { formatMitreAttackDescription, getHumanizedDuration } from '../../helpers/rules'; -import { getEqlRule, getEqlSequenceRule, getIndexPatterns } from '../../objects/rule'; +import { formatMitreAttackDescription, getHumanizedDuration } from '../../../helpers/rules'; +import { getEqlRule, getEqlSequenceRule, getIndexPatterns } from '../../../objects/rule'; -import { ALERTS_COUNT, ALERT_DATA_GRID } from '../../screens/alerts'; +import { ALERTS_COUNT, ALERT_DATA_GRID } from '../../../screens/alerts'; import { CUSTOM_RULES_BTN, RISK_SCORE, @@ -16,7 +16,7 @@ import { RULE_NAME, RULE_SWITCH, SEVERITY, -} from '../../screens/alerts_detection_rules'; +} from '../../../screens/alerts_detection_rules'; import { ABOUT_DETAILS, ABOUT_INVESTIGATION_NOTES, @@ -39,15 +39,15 @@ import { SEVERITY_DETAILS, TAGS_DETAILS, TIMELINE_TEMPLATE_DETAILS, -} from '../../screens/rule_details'; +} from '../../../screens/rule_details'; -import { getDetails } from '../../tasks/rule_details'; +import { getDetails } from '../../../tasks/rule_details'; import { expectNumberOfRules, goToRuleDetails, goToTheRuleDetailsOf, -} from '../../tasks/alerts_detection_rules'; -import { cleanKibana, deleteAlertsAndRules } from '../../tasks/common'; +} from '../../../tasks/alerts_detection_rules'; +import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common'; import { createAndEnableRule, fillAboutRuleAndContinue, @@ -56,10 +56,10 @@ import { selectEqlRuleType, waitForAlertsToPopulate, waitForTheRuleToBeExecuted, -} from '../../tasks/create_new_rule'; -import { login, visit } from '../../tasks/login'; +} from '../../../tasks/create_new_rule'; +import { login, visit } from '../../../tasks/login'; -import { RULE_CREATION } from '../../urls/navigation'; +import { RULE_CREATION } from '../../../urls/navigation'; describe('EQL rules', () => { before(() => { diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/indicator_match_rule.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/indicator_match_rule.cy.ts similarity index 95% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/indicator_match_rule.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/indicator_match_rule.cy.ts index f7b5ed197f43fdf..ec216364a203142 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/indicator_match_rule.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/indicator_match_rule.cy.ts @@ -5,20 +5,20 @@ * 2.0. */ -import { formatMitreAttackDescription, getHumanizedDuration } from '../../helpers/rules'; +import { formatMitreAttackDescription, getHumanizedDuration } from '../../../helpers/rules'; import { getIndexPatterns, getNewThreatIndicatorRule, getThreatIndexPatterns, indicatorRuleMatchingDoc, -} from '../../objects/rule'; +} from '../../../objects/rule'; import { ALERT_RULE_NAME, ALERT_RISK_SCORE, ALERT_SEVERITY, ALERTS_COUNT, -} from '../../screens/alerts'; +} from '../../../screens/alerts'; import { CUSTOM_RULES_BTN, RISK_SCORE, @@ -26,7 +26,7 @@ import { RULE_NAME, RULE_SWITCH, SEVERITY, -} from '../../screens/alerts_detection_rules'; +} from '../../../screens/alerts_detection_rules'; import { ABOUT_DETAILS, ABOUT_INVESTIGATION_NOTES, @@ -53,9 +53,9 @@ import { SEVERITY_DETAILS, TAGS_DETAILS, TIMELINE_TEMPLATE_DETAILS, -} from '../../screens/rule_details'; -import { INDICATOR_MATCH_ROW_RENDER, PROVIDER_BADGE } from '../../screens/timeline'; -import { investigateFirstAlertInTimeline } from '../../tasks/alerts'; +} from '../../../screens/rule_details'; +import { INDICATOR_MATCH_ROW_RENDER, PROVIDER_BADGE } from '../../../screens/timeline'; +import { investigateFirstAlertInTimeline } from '../../../tasks/alerts'; import { duplicateFirstRule, duplicateRuleFromMenu, @@ -63,11 +63,11 @@ import { selectNumberOfRules, checkDuplicatedRule, expectNumberOfRules, -} from '../../tasks/alerts_detection_rules'; -import { duplicateSelectedRulesWithExceptions } from '../../tasks/rules_bulk_actions'; -import { createRule } from '../../tasks/api_calls/rules'; -import { loadPrepackagedTimelineTemplates } from '../../tasks/api_calls/timelines'; -import { cleanKibana, deleteAlertsAndRules } from '../../tasks/common'; +} from '../../../tasks/alerts_detection_rules'; +import { duplicateSelectedRulesWithExceptions } from '../../../tasks/rules_bulk_actions'; +import { createRule } from '../../../tasks/api_calls/rules'; +import { loadPrepackagedTimelineTemplates } from '../../../tasks/api_calls/timelines'; +import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common'; import { createAndEnableRule, fillAboutRuleAndContinue, @@ -93,18 +93,18 @@ import { selectIndicatorMatchType, waitForAlertsToPopulate, waitForTheRuleToBeExecuted, -} from '../../tasks/create_new_rule'; +} from '../../../tasks/create_new_rule'; import { SCHEDULE_INTERVAL_AMOUNT_INPUT, SCHEDULE_INTERVAL_UNITS_INPUT, SCHEDULE_LOOKBACK_AMOUNT_INPUT, SCHEDULE_LOOKBACK_UNITS_INPUT, -} from '../../screens/create_new_rule'; -import { goBackToRuleDetails } from '../../tasks/edit_rule'; -import { login, visit, visitWithoutDateRange } from '../../tasks/login'; -import { goBackToRulesTable, getDetails } from '../../tasks/rule_details'; +} from '../../../screens/create_new_rule'; +import { goBackToRuleDetails } from '../../../tasks/edit_rule'; +import { login, visit, visitWithoutDateRange } from '../../../tasks/login'; +import { goBackToRulesTable, getDetails } from '../../../tasks/rule_details'; -import { DETECTIONS_RULE_MANAGEMENT_URL, RULE_CREATION } from '../../urls/navigation'; +import { DETECTIONS_RULE_MANAGEMENT_URL, RULE_CREATION } from '../../../urls/navigation'; const DEFAULT_THREAT_MATCH_QUERY = '@timestamp >= "now-30d/d"'; diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/machine_learning_rule.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/machine_learning_rule.cy.ts similarity index 88% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/machine_learning_rule.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/machine_learning_rule.cy.ts index 6c5de4f505af81d..d975be9249a5e53 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/machine_learning_rule.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/machine_learning_rule.cy.ts @@ -7,8 +7,8 @@ import { isArray } from 'lodash'; -import { formatMitreAttackDescription, getHumanizedDuration } from '../../helpers/rules'; -import { getMachineLearningRule } from '../../objects/rule'; +import { formatMitreAttackDescription, getHumanizedDuration } from '../../../helpers/rules'; +import { getMachineLearningRule } from '../../../objects/rule'; import { CUSTOM_RULES_BTN, @@ -17,7 +17,7 @@ import { RULE_NAME, RULE_SWITCH, SEVERITY, -} from '../../screens/alerts_detection_rules'; +} from '../../../screens/alerts_detection_rules'; import { ABOUT_DETAILS, ABOUT_RULE_DESCRIPTION, @@ -38,21 +38,21 @@ import { SEVERITY_DETAILS, TAGS_DETAILS, TIMELINE_TEMPLATE_DETAILS, -} from '../../screens/rule_details'; +} from '../../../screens/rule_details'; -import { getDetails } from '../../tasks/rule_details'; -import { expectNumberOfRules, goToRuleDetails } from '../../tasks/alerts_detection_rules'; -import { cleanKibana } from '../../tasks/common'; +import { getDetails } from '../../../tasks/rule_details'; +import { expectNumberOfRules, goToRuleDetails } from '../../../tasks/alerts_detection_rules'; +import { cleanKibana } from '../../../tasks/common'; import { createAndEnableRule, fillAboutRuleAndContinue, fillDefineMachineLearningRuleAndContinue, fillScheduleRuleAndContinue, selectMachineLearningRuleType, -} from '../../tasks/create_new_rule'; -import { login, visitWithoutDateRange } from '../../tasks/login'; +} from '../../../tasks/create_new_rule'; +import { login, visitWithoutDateRange } from '../../../tasks/login'; -import { RULE_CREATION } from '../../urls/navigation'; +import { RULE_CREATION } from '../../../urls/navigation'; describe('Detection rules, machine learning', () => { const expectedUrls = (getMachineLearningRule().references ?? []).join(''); diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/new_terms_rule.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/new_terms_rule.cy.ts similarity index 88% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/new_terms_rule.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/new_terms_rule.cy.ts index 7e46d5d67f6db4b..ae6296aea904bd0 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/new_terms_rule.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/new_terms_rule.cy.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { formatMitreAttackDescription, getHumanizedDuration } from '../../helpers/rules'; -import { getIndexPatterns, getNewTermsRule } from '../../objects/rule'; +import { formatMitreAttackDescription, getHumanizedDuration } from '../../../helpers/rules'; +import { getIndexPatterns, getNewTermsRule } from '../../../objects/rule'; -import { ALERT_DATA_GRID } from '../../screens/alerts'; +import { ALERT_DATA_GRID } from '../../../screens/alerts'; import { CUSTOM_RULES_BTN, RISK_SCORE, @@ -16,7 +16,7 @@ import { RULE_NAME, RULE_SWITCH, SEVERITY, -} from '../../screens/alerts_detection_rules'; +} from '../../../screens/alerts_detection_rules'; import { ABOUT_DETAILS, ABOUT_INVESTIGATION_NOTES, @@ -41,11 +41,11 @@ import { TIMELINE_TEMPLATE_DETAILS, NEW_TERMS_HISTORY_WINDOW_DETAILS, NEW_TERMS_FIELDS_DETAILS, -} from '../../screens/rule_details'; +} from '../../../screens/rule_details'; -import { getDetails } from '../../tasks/rule_details'; -import { expectNumberOfRules, goToRuleDetails } from '../../tasks/alerts_detection_rules'; -import { cleanKibana, deleteAlertsAndRules } from '../../tasks/common'; +import { getDetails } from '../../../tasks/rule_details'; +import { expectNumberOfRules, goToRuleDetails } from '../../../tasks/alerts_detection_rules'; +import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common'; import { createAndEnableRule, fillAboutRuleAndContinue, @@ -54,10 +54,10 @@ import { selectNewTermsRuleType, waitForAlertsToPopulate, waitForTheRuleToBeExecuted, -} from '../../tasks/create_new_rule'; -import { login, visit } from '../../tasks/login'; +} from '../../../tasks/create_new_rule'; +import { login, visit } from '../../../tasks/login'; -import { RULE_CREATION } from '../../urls/navigation'; +import { RULE_CREATION } from '../../../urls/navigation'; describe('New Terms rules', () => { before(() => { diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/override.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/override.cy.ts similarity index 90% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/override.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/override.cy.ts index 3e8f7b22f46652e..0e6a9462237d8d6 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/override.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/override.cy.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { formatMitreAttackDescription, getHumanizedDuration } from '../../helpers/rules'; -import { getIndexPatterns, getNewOverrideRule, getSeveritiesOverride } from '../../objects/rule'; +import { formatMitreAttackDescription, getHumanizedDuration } from '../../../helpers/rules'; +import { getIndexPatterns, getNewOverrideRule, getSeveritiesOverride } from '../../../objects/rule'; -import { ALERT_GRID_CELL, ALERTS_COUNT } from '../../screens/alerts'; +import { ALERT_GRID_CELL, ALERTS_COUNT } from '../../../screens/alerts'; import { CUSTOM_RULES_BTN, @@ -17,7 +17,7 @@ import { RULE_NAME, RULE_SWITCH, SEVERITY, -} from '../../screens/alerts_detection_rules'; +} from '../../../screens/alerts_detection_rules'; import { ABOUT_INVESTIGATION_NOTES, ABOUT_DETAILS, @@ -45,9 +45,9 @@ import { TAGS_DETAILS, TIMELINE_TEMPLATE_DETAILS, TIMESTAMP_OVERRIDE_DETAILS, -} from '../../screens/rule_details'; +} from '../../../screens/rule_details'; -import { expectNumberOfRules, goToRuleDetails } from '../../tasks/alerts_detection_rules'; +import { expectNumberOfRules, goToRuleDetails } from '../../../tasks/alerts_detection_rules'; import { createAndEnableRule, fillAboutRuleWithOverrideAndContinue, @@ -55,11 +55,11 @@ import { fillScheduleRuleAndContinue, waitForAlertsToPopulate, waitForTheRuleToBeExecuted, -} from '../../tasks/create_new_rule'; -import { login, visitWithoutDateRange } from '../../tasks/login'; -import { getDetails } from '../../tasks/rule_details'; +} from '../../../tasks/create_new_rule'; +import { login, visitWithoutDateRange } from '../../../tasks/login'; +import { getDetails } from '../../../tasks/rule_details'; -import { RULE_CREATION } from '../../urls/navigation'; +import { RULE_CREATION } from '../../../urls/navigation'; describe('Detection rules, override', () => { const rule = getNewOverrideRule(); diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/threshold_rule.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/threshold_rule.cy.ts similarity index 86% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/threshold_rule.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/threshold_rule.cy.ts index e7f96ded0b06e03..5c244b8bb52cab4 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/threshold_rule.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation/threshold_rule.cy.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { formatMitreAttackDescription, getHumanizedDuration } from '../../helpers/rules'; -import { getIndexPatterns, getNewThresholdRule } from '../../objects/rule'; +import { formatMitreAttackDescription, getHumanizedDuration } from '../../../helpers/rules'; +import { getIndexPatterns, getNewThresholdRule } from '../../../objects/rule'; -import { ALERTS_COUNT, ALERT_GRID_CELL } from '../../screens/alerts'; +import { ALERTS_COUNT, ALERT_GRID_CELL } from '../../../screens/alerts'; import { CUSTOM_RULES_BTN, @@ -17,7 +17,7 @@ import { RULE_NAME, RULE_SWITCH, SEVERITY, -} from '../../screens/alerts_detection_rules'; +} from '../../../screens/alerts_detection_rules'; import { ABOUT_DETAILS, ABOUT_INVESTIGATION_NOTES, @@ -41,11 +41,11 @@ import { TAGS_DETAILS, THRESHOLD_DETAILS, TIMELINE_TEMPLATE_DETAILS, -} from '../../screens/rule_details'; +} from '../../../screens/rule_details'; -import { getDetails } from '../../tasks/rule_details'; -import { expectNumberOfRules, goToRuleDetails } from '../../tasks/alerts_detection_rules'; -import { cleanKibana, deleteAlertsAndRules } from '../../tasks/common'; +import { getDetails } from '../../../tasks/rule_details'; +import { expectNumberOfRules, goToRuleDetails } from '../../../tasks/alerts_detection_rules'; +import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common'; import { createAndEnableRule, fillAboutRuleAndContinue, @@ -54,10 +54,10 @@ import { selectThresholdRuleType, waitForAlertsToPopulate, waitForTheRuleToBeExecuted, -} from '../../tasks/create_new_rule'; -import { login, visitWithoutDateRange } from '../../tasks/login'; +} from '../../../tasks/create_new_rule'; +import { login, visitWithoutDateRange } from '../../../tasks/login'; -import { RULE_CREATION } from '../../urls/navigation'; +import { RULE_CREATION } from '../../../urls/navigation'; describe('Detection rules, threshold', () => { const rule = getNewThresholdRule(); diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/all_rules_read_only.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/authorization/all_rules_read_only.cy.ts similarity index 70% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/all_rules_read_only.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/authorization/all_rules_read_only.cy.ts index 254990f73cb0ed9..eb7fa7054896f21 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/all_rules_read_only.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/authorization/all_rules_read_only.cy.ts @@ -5,20 +5,24 @@ * 2.0. */ -import { ROLES } from '../../../common/test'; -import { getNewRule } from '../../objects/rule'; +import { ROLES } from '../../../../../common/test'; +import { getNewRule } from '../../../../objects/rule'; import { COLLAPSED_ACTION_BTN, RULE_CHECKBOX, RULE_NAME, -} from '../../screens/alerts_detection_rules'; -import { VALUE_LISTS_MODAL_ACTIVATOR } from '../../screens/lists'; -import { waitForRulesTableToBeLoaded } from '../../tasks/alerts_detection_rules'; -import { createRule } from '../../tasks/api_calls/rules'; -import { cleanKibana } from '../../tasks/common'; -import { dismissCallOut, getCallOut, waitForCallOutToBeShown } from '../../tasks/common/callouts'; -import { login, visitWithoutDateRange } from '../../tasks/login'; -import { SECURITY_DETECTIONS_RULES_URL } from '../../urls/navigation'; +} from '../../../../screens/alerts_detection_rules'; +import { VALUE_LISTS_MODAL_ACTIVATOR } from '../../../../screens/lists'; +import { waitForRulesTableToBeLoaded } from '../../../../tasks/alerts_detection_rules'; +import { createRule } from '../../../../tasks/api_calls/rules'; +import { cleanKibana } from '../../../../tasks/common'; +import { + dismissCallOut, + getCallOut, + waitForCallOutToBeShown, +} from '../../../../tasks/common/callouts'; +import { login, visitWithoutDateRange } from '../../../../tasks/login'; +import { SECURITY_DETECTIONS_RULES_URL } from '../../../../urls/navigation'; const MISSING_PRIVILEGES_CALLOUT = 'missing-user-privileges'; diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/maintenance_window.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/maintenance_windows/maintenance_window_callout.cy.ts similarity index 89% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/maintenance_window.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/maintenance_windows/maintenance_window_callout.cy.ts index bdd481762c29b7d..738c844262bf21d 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/maintenance_window.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/maintenance_windows/maintenance_window_callout.cy.ts @@ -8,9 +8,9 @@ import { INTERNAL_ALERTING_API_MAINTENANCE_WINDOW_PATH } from '@kbn/alerting-plugin/common'; import type { MaintenanceWindowCreateBody } from '@kbn/alerting-plugin/common'; import type { AsApiContract } from '@kbn/alerting-plugin/server/routes/lib'; -import { cleanKibana } from '../../tasks/common'; -import { login, visit } from '../../tasks/login'; -import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation'; +import { cleanKibana } from '../../../../tasks/common'; +import { login, visit } from '../../../../tasks/login'; +import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../../../urls/navigation'; describe('Maintenance window callout on Rule Management page', () => { let maintenanceWindowId = ''; diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/related_integrations.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/related_integrations/related_integrations.cy.ts similarity index 89% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/related_integrations.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/related_integrations/related_integrations.cy.ts index 8f787a3826396e0..56865abd794c321 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/related_integrations.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/related_integrations/related_integrations.cy.ts @@ -5,36 +5,36 @@ * 2.0. */ -import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation'; +import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../../../urls/navigation'; -import { FIELD } from '../../screens/alerts_details'; -import { INTEGRATIONS, INTEGRATIONS_STATUS } from '../../screens/rule_details'; +import { FIELD } from '../../../../screens/alerts_details'; +import { INTEGRATIONS, INTEGRATIONS_STATUS } from '../../../../screens/rule_details'; import { INTEGRATIONS_POPOVER, INTEGRATIONS_POPOVER_TITLE, RULE_NAME, -} from '../../screens/alerts_detection_rules'; +} from '../../../../screens/alerts_detection_rules'; -import { cleanFleet } from '../../tasks/api_calls/fleet'; -import { importRule } from '../../tasks/api_calls/rules'; +import { cleanFleet } from '../../../../tasks/api_calls/fleet'; +import { importRule } from '../../../../tasks/api_calls/rules'; import { disableRelatedIntegrations, enableRelatedIntegrations, -} from '../../tasks/api_calls/kibana_advanced_settings'; - -import { cleanKibana } from '../../tasks/common'; -import { login, visit } from '../../tasks/login'; -import { expandFirstAlert } from '../../tasks/alerts'; -import { filterBy, openTable } from '../../tasks/alerts_details'; -import { waitForAlertsToPopulate } from '../../tasks/create_new_rule'; -import { installAwsCloudFrontWithPolicy } from '../../tasks/integrations'; +} from '../../../../tasks/api_calls/kibana_advanced_settings'; + +import { cleanKibana } from '../../../../tasks/common'; +import { login, visit } from '../../../../tasks/login'; +import { expandFirstAlert } from '../../../../tasks/alerts'; +import { filterBy, openTable } from '../../../../tasks/alerts_details'; +import { waitForAlertsToPopulate } from '../../../../tasks/create_new_rule'; +import { installAwsCloudFrontWithPolicy } from '../../../../tasks/integrations'; import { enableRule, goToTheRuleDetailsOf, openIntegrationsPopover, waitForRulesTableToShow, waitForRuleToUpdate, -} from '../../tasks/alerts_detection_rules'; +} from '../../../../tasks/alerts_detection_rules'; /* Note that the rule we are using for testing purposes has the following characteristics, changing that may affect the coverage. diff --git a/x-pack/plugins/security_solution/cypress/e2e/detections_response/rules_management/bulk_actions/bulk_duplicate_rules.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts similarity index 84% rename from x-pack/plugins/security_solution/cypress/e2e/detections_response/rules_management/bulk_actions/bulk_duplicate_rules.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts index 2f091fd4d03afe0..c687deff53cf9f0 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detections_response/rules_management/bulk_actions/bulk_duplicate_rules.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts @@ -10,27 +10,31 @@ import { goToTheRuleDetailsOf, selectNumberOfRules, expectManagementTableRules, -} from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../tasks/alerts_detection_rules'; import { duplicateSelectedRulesWithoutExceptions, duplicateSelectedRulesWithExceptions, duplicateSelectedRulesWithNonExpiredExceptions, -} from '../../../../tasks/rules_bulk_actions'; -import { goToExceptionsTab, viewExpiredExceptionItems } from '../../../../tasks/rule_details'; -import { login, visitWithoutDateRange } from '../../../../tasks/login'; +} from '../../../../../tasks/rules_bulk_actions'; +import { goToExceptionsTab, viewExpiredExceptionItems } from '../../../../../tasks/rule_details'; +import { login, visitWithoutDateRange } from '../../../../../tasks/login'; -import { SECURITY_DETECTIONS_RULES_URL } from '../../../../urls/navigation'; -import { createRule } from '../../../../tasks/api_calls/rules'; -import { cleanKibana, resetRulesTableState, deleteAlertsAndRules } from '../../../../tasks/common'; +import { SECURITY_DETECTIONS_RULES_URL } from '../../../../../urls/navigation'; +import { createRule } from '../../../../../tasks/api_calls/rules'; +import { + cleanKibana, + resetRulesTableState, + deleteAlertsAndRules, +} from '../../../../../tasks/common'; -import { getNewRule } from '../../../../objects/rule'; +import { getNewRule } from '../../../../../objects/rule'; -import { createRuleExceptionItem } from '../../../../tasks/api_calls/exceptions'; -import { EXCEPTION_CARD_ITEM_NAME } from '../../../../screens/exceptions'; +import { createRuleExceptionItem } from '../../../../../tasks/api_calls/exceptions'; +import { EXCEPTION_CARD_ITEM_NAME } from '../../../../../screens/exceptions'; import { assertExceptionItemsExists, assertNumberOfExceptionItemsExists, -} from '../../../../tasks/exceptions'; +} from '../../../../../tasks/exceptions'; const RULE_NAME = 'Custom rule for bulk actions'; diff --git a/x-pack/plugins/security_solution/cypress/e2e/detections_response/rules_management/bulk_actions/bulk_edit_rules.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts similarity index 94% rename from x-pack/plugins/security_solution/cypress/e2e/detections_response/rules_management/bulk_actions/bulk_edit_rules.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts index efb546fb8ec29bf..385a4476b2e8a20 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detections_response/rules_management/bulk_actions/bulk_edit_rules.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts @@ -11,7 +11,7 @@ import { RULE_CHECKBOX, RULES_TAGS_POPOVER_BTN, MODAL_ERROR_BODY, -} from '../../../../screens/alerts_detection_rules'; +} from '../../../../../screens/alerts_detection_rules'; import { RULES_BULK_EDIT_INDEX_PATTERNS_WARNING, @@ -20,11 +20,11 @@ import { TAGS_RULE_BULK_MENU_ITEM, INDEX_PATTERNS_RULE_BULK_MENU_ITEM, APPLY_TIMELINE_RULE_BULK_MENU_ITEM, -} from '../../../../screens/rules_bulk_actions'; +} from '../../../../../screens/rules_bulk_actions'; -import { TIMELINE_TEMPLATE_DETAILS } from '../../../../screens/rule_details'; +import { TIMELINE_TEMPLATE_DETAILS } from '../../../../../screens/rule_details'; -import { EUI_FILTER_SELECT_ITEM } from '../../../../screens/common/controls'; +import { EUI_FILTER_SELECT_ITEM } from '../../../../../screens/common/controls'; import { waitForRulesTableToBeLoaded, @@ -38,7 +38,7 @@ import { clickErrorToastBtn, unselectRuleByName, cancelConfirmationModal, -} from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../tasks/alerts_detection_rules'; import { typeIndexPatterns, @@ -69,15 +69,19 @@ import { assertRuleScheduleValues, assertUpdateScheduleWarningExists, assertDefaultValuesAreAppliedToScheduleFields, -} from '../../../../tasks/rules_bulk_actions'; +} from '../../../../../tasks/rules_bulk_actions'; -import { hasIndexPatterns, getDetails } from '../../../../tasks/rule_details'; -import { login, visitWithoutDateRange } from '../../../../tasks/login'; +import { hasIndexPatterns, getDetails } from '../../../../../tasks/rule_details'; +import { login, visitWithoutDateRange } from '../../../../../tasks/login'; -import { SECURITY_DETECTIONS_RULES_URL } from '../../../../urls/navigation'; -import { createRule } from '../../../../tasks/api_calls/rules'; -import { loadPrepackagedTimelineTemplates } from '../../../../tasks/api_calls/timelines'; -import { cleanKibana, resetRulesTableState, deleteAlertsAndRules } from '../../../../tasks/common'; +import { SECURITY_DETECTIONS_RULES_URL } from '../../../../../urls/navigation'; +import { createRule } from '../../../../../tasks/api_calls/rules'; +import { loadPrepackagedTimelineTemplates } from '../../../../../tasks/api_calls/timelines'; +import { + cleanKibana, + resetRulesTableState, + deleteAlertsAndRules, +} from '../../../../../tasks/common'; import { getEqlRule, @@ -86,13 +90,13 @@ import { getNewThresholdRule, getMachineLearningRule, getNewTermsRule, -} from '../../../../objects/rule'; +} from '../../../../../objects/rule'; import { getAvailablePrebuiltRulesCount, excessivelyInstallAllPrebuiltRules, -} from '../../../../tasks/api_calls/prebuilt_rules'; -import { setRowsPerPageTo } from '../../../../tasks/table_pagination'; +} from '../../../../../tasks/api_calls/prebuilt_rules'; +import { setRowsPerPageTo } from '../../../../../tasks/table_pagination'; const RULE_NAME = 'Custom rule for bulk actions'; const EUI_SELECTABLE_LIST_ITEM_SR_TEXT = '. To check this option, press Enter.'; diff --git a/x-pack/plugins/security_solution/cypress/e2e/detections_response/rules_management/bulk_actions/bulk_edit_rules_actions.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts similarity index 89% rename from x-pack/plugins/security_solution/cypress/e2e/detections_response/rules_management/bulk_actions/bulk_edit_rules_actions.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts index 7f06d43f4bd960c..386d0be97d2a855 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detections_response/rules_management/bulk_actions/bulk_edit_rules_actions.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts @@ -6,17 +6,17 @@ */ import type { RuleActionArray } from '@kbn/securitysolution-io-ts-alerting-types'; -import { ROLES } from '../../../../../common/test'; +import { ROLES } from '../../../../../../common/test'; import { RULES_BULK_EDIT_ACTIONS_INFO, RULES_BULK_EDIT_ACTIONS_WARNING, ADD_RULE_ACTIONS_MENU_ITEM, -} from '../../../../screens/rules_bulk_actions'; -import { actionFormSelector } from '../../../../screens/common/rule_actions'; +} from '../../../../../screens/rules_bulk_actions'; +import { actionFormSelector } from '../../../../../screens/common/rule_actions'; -import { cleanKibana, deleteAlertsAndRules, deleteConnectors } from '../../../../tasks/common'; -import type { RuleActionCustomFrequency } from '../../../../tasks/common/rule_actions'; +import { cleanKibana, deleteAlertsAndRules, deleteConnectors } from '../../../../../tasks/common'; +import type { RuleActionCustomFrequency } from '../../../../../tasks/common/rule_actions'; import { addSlackRuleAction, assertSlackRuleAction, @@ -28,25 +28,25 @@ import { pickCustomFrequencyOption, pickPerRuleRunFrequencyOption, pickSummaryOfAlertsOption, -} from '../../../../tasks/common/rule_actions'; +} from '../../../../../tasks/common/rule_actions'; import { waitForRulesTableToBeLoaded, selectNumberOfRules, goToEditRuleActionsSettingsOf, -} from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../tasks/alerts_detection_rules'; import { waitForBulkEditActionToFinish, submitBulkEditForm, checkOverwriteRuleActionsCheckbox, openBulkEditRuleActionsForm, openBulkActionsMenu, -} from '../../../../tasks/rules_bulk_actions'; -import { login, visitWithoutDateRange } from '../../../../tasks/login'; +} from '../../../../../tasks/rules_bulk_actions'; +import { login, visitWithoutDateRange } from '../../../../../tasks/login'; -import { SECURITY_DETECTIONS_RULES_URL } from '../../../../urls/navigation'; +import { SECURITY_DETECTIONS_RULES_URL } from '../../../../../urls/navigation'; -import { createRule } from '../../../../tasks/api_calls/rules'; -import { createSlackConnector } from '../../../../tasks/api_calls/connectors'; +import { createRule } from '../../../../../tasks/api_calls/rules'; +import { createSlackConnector } from '../../../../../tasks/api_calls/connectors'; import { getEqlRule, @@ -55,8 +55,8 @@ import { getNewThresholdRule, getMachineLearningRule, getNewTermsRule, -} from '../../../../objects/rule'; -import { excessivelyInstallAllPrebuiltRules } from '../../../../tasks/api_calls/prebuilt_rules'; +} from '../../../../../objects/rule'; +import { excessivelyInstallAllPrebuiltRules } from '../../../../../tasks/api_calls/prebuilt_rules'; const ruleNameToAssert = 'Custom rule name with actions'; const expectedNumberOfCustomRulesToBeEdited = 7; diff --git a/x-pack/plugins/security_solution/cypress/e2e/detections_response/rules_management/bulk_actions/bulk_edit_rules_data_view.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts similarity index 93% rename from x-pack/plugins/security_solution/cypress/e2e/detections_response/rules_management/bulk_actions/bulk_edit_rules_data_view.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts index f3963340c897788..16fd49767fcc4c6 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detections_response/rules_management/bulk_actions/bulk_edit_rules_data_view.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts @@ -8,16 +8,16 @@ import { RULES_BULK_EDIT_DATA_VIEWS_WARNING, RULES_BULK_EDIT_OVERWRITE_DATA_VIEW_CHECKBOX, -} from '../../../../screens/rules_bulk_actions'; +} from '../../../../../screens/rules_bulk_actions'; -import { DATA_VIEW_DETAILS, INDEX_PATTERNS_DETAILS } from '../../../../screens/rule_details'; +import { DATA_VIEW_DETAILS, INDEX_PATTERNS_DETAILS } from '../../../../../screens/rule_details'; import { waitForRulesTableToBeLoaded, goToRuleDetails, selectNumberOfRules, goToTheRuleDetailsOf, -} from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../tasks/alerts_detection_rules'; import { typeIndexPatterns, @@ -27,18 +27,18 @@ import { checkOverwriteIndexPatternsCheckbox, openBulkEditAddIndexPatternsForm, openBulkEditDeleteIndexPatternsForm, -} from '../../../../tasks/rules_bulk_actions'; +} from '../../../../../tasks/rules_bulk_actions'; import { hasIndexPatterns, getDetails, assertDetailsNotExist, -} from '../../../../tasks/rule_details'; -import { login, visitWithoutDateRange } from '../../../../tasks/login'; +} from '../../../../../tasks/rule_details'; +import { login, visitWithoutDateRange } from '../../../../../tasks/login'; -import { SECURITY_DETECTIONS_RULES_URL } from '../../../../urls/navigation'; -import { createRule } from '../../../../tasks/api_calls/rules'; -import { cleanKibana, deleteAlertsAndRules, postDataView } from '../../../../tasks/common'; +import { SECURITY_DETECTIONS_RULES_URL } from '../../../../../urls/navigation'; +import { createRule } from '../../../../../tasks/api_calls/rules'; +import { cleanKibana, deleteAlertsAndRules, postDataView } from '../../../../../tasks/common'; import { getEqlRule, @@ -46,7 +46,7 @@ import { getNewRule, getNewThresholdRule, getNewTermsRule, -} from '../../../../objects/rule'; +} from '../../../../../objects/rule'; const DATA_VIEW_ID = 'auditbeat'; diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/export_rule.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts similarity index 87% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/export_rule.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts index f089b2991d78204..6c3c1dee6c7ad83 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/export_rule.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts @@ -7,13 +7,13 @@ import path from 'path'; -import { expectedExportedRule, getNewRule } from '../../objects/rule'; +import { expectedExportedRule, getNewRule } from '../../../../../objects/rule'; import { TOASTER_BODY, MODAL_CONFIRMATION_BODY, MODAL_CONFIRMATION_BTN, TOASTER, -} from '../../screens/alerts_detection_rules'; +} from '../../../../../screens/alerts_detection_rules'; import { filterByElasticRules, selectNumberOfRules, @@ -22,26 +22,29 @@ import { exportRule, importRules, expectManagementTableRules, -} from '../../tasks/alerts_detection_rules'; -import { bulkExportRules } from '../../tasks/rules_bulk_actions'; -import { createExceptionList, deleteExceptionList } from '../../tasks/api_calls/exceptions'; -import { getExceptionList } from '../../objects/exception'; -import { createRule } from '../../tasks/api_calls/rules'; +} from '../../../../../tasks/alerts_detection_rules'; +import { bulkExportRules } from '../../../../../tasks/rules_bulk_actions'; +import { + createExceptionList, + deleteExceptionList, +} from '../../../../../tasks/api_calls/exceptions'; +import { getExceptionList } from '../../../../../objects/exception'; +import { createRule } from '../../../../../tasks/api_calls/rules'; import { cleanKibana, resetRulesTableState, deleteAlertsAndRules, reload, -} from '../../tasks/common'; -import { login, visitWithoutDateRange } from '../../tasks/login'; +} from '../../../../../tasks/common'; +import { login, visitWithoutDateRange } from '../../../../../tasks/login'; -import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation'; +import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../../../../urls/navigation'; import { createAndInstallMockedPrebuiltRules, getAvailablePrebuiltRulesCount, preventPrebuiltRulesPackageInstallation, -} from '../../tasks/api_calls/prebuilt_rules'; -import { createRuleAssetSavedObject } from '../../helpers/rules'; +} from '../../../../../tasks/api_calls/prebuilt_rules'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; const EXPORTED_RULES_FILENAME = 'rules_export.ndjson'; const exceptionList = getExceptionList(); diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/import_rules.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/import_export/import_rules.cy.ts similarity index 88% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/import_rules.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/import_export/import_rules.cy.ts index eaa3cc5b989703b..183ab85bbd5d3bf 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/import_rules.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/import_export/import_rules.cy.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { TOASTER } from '../../screens/alerts_detection_rules'; +import { TOASTER } from '../../../../../screens/alerts_detection_rules'; import { expectManagementTableRules, importRules, importRulesWithOverwriteAll, -} from '../../tasks/alerts_detection_rules'; -import { cleanKibana, deleteAlertsAndRules, reload } from '../../tasks/common'; -import { login, visitWithoutDateRange } from '../../tasks/login'; +} from '../../../../../tasks/alerts_detection_rules'; +import { cleanKibana, deleteAlertsAndRules, reload } from '../../../../../tasks/common'; +import { login, visitWithoutDateRange } from '../../../../../tasks/login'; -import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation'; +import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../../../../urls/navigation'; const RULES_TO_IMPORT_FILENAME = 'cypress/fixtures/7_16_rules.ndjson'; describe('Import rules', () => { diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rule_snoozing.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts similarity index 84% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/rule_snoozing.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts index 20c48ebe9afbf90..08bddea26288a17 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rule_snoozing.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts @@ -6,14 +6,18 @@ */ import { INTERNAL_ALERTING_API_FIND_RULES_PATH } from '@kbn/alerting-plugin/common'; -import type { RuleResponse } from '../../../common/api/detection_engine'; -import { createRule, snoozeRule as snoozeRuleViaAPI } from '../../tasks/api_calls/rules'; -import { cleanKibana, deleteAlertsAndRules, deleteConnectors } from '../../tasks/common'; -import { login, visitWithoutDateRange } from '../../tasks/login'; -import { getNewRule } from '../../objects/rule'; -import { ruleDetailsUrl, ruleEditUrl, SECURITY_DETECTIONS_RULES_URL } from '../../urls/navigation'; -import { internalAlertingSnoozeRule } from '../../urls/routes'; -import { RULES_MANAGEMENT_TABLE, RULE_NAME } from '../../screens/alerts_detection_rules'; +import type { RuleResponse } from '../../../../../../common/api/detection_engine'; +import { createRule, snoozeRule as snoozeRuleViaAPI } from '../../../../../tasks/api_calls/rules'; +import { cleanKibana, deleteAlertsAndRules, deleteConnectors } from '../../../../../tasks/common'; +import { login, visitWithoutDateRange } from '../../../../../tasks/login'; +import { getNewRule } from '../../../../../objects/rule'; +import { + ruleDetailsUrl, + ruleEditUrl, + SECURITY_DETECTIONS_RULES_URL, +} from '../../../../../urls/navigation'; +import { internalAlertingSnoozeRule } from '../../../../../urls/routes'; +import { RULES_MANAGEMENT_TABLE, RULE_NAME } from '../../../../../screens/alerts_detection_rules'; import { expectRuleSnoozed, expectRuleSnoozedInTable, @@ -25,17 +29,17 @@ import { snoozeRule, snoozeRuleInTable, unsnoozeRuleInTable, -} from '../../tasks/rule_snoozing'; -import { createSlackConnector } from '../../tasks/api_calls/connectors'; -import { duplicateFirstRule, importRules } from '../../tasks/alerts_detection_rules'; -import { goToActionsStepTab } from '../../tasks/create_new_rule'; -import { goToRuleEditSettings } from '../../tasks/rule_details'; -import { actionFormSelector } from '../../screens/common/rule_actions'; -import { RULE_INDICES } from '../../screens/create_new_rule'; -import { addEmailConnectorAndRuleAction } from '../../tasks/common/rule_actions'; -import { saveEditedRule } from '../../tasks/edit_rule'; -import { DISABLED_SNOOZE_BADGE } from '../../screens/rule_snoozing'; -import { TOOLTIP } from '../../screens/common'; +} from '../../../../../tasks/rule_snoozing'; +import { createSlackConnector } from '../../../../../tasks/api_calls/connectors'; +import { duplicateFirstRule, importRules } from '../../../../../tasks/alerts_detection_rules'; +import { goToActionsStepTab } from '../../../../../tasks/create_new_rule'; +import { goToRuleEditSettings } from '../../../../../tasks/rule_details'; +import { actionFormSelector } from '../../../../../screens/common/rule_actions'; +import { RULE_INDICES } from '../../../../../screens/create_new_rule'; +import { addEmailConnectorAndRuleAction } from '../../../../../tasks/common/rule_actions'; +import { saveEditedRule } from '../../../../../tasks/edit_rule'; +import { DISABLED_SNOOZE_BADGE } from '../../../../../screens/rule_snoozing'; +import { TOOLTIP } from '../../../../../screens/common'; const RULES_TO_IMPORT_FILENAME = 'cypress/fixtures/7_16_rules.ndjson'; diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rules_table_auto_refresh.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_auto_refresh.cy.ts similarity index 86% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/rules_table_auto_refresh.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_auto_refresh.cy.ts index ec553a15c2b2f70..7304972a657908a 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rules_table_auto_refresh.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_auto_refresh.cy.ts @@ -10,7 +10,7 @@ import { REFRESH_RULES_STATUS, REFRESH_SETTINGS_SWITCH, REFRESH_SETTINGS_SELECTION_NOTE, -} from '../../screens/alerts_detection_rules'; +} from '../../../../screens/alerts_detection_rules'; import { checkAutoRefresh, waitForRulesTableToBeLoaded, @@ -22,19 +22,19 @@ import { disableAutoRefresh, checkAutoRefreshIsDisabled, checkAutoRefreshIsEnabled, -} from '../../tasks/alerts_detection_rules'; -import { login, visit, visitWithoutDateRange } from '../../tasks/login'; +} from '../../../../tasks/alerts_detection_rules'; +import { login, visit, visitWithoutDateRange } from '../../../../tasks/login'; -import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation'; -import { createRule } from '../../tasks/api_calls/rules'; -import { cleanKibana } from '../../tasks/common'; -import { getNewRule } from '../../objects/rule'; -import { setRowsPerPageTo } from '../../tasks/table_pagination'; +import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../../../urls/navigation'; +import { createRule } from '../../../../tasks/api_calls/rules'; +import { cleanKibana } from '../../../../tasks/common'; +import { getNewRule } from '../../../../objects/rule'; +import { setRowsPerPageTo } from '../../../../tasks/table_pagination'; const DEFAULT_RULE_REFRESH_INTERVAL_VALUE = 60000; // TODO: See https://github.com/elastic/kibana/issues/154694 -describe.skip('Alerts detection rules table auto-refresh', () => { +describe.skip('Rules table: auto-refresh', () => { before(() => { cleanKibana(); login(); diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rule_fiters.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_filtering.cy.ts similarity index 82% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/rule_fiters.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_filtering.cy.ts index 2dd0bc60710720a..5c94cfb3f1bcb95 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rule_fiters.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_filtering.cy.ts @@ -5,24 +5,28 @@ * 2.0. */ -import { cleanKibana, resetRulesTableState, deleteAlertsAndRules } from '../../tasks/common'; -import { login, visitWithoutDateRange } from '../../tasks/login'; +import { cleanKibana, resetRulesTableState, deleteAlertsAndRules } from '../../../../tasks/common'; +import { login, visitWithoutDateRange } from '../../../../tasks/login'; import { expectRulesWithExecutionStatus, filterByExecutionStatus, expectNumberOfRulesShownOnPage, -} from '../../tasks/rule_filters'; +} from '../../../../tasks/rule_filters'; -import { SECURITY_DETECTIONS_RULES_URL } from '../../urls/navigation'; +import { SECURITY_DETECTIONS_RULES_URL } from '../../../../urls/navigation'; -import { waitForRulesTableToBeLoaded } from '../../tasks/alerts_detection_rules'; +import { waitForRulesTableToBeLoaded } from '../../../../tasks/alerts_detection_rules'; -import { createRule, waitForRulesToFinishExecution } from '../../tasks/api_calls/rules'; -import { deleteIndex, createIndex, createDocument } from '../../tasks/api_calls/elasticsearch'; +import { createRule, waitForRulesToFinishExecution } from '../../../../tasks/api_calls/rules'; +import { + deleteIndex, + createIndex, + createDocument, +} from '../../../../tasks/api_calls/elasticsearch'; -import { getNewRule } from '../../objects/rule'; +import { getNewRule } from '../../../../objects/rule'; -describe('Rule management filters', () => { +describe('Rules table: filtering', () => { before(() => { cleanKibana(); }); diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/links.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_links.cy.ts similarity index 63% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/links.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_links.cy.ts index 96bcfb7af864aeb..b7fa19531065d5c 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/links.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_links.cy.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { getNewRule } from '../../objects/rule'; -import { RULES_MONITORING_TAB, RULE_NAME } from '../../screens/alerts_detection_rules'; -import { createRule } from '../../tasks/api_calls/rules'; -import { cleanKibana, deleteAlertsAndRules } from '../../tasks/common'; -import { login, visitWithoutDateRange } from '../../tasks/login'; -import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation'; +import { getNewRule } from '../../../../objects/rule'; +import { RULES_MONITORING_TAB, RULE_NAME } from '../../../../screens/alerts_detection_rules'; +import { createRule } from '../../../../tasks/api_calls/rules'; +import { cleanKibana, deleteAlertsAndRules } from '../../../../tasks/common'; +import { login, visitWithoutDateRange } from '../../../../tasks/login'; +import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../../../urls/navigation'; -describe('Rules talbes links', () => { +describe('Rules table: links', () => { before(() => { cleanKibana(); }); diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/persistent_rules_table_state.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_persistent_state.cy.ts similarity index 95% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/persistent_rules_table_state.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_persistent_state.cy.ts index d063ca348c8d1eb..ef3d23cf7116287 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/persistent_rules_table_state.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_persistent_state.cy.ts @@ -6,16 +6,16 @@ */ import { encode } from '@kbn/rison'; -import { cleanKibana, resetRulesTableState } from '../../tasks/common'; -import { login, visit } from '../../tasks/login'; +import { cleanKibana, resetRulesTableState } from '../../../../tasks/common'; +import { login, visit } from '../../../../tasks/login'; import { DASHBOARDS_URL, KIBANA_HOME, SECURITY_DETECTIONS_RULES_MANAGEMENT_URL, SECURITY_DETECTIONS_RULES_MONITORING_URL, SECURITY_DETECTIONS_RULES_URL, -} from '../../urls/navigation'; -import { getNewRule } from '../../objects/rule'; +} from '../../../../urls/navigation'; +import { getNewRule } from '../../../../objects/rule'; import { filterByCustomRules, filterBySearchTerm, @@ -34,8 +34,8 @@ import { expectFilterByPrebuiltRules, expectFilterByEnabledRules, expectManagementTableRules, -} from '../../tasks/alerts_detection_rules'; -import { createRule } from '../../tasks/api_calls/rules'; +} from '../../../../tasks/alerts_detection_rules'; +import { createRule } from '../../../../tasks/api_calls/rules'; import { expectRowsPerPage, expectTablePage, @@ -43,7 +43,7 @@ import { goToTablePage, setRowsPerPageTo, sortByTableColumn, -} from '../../tasks/table_pagination'; +} from '../../../../tasks/table_pagination'; function createTestRules(): void { createRule(getNewRule({ rule_id: '1', name: 'test 1', tags: ['tag-a'], enabled: false })); @@ -98,7 +98,7 @@ function expectDefaultRulesTableState(): void { expectTablePage(1); } -describe('Persistent rules table state', () => { +describe('Rules table: persistent state', () => { before(() => { cleanKibana(); createTestRules(); diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rules_selection.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection.cy.ts similarity index 86% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/rules_selection.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection.cy.ts index 0e72b6cf7870318..db68e62d923155e 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rules_selection.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection.cy.ts @@ -4,24 +4,24 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { createRuleAssetSavedObject } from '../../helpers/rules'; +import { createRuleAssetSavedObject } from '../../../../helpers/rules'; import { SELECTED_RULES_NUMBER_LABEL, SELECT_ALL_RULES_BTN, SELECT_ALL_RULES_ON_PAGE_CHECKBOX, -} from '../../screens/alerts_detection_rules'; +} from '../../../../screens/alerts_detection_rules'; import { selectNumberOfRules, unselectNumberOfRules, waitForPrebuiltDetectionRulesToBeLoaded, -} from '../../tasks/alerts_detection_rules'; +} from '../../../../tasks/alerts_detection_rules'; import { getAvailablePrebuiltRulesCount, createAndInstallMockedPrebuiltRules, -} from '../../tasks/api_calls/prebuilt_rules'; -import { cleanKibana } from '../../tasks/common'; -import { login, visitWithoutDateRange } from '../../tasks/login'; -import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation'; +} from '../../../../tasks/api_calls/prebuilt_rules'; +import { cleanKibana } from '../../../../tasks/common'; +import { login, visitWithoutDateRange } from '../../../../tasks/login'; +import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../../../urls/navigation'; const RULE_1 = createRuleAssetSavedObject({ name: 'Test rule 1', @@ -32,7 +32,7 @@ const RULE_2 = createRuleAssetSavedObject({ rule_id: 'rule_2', }); -describe('Rules selection', () => { +describe('Rules table: selection', () => { before(() => { cleanKibana(); }); diff --git a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/sorting.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_sorting.cy.ts similarity index 79% rename from x-pack/plugins/security_solution/cypress/e2e/detection_rules/sorting.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_sorting.cy.ts index 36cd0161812530c..66fe81f43c874c7 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/detection_rules/sorting.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management/rules_table/rules_table_sorting.cy.ts @@ -13,27 +13,31 @@ import { FOURTH_RULE, RULES_MANAGEMENT_TABLE, RULES_ROW, -} from '../../screens/alerts_detection_rules'; +} from '../../../../screens/alerts_detection_rules'; import { enableRule, waitForRulesTableToBeLoaded, waitForRuleToUpdate, -} from '../../tasks/alerts_detection_rules'; -import { login, visit } from '../../tasks/login'; +} from '../../../../tasks/alerts_detection_rules'; +import { login, visit } from '../../../../tasks/login'; -import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation'; -import { createRule } from '../../tasks/api_calls/rules'; -import { cleanKibana } from '../../tasks/common'; +import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../../../urls/navigation'; +import { createRule } from '../../../../tasks/api_calls/rules'; +import { cleanKibana } from '../../../../tasks/common'; import { getExistingRule, getNewOverrideRule, getNewRule, getNewThresholdRule, -} from '../../objects/rule'; -import { goToTablePage, setRowsPerPageTo, sortByTableColumn } from '../../tasks/table_pagination'; -import { TABLE_FIRST_PAGE, TABLE_SECOND_PAGE } from '../../screens/table_pagination'; +} from '../../../../objects/rule'; +import { + goToTablePage, + setRowsPerPageTo, + sortByTableColumn, +} from '../../../../tasks/table_pagination'; +import { TABLE_FIRST_PAGE, TABLE_SECOND_PAGE } from '../../../../screens/table_pagination'; -describe('Alerts detection rules', () => { +describe('Rules table: sorting', () => { before(() => { cleanKibana(); login(); diff --git a/x-pack/plugins/security_solution/cypress/e2e/value_lists/value_lists.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/detection_response/value_lists/value_lists.cy.ts similarity index 97% rename from x-pack/plugins/security_solution/cypress/e2e/value_lists/value_lists.cy.ts rename to x-pack/plugins/security_solution/cypress/e2e/detection_response/value_lists/value_lists.cy.ts index 719310b80a7eb1a..dbbb9badd8b9df0 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/value_lists/value_lists.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/detection_response/value_lists/value_lists.cy.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { ROLES } from '../../../common/test'; -import { deleteRoleAndUser, login, visitWithoutDateRange } from '../../tasks/login'; -import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../urls/navigation'; +import { ROLES } from '../../../../common/test'; +import { deleteRoleAndUser, login, visitWithoutDateRange } from '../../../tasks/login'; +import { DETECTIONS_RULE_MANAGEMENT_URL } from '../../../urls/navigation'; import { createListsIndex, waitForValueListsModalToBeLoaded, @@ -21,12 +21,12 @@ import { deleteValueListsFile, exportValueList, waitForListsIndex, -} from '../../tasks/lists'; +} from '../../../tasks/lists'; import { VALUE_LISTS_TABLE, VALUE_LISTS_ROW, VALUE_LISTS_MODAL_ACTIVATOR, -} from '../../screens/lists'; +} from '../../../screens/lists'; describe('value lists', () => { describe('management modal', () => {