From 57550cf824d77f801d42bf00e7ee0d4f3a30a7de Mon Sep 17 00:00:00 2001 From: MadameSheema Date: Tue, 30 Jun 2020 10:35:14 +0200 Subject: [PATCH] renames 'detections' to 'alerts' (#70164) (#70248) --- .../{detections.spec.ts => alerts.spec.ts} | 6 +-- ...spec.ts => alerts_detection_rules.spec.ts} | 16 ++++---- ... => alerts_detection_rules_custom.spec.ts} | 38 +++++++++---------- ... => alerts_detection_rules_export.spec.ts} | 8 ++-- ...c.ts => alerts_detection_rules_ml.spec.ts} | 38 +++++++++---------- ...> alerts_detection_rules_prebuilt.spec.ts} | 20 +++++----- ...meline.spec.ts => alerts_timeline.spec.ts} | 6 +-- .../screens/{detections.ts => alerts.ts} | 0 ...ion_rules.ts => alerts_detection_rules.ts} | 0 .../tasks/{detections.ts => alerts.ts} | 4 +- ...ion_rules.ts => alerts_detection_rules.ts} | 2 +- 11 files changed, 69 insertions(+), 69 deletions(-) rename x-pack/plugins/security_solution/cypress/integration/{detections.spec.ts => alerts.spec.ts} (98%) rename x-pack/plugins/security_solution/cypress/integration/{signal_detection_rules.spec.ts => alerts_detection_rules.spec.ts} (91%) rename x-pack/plugins/security_solution/cypress/integration/{signal_detection_rules_custom.spec.ts => alerts_detection_rules_custom.spec.ts} (97%) rename x-pack/plugins/security_solution/cypress/integration/{signal_detection_rules_export.spec.ts => alerts_detection_rules_export.spec.ts} (88%) rename x-pack/plugins/security_solution/cypress/integration/{signal_detection_rules_ml.spec.ts => alerts_detection_rules_ml.spec.ts} (96%) rename x-pack/plugins/security_solution/cypress/integration/{signal_detection_rules_prebuilt.spec.ts => alerts_detection_rules_prebuilt.spec.ts} (95%) rename x-pack/plugins/security_solution/cypress/integration/{detections_timeline.spec.ts => alerts_timeline.spec.ts} (90%) rename x-pack/plugins/security_solution/cypress/screens/{detections.ts => alerts.ts} (100%) rename x-pack/plugins/security_solution/cypress/screens/{alert_detection_rules.ts => alerts_detection_rules.ts} (100%) rename x-pack/plugins/security_solution/cypress/tasks/{detections.ts => alerts.ts} (97%) rename x-pack/plugins/security_solution/cypress/tasks/{alert_detection_rules.ts => alerts_detection_rules.ts} (98%) diff --git a/x-pack/plugins/security_solution/cypress/integration/detections.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts.spec.ts similarity index 98% rename from x-pack/plugins/security_solution/cypress/integration/detections.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/alerts.spec.ts index 2e727be1fc9b45..c8c18696359f72 100644 --- a/x-pack/plugins/security_solution/cypress/integration/detections.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/alerts.spec.ts @@ -9,7 +9,7 @@ import { SHOWING_ALERTS, ALERTS, TAKE_ACTION_POPOVER_BTN, -} from '../screens/detections'; +} from '../screens/alerts'; import { closeFirstAlert, @@ -24,13 +24,13 @@ import { waitForAlertsToBeLoaded, markInProgressFirstAlert, goToInProgressAlerts, -} from '../tasks/detections'; +} from '../tasks/alerts'; import { esArchiverLoad } from '../tasks/es_archiver'; import { loginAndWaitForPage } from '../tasks/login'; import { ALERTS_URL } from '../urls/navigation'; -describe('Detections', () => { +describe('Alerts', () => { context('Closing alerts', () => { beforeEach(() => { esArchiverLoad('alerts'); diff --git a/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules.spec.ts similarity index 91% rename from x-pack/plugins/security_solution/cypress/integration/signal_detection_rules.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules.spec.ts index 72a86e3ffffc56..5cad0b9c3260c2 100644 --- a/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules.spec.ts @@ -10,25 +10,25 @@ import { RULE_SWITCH, SECOND_RULE, SEVENTH_RULE, -} from '../screens/alert_detection_rules'; +} from '../screens/alerts_detection_rules'; import { - goToManageAlertDetectionRules, + goToManageAlertsDetectionRules, waitForAlertsPanelToBeLoaded, waitForAlertsIndexToBeCreated, -} from '../tasks/detections'; -import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver'; -import { loginAndWaitForPageWithoutDateRange } from '../tasks/login'; +} from '../tasks/alerts'; import { activateRule, sortByActivatedRules, waitForLoadElasticPrebuiltDetectionRulesTableToBeLoaded, waitForRuleToBeActivated, -} from '../tasks/alert_detection_rules'; +} from '../tasks/alerts_detection_rules'; +import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver'; +import { loginAndWaitForPageWithoutDateRange } from '../tasks/login'; import { ALERTS_URL } from '../urls/navigation'; -describe('Detection rules', () => { +describe('Alerts detection rules', () => { before(() => { esArchiverLoad('prebuilt_rules_loaded'); }); @@ -41,7 +41,7 @@ describe('Detection rules', () => { loginAndWaitForPageWithoutDateRange(ALERTS_URL); waitForAlertsPanelToBeLoaded(); waitForAlertsIndexToBeCreated(); - goToManageAlertDetectionRules(); + goToManageAlertsDetectionRules(); waitForLoadElasticPrebuiltDetectionRulesTableToBeLoaded(); cy.get(RULE_NAME) .eq(FIFTH_RULE) diff --git a/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_custom.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts similarity index 97% rename from x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_custom.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts index 48d0c2e7238cd4..9e9732a403f8fc 100644 --- a/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_custom.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_custom.spec.ts @@ -6,6 +6,15 @@ import { newRule, totalNumberOfPrebuiltRulesInEsArchive } from '../objects/rule'; +import { + CUSTOM_RULES_BTN, + RISK_SCORE, + RULE_NAME, + RULES_ROW, + RULES_TABLE, + SEVERITY, + SHOWING_RULES_TEXT, +} from '../screens/alerts_detection_rules'; import { ABOUT_FALSE_POSITIVES, ABOUT_INVESTIGATION_NOTES, @@ -28,26 +37,12 @@ import { SCHEDULE_RUNS, SCHEDULE_STEP, } from '../screens/rule_details'; -import { - CUSTOM_RULES_BTN, - RISK_SCORE, - RULE_NAME, - RULES_ROW, - RULES_TABLE, - SEVERITY, - SHOWING_RULES_TEXT, -} from '../screens/alert_detection_rules'; import { - createAndActivateRule, - fillAboutRuleAndContinue, - fillDefineCustomRuleWithImportedQueryAndContinue, -} from '../tasks/create_new_rule'; -import { - goToManageAlertDetectionRules, + goToManageAlertsDetectionRules, waitForAlertsIndexToBeCreated, waitForAlertsPanelToBeLoaded, -} from '../tasks/detections'; +} from '../tasks/alerts'; import { changeToThreeHundredRowsPerPage, deleteFirstRule, @@ -58,7 +53,12 @@ import { selectNumberOfRules, waitForLoadElasticPrebuiltDetectionRulesTableToBeLoaded, waitForRulesToBeLoaded, -} from '../tasks/alert_detection_rules'; +} from '../tasks/alerts_detection_rules'; +import { + createAndActivateRule, + fillAboutRuleAndContinue, + fillDefineCustomRuleWithImportedQueryAndContinue, +} from '../tasks/create_new_rule'; import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver'; import { loginAndWaitForPageWithoutDateRange } from '../tasks/login'; @@ -77,7 +77,7 @@ describe('Detection rules, custom', () => { loginAndWaitForPageWithoutDateRange(ALERTS_URL); waitForAlertsPanelToBeLoaded(); waitForAlertsIndexToBeCreated(); - goToManageAlertDetectionRules(); + goToManageAlertsDetectionRules(); waitForLoadElasticPrebuiltDetectionRulesTableToBeLoaded(); goToCreateNewRule(); fillDefineCustomRuleWithImportedQueryAndContinue(newRule); @@ -172,7 +172,7 @@ describe('Deletes custom rules', () => { loginAndWaitForPageWithoutDateRange(ALERTS_URL); waitForAlertsPanelToBeLoaded(); waitForAlertsIndexToBeCreated(); - goToManageAlertDetectionRules(); + goToManageAlertsDetectionRules(); }); after(() => { diff --git a/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_export.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_export.spec.ts similarity index 88% rename from x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_export.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_export.spec.ts index edb559bf6a279e..25fc1fc3a7c110 100644 --- a/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_export.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_export.spec.ts @@ -5,13 +5,13 @@ */ import { - goToManageAlertDetectionRules, + goToManageAlertsDetectionRules, waitForAlertsIndexToBeCreated, waitForAlertsPanelToBeLoaded, -} from '../tasks/detections'; +} from '../tasks/alerts'; +import { exportFirstRule } from '../tasks/alerts_detection_rules'; import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver'; import { loginAndWaitForPageWithoutDateRange } from '../tasks/login'; -import { exportFirstRule } from '../tasks/alert_detection_rules'; import { ALERTS_URL } from '../urls/navigation'; @@ -35,7 +35,7 @@ describe('Export rules', () => { loginAndWaitForPageWithoutDateRange(ALERTS_URL); waitForAlertsPanelToBeLoaded(); waitForAlertsIndexToBeCreated(); - goToManageAlertDetectionRules(); + goToManageAlertsDetectionRules(); exportFirstRule(); cy.wait('@export').then((xhr) => { cy.readFile(EXPECTED_EXPORTED_RULE_FILE_PATH).then(($expectedExportedJson) => { diff --git a/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_ml.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_ml.spec.ts similarity index 96% rename from x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_ml.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_ml.spec.ts index 3e0fc2e1b37fd0..19957a53dd701f 100644 --- a/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_ml.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_ml.spec.ts @@ -6,6 +6,15 @@ import { machineLearningRule, totalNumberOfPrebuiltRulesInEsArchive } from '../objects/rule'; +import { + CUSTOM_RULES_BTN, + RISK_SCORE, + RULE_NAME, + RULE_SWITCH, + RULES_ROW, + RULES_TABLE, + SEVERITY, +} from '../screens/alerts_detection_rules'; import { ABOUT_FALSE_POSITIVES, ABOUT_MITRE, @@ -26,27 +35,12 @@ import { SCHEDULE_STEP, RULE_TYPE, } from '../screens/rule_details'; -import { - CUSTOM_RULES_BTN, - RISK_SCORE, - RULE_NAME, - RULE_SWITCH, - RULES_ROW, - RULES_TABLE, - SEVERITY, -} from '../screens/alert_detection_rules'; import { - createAndActivateRule, - fillAboutRuleAndContinue, - fillDefineMachineLearningRuleAndContinue, - selectMachineLearningRuleType, -} from '../tasks/create_new_rule'; -import { - goToManageAlertDetectionRules, + goToManageAlertsDetectionRules, waitForAlertsIndexToBeCreated, waitForAlertsPanelToBeLoaded, -} from '../tasks/detections'; +} from '../tasks/alerts'; import { changeToThreeHundredRowsPerPage, filterByCustomRules, @@ -54,7 +48,13 @@ import { goToRuleDetails, waitForLoadElasticPrebuiltDetectionRulesTableToBeLoaded, waitForRulesToBeLoaded, -} from '../tasks/alert_detection_rules'; +} from '../tasks/alerts_detection_rules'; +import { + createAndActivateRule, + fillAboutRuleAndContinue, + fillDefineMachineLearningRuleAndContinue, + selectMachineLearningRuleType, +} from '../tasks/create_new_rule'; import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver'; import { loginAndWaitForPageWithoutDateRange } from '../tasks/login'; @@ -73,7 +73,7 @@ describe('Detection rules, machine learning', () => { loginAndWaitForPageWithoutDateRange(ALERTS_URL); waitForAlertsPanelToBeLoaded(); waitForAlertsIndexToBeCreated(); - goToManageAlertDetectionRules(); + goToManageAlertsDetectionRules(); waitForLoadElasticPrebuiltDetectionRulesTableToBeLoaded(); goToCreateNewRule(); selectMachineLearningRuleType(); diff --git a/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_prebuilt.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_prebuilt.spec.ts similarity index 95% rename from x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_prebuilt.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_prebuilt.spec.ts index f819c91a773749..d3cbb05d7fc17a 100644 --- a/x-pack/plugins/security_solution/cypress/integration/signal_detection_rules_prebuilt.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/alerts_detection_rules_prebuilt.spec.ts @@ -10,8 +10,13 @@ import { RELOAD_PREBUILT_RULES_BTN, RULES_ROW, RULES_TABLE, -} from '../screens/alert_detection_rules'; +} from '../screens/alerts_detection_rules'; +import { + goToManageAlertsDetectionRules, + waitForAlertsIndexToBeCreated, + waitForAlertsPanelToBeLoaded, +} from '../tasks/alerts'; import { changeToThreeHundredRowsPerPage, deleteFirstRule, @@ -22,12 +27,7 @@ import { waitForLoadElasticPrebuiltDetectionRulesTableToBeLoaded, waitForPrebuiltDetectionRulesToBeLoaded, waitForRulesToBeLoaded, -} from '../tasks/alert_detection_rules'; -import { - goToManageAlertDetectionRules, - waitForAlertsIndexToBeCreated, - waitForAlertsPanelToBeLoaded, -} from '../tasks/detections'; +} from '../tasks/alerts_detection_rules'; import { esArchiverLoadEmptyKibana, esArchiverUnloadEmptyKibana } from '../tasks/es_archiver'; import { loginAndWaitForPageWithoutDateRange } from '../tasks/login'; @@ -35,7 +35,7 @@ import { ALERTS_URL } from '../urls/navigation'; import { totalNumberOfPrebuiltRules } from '../objects/rule'; -describe('Detection rules, prebuilt rules', () => { +describe('Alerts rules, prebuilt rules', () => { before(() => { esArchiverLoadEmptyKibana(); }); @@ -51,7 +51,7 @@ describe('Detection rules, prebuilt rules', () => { loginAndWaitForPageWithoutDateRange(ALERTS_URL); waitForAlertsPanelToBeLoaded(); waitForAlertsIndexToBeCreated(); - goToManageAlertDetectionRules(); + goToManageAlertsDetectionRules(); waitForLoadElasticPrebuiltDetectionRulesTableToBeLoaded(); loadPrebuiltDetectionRules(); waitForPrebuiltDetectionRulesToBeLoaded(); @@ -76,7 +76,7 @@ describe('Deleting prebuilt rules', () => { loginAndWaitForPageWithoutDateRange(ALERTS_URL); waitForAlertsPanelToBeLoaded(); waitForAlertsIndexToBeCreated(); - goToManageAlertDetectionRules(); + goToManageAlertsDetectionRules(); waitForLoadElasticPrebuiltDetectionRulesTableToBeLoaded(); loadPrebuiltDetectionRules(); waitForPrebuiltDetectionRulesToBeLoaded(); diff --git a/x-pack/plugins/security_solution/cypress/integration/detections_timeline.spec.ts b/x-pack/plugins/security_solution/cypress/integration/alerts_timeline.spec.ts similarity index 90% rename from x-pack/plugins/security_solution/cypress/integration/detections_timeline.spec.ts rename to x-pack/plugins/security_solution/cypress/integration/alerts_timeline.spec.ts index 91617981ab14c4..10dc4fdd444869 100644 --- a/x-pack/plugins/security_solution/cypress/integration/detections_timeline.spec.ts +++ b/x-pack/plugins/security_solution/cypress/integration/alerts_timeline.spec.ts @@ -4,20 +4,20 @@ * you may not use this file except in compliance with the Elastic License. */ -import { ALERT_ID } from '../screens/detections'; +import { ALERT_ID } from '../screens/alerts'; import { PROVIDER_BADGE } from '../screens/timeline'; import { expandFirstAlert, investigateFirstAlertInTimeline, waitForAlertsPanelToBeLoaded, -} from '../tasks/detections'; +} from '../tasks/alerts'; import { esArchiverLoad, esArchiverUnload } from '../tasks/es_archiver'; import { loginAndWaitForPage } from '../tasks/login'; import { ALERTS_URL } from '../urls/navigation'; -describe('Detections timeline', () => { +describe('Alerts timeline', () => { beforeEach(() => { esArchiverLoad('timeline_alerts'); loginAndWaitForPage(ALERTS_URL); diff --git a/x-pack/plugins/security_solution/cypress/screens/detections.ts b/x-pack/plugins/security_solution/cypress/screens/alerts.ts similarity index 100% rename from x-pack/plugins/security_solution/cypress/screens/detections.ts rename to x-pack/plugins/security_solution/cypress/screens/alerts.ts diff --git a/x-pack/plugins/security_solution/cypress/screens/alert_detection_rules.ts b/x-pack/plugins/security_solution/cypress/screens/alerts_detection_rules.ts similarity index 100% rename from x-pack/plugins/security_solution/cypress/screens/alert_detection_rules.ts rename to x-pack/plugins/security_solution/cypress/screens/alerts_detection_rules.ts diff --git a/x-pack/plugins/security_solution/cypress/tasks/detections.ts b/x-pack/plugins/security_solution/cypress/tasks/alerts.ts similarity index 97% rename from x-pack/plugins/security_solution/cypress/tasks/detections.ts rename to x-pack/plugins/security_solution/cypress/tasks/alerts.ts index 8b1e8b41b6da14..ebd37b522924fd 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/detections.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/alerts.ts @@ -22,7 +22,7 @@ import { OPEN_SELECTED_ALERTS_BTN, MARK_ALERT_IN_PROGRESS_BTN, MARK_SELECTED_ALERTS_IN_PROGRESS_BTN, -} from '../screens/detections'; +} from '../screens/alerts'; import { REFRESH_BUTTON } from '../screens/security_header'; export const closeFirstAlert = () => { @@ -43,7 +43,7 @@ export const goToClosedAlerts = () => { cy.get(CLOSED_ALERTS_FILTER_BTN).click({ force: true }); }; -export const goToManageAlertDetectionRules = () => { +export const goToManageAlertsDetectionRules = () => { cy.get(MANAGE_ALERT_DETECTION_RULES_BTN).should('exist').click({ force: true }); }; diff --git a/x-pack/plugins/security_solution/cypress/tasks/alert_detection_rules.ts b/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts similarity index 98% rename from x-pack/plugins/security_solution/cypress/tasks/alert_detection_rules.ts rename to x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts index 9710e0e808ac59..79756621ef5028 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/alert_detection_rules.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/alerts_detection_rules.ts @@ -24,7 +24,7 @@ import { SORT_RULES_BTN, THREE_HUNDRED_ROWS, EXPORT_ACTION_BTN, -} from '../screens/alert_detection_rules'; +} from '../screens/alerts_detection_rules'; export const activateRule = (rulePosition: number) => { cy.get(RULE_SWITCH).eq(rulePosition).click({ force: true });