From f143395c98e7cace008a196007c27777c8a41696 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 23 Nov 2023 11:25:24 +0100 Subject: [PATCH 01/17] new rule management folder --- .../authorization/all_rules_read_only.cy.ts | 14 ++++---- .../maintenance_window_callout.cy.ts | 6 ++-- .../install_update_authorization.cy.ts | 0 .../install_update_error_handling.cy.ts | 0 .../prebuilt_rules/install_via_fleet.cy.ts | 0 .../prebuilt_rules/install_workflow.cy.ts | 0 .../prebuilt_rules/management.cy.ts | 0 .../prebuilt_rules/notifications.cy.ts | 0 .../prebuilt_rules_preview.cy.ts | 0 .../prebuilt_rules/update_workflow.ts | 0 .../related_integrations.cy.ts | 35 +++++++++---------- .../bulk_actions/bulk_duplicate_rules.cy.ts | 24 ++++++------- .../bulk_actions/bulk_edit_rules.cy.ts | 34 +++++++++--------- .../bulk_edit_rules_actions.cy.ts | 30 ++++++++-------- .../bulk_edit_rules_data_view.cy.ts | 20 +++++------ .../rule_actions/deletion/rule_delete.cy.ts | 16 ++++----- .../import_export/export_rule.cy.ts | 33 ++++++++--------- .../import_export/import_rules.cy.ts | 14 ++++---- .../rule_actions/snoozing/rule_snoozing.cy.ts | 34 +++++++++--------- .../rule_details/common_flows.cy.ts | 0 .../rule_details/esql_rule.cy.ts | 0 .../rules_table_auto_refresh.cy.ts | 14 ++++---- .../rules_table/rules_table_filtering.cy.ts | 24 ++++++------- .../rules_table/rules_table_links.cy.ts | 14 ++++---- .../rules_table_persistent_state.cy.ts | 18 +++++----- .../rules_table/rules_table_selection.cy.ts | 14 ++++---- .../rules_table/rules_table_sorting.cy.ts | 18 +++++----- 27 files changed, 176 insertions(+), 186 deletions(-) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/authorization/all_rules_read_only.cy.ts (82%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/maintenance_windows/maintenance_window_callout.cy.ts (92%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => rule_management}/prebuilt_rules/install_update_authorization.cy.ts (100%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => rule_management}/prebuilt_rules/install_update_error_handling.cy.ts (100%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => rule_management}/prebuilt_rules/install_via_fleet.cy.ts (100%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => rule_management}/prebuilt_rules/install_workflow.cy.ts (100%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => rule_management}/prebuilt_rules/management.cy.ts (100%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => rule_management}/prebuilt_rules/notifications.cy.ts (100%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => rule_management}/prebuilt_rules/prebuilt_rules_preview.cy.ts (100%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => rule_management}/prebuilt_rules/update_workflow.ts (100%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/related_integrations/related_integrations.cy.ts (91%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts (83%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts (95%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts (90%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts (94%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/rule_actions/deletion/rule_delete.cy.ts (83%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/rule_actions/import_export/export_rule.cy.ts (85%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/rule_actions/import_export/import_rules.cy.ts (83%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts (87%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => rule_management}/rule_details/common_flows.cy.ts (100%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => rule_management}/rule_details/esql_rule.cy.ts (100%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/rules_table/rules_table_auto_refresh.cy.ts (92%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/rules_table/rules_table_filtering.cy.ts (84%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/rules_table/rules_table_links.cy.ts (65%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/rules_table/rules_table_persistent_state.cy.ts (95%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/rules_table/rules_table_selection.cy.ts (89%) rename x-pack/test/security_solution_cypress/cypress/e2e/{detection_response => }/rule_management/rules_table/rules_table_sorting.cy.ts (83%) diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/authorization/all_rules_read_only.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/authorization/all_rules_read_only.cy.ts similarity index 82% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/authorization/all_rules_read_only.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/authorization/all_rules_read_only.cy.ts index 244637126ecc2..e1cfa11518414 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/authorization/all_rules_read_only.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/authorization/all_rules_read_only.cy.ts @@ -7,22 +7,22 @@ import { ROLES } from '@kbn/security-solution-plugin/common/test'; -import { getNewRule } from '../../../../objects/rule'; +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 { createRule } from '../../../../tasks/api_calls/rules'; +} from '../../../screens/alerts_detection_rules'; +import { VALUE_LISTS_MODAL_ACTIVATOR } from '../../../screens/lists'; +import { createRule } from '../../../tasks/api_calls/rules'; import { dismissCallOut, getCallOut, waitForCallOutToBeShown, MISSING_PRIVILEGES_CALLOUT, -} from '../../../../tasks/common/callouts'; -import { login } from '../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +} from '../../../tasks/common/callouts'; +import { login } from '../../../tasks/login'; +import { visitRulesManagementTable } from '../../../tasks/rules_management'; // TODO: https://github.com/elastic/kibana/issues/164451 We should find a way to make this spec work in Serverless // TODO: https://github.com/elastic/kibana/issues/161540 diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/maintenance_windows/maintenance_window_callout.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/maintenance_windows/maintenance_window_callout.cy.ts similarity index 92% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/maintenance_windows/maintenance_window_callout.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/maintenance_windows/maintenance_window_callout.cy.ts index b5e7218aaa293..e26428ee06c01 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/maintenance_windows/maintenance_window_callout.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/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 { login } from '../../../../tasks/login'; -import { visit } from '../../../../tasks/navigation'; -import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; +import { login } from '../../../tasks/login'; +import { visit } from '../../../tasks/navigation'; +import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; describe( 'Maintenance window callout on Rule Management page', diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/install_update_authorization.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_update_authorization.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/install_update_authorization.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_update_authorization.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/install_update_error_handling.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_update_error_handling.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/install_update_error_handling.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_update_error_handling.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/install_via_fleet.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_via_fleet.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/install_via_fleet.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_via_fleet.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/install_workflow.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_workflow.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/install_workflow.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_workflow.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/management.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/management.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/management.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/management.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/notifications.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/notifications.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/notifications.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/notifications.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_preview.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/prebuilt_rules_preview.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/prebuilt_rules_preview.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/prebuilt_rules_preview.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/update_workflow.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/update_workflow.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules/update_workflow.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/update_workflow.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/related_integrations/related_integrations.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/related_integrations/related_integrations.cy.ts similarity index 91% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/related_integrations/related_integrations.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/related_integrations/related_integrations.cy.ts index 51aa3f406b8ed..ee9e46d02513c 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/related_integrations/related_integrations.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/related_integrations/related_integrations.cy.ts @@ -7,43 +7,40 @@ import { omit } from 'lodash'; import { PerformRuleInstallationResponseBody } from '@kbn/security-solution-plugin/common/api/detection_engine'; -import { generateEvent } from '../../../../objects/event'; -import { createDocument, deleteDataStream } from '../../../../tasks/api_calls/elasticsearch'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; -import { INTEGRATION_LINK, INTEGRATION_STATUS } from '../../../../screens/rule_details'; +import { generateEvent } from '../../../objects/event'; +import { createDocument, deleteDataStream } from '../../../tasks/api_calls/elasticsearch'; +import { createRuleAssetSavedObject } from '../../../helpers/rules'; +import { INTEGRATION_LINK, INTEGRATION_STATUS } from '../../../screens/rule_details'; import { INTEGRATIONS_POPOVER, INTEGRATIONS_POPOVER_TITLE, RULE_NAME, -} from '../../../../screens/alerts_detection_rules'; +} from '../../../screens/alerts_detection_rules'; import { installPrebuiltRuleAssets, installAllPrebuiltRulesRequest, SAMPLE_PREBUILT_RULE, -} from '../../../../tasks/api_calls/prebuilt_rules'; -import { cleanFleet } from '../../../../tasks/api_calls/fleet'; +} from '../../../tasks/api_calls/prebuilt_rules'; +import { cleanFleet } from '../../../tasks/api_calls/fleet'; import { disableRelatedIntegrations, enableRelatedIntegrations, -} from '../../../../tasks/api_calls/kibana_advanced_settings'; -import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; -import { login } from '../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; -import { waitForAlertsToPopulate } from '../../../../tasks/create_new_rule'; +} from '../../../tasks/api_calls/kibana_advanced_settings'; +import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; +import { login } from '../../../tasks/login'; +import { visitRulesManagementTable } from '../../../tasks/rules_management'; +import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; import { installIntegrations, PackagePolicyWithoutAgentPolicyId, -} from '../../../../tasks/api_calls/integrations'; -import { - disableAutoRefresh, - openIntegrationsPopover, -} from '../../../../tasks/alerts_detection_rules'; -import { fetchRuleAlerts } from '../../../../tasks/api_calls/alerts'; +} from '../../../tasks/api_calls/integrations'; +import { disableAutoRefresh, openIntegrationsPopover } from '../../../tasks/alerts_detection_rules'; +import { fetchRuleAlerts } from '../../../tasks/api_calls/alerts'; import { enablesRule, visitRuleDetailsPage, waitForPageToBeLoaded, -} from '../../../../tasks/rule_details'; +} from '../../../tasks/rule_details'; describe('Related integrations', { tags: ['@ess', '@serverless', '@brokenInServerlessQA'] }, () => { const DATA_STREAM_NAME = 'logs-related-integrations-test'; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts similarity index 83% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts index dd053ab958aab..cacf36473b7dd 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts @@ -5,33 +5,33 @@ * 2.0. */ -import { deleteAlertsAndRules } from '../../../../../tasks/api_calls/common'; +import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; import { goToRuleDetailsOf, expectManagementTableRules, selectAllRules, disableAutoRefresh, -} 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 } from '../../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; +} from '../../../../tasks/rules_bulk_actions'; +import { goToExceptionsTab, viewExpiredExceptionItems } from '../../../../tasks/rule_details'; +import { login } from '../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; -import { createRule } from '../../../../../tasks/api_calls/rules'; -import { resetRulesTableState } from '../../../../../tasks/common'; +import { createRule } from '../../../../tasks/api_calls/rules'; +import { resetRulesTableState } 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/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts similarity index 95% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts index 94b6804b31193..a92795b7fe750 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { deleteAlertsAndRules } from '../../../../../tasks/api_calls/common'; +import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; import { MODAL_CONFIRMATION_BTN, MODAL_CONFIRMATION_BODY, 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_CHECKBOX, EUI_FILTER_SELECT_ITEM } from '../../../../../screens/common/controls'; +import { EUI_CHECKBOX, EUI_FILTER_SELECT_ITEM } from '../../../../screens/common/controls'; import { selectAllRules, @@ -40,7 +40,7 @@ import { selectAllRulesOnPage, getRuleRow, disableAutoRefresh, -} from '../../../../../tasks/alerts_detection_rules'; +} from '../../../../tasks/alerts_detection_rules'; import { typeIndexPatterns, @@ -72,15 +72,15 @@ import { assertRuleScheduleValues, assertUpdateScheduleWarningExists, assertDefaultValuesAreAppliedToScheduleFields, -} from '../../../../../tasks/rules_bulk_actions'; +} from '../../../../tasks/rules_bulk_actions'; -import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; -import { hasIndexPatterns, getDetails } from '../../../../../tasks/rule_details'; -import { login } from '../../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; -import { createRule } from '../../../../../tasks/api_calls/rules'; -import { loadPrepackagedTimelineTemplates } from '../../../../../tasks/api_calls/timelines'; -import { resetRulesTableState } from '../../../../../tasks/common'; +import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +import { hasIndexPatterns, getDetails } from '../../../../tasks/rule_details'; +import { login } from '../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +import { createRule } from '../../../../tasks/api_calls/rules'; +import { loadPrepackagedTimelineTemplates } from '../../../../tasks/api_calls/timelines'; +import { resetRulesTableState } from '../../../../tasks/common'; import { getEqlRule, @@ -90,14 +90,14 @@ import { getNewThresholdRule, getMachineLearningRule, getNewTermsRule, -} from '../../../../../objects/rule'; +} from '../../../../objects/rule'; import { createAndInstallMockedPrebuiltRules, getAvailablePrebuiltRulesCount, preventPrebuiltRulesPackageInstallation, -} from '../../../../../tasks/api_calls/prebuilt_rules'; -import { setRowsPerPageTo, sortByTableColumn } from '../../../../../tasks/table_pagination'; +} from '../../../../tasks/api_calls/prebuilt_rules'; +import { setRowsPerPageTo, sortByTableColumn } 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/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts similarity index 90% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts index 62acef933f032..8696edd468921 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts @@ -10,18 +10,18 @@ import { ROLES } from '@kbn/security-solution-plugin/common/test'; import { MISSING_PRIVILEGES_CALLOUT, waitForCallOutToBeShown, -} from '../../../../../tasks/common/callouts'; -import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; +} from '../../../../tasks/common/callouts'; +import { createRuleAssetSavedObject } from '../../../../helpers/rules'; 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 { deleteAlertsAndRules, deleteConnectors } from '../../../../../tasks/api_calls/common'; -import type { RuleActionCustomFrequency } from '../../../../../tasks/common/rule_actions'; +import { deleteAlertsAndRules, deleteConnectors } from '../../../../tasks/api_calls/common'; +import type { RuleActionCustomFrequency } from '../../../../tasks/common/rule_actions'; import { addSlackRuleAction, assertSlackRuleAction, @@ -33,7 +33,7 @@ import { pickCustomFrequencyOption, pickPerRuleRunFrequencyOption, pickSummaryOfAlertsOption, -} from '../../../../../tasks/common/rule_actions'; +} from '../../../../tasks/common/rule_actions'; import { goToEditRuleActionsSettingsOf, expectManagementTableRules, @@ -41,19 +41,19 @@ import { selectRulesByName, getRulesManagementTableRows, disableAutoRefresh, -} from '../../../../../tasks/alerts_detection_rules'; +} from '../../../../tasks/alerts_detection_rules'; import { waitForBulkEditActionToFinish, submitBulkEditForm, checkOverwriteRuleActionsCheckbox, openBulkEditRuleActionsForm, openBulkActionsMenu, -} from '../../../../../tasks/rules_bulk_actions'; -import { login } from '../../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; +} from '../../../../tasks/rules_bulk_actions'; +import { login } from '../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; -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, @@ -62,12 +62,12 @@ import { getNewThresholdRule, getMachineLearningRule, getNewTermsRule, -} from '../../../../../objects/rule'; +} from '../../../../objects/rule'; import { createAndInstallMockedPrebuiltRules, excessivelyInstallAllPrebuiltRules, preventPrebuiltRulesPackageInstallation, -} from '../../../../../tasks/api_calls/prebuilt_rules'; +} from '../../../../tasks/api_calls/prebuilt_rules'; const ruleNameToAssert = 'Custom rule name with actions'; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts similarity index 94% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts index 3b9ddf73ad3c7..5e5bbc2413c74 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts @@ -8,9 +8,9 @@ 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 { goToRuleDetailsOf, @@ -18,7 +18,7 @@ import { selectAllRules, getRulesManagementTableRows, disableAutoRefresh, -} from '../../../../../tasks/alerts_detection_rules'; +} from '../../../../tasks/alerts_detection_rules'; import { typeIndexPatterns, @@ -28,22 +28,22 @@ import { checkOverwriteIndexPatternsCheckbox, openBulkEditAddIndexPatternsForm, openBulkEditDeleteIndexPatternsForm, -} from '../../../../../tasks/rules_bulk_actions'; +} from '../../../../tasks/rules_bulk_actions'; import { hasIndexPatterns, getDetails, assertDetailsNotExist, -} from '../../../../../tasks/rule_details'; -import { login } from '../../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; +} from '../../../../tasks/rule_details'; +import { login } from '../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; -import { createRule } from '../../../../../tasks/api_calls/rules'; +import { createRule } from '../../../../tasks/api_calls/rules'; import { deleteAlertsAndRules, deleteDataView, postDataView, -} from '../../../../../tasks/api_calls/common'; +} from '../../../../tasks/api_calls/common'; import { getEqlRule, @@ -51,7 +51,7 @@ import { getNewRule, getNewThresholdRule, getNewTermsRule, -} from '../../../../../objects/rule'; +} from '../../../../objects/rule'; const DATA_VIEW_ID = 'auditbeat'; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/deletion/rule_delete.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/deletion/rule_delete.cy.ts similarity index 83% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/deletion/rule_delete.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/deletion/rule_delete.cy.ts index 4c9168744920d..2da90f07b79dd 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/deletion/rule_delete.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/deletion/rule_delete.cy.ts @@ -5,21 +5,21 @@ * 2.0. */ -import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; -import { getNewRule } from '../../../../../objects/rule'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +import { getNewRule } from '../../../../objects/rule'; -import { RULE_SWITCH } from '../../../../../screens/alerts_detection_rules'; +import { RULE_SWITCH } from '../../../../screens/alerts_detection_rules'; import { deleteFirstRule, disableAutoRefresh, getRulesManagementTableRows, selectRulesByName, -} from '../../../../../tasks/alerts_detection_rules'; -import { deleteSelectedRules } from '../../../../../tasks/rules_bulk_actions'; -import { createRule, findAllRules } from '../../../../../tasks/api_calls/rules'; -import { deleteAlertsAndRules } from '../../../../../tasks/api_calls/common'; -import { login } from '../../../../../tasks/login'; +} from '../../../../tasks/alerts_detection_rules'; +import { deleteSelectedRules } from '../../../../tasks/rules_bulk_actions'; +import { createRule, findAllRules } from '../../../../tasks/api_calls/rules'; +import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; +import { login } from '../../../../tasks/login'; describe('Rule deletion', { tags: ['@ess', '@serverless'] }, () => { const testRules = [ diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/import_export/export_rule.cy.ts similarity index 85% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/import_export/export_rule.cy.ts index 0cfcc43714497..41865b729eb49 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/import_export/export_rule.cy.ts @@ -7,14 +7,14 @@ import path from 'path'; -import { deleteAlertsAndRules } from '../../../../../tasks/api_calls/common'; -import { expectedExportedRule, getNewRule } from '../../../../../objects/rule'; +import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; +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, selectAllRules, @@ -22,25 +22,22 @@ 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'; -import { resetRulesTableState } from '../../../../../tasks/common'; -import { login } from '../../../../../tasks/login'; -import { visit } from '../../../../../tasks/navigation'; - -import { RULES_MANAGEMENT_URL } from '../../../../../urls/rules_management'; +} 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 { resetRulesTableState } from '../../../../tasks/common'; +import { login } from '../../../../tasks/login'; +import { visit } from '../../../../tasks/navigation'; + +import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; 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/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/import_rules.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/import_export/import_rules.cy.ts similarity index 83% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/import_rules.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/import_export/import_rules.cy.ts index 4b8fe5b5312b0..85eae2c6a2891 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/import_rules.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/import_export/import_rules.cy.ts @@ -5,18 +5,18 @@ * 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 { deleteAlertsAndRules } from '../../../../../tasks/api_calls/common'; -import { deleteExceptionList } from '../../../../../tasks/api_calls/exceptions'; -import { login } from '../../../../../tasks/login'; -import { visit } from '../../../../../tasks/navigation'; +} from '../../../../tasks/alerts_detection_rules'; +import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; +import { deleteExceptionList } from '../../../../tasks/api_calls/exceptions'; +import { login } from '../../../../tasks/login'; +import { visit } from '../../../../tasks/navigation'; -import { RULES_MANAGEMENT_URL } from '../../../../../urls/rules_management'; +import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; const RULES_TO_IMPORT_FILENAME = 'cypress/fixtures/7_16_rules.ndjson'; const IMPORTED_EXCEPTION_ID = 'b8dfd17f-1e11-41b0-ae7e-9e7f8237de49'; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts similarity index 87% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts index 7e753d42b6b6d..c36b32bb684fe 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts @@ -8,13 +8,13 @@ import { INTERNAL_ALERTING_API_FIND_RULES_PATH } from '@kbn/alerting-plugin/common'; import type { RuleResponse } from '@kbn/security-solution-plugin/common/api/detection_engine'; -import { createRule, snoozeRule as snoozeRuleViaAPI } from '../../../../../tasks/api_calls/rules'; -import { deleteAlertsAndRules, deleteConnectors } from '../../../../../tasks/api_calls/common'; -import { login } from '../../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; -import { getNewRule } from '../../../../../objects/rule'; -import { internalAlertingSnoozeRule } from '../../../../../urls/routes'; -import { RULES_MANAGEMENT_TABLE, RULE_NAME } from '../../../../../screens/alerts_detection_rules'; +import { createRule, snoozeRule as snoozeRuleViaAPI } from '../../../../tasks/api_calls/rules'; +import { deleteAlertsAndRules, deleteConnectors } from '../../../../tasks/api_calls/common'; +import { login } from '../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +import { getNewRule } from '../../../../objects/rule'; +import { internalAlertingSnoozeRule } from '../../../../urls/routes'; +import { RULES_MANAGEMENT_TABLE, RULE_NAME } from '../../../../screens/alerts_detection_rules'; import { expectRuleSnoozed, expectRuleSnoozedInTable, @@ -26,20 +26,20 @@ import { snoozeRule, snoozeRuleInTable, unsnoozeRuleInTable, -} from '../../../../../tasks/rule_snoozing'; -import { createSlackConnector } from '../../../../../tasks/api_calls/connectors'; +} from '../../../../tasks/rule_snoozing'; +import { createSlackConnector } from '../../../../tasks/api_calls/connectors'; import { disableAutoRefresh, duplicateFirstRule, importRules, -} from '../../../../../tasks/alerts_detection_rules'; -import { goToActionsStepTab } from '../../../../../tasks/create_new_rule'; -import { goToRuleEditSettings, visitRuleDetailsPage } from '../../../../../tasks/rule_details'; -import { actionFormSelector } from '../../../../../screens/common/rule_actions'; -import { addEmailConnectorAndRuleAction } from '../../../../../tasks/common/rule_actions'; -import { saveEditedRule, visitEditRulePage } from '../../../../../tasks/edit_rule'; -import { DISABLED_SNOOZE_BADGE } from '../../../../../screens/rule_snoozing'; -import { TOOLTIP } from '../../../../../screens/common'; +} from '../../../../tasks/alerts_detection_rules'; +import { goToActionsStepTab } from '../../../../tasks/create_new_rule'; +import { goToRuleEditSettings, visitRuleDetailsPage } from '../../../../tasks/rule_details'; +import { actionFormSelector } from '../../../../screens/common/rule_actions'; +import { addEmailConnectorAndRuleAction } from '../../../../tasks/common/rule_actions'; +import { saveEditedRule, visitEditRulePage } 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/test/security_solution_cypress/cypress/e2e/detection_response/rule_details/common_flows.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_details/common_flows.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_details/common_flows.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_details/common_flows.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_details/esql_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_details/esql_rule.cy.ts similarity index 100% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_details/esql_rule.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_details/esql_rule.cy.ts diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_auto_refresh.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_auto_refresh.cy.ts similarity index 92% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_auto_refresh.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_auto_refresh.cy.ts index 911fe32dd8f7c..e5175030908ff 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_auto_refresh.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_auto_refresh.cy.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +import { visitRulesManagementTable } from '../../../tasks/rules_management'; import { REFRESH_RULES_STATUS, RULES_TABLE_AUTOREFRESH_INDICATOR, RULES_MANAGEMENT_TABLE, -} from '../../../../screens/alerts_detection_rules'; -import { EUI_CHECKBOX } from '../../../../screens/common/controls'; +} from '../../../screens/alerts_detection_rules'; +import { EUI_CHECKBOX } from '../../../screens/common/controls'; import { selectAllRules, clearAllRuleSelection, @@ -24,11 +24,11 @@ import { selectRulesByName, getRuleRow, setRulesTableAutoRefreshIntervalSetting, -} from '../../../../tasks/alerts_detection_rules'; -import { login } from '../../../../tasks/login'; +} from '../../../tasks/alerts_detection_rules'; +import { login } from '../../../tasks/login'; -import { createRule } from '../../../../tasks/api_calls/rules'; -import { getNewRule } from '../../../../objects/rule'; +import { createRule } from '../../../tasks/api_calls/rules'; +import { getNewRule } from '../../../objects/rule'; const RULES_TABLE_REFRESH_INTERVAL_MS = 60000; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_filtering.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_filtering.cy.ts similarity index 84% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_filtering.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_filtering.cy.ts index 117fc0eee632b..3000a7d05151e 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_filtering.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_filtering.cy.ts @@ -5,30 +5,26 @@ * 2.0. */ -import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; -import { resetRulesTableState } from '../../../../tasks/common'; -import { login } from '../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; +import { resetRulesTableState } from '../../../tasks/common'; +import { login } from '../../../tasks/login'; +import { visitRulesManagementTable } from '../../../tasks/rules_management'; import { expectRulesWithExecutionStatus, filterByExecutionStatus, expectNumberOfRulesShownOnPage, -} from '../../../../tasks/rule_filters'; +} from '../../../tasks/rule_filters'; import { expectManagementTableRules, filterByTags, unselectTags, -} from '../../../../tasks/alerts_detection_rules'; +} from '../../../tasks/alerts_detection_rules'; -import { createRule, waitForRulesToFinishExecution } from '../../../../tasks/api_calls/rules'; -import { - deleteIndex, - createIndex, - createDocument, -} from '../../../../tasks/api_calls/elasticsearch'; -import { disableAutoRefresh } from '../../../../tasks/alerts_detection_rules'; -import { getNewRule } from '../../../../objects/rule'; +import { createRule, waitForRulesToFinishExecution } from '../../../tasks/api_calls/rules'; +import { deleteIndex, createIndex, createDocument } from '../../../tasks/api_calls/elasticsearch'; +import { disableAutoRefresh } from '../../../tasks/alerts_detection_rules'; +import { getNewRule } from '../../../objects/rule'; describe('Rules table: filtering', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_links.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_links.cy.ts similarity index 65% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_links.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_links.cy.ts index ace4406b1c22a..996f081f47cef 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_links.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_links.cy.ts @@ -5,13 +5,13 @@ * 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 { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; -import { login } from '../../../../tasks/login'; -import { visit } from '../../../../tasks/navigation'; -import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; +import { getNewRule } from '../../../objects/rule'; +import { RULES_MONITORING_TAB, RULE_NAME } from '../../../screens/alerts_detection_rules'; +import { createRule } from '../../../tasks/api_calls/rules'; +import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; +import { login } from '../../../tasks/login'; +import { visit } from '../../../tasks/navigation'; +import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; describe('Rules table: links', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_persistent_state.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_persistent_state.cy.ts similarity index 95% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_persistent_state.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_persistent_state.cy.ts index 15ab7e21d2f38..0dc648114ed58 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_persistent_state.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_persistent_state.cy.ts @@ -7,12 +7,12 @@ import { encode } from '@kbn/rison'; -import { resetRulesTableState } from '../../../../tasks/common'; -import { login } from '../../../../tasks/login'; -import { visit } from '../../../../tasks/navigation'; -import { DASHBOARDS_URL, KIBANA_HOME } from '../../../../urls/navigation'; -import { RULES_MANAGEMENT_URL, RULES_MONITORING_URL } from '../../../../urls/rules_management'; -import { getNewRule } from '../../../../objects/rule'; +import { resetRulesTableState } from '../../../tasks/common'; +import { login } from '../../../tasks/login'; +import { visit } from '../../../tasks/navigation'; +import { DASHBOARDS_URL, KIBANA_HOME } from '../../../urls/navigation'; +import { RULES_MANAGEMENT_URL, RULES_MONITORING_URL } from '../../../urls/rules_management'; +import { getNewRule } from '../../../objects/rule'; import { filterByCustomRules, filterBySearchTerm, @@ -31,8 +31,8 @@ import { expectFilterByEnabledRules, expectManagementTableRules, goToRuleDetailsOf, -} 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, @@ -40,7 +40,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 })); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_selection.cy.ts similarity index 89% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_selection.cy.ts index 6014f1c83b9af..12bd51ebf9ffe 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_selection.cy.ts @@ -5,25 +5,25 @@ * 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 { disableAutoRefresh, selectRulesByName, unselectRulesByName, waitForPrebuiltDetectionRulesToBeLoaded, -} from '../../../../tasks/alerts_detection_rules'; +} from '../../../tasks/alerts_detection_rules'; import { getAvailablePrebuiltRulesCount, createAndInstallMockedPrebuiltRules, -} from '../../../../tasks/api_calls/prebuilt_rules'; -import { login } from '../../../../tasks/login'; -import { visit } from '../../../../tasks/navigation'; -import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; +} from '../../../tasks/api_calls/prebuilt_rules'; +import { login } from '../../../tasks/login'; +import { visit } from '../../../tasks/navigation'; +import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; const RULE_1 = createRuleAssetSavedObject({ name: 'Test rule 1', diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_sorting.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_sorting.cy.ts similarity index 83% rename from x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_sorting.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_sorting.cy.ts index 201ae848e6714..67f9095050fc1 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_sorting.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_sorting.cy.ts @@ -12,29 +12,29 @@ import { SECOND_RULE, FOURTH_RULE, RULES_MANAGEMENT_TABLE, -} from '../../../../screens/alerts_detection_rules'; +} from '../../../screens/alerts_detection_rules'; import { enableRule, getRulesManagementTableRows, waitForRuleToUpdate, -} from '../../../../tasks/alerts_detection_rules'; -import { login } from '../../../../tasks/login'; -import { visit } from '../../../../tasks/navigation'; +} from '../../../tasks/alerts_detection_rules'; +import { login } from '../../../tasks/login'; +import { visit } from '../../../tasks/navigation'; -import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; -import { createRule } from '../../../../tasks/api_calls/rules'; +import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; +import { createRule } from '../../../tasks/api_calls/rules'; import { getExistingRule, getNewOverrideRule, getNewRule, getNewThresholdRule, -} from '../../../../objects/rule'; +} from '../../../objects/rule'; import { goToTablePage, setRowsPerPageTo, sortByTableColumn, -} from '../../../../tasks/table_pagination'; -import { TABLE_FIRST_PAGE, TABLE_SECOND_PAGE } from '../../../../screens/table_pagination'; +} from '../../../tasks/table_pagination'; +import { TABLE_FIRST_PAGE, TABLE_SECOND_PAGE } from '../../../screens/table_pagination'; describe('Rules table: sorting', { tags: ['@ess', '@serverless'] }, () => { before(() => { From 3fc3611e4e999778f3c0928b620b8e2590ab33dd Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 23 Nov 2023 11:25:46 +0100 Subject: [PATCH 02/17] updating codeowners file --- .github/CODEOWNERS | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 65a6381cb622c..eca16e5485efd 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1319,9 +1319,7 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/ /x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring @elastic/security-detection-rule-management /x-pack/plugins/security_solution/common/detection_engine/rule_management @elastic/security-detection-rule-management -/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules @elastic/security-detection-rule-management /x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management @elastic/security-detection-rule-management -/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_details @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 /x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules @elastic/security-detection-rule-management From 7110b010f18f577ae72da492365473f79e4b4476 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 23 Nov 2023 11:40:50 +0100 Subject: [PATCH 03/17] adding new scripts --- x-pack/test/security_solution_cypress/package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x-pack/test/security_solution_cypress/package.json b/x-pack/test/security_solution_cypress/package.json index e43f32a447575..69578491619ca 100644 --- a/x-pack/test/security_solution_cypress/package.json +++ b/x-pack/test/security_solution_cypress/package.json @@ -10,6 +10,8 @@ "cypress:run:ess": "yarn cypress:ess --spec './cypress/e2e/!(investigations|explore)/**/*.cy.ts'", "cypress:run:cases:ess": "yarn cypress:ess --spec './cypress/e2e/explore/cases/*.cy.ts'", "cypress:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel run --config-file ../../test/security_solution_cypress/cypress/cypress_ci.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", + "cypress:rule_management:run:ess":"yarn cypress:ess --spec './cypress/e2e/rule_management/!(prebuilt_rules)/**/*.cy.ts'", + "cypress:rule_management:prebuilt_rules:run:ess": "yarn cypress:ess --spec './cypress/e2e/rule_management/prebuilt_rules/**/*.cy.ts'", "cypress:run:respops:ess": "yarn cypress:ess --spec './cypress/e2e/(detection_response|exceptions)/**/*.cy.ts'", "cypress:investigations:run:ess": "yarn cypress:ess --spec './cypress/e2e/investigations/**/*.cy.ts'", "cypress:explore:run:ess": "yarn cypress:ess --spec './cypress/e2e/explore/**/*.cy.ts'", @@ -23,6 +25,8 @@ "cypress:open:serverless": "yarn cypress:serverless open --config-file ../../test/security_solution_cypress/cypress/cypress_serverless.config.ts --spec './cypress/e2e/**/*.cy.ts'", "cypress:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/!(investigations|explore)/**/*.cy.ts'", "cypress:run:cloud:serverless": "yarn cypress:cloud:serverless run --config-file ./cypress/cypress_ci_serverless.config.ts --env CLOUD_SERVERLESS=true", + "cypress:rule_management:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", + "cypress:rule_management:prebuilt_rules:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", "cypress:investigations:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", "cypress:explore:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/explore/**/*.cy.ts'", "cypress:changed-specs-only:serverless": "yarn cypress:serverless --changed-specs-only --env burn=5", From 705daa922f1501cd0126d27c22fd6defe20f940e Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 23 Nov 2023 11:47:35 +0100 Subject: [PATCH 04/17] adding ESS executions to buildkite --- .buildkite/pipelines/on_merge.yml | 24 +++++++++++++++++++ .buildkite/pipelines/pull_request/base.yml | 24 +++++++++++++++++++ .../security_solution_rule_management.sh | 16 +++++++++++++ ...solution_rule_management_prebuilt_rules.sh | 16 +++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 .buildkite/scripts/steps/functional/security_solution_rule_management.sh create mode 100644 .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml index 8b00db428a713..8639c70756b74 100644 --- a/.buildkite/pipelines/on_merge.yml +++ b/.buildkite/pipelines/on_merge.yml @@ -103,6 +103,30 @@ steps: - exit_status: '*' limit: 1 + - command: .buildkite/scripts/steps/functional/security_solution_rule_management.sh + label: 'Rule Management - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + depends_on: build + timeout_in_minutes: 60 + parallelism: 8 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh + label: 'Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + depends_on: build + timeout_in_minutes: 60 + parallelism: 6 + retry: + automatic: + - exit_status: '*' + limit: 1 + - command: .buildkite/scripts/steps/functional/security_serverless_investigations.sh label: 'Serverless Investigations - Security Solution Cypress Tests' agents: diff --git a/.buildkite/pipelines/pull_request/base.yml b/.buildkite/pipelines/pull_request/base.yml index 49215bbd00f11..00c26dc33c658 100644 --- a/.buildkite/pipelines/pull_request/base.yml +++ b/.buildkite/pipelines/pull_request/base.yml @@ -117,6 +117,30 @@ steps: - exit_status: '*' limit: 1 + - command: .buildkite/scripts/steps/functional/security_solution_rule_management.sh + label: 'Rule Management - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + depends_on: build + timeout_in_minutes: 60 + parallelism: 8 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh + label: 'Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + depends_on: build + timeout_in_minutes: 60 + parallelism: 6 + retry: + automatic: + - exit_status: '*' + limit: 1 + - command: .buildkite/scripts/steps/functional/security_solution_investigations.sh label: 'Investigations - Security Solution Cypress Tests' agents: diff --git a/.buildkite/scripts/steps/functional/security_solution_rule_management.sh b/.buildkite/scripts/steps/functional/security_solution_rule_management.sh new file mode 100644 index 0000000000000..847cb42896cf1 --- /dev/null +++ b/.buildkite/scripts/steps/functional/security_solution_rule_management.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/steps/functional/common.sh +source .buildkite/scripts/steps/functional/common_cypress.sh + +export JOB=kibana-security-solution-chrome +export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} + +echo "--- Rule Management - Security Solution Cypress Tests" + +cd x-pack/test/security_solution_cypress + +set +e +yarn cypress:rule_management:run:ess; status=$?; yarn junit:merge || :; exit $status diff --git a/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh b/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh new file mode 100644 index 0000000000000..d8b19ad3363b5 --- /dev/null +++ b/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/steps/functional/common.sh +source .buildkite/scripts/steps/functional/common_cypress.sh + +export JOB=kibana-security-solution-chrome +export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} + +echo "--- Rule Management - Prebuilt Rules - Security Solution Cypress Tests" + +cd x-pack/test/security_solution_cypress + +set +e +yarn cypress:rule_management:prebuilt_rules:run:ess; status=$?; yarn junit:merge || :; exit $status From 433e1b432d2fddb4761448d632d51e78bb187f93 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 23 Nov 2023 15:03:00 +0100 Subject: [PATCH 05/17] adding serverless executions to buildkite --- .../verify_es_serverless_image.yml | 24 +++++++++++++ .buildkite/pipelines/on_merge.yml | 36 +++++++++++++++---- .buildkite/pipelines/pull_request/base.yml | 24 +++++++++++++ .../security_serverless_rule_management.sh | 16 +++++++++ ...rverless_rule_management_prebuilt_rules.sh | 16 +++++++++ 5 files changed, 110 insertions(+), 6 deletions(-) create mode 100644 .buildkite/scripts/steps/functional/security_serverless_rule_management.sh create mode 100644 .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh diff --git a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml index 8e64513b14900..7591c1d57d7ff 100644 --- a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml +++ b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml @@ -95,6 +95,30 @@ steps: - exit_status: '*' limit: 1 + - command: .buildkite/scripts/steps/functional/security_serverles_rule_management.sh + label: 'Serverless Rule Management - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + depends_on: build + timeout_in_minutes: 60 + parallelism: 8 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh + label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + depends_on: build + timeout_in_minutes: 60 + parallelism: 6 + retry: + automatic: + - exit_status: '*' + limit: 1 + - command: .buildkite/scripts/steps/functional/defend_workflows_serverless.sh label: 'Defend Workflows Cypress Tests on Serverless' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml index 8639c70756b74..ec88ea50649fd 100644 --- a/.buildkite/pipelines/on_merge.yml +++ b/.buildkite/pipelines/on_merge.yml @@ -103,8 +103,8 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/functional/security_solution_rule_management.sh - label: 'Rule Management - Security Solution Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_serverless_investigations.sh + label: 'Serverless Investigations - Security Solution Cypress Tests' agents: queue: n2-4-spot depends_on: build @@ -115,8 +115,20 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh - label: 'Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_serverles_rule_management.sh + label: 'Serverless Rule Management - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + depends_on: build + timeout_in_minutes: 60 + parallelism: 8 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh + label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests' agents: queue: n2-4-spot depends_on: build @@ -127,8 +139,8 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/functional/security_serverless_investigations.sh - label: 'Serverless Investigations - Security Solution Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_solution_rule_management.sh + label: 'Rule Management - Security Solution Cypress Tests' agents: queue: n2-4-spot depends_on: build @@ -139,6 +151,18 @@ steps: - exit_status: '*' limit: 1 + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh + label: 'Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + depends_on: build + timeout_in_minutes: 60 + parallelism: 6 + retry: + automatic: + - exit_status: '*' + limit: 1 + - command: .buildkite/scripts/steps/functional/security_solution.sh label: 'Security Solution Cypress Tests' agents: diff --git a/.buildkite/pipelines/pull_request/base.yml b/.buildkite/pipelines/pull_request/base.yml index 00c26dc33c658..d50761a0459fd 100644 --- a/.buildkite/pipelines/pull_request/base.yml +++ b/.buildkite/pipelines/pull_request/base.yml @@ -93,6 +93,30 @@ steps: - exit_status: '*' limit: 1 + - command: .buildkite/scripts/steps/functional/security_serverles_rule_management.sh + label: 'Serverless Rule Management - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + depends_on: build + timeout_in_minutes: 60 + parallelism: 8 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh + label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + depends_on: build + timeout_in_minutes: 60 + parallelism: 6 + retry: + automatic: + - exit_status: '*' + limit: 1 + - command: .buildkite/scripts/steps/functional/security_solution.sh label: 'Security Solution Cypress Tests' agents: diff --git a/.buildkite/scripts/steps/functional/security_serverless_rule_management.sh b/.buildkite/scripts/steps/functional/security_serverless_rule_management.sh new file mode 100644 index 0000000000000..e91e9f084b6be --- /dev/null +++ b/.buildkite/scripts/steps/functional/security_serverless_rule_management.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/steps/functional/common.sh +source .buildkite/scripts/steps/functional/common_cypress.sh + +export JOB=kibana-security-solution-chrome +export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} + +echo "--- Investigations Cypress Tests on Serverless" + +cd x-pack/test/security_solution_cypress + +set +e +yarn cypress:rule_management:run:serverless; status=$?; yarn junit:merge || :; exit $status diff --git a/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh b/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh new file mode 100644 index 0000000000000..4f02b9c2ac162 --- /dev/null +++ b/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/steps/functional/common.sh +source .buildkite/scripts/steps/functional/common_cypress.sh + +export JOB=kibana-security-solution-chrome +export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} + +echo "--- Investigations Cypress Tests on Serverless" + +cd x-pack/test/security_solution_cypress + +set +e +yarn cypress:rule_management:prebuilt_rules:run:serverless; status=$?; yarn junit:merge || :; exit $status From 92b6ec2952c40289593457eb517f591f24488a17 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 23 Nov 2023 15:06:34 +0100 Subject: [PATCH 06/17] addking MKI scropts --- x-pack/test/security_solution_cypress/package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/x-pack/test/security_solution_cypress/package.json b/x-pack/test/security_solution_cypress/package.json index 69578491619ca..be48fd5bf800e 100644 --- a/x-pack/test/security_solution_cypress/package.json +++ b/x-pack/test/security_solution_cypress/package.json @@ -25,7 +25,7 @@ "cypress:open:serverless": "yarn cypress:serverless open --config-file ../../test/security_solution_cypress/cypress/cypress_serverless.config.ts --spec './cypress/e2e/**/*.cy.ts'", "cypress:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/!(investigations|explore)/**/*.cy.ts'", "cypress:run:cloud:serverless": "yarn cypress:cloud:serverless run --config-file ./cypress/cypress_ci_serverless.config.ts --env CLOUD_SERVERLESS=true", - "cypress:rule_management:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", + "cypress:rule_management:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/rule_management/**/*.cy.ts'", "cypress:rule_management:prebuilt_rules:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", "cypress:investigations:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", "cypress:explore:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/explore/**/*.cy.ts'", @@ -35,6 +35,8 @@ "cypress:open:qa:serverless": "yarn cypress:qa:serverless open", "cypress:run:qa:serverless": "yarn cypress:qa:serverless --spec './cypress/e2e/!(investigations|explore)/**/*.cy.ts'", "cypress:run:qa:serverless:investigations": "yarn cypress:qa:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", - "cypress:run:qa:serverless:explore": "yarn cypress:qa:serverless --spec './cypress/e2e/explore/**/*.cy.ts'" + "cypress:run:qa:serverless:explore": "yarn cypress:qa:serverless --spec './cypress/e2e/explore/**/*.cy.ts'", + "cypress:run:qa:serverless:rule_management": "yarn cypress:qa:serverless --spec './cypress/e2e/rule_management/!(prebuilt_rules)/**/*.cy.ts'", + "cypress:run:qa:serverless:rule_management:prebuilt_rules": "yarn cypress:qa:serverless --spec './cypress/e2e/rule_management/prebuilt_rules/**/*.cy.ts'" } } \ No newline at end of file From 1d9aec7dfff80aaa11f3e6a1149f75223420f397 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 23 Nov 2023 15:08:36 +0100 Subject: [PATCH 07/17] adding execution to the quality gate pipeline --- .../security_solution_cypress.yml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.buildkite/pipelines/security_solution/security_solution_cypress.yml b/.buildkite/pipelines/security_solution/security_solution_cypress.yml index 247505ef1c85a..77e7fea574352 100644 --- a/.buildkite/pipelines/security_solution/security_solution_cypress.yml +++ b/.buildkite/pipelines/security_solution/security_solution_cypress.yml @@ -30,6 +30,30 @@ steps: # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. timeout_in_minutes: 300 parallelism: 8 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:rule_management + label: 'Serverless MKI QA Rule Management - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. + timeout_in_minutes: 300 + parallelism: 8 + retry: + automatic: + - exit_status: '*' + limit: 1 + + - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:rule_management:prebuilt_rules + label: 'Serverless MKI QA Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + agents: + queue: n2-4-spot + # TODO : Revise the timeout when the pipeline will be officially integrated with the quality gate. + timeout_in_minutes: 300 + parallelism: 6 retry: automatic: - exit_status: '*' From 2677546597a9f28b49e5ec3e1c6f14b5bbe2fb73 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 23 Nov 2023 15:30:22 +0100 Subject: [PATCH 08/17] excluding rule management from general scripts to avoid duplicate executions --- x-pack/test/security_solution_cypress/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/test/security_solution_cypress/package.json b/x-pack/test/security_solution_cypress/package.json index be48fd5bf800e..2d1bccf2396df 100644 --- a/x-pack/test/security_solution_cypress/package.json +++ b/x-pack/test/security_solution_cypress/package.json @@ -7,7 +7,7 @@ "scripts": { "cypress": "NODE_OPTIONS=--openssl-legacy-provider ../../../node_modules/.bin/cypress", "cypress:open:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel open --spec './cypress/e2e/**/*.cy.ts' --config-file ../../test/security_solution_cypress/cypress/cypress.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", - "cypress:run:ess": "yarn cypress:ess --spec './cypress/e2e/!(investigations|explore)/**/*.cy.ts'", + "cypress:run:ess": "yarn cypress:ess --spec './cypress/e2e/!(investigations|explore|rule_management)/**/*.cy.ts'", "cypress:run:cases:ess": "yarn cypress:ess --spec './cypress/e2e/explore/cases/*.cy.ts'", "cypress:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel run --config-file ../../test/security_solution_cypress/cypress/cypress_ci.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", "cypress:rule_management:run:ess":"yarn cypress:ess --spec './cypress/e2e/rule_management/!(prebuilt_rules)/**/*.cy.ts'", @@ -23,7 +23,7 @@ "cypress:cloud:serverless": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider NODE_TLS_REJECT_UNAUTHORIZED=0 ../../../node_modules/.bin/cypress", "cypress:open:cloud:serverless": "yarn cypress:cloud:serverless open --config-file ./cypress/cypress_serverless.config.ts --env CLOUD_SERVERLESS=true", "cypress:open:serverless": "yarn cypress:serverless open --config-file ../../test/security_solution_cypress/cypress/cypress_serverless.config.ts --spec './cypress/e2e/**/*.cy.ts'", - "cypress:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/!(investigations|explore)/**/*.cy.ts'", + "cypress:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/!(investigations|explore|rule_management)/**/*.cy.ts'", "cypress:run:cloud:serverless": "yarn cypress:cloud:serverless run --config-file ./cypress/cypress_ci_serverless.config.ts --env CLOUD_SERVERLESS=true", "cypress:rule_management:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/rule_management/**/*.cy.ts'", "cypress:rule_management:prebuilt_rules:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", @@ -33,7 +33,7 @@ "cypress:burn:serverless": "yarn cypress:serverless --env burn=2", "cypress:qa:serverless": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel_serverless --config-file ../../test/security_solution_cypress/cypress/cypress_ci_serverless_qa.config.ts", "cypress:open:qa:serverless": "yarn cypress:qa:serverless open", - "cypress:run:qa:serverless": "yarn cypress:qa:serverless --spec './cypress/e2e/!(investigations|explore)/**/*.cy.ts'", + "cypress:run:qa:serverless": "yarn cypress:qa:serverless --spec './cypress/e2e/!(investigations|explore|rule_management)/**/*.cy.ts'", "cypress:run:qa:serverless:investigations": "yarn cypress:qa:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", "cypress:run:qa:serverless:explore": "yarn cypress:qa:serverless --spec './cypress/e2e/explore/**/*.cy.ts'", "cypress:run:qa:serverless:rule_management": "yarn cypress:qa:serverless --spec './cypress/e2e/rule_management/!(prebuilt_rules)/**/*.cy.ts'", From ee25e91f759472707438dbd3e5e7ea91b8adacd3 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 23 Nov 2023 15:40:20 +0100 Subject: [PATCH 09/17] updates readme --- .../cypress/README.md | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/x-pack/test/security_solution_cypress/cypress/README.md b/x-pack/test/security_solution_cypress/cypress/README.md index 8940d6c86e73e..97bb043d1a02e 100644 --- a/x-pack/test/security_solution_cypress/cypress/README.md +++ b/x-pack/test/security_solution_cypress/cypress/README.md @@ -62,19 +62,25 @@ Run the tests with the following yarn scripts from `x-pack/test/security_solutio | cypress | Runs the default Cypress command | | cypress:open:ess | Opens the Cypress UI with all tests in the `e2e` directory. This also runs a local kibana and ES instance. The kibana instance will reload when you make code changes. This is the recommended way to debug and develop tests. | | cypress:open:serverless | Opens the Cypress UI with all tests in the `e2e` directory. This also runs a mocked serverless environment. The kibana instance will reload when you make code changes. This is the recommended way to debug and develop tests. | -| cypress:run:ess | Runs all tests tagged as ESS placed in the `e2e` directory excluding `investigations` and `explore` directories in headless mode | +| cypress:run:ess | Runs all tests tagged as ESS placed in the `e2e` directory excluding `investigations`,`explore` and `rule_management` directories in headless mode | | cypress:run:cases:ess | Runs all tests under `explore/cases` in the `e2e` directory related to the Cases area team in headless mode | | cypress:ess | Runs all ESS tests with the specified configuration in headless mode and produces a report using `cypress-multi-reporters` | +| cypress:rule_management:run:ess | Runs all tests tagged as ESS in the `e2e/rule_management` excluding `e2e/rule_management/prebuilt_rules` directory in headless mode | +| cypress:rule_management:prebuilt_rules:run:ess | Runs all tests tagged as ESS in the `e2e/rule_management/prebuilt_rules` directory in headless mode | | cypress:run:respops:ess | Runs all tests related to the Response Ops area team, specifically tests in `detection_alerts`, `detection_rules`, and `exceptions` directories in headless mode | -| cypress:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e` directory excluding `investigations` and `explore` directories in headless mode | -| cypress:investigations:run:ess | Runs all tests tagged as ESS in the `e2e/investigations` directory in headless mode | +| cypress:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e` directory excluding `investigations`, `explore` and `rule_management` directories in headless mode | +| cypress:rule_management:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/rule_management` excluding `e2e/rule_management/prebuilt_rules` directory in headless mode | +| cypress:rule_management:prebuilt_rules:run:serverless | Runs all tests tagged as ESS in the `e2e/rule_management/prebuilt_rules` directory in headless mode | +| cypress:investigations:run:ess | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode | | cypress:explore:run:ess | Runs all tests tagged as ESS in the `e2e/explore` directory in headless mode | | cypress:investigations:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode | | cypress:explore:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode | | cypress:open:qa:serverless | Opens the Cypress UI with all tests in the `e2e` directory tagged as SERVERLESS. This also creates an MKI project in console.qa enviornment. The kibana instance will reload when you make code changes. This is the recommended way to debug tests in QA. Follow the readme in order to learn about the known limitations. | -| cypress:run:qa:serverless | Runs all tests tagged as SERVERLESS placed in the `e2e` directory excluding `investigations` and `explore` directories in headless mode using the QA environment and real MKI projects.| +| cypress:run:qa:serverless | Runs all tests tagged as SERVERLESS placed in the `e2e` directory excluding `investigations`, `explore` and `rule_management` directories in headless mode using the QA environment and real MKI projects.| | cypress:run:qa:serverless:explore | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode using the QA environment and real MKI prorjects. | | cypress:run:qa:serverless:investigations | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode using the QA environment and reak MKI projects. | +| cypress:run:qa:serverless:rule_management | Runs all tests tagged as SERVERLESS in the `e2e/rule_management` directory, excluding `e2e/rule_management/prebuilt_rules` in headless mode using the QA environment and reak MKI projects. | +| cypress:run:qa:serverless:rule_management:prebuilt_rules | Runs all tests tagged as SERVERLESS in the `e2e/rule_management/prebuilt_rules` directory in headless mode using the QA environment and reak MKI projects. | | junit:merge | Merges individual test reports into a single report and moves the report to the `junit` directory | Please note that all the headless mode commands do not open the Cypress UI and are typically used in CI/CD environments. The scripts that open the Cypress UI are useful for development and debugging. @@ -94,7 +100,7 @@ Below you can find the folder structure used on our Cypress tests. Cypress convention starting version 10 (previously known as integration). Contains the specs that are going to be executed. -### e2e/explore and e2e/investigations +### Area teams folders These directories contain tests which are run in their own Buildkite pipeline. @@ -103,7 +109,8 @@ If you belong to one of the teams listed in the table, please add new e2e specs | Directory | Area team | | -- | -- | | `e2e/explore` | Threat Hunting Explore | -| `e2e/investigations | Threat Hunting Investigations | +| `e2e/investigations` | Threat Hunting Investigations | +| `e2e/rule_management` | Detection Rule Management | ### fixtures/ @@ -203,6 +210,8 @@ Run the tests with the following yarn scripts from `x-pack/test/security_solutio | cypress:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e` directory excluding `investigations` and `explore` directories in headless mode | | cypress:investigations:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode | | cypress:explore:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode | +| cypress:rule_management:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/rule_management` excluding `e2e/rule_management/prebuilt_rules` directory in headless mode | +| cypress:rule_management:prebuilt_rules:run:serverless | Runs all tests tagged as ESS in the `e2e/rule_management/prebuilt_rules` directory in headless mode | Please note that all the headless mode commands do not open the Cypress UI and are typically used in CI/CD environments. The scripts that open the Cypress UI are useful for development and debugging. @@ -248,6 +257,8 @@ Run the tests with the following yarn scripts from `x-pack/test/security_solutio | cypress:run:qa:serverless | Runs all tests tagged as SERVERLESS placed in the `e2e` directory excluding `investigations` and `explore` directories in headless mode using the QA environment and real MKI projects.| | cypress:run:qa:serverless:explore | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode using the QA environment and real MKI prorjects. | | cypress:run:qa:serverless:investigations | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode using the QA environment and reak MKI projects. | +| cypress:run:qa:serverless:rule_management | Runs all tests tagged as SERVERLESS in the `e2e/rule_management` directory, excluding `e2e/rule_management/prebuilt_rules` in headless mode using the QA environment and reak MKI projects. | +| cypress:run:qa:serverless:rule_management:prebuilt_rules | Runs all tests tagged as SERVERLESS in the `e2e/rule_management/prebuilt_rules` directory in headless mode using the QA environment and reak MKI projects. | Please note that all the headless mode commands do not open the Cypress UI and are typically used in CI/CD environments. The scripts that open the Cypress UI are useful for development and debugging. From c1641bd96661d4724c6eb2c9011a59ec6862fe6d Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 23 Nov 2023 16:04:22 +0100 Subject: [PATCH 10/17] fixing typo --- .../pipelines/es_serverless/verify_es_serverless_image.yml | 2 +- .buildkite/pipelines/on_merge.yml | 2 +- .buildkite/pipelines/pull_request/base.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml index 7591c1d57d7ff..217ab4a23c161 100644 --- a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml +++ b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml @@ -95,7 +95,7 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/functional/security_serverles_rule_management.sh + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management.sh label: 'Serverless Rule Management - Security Solution Cypress Tests' agents: queue: n2-4-spot diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml index ec88ea50649fd..8256eb2395633 100644 --- a/.buildkite/pipelines/on_merge.yml +++ b/.buildkite/pipelines/on_merge.yml @@ -115,7 +115,7 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/functional/security_serverles_rule_management.sh + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management.sh label: 'Serverless Rule Management - Security Solution Cypress Tests' agents: queue: n2-4-spot diff --git a/.buildkite/pipelines/pull_request/base.yml b/.buildkite/pipelines/pull_request/base.yml index d50761a0459fd..b2618dbfad30f 100644 --- a/.buildkite/pipelines/pull_request/base.yml +++ b/.buildkite/pipelines/pull_request/base.yml @@ -93,7 +93,7 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/steps/functional/security_serverles_rule_management.sh + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management.sh label: 'Serverless Rule Management - Security Solution Cypress Tests' agents: queue: n2-4-spot From f80dc5317c8f4b4d3cb34ef5f25ee8ed891e677a Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 23 Nov 2023 16:06:39 +0100 Subject: [PATCH 11/17] adjustments --- .../pipelines/es_serverless/verify_es_serverless_image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml index 217ab4a23c161..98d7cabca920a 100644 --- a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml +++ b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml @@ -117,7 +117,7 @@ steps: retry: automatic: - exit_status: '*' - limit: 1 + limit: 1 - command: .buildkite/scripts/steps/functional/defend_workflows_serverless.sh label: 'Defend Workflows Cypress Tests on Serverless' From 0fa496cd925956abe087b14a500fabb115430355 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Thu, 23 Nov 2023 16:07:53 +0100 Subject: [PATCH 12/17] more adjustments --- .buildkite/pipelines/pull_request/base.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipelines/pull_request/base.yml b/.buildkite/pipelines/pull_request/base.yml index b2618dbfad30f..8238afbee4fd2 100644 --- a/.buildkite/pipelines/pull_request/base.yml +++ b/.buildkite/pipelines/pull_request/base.yml @@ -115,7 +115,7 @@ steps: retry: automatic: - exit_status: '*' - limit: 1 + limit: 1 - command: .buildkite/scripts/steps/functional/security_solution.sh label: 'Security Solution Cypress Tests' From 11c26ece929f8c15511a6ad18822bd9e7c417944 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Fri, 24 Nov 2023 11:20:25 +0100 Subject: [PATCH 13/17] addressing comments --- .../pipelines/es_serverless/verify_es_serverless_image.yml | 2 ++ .../steps/functional/security_serverless_rule_management.sh | 2 +- .../security_serverless_rule_management_prebuilt_rules.sh | 2 +- .github/CODEOWNERS | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml index 98d7cabca920a..8d1b778b67983 100644 --- a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml +++ b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml @@ -97,6 +97,7 @@ steps: - command: .buildkite/scripts/steps/functional/security_serverless_rule_management.sh label: 'Serverless Rule Management - Security Solution Cypress Tests' + if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: queue: n2-4-spot depends_on: build @@ -109,6 +110,7 @@ steps: - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: queue: n2-4-spot depends_on: build diff --git a/.buildkite/scripts/steps/functional/security_serverless_rule_management.sh b/.buildkite/scripts/steps/functional/security_serverless_rule_management.sh index e91e9f084b6be..5d360e0db4f29 100644 --- a/.buildkite/scripts/steps/functional/security_serverless_rule_management.sh +++ b/.buildkite/scripts/steps/functional/security_serverless_rule_management.sh @@ -8,7 +8,7 @@ source .buildkite/scripts/steps/functional/common_cypress.sh export JOB=kibana-security-solution-chrome export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} -echo "--- Investigations Cypress Tests on Serverless" +echo "--- Rule Management Cypress Tests on Serverless" cd x-pack/test/security_solution_cypress diff --git a/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh b/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh index 4f02b9c2ac162..bc7dc3269d8cb 100644 --- a/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh +++ b/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh @@ -8,7 +8,7 @@ source .buildkite/scripts/steps/functional/common_cypress.sh export JOB=kibana-security-solution-chrome export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} -echo "--- Investigations Cypress Tests on Serverless" +echo "--- Rule Management - Prebuilt Rules - Cypress Tests on Serverless" cd x-pack/test/security_solution_cypress diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index eca16e5485efd..08f1bf7516d22 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1319,7 +1319,7 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/ /x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring @elastic/security-detection-rule-management /x-pack/plugins/security_solution/common/detection_engine/rule_management @elastic/security-detection-rule-management -/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management @elastic/security-detection-rule-management +/x-pack/test/security_solution_cypress/cypress/e2e/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 /x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules @elastic/security-detection-rule-management From b2d8075fffa274c86047da19dfb5b52b5ede8368 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Mon, 27 Nov 2023 19:15:30 +0100 Subject: [PATCH 14/17] addressing comments --- .github/CODEOWNERS | 2 +- .../cypress/README.md | 24 ++++++------- .../authorization/all_rules_read_only.cy.ts | 14 ++++---- .../maintenance_window_callout.cy.ts | 6 ++-- .../install_update_authorization.cy.ts | 12 +++---- .../install_update_error_handling.cy.ts | 14 ++++---- .../prebuilt_rules/install_via_fleet.cy.ts | 14 ++++---- .../prebuilt_rules/install_workflow.cy.ts | 20 +++++------ .../prebuilt_rules/management.cy.ts | 21 ++++++----- .../prebuilt_rules/notifications.cy.ts | 19 +++++----- .../prebuilt_rules_preview.cy.ts | 24 ++++++------- .../prebuilt_rules/update_workflow.ts | 18 +++++----- .../related_integrations.cy.ts | 35 ++++++++++--------- .../bulk_actions/bulk_duplicate_rules.cy.ts | 24 ++++++------- .../bulk_actions/bulk_edit_rules.cy.ts | 34 +++++++++--------- .../bulk_edit_rules_actions.cy.ts | 30 ++++++++-------- .../bulk_edit_rules_data_view.cy.ts | 20 +++++------ .../rule_actions/deletion/rule_delete.cy.ts | 16 ++++----- .../import_export/export_rule.cy.ts | 33 +++++++++-------- .../import_export/import_rules.cy.ts | 14 ++++---- .../rule_actions/snoozing/rule_snoozing.cy.ts | 34 +++++++++--------- .../rule_details/common_flows.cy.ts | 26 +++++++------- .../rule_details/esql_rule.cy.ts | 16 ++++----- .../rules_table_auto_refresh.cy.ts | 14 ++++---- .../rules_table/rules_table_filtering.cy.ts | 24 +++++++------ .../rules_table/rules_table_links.cy.ts | 14 ++++---- .../rules_table_persistent_state.cy.ts | 18 +++++----- .../rules_table/rules_table_selection.cy.ts | 14 ++++---- .../rules_table/rules_table_sorting.cy.ts | 18 +++++----- .../security_solution_cypress/package.json | 16 ++++----- 30 files changed, 302 insertions(+), 286 deletions(-) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/authorization/all_rules_read_only.cy.ts (82%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/maintenance_windows/maintenance_window_callout.cy.ts (92%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/prebuilt_rules/install_update_authorization.cy.ts (94%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/prebuilt_rules/install_update_error_handling.cy.ts (94%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/prebuilt_rules/install_via_fleet.cy.ts (90%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/prebuilt_rules/install_workflow.cy.ts (85%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/prebuilt_rules/management.cy.ts (91%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/prebuilt_rules/notifications.cy.ts (92%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/prebuilt_rules/prebuilt_rules_preview.cy.ts (97%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/prebuilt_rules/update_workflow.ts (88%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/related_integrations/related_integrations.cy.ts (91%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts (83%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts (95%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts (90%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts (94%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rule_actions/deletion/rule_delete.cy.ts (83%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rule_actions/import_export/export_rule.cy.ts (85%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rule_actions/import_export/import_rules.cy.ts (83%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts (87%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rule_details/common_flows.cy.ts (88%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rule_details/esql_rule.cy.ts (69%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rules_table/rules_table_auto_refresh.cy.ts (92%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rules_table/rules_table_filtering.cy.ts (84%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rules_table/rules_table_links.cy.ts (65%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rules_table/rules_table_persistent_state.cy.ts (95%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rules_table/rules_table_selection.cy.ts (89%) rename x-pack/test/security_solution_cypress/cypress/e2e/{ => detection_response}/rule_management/rules_table/rules_table_sorting.cy.ts (83%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index fd981462dc2c0..2459d2c95a70f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1318,7 +1318,7 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/ /x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring @elastic/security-detection-rule-management /x-pack/plugins/security_solution/common/detection_engine/rule_management @elastic/security-detection-rule-management -/x-pack/test/security_solution_cypress/cypress/e2e/rule_management @elastic/security-detection-rule-management +/x-pack/test/security_solution_cypress/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 /x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/prebuilt_rules @elastic/security-detection-rule-management diff --git a/x-pack/test/security_solution_cypress/cypress/README.md b/x-pack/test/security_solution_cypress/cypress/README.md index 97bb043d1a02e..88786aed7ff56 100644 --- a/x-pack/test/security_solution_cypress/cypress/README.md +++ b/x-pack/test/security_solution_cypress/cypress/README.md @@ -62,15 +62,15 @@ Run the tests with the following yarn scripts from `x-pack/test/security_solutio | cypress | Runs the default Cypress command | | cypress:open:ess | Opens the Cypress UI with all tests in the `e2e` directory. This also runs a local kibana and ES instance. The kibana instance will reload when you make code changes. This is the recommended way to debug and develop tests. | | cypress:open:serverless | Opens the Cypress UI with all tests in the `e2e` directory. This also runs a mocked serverless environment. The kibana instance will reload when you make code changes. This is the recommended way to debug and develop tests. | -| cypress:run:ess | Runs all tests tagged as ESS placed in the `e2e` directory excluding `investigations`,`explore` and `rule_management` directories in headless mode | +| cypress:run:ess | Runs all tests tagged as ESS placed in the `e2e` directory excluding `investigations`,`explore` and `detection_response/rule_management` directories in headless mode | | cypress:run:cases:ess | Runs all tests under `explore/cases` in the `e2e` directory related to the Cases area team in headless mode | | cypress:ess | Runs all ESS tests with the specified configuration in headless mode and produces a report using `cypress-multi-reporters` | -| cypress:rule_management:run:ess | Runs all tests tagged as ESS in the `e2e/rule_management` excluding `e2e/rule_management/prebuilt_rules` directory in headless mode | -| cypress:rule_management:prebuilt_rules:run:ess | Runs all tests tagged as ESS in the `e2e/rule_management/prebuilt_rules` directory in headless mode | +| cypress:rule_management:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management` excluding `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | +| cypress:rule_management:prebuilt_rules:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | | cypress:run:respops:ess | Runs all tests related to the Response Ops area team, specifically tests in `detection_alerts`, `detection_rules`, and `exceptions` directories in headless mode | | cypress:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e` directory excluding `investigations`, `explore` and `rule_management` directories in headless mode | -| cypress:rule_management:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/rule_management` excluding `e2e/rule_management/prebuilt_rules` directory in headless mode | -| cypress:rule_management:prebuilt_rules:run:serverless | Runs all tests tagged as ESS in the `e2e/rule_management/prebuilt_rules` directory in headless mode | +| cypress:rule_management:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` excluding `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | +| cypress:rule_management:prebuilt_rules:run:serverless | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | | cypress:investigations:run:ess | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode | | cypress:explore:run:ess | Runs all tests tagged as ESS in the `e2e/explore` directory in headless mode | | cypress:investigations:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode | @@ -79,8 +79,8 @@ Run the tests with the following yarn scripts from `x-pack/test/security_solutio | cypress:run:qa:serverless | Runs all tests tagged as SERVERLESS placed in the `e2e` directory excluding `investigations`, `explore` and `rule_management` directories in headless mode using the QA environment and real MKI projects.| | cypress:run:qa:serverless:explore | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode using the QA environment and real MKI prorjects. | | cypress:run:qa:serverless:investigations | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode using the QA environment and reak MKI projects. | -| cypress:run:qa:serverless:rule_management | Runs all tests tagged as SERVERLESS in the `e2e/rule_management` directory, excluding `e2e/rule_management/prebuilt_rules` in headless mode using the QA environment and reak MKI projects. | -| cypress:run:qa:serverless:rule_management:prebuilt_rules | Runs all tests tagged as SERVERLESS in the `e2e/rule_management/prebuilt_rules` directory in headless mode using the QA environment and reak MKI projects. | +| cypress:run:qa:serverless:rule_management | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` directory, excluding `e2e/detection_response/rule_management/prebuilt_rules` in headless mode using the QA environment and reak MKI projects. | +| cypress:run:qa:serverless:rule_management:prebuilt_rules | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode using the QA environment and reak MKI projects. | | junit:merge | Merges individual test reports into a single report and moves the report to the `junit` directory | Please note that all the headless mode commands do not open the Cypress UI and are typically used in CI/CD environments. The scripts that open the Cypress UI are useful for development and debugging. @@ -110,7 +110,7 @@ If you belong to one of the teams listed in the table, please add new e2e specs | -- | -- | | `e2e/explore` | Threat Hunting Explore | | `e2e/investigations` | Threat Hunting Investigations | -| `e2e/rule_management` | Detection Rule Management | +| `e2e/detection_response/rule_management` | Detection Rule Management | ### fixtures/ @@ -210,8 +210,8 @@ Run the tests with the following yarn scripts from `x-pack/test/security_solutio | cypress:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e` directory excluding `investigations` and `explore` directories in headless mode | | cypress:investigations:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode | | cypress:explore:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode | -| cypress:rule_management:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/rule_management` excluding `e2e/rule_management/prebuilt_rules` directory in headless mode | -| cypress:rule_management:prebuilt_rules:run:serverless | Runs all tests tagged as ESS in the `e2e/rule_management/prebuilt_rules` directory in headless mode | +| cypress:rule_management:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` excluding `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | +| cypress:rule_management:prebuilt_rules:run:serverless | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | Please note that all the headless mode commands do not open the Cypress UI and are typically used in CI/CD environments. The scripts that open the Cypress UI are useful for development and debugging. @@ -257,8 +257,8 @@ Run the tests with the following yarn scripts from `x-pack/test/security_solutio | cypress:run:qa:serverless | Runs all tests tagged as SERVERLESS placed in the `e2e` directory excluding `investigations` and `explore` directories in headless mode using the QA environment and real MKI projects.| | cypress:run:qa:serverless:explore | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode using the QA environment and real MKI prorjects. | | cypress:run:qa:serverless:investigations | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode using the QA environment and reak MKI projects. | -| cypress:run:qa:serverless:rule_management | Runs all tests tagged as SERVERLESS in the `e2e/rule_management` directory, excluding `e2e/rule_management/prebuilt_rules` in headless mode using the QA environment and reak MKI projects. | -| cypress:run:qa:serverless:rule_management:prebuilt_rules | Runs all tests tagged as SERVERLESS in the `e2e/rule_management/prebuilt_rules` directory in headless mode using the QA environment and reak MKI projects. | +| cypress:run:qa:serverless:rule_management | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` directory, excluding `e2e/detection_response/rule_management/prebuilt_rules` in headless mode using the QA environment and reak MKI projects. | +| cypress:run:qa:serverless:rule_management:prebuilt_rules | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode using the QA environment and reak MKI projects. | Please note that all the headless mode commands do not open the Cypress UI and are typically used in CI/CD environments. The scripts that open the Cypress UI are useful for development and debugging. diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/authorization/all_rules_read_only.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/authorization/all_rules_read_only.cy.ts similarity index 82% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/authorization/all_rules_read_only.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/authorization/all_rules_read_only.cy.ts index e1cfa11518414..244637126ecc2 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/authorization/all_rules_read_only.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/authorization/all_rules_read_only.cy.ts @@ -7,22 +7,22 @@ import { ROLES } from '@kbn/security-solution-plugin/common/test'; -import { getNewRule } from '../../../objects/rule'; +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 { createRule } from '../../../tasks/api_calls/rules'; +} from '../../../../screens/alerts_detection_rules'; +import { VALUE_LISTS_MODAL_ACTIVATOR } from '../../../../screens/lists'; +import { createRule } from '../../../../tasks/api_calls/rules'; import { dismissCallOut, getCallOut, waitForCallOutToBeShown, MISSING_PRIVILEGES_CALLOUT, -} from '../../../tasks/common/callouts'; -import { login } from '../../../tasks/login'; -import { visitRulesManagementTable } from '../../../tasks/rules_management'; +} from '../../../../tasks/common/callouts'; +import { login } from '../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; // TODO: https://github.com/elastic/kibana/issues/164451 We should find a way to make this spec work in Serverless // TODO: https://github.com/elastic/kibana/issues/161540 diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/maintenance_windows/maintenance_window_callout.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/maintenance_windows/maintenance_window_callout.cy.ts similarity index 92% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/maintenance_windows/maintenance_window_callout.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/maintenance_windows/maintenance_window_callout.cy.ts index e26428ee06c01..b5e7218aaa293 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/maintenance_windows/maintenance_window_callout.cy.ts +++ b/x-pack/test/security_solution_cypress/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 { login } from '../../../tasks/login'; -import { visit } from '../../../tasks/navigation'; -import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; +import { login } from '../../../../tasks/login'; +import { visit } from '../../../../tasks/navigation'; +import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; describe( 'Maintenance window callout on Rule Management page', diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_update_authorization.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_update_authorization.cy.ts similarity index 94% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_update_authorization.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_update_authorization.cy.ts index e0078dd54e7ea..29e650dd4de66 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_update_authorization.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_update_authorization.cy.ts @@ -12,14 +12,14 @@ import { } from '@kbn/security-solution-plugin/common/constants'; import { ROLES } from '@kbn/security-solution-plugin/common/test'; -import { createRuleAssetSavedObject } from '../../../helpers/rules'; +import { createRuleAssetSavedObject } from '../../../../helpers/rules'; import { createAndInstallMockedPrebuiltRules, installPrebuiltRuleAssets, preventPrebuiltRulesPackageInstallation, -} from '../../../tasks/api_calls/prebuilt_rules'; -import { visit } from '../../../tasks/navigation'; -import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; +} from '../../../../tasks/api_calls/prebuilt_rules'; +import { visit } from '../../../../tasks/navigation'; +import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; import { ADD_ELASTIC_RULES_BTN, getInstallSingleRuleButtonByRuleId, @@ -31,8 +31,8 @@ import { RULES_UPDATES_TAB, RULE_CHECKBOX, UPGRADE_ALL_RULES_BUTTON, -} from '../../../screens/alerts_detection_rules'; -import { login } from '../../../tasks/login'; +} from '../../../../screens/alerts_detection_rules'; +import { login } from '../../../../tasks/login'; // Rule to test update const RULE_1_ID = 'rule_1'; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_update_error_handling.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_update_error_handling.cy.ts similarity index 94% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_update_error_handling.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_update_error_handling.cy.ts index 7e288910ccb60..db84d92e4ddb6 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_update_error_handling.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_update_error_handling.cy.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { createRuleAssetSavedObject } from '../../../helpers/rules'; +import { createRuleAssetSavedObject } from '../../../../helpers/rules'; import { getInstallSingleRuleButtonByRuleId, getUpgradeSingleRuleButtonByRuleId, @@ -14,14 +14,14 @@ import { SELECT_ALL_RULES_ON_PAGE_CHECKBOX, UPGRADE_ALL_RULES_BUTTON, UPGRADE_SELECTED_RULES_BUTTON, -} from '../../../screens/alerts_detection_rules'; -import { selectRulesByName } from '../../../tasks/alerts_detection_rules'; +} from '../../../../screens/alerts_detection_rules'; +import { selectRulesByName } from '../../../../tasks/alerts_detection_rules'; import { installPrebuiltRuleAssets, createAndInstallMockedPrebuiltRules, preventPrebuiltRulesPackageInstallation, -} from '../../../tasks/api_calls/prebuilt_rules'; -import { login } from '../../../tasks/login'; +} from '../../../../tasks/api_calls/prebuilt_rules'; +import { login } from '../../../../tasks/login'; import { clickAddElasticRulesButton, assertInstallationRequestIsComplete, @@ -33,8 +33,8 @@ import { assertRulesPresentInAddPrebuiltRulesTable, assertRuleUpgradeFailureToastShown, assertRulesPresentInRuleUpdatesTable, -} from '../../../tasks/prebuilt_rules'; -import { visitRulesManagementTable } from '../../../tasks/rules_management'; +} from '../../../../tasks/prebuilt_rules'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; describe( 'Detection rules, Prebuilt Rules Installation and Update - Error handling', diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_via_fleet.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_via_fleet.cy.ts similarity index 90% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_via_fleet.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_via_fleet.cy.ts index 6da3d58c0530d..762e79bb27003 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_via_fleet.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_via_fleet.cy.ts @@ -8,13 +8,13 @@ import type { BulkInstallPackageInfo } from '@kbn/fleet-plugin/common'; import type { Rule } from '@kbn/security-solution-plugin/public/detection_engine/rule_management/logic/types'; -import { resetRulesTableState } from '../../../tasks/common'; -import { INSTALL_ALL_RULES_BUTTON, TOASTER } from '../../../screens/alerts_detection_rules'; -import { getRuleAssets } from '../../../tasks/api_calls/prebuilt_rules'; -import { login } from '../../../tasks/login'; -import { clickAddElasticRulesButton } from '../../../tasks/prebuilt_rules'; -import { visitRulesManagementTable } from '../../../tasks/rules_management'; -import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; +import { resetRulesTableState } from '../../../../tasks/common'; +import { INSTALL_ALL_RULES_BUTTON, TOASTER } from '../../../../screens/alerts_detection_rules'; +import { getRuleAssets } from '../../../../tasks/api_calls/prebuilt_rules'; +import { login } from '../../../../tasks/login'; +import { clickAddElasticRulesButton } from '../../../../tasks/prebuilt_rules'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; describe( 'Detection rules, Prebuilt Rules Installation and Update workflow', diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_workflow.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_workflow.cy.ts similarity index 85% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_workflow.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_workflow.cy.ts index ec4615bcf59e4..523d0ec0ad4e0 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/install_workflow.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_workflow.cy.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { resetRulesTableState } from '../../../tasks/common'; -import { createRuleAssetSavedObject } from '../../../helpers/rules'; +import { resetRulesTableState } from '../../../../tasks/common'; +import { createRuleAssetSavedObject } from '../../../../helpers/rules'; import { getInstallSingleRuleButtonByRuleId, GO_BACK_TO_RULES_TABLE_BUTTON, @@ -16,19 +16,19 @@ import { RULE_CHECKBOX, SELECT_ALL_RULES_ON_PAGE_CHECKBOX, TOASTER, -} from '../../../screens/alerts_detection_rules'; -import { selectRulesByName } from '../../../tasks/alerts_detection_rules'; -import { RULE_MANAGEMENT_PAGE_BREADCRUMB } from '../../../screens/breadcrumbs'; -import { installPrebuiltRuleAssets } from '../../../tasks/api_calls/prebuilt_rules'; -import { login } from '../../../tasks/login'; +} from '../../../../screens/alerts_detection_rules'; +import { selectRulesByName } from '../../../../tasks/alerts_detection_rules'; +import { RULE_MANAGEMENT_PAGE_BREADCRUMB } from '../../../../screens/breadcrumbs'; +import { installPrebuiltRuleAssets } from '../../../../tasks/api_calls/prebuilt_rules'; +import { login } from '../../../../tasks/login'; import { assertInstallationRequestIsComplete, assertRuleInstallationSuccessToastShown, assertRulesPresentInInstalledRulesTable, clickAddElasticRulesButton, -} from '../../../tasks/prebuilt_rules'; -import { visitRulesManagementTable } from '../../../tasks/rules_management'; -import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; +} from '../../../../tasks/prebuilt_rules'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; describe( 'Detection rules, Prebuilt Rules Installation and Update workflow', diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/management.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/management.cy.ts similarity index 91% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/management.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/management.cy.ts index f3101f513915f..15e020b5e0663 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/management.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/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, @@ -15,7 +15,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 { deleteFirstRule, disableAutoRefresh, @@ -24,21 +24,24 @@ import { selectRulesByName, 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, preventPrebuiltRulesPackageInstallation, -} from '../../../tasks/api_calls/prebuilt_rules'; -import { deleteAlertsAndRules, deletePrebuiltRulesAssets } from '../../../tasks/api_calls/common'; -import { login } from '../../../tasks/login'; -import { visit } from '../../../tasks/navigation'; -import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; +} from '../../../../tasks/api_calls/prebuilt_rules'; +import { + deleteAlertsAndRules, + deletePrebuiltRulesAssets, +} from '../../../../tasks/api_calls/common'; +import { login } from '../../../../tasks/login'; +import { visit } from '../../../../tasks/navigation'; +import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; const rules = Array.from(Array(5)).map((_, i) => { return createRuleAssetSavedObject({ diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/notifications.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/notifications.cy.ts similarity index 92% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/notifications.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/notifications.cy.ts index 92bf9e7f1471c..4812efc740ae2 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/notifications.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/notifications.cy.ts @@ -5,22 +5,25 @@ * 2.0. */ -import { createRuleAssetSavedObject } from '../../../helpers/rules'; +import { createRuleAssetSavedObject } from '../../../../helpers/rules'; import { ADD_ELASTIC_RULES_BTN, ADD_ELASTIC_RULES_EMPTY_PROMPT_BTN, RULES_UPDATES_TAB, -} from '../../../screens/alerts_detection_rules'; -import { deleteFirstRule } from '../../../tasks/alerts_detection_rules'; -import { deleteAlertsAndRules, deletePrebuiltRulesAssets } from '../../../tasks/api_calls/common'; +} from '../../../../screens/alerts_detection_rules'; +import { deleteFirstRule } from '../../../../tasks/alerts_detection_rules'; +import { + deleteAlertsAndRules, + deletePrebuiltRulesAssets, +} from '../../../../tasks/api_calls/common'; import { installAllPrebuiltRulesRequest, installPrebuiltRuleAssets, createAndInstallMockedPrebuiltRules, -} from '../../../tasks/api_calls/prebuilt_rules'; -import { resetRulesTableState } from '../../../tasks/common'; -import { login } from '../../../tasks/login'; -import { visitRulesManagementTable } from '../../../tasks/rules_management'; +} from '../../../../tasks/api_calls/prebuilt_rules'; +import { resetRulesTableState } from '../../../../tasks/common'; +import { login } from '../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; const RULE_1 = createRuleAssetSavedObject({ name: 'Test rule 1', diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/prebuilt_rules_preview.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/prebuilt_rules_preview.cy.ts similarity index 97% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/prebuilt_rules_preview.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/prebuilt_rules_preview.cy.ts index 6deeb6f5202c0..81f37b7760df2 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/prebuilt_rules_preview.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/prebuilt_rules_preview.cy.ts @@ -12,22 +12,22 @@ import type { PrebuiltRuleAsset } from '@kbn/security-solution-plugin/server/lib import type { Threshold } from '@kbn/security-solution-plugin/common/api/detection_engine/model/rule_schema'; import { AlertSuppression } from '@kbn/security-solution-plugin/common/api/detection_engine/model/rule_schema'; -import { createRuleAssetSavedObject } from '../../../helpers/rules'; +import { createRuleAssetSavedObject } from '../../../../helpers/rules'; import { INSTALL_PREBUILT_RULE_BUTTON, INSTALL_PREBUILT_RULE_PREVIEW, UPDATE_PREBUILT_RULE_PREVIEW, UPDATE_PREBUILT_RULE_BUTTON, -} from '../../../screens/alerts_detection_rules'; -import { RULE_MANAGEMENT_PAGE_BREADCRUMB } from '../../../screens/breadcrumbs'; +} from '../../../../screens/alerts_detection_rules'; +import { RULE_MANAGEMENT_PAGE_BREADCRUMB } from '../../../../screens/breadcrumbs'; import { installPrebuiltRuleAssets, createAndInstallMockedPrebuiltRules, -} from '../../../tasks/api_calls/prebuilt_rules'; -import { createSavedQuery, deleteSavedQueries } from '../../../tasks/api_calls/saved_queries'; -import { fetchMachineLearningModules } from '../../../tasks/api_calls/machine_learning'; -import { resetRulesTableState } from '../../../tasks/common'; -import { login } from '../../../tasks/login'; +} from '../../../../tasks/api_calls/prebuilt_rules'; +import { createSavedQuery, deleteSavedQueries } from '../../../../tasks/api_calls/saved_queries'; +import { fetchMachineLearningModules } from '../../../../tasks/api_calls/machine_learning'; +import { resetRulesTableState } from '../../../../tasks/common'; +import { login } from '../../../../tasks/login'; import { assertRuleInstallationSuccessToastShown, assertRulesNotPresentInAddPrebuiltRulesTable, @@ -36,7 +36,7 @@ import { assertRuleUpgradeSuccessToastShown, clickAddElasticRulesButton, clickRuleUpdatesTab, -} from '../../../tasks/prebuilt_rules'; +} from '../../../../tasks/prebuilt_rules'; import { assertAlertSuppressionPropertiesShown, assertCommonPropertiesShown, @@ -55,13 +55,13 @@ import { closeRulePreview, openRuleInstallPreview, openRuleUpdatePreview, -} from '../../../tasks/prebuilt_rules_preview'; -import { visitRulesManagementTable } from '../../../tasks/rules_management'; +} from '../../../../tasks/prebuilt_rules_preview'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; import { deleteAlertsAndRules, deleteDataView, postDataView, -} from '../../../tasks/api_calls/common'; +} from '../../../../tasks/api_calls/common'; const TEST_ENV_TAGS = ['@ess', '@serverless']; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/update_workflow.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/update_workflow.ts similarity index 88% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/update_workflow.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/update_workflow.ts index edeb8ac98623b..d858280dd5294 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/prebuilt_rules/update_workflow.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/update_workflow.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { createRuleAssetSavedObject } from '../../../helpers/rules'; +import { createRuleAssetSavedObject } from '../../../../helpers/rules'; import { getUpgradeSingleRuleButtonByRuleId, NO_RULES_AVAILABLE_FOR_UPGRADE_MESSAGE, @@ -13,22 +13,22 @@ import { SELECT_ALL_RULES_ON_PAGE_CHECKBOX, UPGRADE_ALL_RULES_BUTTON, UPGRADE_SELECTED_RULES_BUTTON, -} from '../../../screens/alerts_detection_rules'; -import { selectRulesByName } from '../../../tasks/alerts_detection_rules'; -import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; +} from '../../../../screens/alerts_detection_rules'; +import { selectRulesByName } from '../../../../tasks/alerts_detection_rules'; +import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; import { installPrebuiltRuleAssets, createAndInstallMockedPrebuiltRules, -} from '../../../tasks/api_calls/prebuilt_rules'; -import { resetRulesTableState } from '../../../tasks/common'; -import { login } from '../../../tasks/login'; +} from '../../../../tasks/api_calls/prebuilt_rules'; +import { resetRulesTableState } from '../../../../tasks/common'; +import { login } from '../../../../tasks/login'; import { assertRulesNotPresentInRuleUpdatesTable, assertRuleUpgradeSuccessToastShown, assertUpgradeRequestIsComplete, clickRuleUpdatesTab, -} from '../../../tasks/prebuilt_rules'; -import { visitRulesManagementTable } from '../../../tasks/rules_management'; +} from '../../../../tasks/prebuilt_rules'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; describe( 'Detection rules, Prebuilt Rules Installation and Update workflow', diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/related_integrations/related_integrations.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/related_integrations/related_integrations.cy.ts similarity index 91% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/related_integrations/related_integrations.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/related_integrations/related_integrations.cy.ts index ee9e46d02513c..51aa3f406b8ed 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/related_integrations/related_integrations.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/related_integrations/related_integrations.cy.ts @@ -7,40 +7,43 @@ import { omit } from 'lodash'; import { PerformRuleInstallationResponseBody } from '@kbn/security-solution-plugin/common/api/detection_engine'; -import { generateEvent } from '../../../objects/event'; -import { createDocument, deleteDataStream } from '../../../tasks/api_calls/elasticsearch'; -import { createRuleAssetSavedObject } from '../../../helpers/rules'; -import { INTEGRATION_LINK, INTEGRATION_STATUS } from '../../../screens/rule_details'; +import { generateEvent } from '../../../../objects/event'; +import { createDocument, deleteDataStream } from '../../../../tasks/api_calls/elasticsearch'; +import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +import { INTEGRATION_LINK, INTEGRATION_STATUS } from '../../../../screens/rule_details'; import { INTEGRATIONS_POPOVER, INTEGRATIONS_POPOVER_TITLE, RULE_NAME, -} from '../../../screens/alerts_detection_rules'; +} from '../../../../screens/alerts_detection_rules'; import { installPrebuiltRuleAssets, installAllPrebuiltRulesRequest, SAMPLE_PREBUILT_RULE, -} from '../../../tasks/api_calls/prebuilt_rules'; -import { cleanFleet } from '../../../tasks/api_calls/fleet'; +} from '../../../../tasks/api_calls/prebuilt_rules'; +import { cleanFleet } from '../../../../tasks/api_calls/fleet'; import { disableRelatedIntegrations, enableRelatedIntegrations, -} from '../../../tasks/api_calls/kibana_advanced_settings'; -import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; -import { login } from '../../../tasks/login'; -import { visitRulesManagementTable } from '../../../tasks/rules_management'; -import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; +} from '../../../../tasks/api_calls/kibana_advanced_settings'; +import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; +import { login } from '../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +import { waitForAlertsToPopulate } from '../../../../tasks/create_new_rule'; import { installIntegrations, PackagePolicyWithoutAgentPolicyId, -} from '../../../tasks/api_calls/integrations'; -import { disableAutoRefresh, openIntegrationsPopover } from '../../../tasks/alerts_detection_rules'; -import { fetchRuleAlerts } from '../../../tasks/api_calls/alerts'; +} from '../../../../tasks/api_calls/integrations'; +import { + disableAutoRefresh, + openIntegrationsPopover, +} from '../../../../tasks/alerts_detection_rules'; +import { fetchRuleAlerts } from '../../../../tasks/api_calls/alerts'; import { enablesRule, visitRuleDetailsPage, waitForPageToBeLoaded, -} from '../../../tasks/rule_details'; +} from '../../../../tasks/rule_details'; describe('Related integrations', { tags: ['@ess', '@serverless', '@brokenInServerlessQA'] }, () => { const DATA_STREAM_NAME = 'logs-related-integrations-test'; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts similarity index 83% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts index cacf36473b7dd..dd053ab958aab 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts @@ -5,33 +5,33 @@ * 2.0. */ -import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; +import { deleteAlertsAndRules } from '../../../../../tasks/api_calls/common'; import { goToRuleDetailsOf, expectManagementTableRules, selectAllRules, disableAutoRefresh, -} 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 } from '../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +} from '../../../../../tasks/rules_bulk_actions'; +import { goToExceptionsTab, viewExpiredExceptionItems } from '../../../../../tasks/rule_details'; +import { login } from '../../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; -import { createRule } from '../../../../tasks/api_calls/rules'; -import { resetRulesTableState } from '../../../../tasks/common'; +import { createRule } from '../../../../../tasks/api_calls/rules'; +import { resetRulesTableState } 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/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts similarity index 95% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts index a92795b7fe750..94b6804b31193 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; +import { deleteAlertsAndRules } from '../../../../../tasks/api_calls/common'; import { MODAL_CONFIRMATION_BTN, MODAL_CONFIRMATION_BODY, 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_CHECKBOX, EUI_FILTER_SELECT_ITEM } from '../../../../screens/common/controls'; +import { EUI_CHECKBOX, EUI_FILTER_SELECT_ITEM } from '../../../../../screens/common/controls'; import { selectAllRules, @@ -40,7 +40,7 @@ import { selectAllRulesOnPage, getRuleRow, disableAutoRefresh, -} from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../tasks/alerts_detection_rules'; import { typeIndexPatterns, @@ -72,15 +72,15 @@ import { assertRuleScheduleValues, assertUpdateScheduleWarningExists, assertDefaultValuesAreAppliedToScheduleFields, -} from '../../../../tasks/rules_bulk_actions'; +} from '../../../../../tasks/rules_bulk_actions'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; -import { hasIndexPatterns, getDetails } from '../../../../tasks/rule_details'; -import { login } from '../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; -import { createRule } from '../../../../tasks/api_calls/rules'; -import { loadPrepackagedTimelineTemplates } from '../../../../tasks/api_calls/timelines'; -import { resetRulesTableState } from '../../../../tasks/common'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; +import { hasIndexPatterns, getDetails } from '../../../../../tasks/rule_details'; +import { login } from '../../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; +import { createRule } from '../../../../../tasks/api_calls/rules'; +import { loadPrepackagedTimelineTemplates } from '../../../../../tasks/api_calls/timelines'; +import { resetRulesTableState } from '../../../../../tasks/common'; import { getEqlRule, @@ -90,14 +90,14 @@ import { getNewThresholdRule, getMachineLearningRule, getNewTermsRule, -} from '../../../../objects/rule'; +} from '../../../../../objects/rule'; import { createAndInstallMockedPrebuiltRules, getAvailablePrebuiltRulesCount, preventPrebuiltRulesPackageInstallation, -} from '../../../../tasks/api_calls/prebuilt_rules'; -import { setRowsPerPageTo, sortByTableColumn } from '../../../../tasks/table_pagination'; +} from '../../../../../tasks/api_calls/prebuilt_rules'; +import { setRowsPerPageTo, sortByTableColumn } 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/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts similarity index 90% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts index 8696edd468921..62acef933f032 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts @@ -10,18 +10,18 @@ import { ROLES } from '@kbn/security-solution-plugin/common/test'; import { MISSING_PRIVILEGES_CALLOUT, waitForCallOutToBeShown, -} from '../../../../tasks/common/callouts'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +} from '../../../../../tasks/common/callouts'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; 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 { deleteAlertsAndRules, deleteConnectors } from '../../../../tasks/api_calls/common'; -import type { RuleActionCustomFrequency } from '../../../../tasks/common/rule_actions'; +import { deleteAlertsAndRules, deleteConnectors } from '../../../../../tasks/api_calls/common'; +import type { RuleActionCustomFrequency } from '../../../../../tasks/common/rule_actions'; import { addSlackRuleAction, assertSlackRuleAction, @@ -33,7 +33,7 @@ import { pickCustomFrequencyOption, pickPerRuleRunFrequencyOption, pickSummaryOfAlertsOption, -} from '../../../../tasks/common/rule_actions'; +} from '../../../../../tasks/common/rule_actions'; import { goToEditRuleActionsSettingsOf, expectManagementTableRules, @@ -41,19 +41,19 @@ import { selectRulesByName, getRulesManagementTableRows, disableAutoRefresh, -} from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../tasks/alerts_detection_rules'; import { waitForBulkEditActionToFinish, submitBulkEditForm, checkOverwriteRuleActionsCheckbox, openBulkEditRuleActionsForm, openBulkActionsMenu, -} from '../../../../tasks/rules_bulk_actions'; -import { login } from '../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +} from '../../../../../tasks/rules_bulk_actions'; +import { login } from '../../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; -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, @@ -62,12 +62,12 @@ import { getNewThresholdRule, getMachineLearningRule, getNewTermsRule, -} from '../../../../objects/rule'; +} from '../../../../../objects/rule'; import { createAndInstallMockedPrebuiltRules, excessivelyInstallAllPrebuiltRules, preventPrebuiltRulesPackageInstallation, -} from '../../../../tasks/api_calls/prebuilt_rules'; +} from '../../../../../tasks/api_calls/prebuilt_rules'; const ruleNameToAssert = 'Custom rule name with actions'; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts similarity index 94% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts index 5e5bbc2413c74..3b9ddf73ad3c7 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_data_view.cy.ts @@ -8,9 +8,9 @@ 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 { goToRuleDetailsOf, @@ -18,7 +18,7 @@ import { selectAllRules, getRulesManagementTableRows, disableAutoRefresh, -} from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../tasks/alerts_detection_rules'; import { typeIndexPatterns, @@ -28,22 +28,22 @@ import { checkOverwriteIndexPatternsCheckbox, openBulkEditAddIndexPatternsForm, openBulkEditDeleteIndexPatternsForm, -} from '../../../../tasks/rules_bulk_actions'; +} from '../../../../../tasks/rules_bulk_actions'; import { hasIndexPatterns, getDetails, assertDetailsNotExist, -} from '../../../../tasks/rule_details'; -import { login } from '../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +} from '../../../../../tasks/rule_details'; +import { login } from '../../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; -import { createRule } from '../../../../tasks/api_calls/rules'; +import { createRule } from '../../../../../tasks/api_calls/rules'; import { deleteAlertsAndRules, deleteDataView, postDataView, -} from '../../../../tasks/api_calls/common'; +} from '../../../../../tasks/api_calls/common'; import { getEqlRule, @@ -51,7 +51,7 @@ import { getNewRule, getNewThresholdRule, getNewTermsRule, -} from '../../../../objects/rule'; +} from '../../../../../objects/rule'; const DATA_VIEW_ID = 'auditbeat'; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/deletion/rule_delete.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/deletion/rule_delete.cy.ts similarity index 83% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/deletion/rule_delete.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/deletion/rule_delete.cy.ts index 2da90f07b79dd..4c9168744920d 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/deletion/rule_delete.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/deletion/rule_delete.cy.ts @@ -5,21 +5,21 @@ * 2.0. */ -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; -import { getNewRule } from '../../../../objects/rule'; +import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; +import { getNewRule } from '../../../../../objects/rule'; -import { RULE_SWITCH } from '../../../../screens/alerts_detection_rules'; +import { RULE_SWITCH } from '../../../../../screens/alerts_detection_rules'; import { deleteFirstRule, disableAutoRefresh, getRulesManagementTableRows, selectRulesByName, -} from '../../../../tasks/alerts_detection_rules'; -import { deleteSelectedRules } from '../../../../tasks/rules_bulk_actions'; -import { createRule, findAllRules } from '../../../../tasks/api_calls/rules'; -import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; -import { login } from '../../../../tasks/login'; +} from '../../../../../tasks/alerts_detection_rules'; +import { deleteSelectedRules } from '../../../../../tasks/rules_bulk_actions'; +import { createRule, findAllRules } from '../../../../../tasks/api_calls/rules'; +import { deleteAlertsAndRules } from '../../../../../tasks/api_calls/common'; +import { login } from '../../../../../tasks/login'; describe('Rule deletion', { tags: ['@ess', '@serverless'] }, () => { const testRules = [ diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/import_export/export_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts similarity index 85% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/import_export/export_rule.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts index 41865b729eb49..0cfcc43714497 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/import_export/export_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts @@ -7,14 +7,14 @@ import path from 'path'; -import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; -import { expectedExportedRule, getNewRule } from '../../../../objects/rule'; +import { deleteAlertsAndRules } from '../../../../../tasks/api_calls/common'; +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, selectAllRules, @@ -22,22 +22,25 @@ 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'; -import { resetRulesTableState } from '../../../../tasks/common'; -import { login } from '../../../../tasks/login'; -import { visit } from '../../../../tasks/navigation'; - -import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; +} 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 { resetRulesTableState } from '../../../../../tasks/common'; +import { login } from '../../../../../tasks/login'; +import { visit } from '../../../../../tasks/navigation'; + +import { RULES_MANAGEMENT_URL } from '../../../../../urls/rules_management'; 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/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/import_export/import_rules.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/import_rules.cy.ts similarity index 83% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/import_export/import_rules.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/import_rules.cy.ts index 85eae2c6a2891..4b8fe5b5312b0 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/import_export/import_rules.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/import_export/import_rules.cy.ts @@ -5,18 +5,18 @@ * 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 { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; -import { deleteExceptionList } from '../../../../tasks/api_calls/exceptions'; -import { login } from '../../../../tasks/login'; -import { visit } from '../../../../tasks/navigation'; +} from '../../../../../tasks/alerts_detection_rules'; +import { deleteAlertsAndRules } from '../../../../../tasks/api_calls/common'; +import { deleteExceptionList } from '../../../../../tasks/api_calls/exceptions'; +import { login } from '../../../../../tasks/login'; +import { visit } from '../../../../../tasks/navigation'; -import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; +import { RULES_MANAGEMENT_URL } from '../../../../../urls/rules_management'; const RULES_TO_IMPORT_FILENAME = 'cypress/fixtures/7_16_rules.ndjson'; const IMPORTED_EXCEPTION_ID = 'b8dfd17f-1e11-41b0-ae7e-9e7f8237de49'; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts similarity index 87% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts index c36b32bb684fe..7e753d42b6b6d 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts @@ -8,13 +8,13 @@ import { INTERNAL_ALERTING_API_FIND_RULES_PATH } from '@kbn/alerting-plugin/common'; import type { RuleResponse } from '@kbn/security-solution-plugin/common/api/detection_engine'; -import { createRule, snoozeRule as snoozeRuleViaAPI } from '../../../../tasks/api_calls/rules'; -import { deleteAlertsAndRules, deleteConnectors } from '../../../../tasks/api_calls/common'; -import { login } from '../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; -import { getNewRule } from '../../../../objects/rule'; -import { internalAlertingSnoozeRule } from '../../../../urls/routes'; -import { RULES_MANAGEMENT_TABLE, RULE_NAME } from '../../../../screens/alerts_detection_rules'; +import { createRule, snoozeRule as snoozeRuleViaAPI } from '../../../../../tasks/api_calls/rules'; +import { deleteAlertsAndRules, deleteConnectors } from '../../../../../tasks/api_calls/common'; +import { login } from '../../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; +import { getNewRule } from '../../../../../objects/rule'; +import { internalAlertingSnoozeRule } from '../../../../../urls/routes'; +import { RULES_MANAGEMENT_TABLE, RULE_NAME } from '../../../../../screens/alerts_detection_rules'; import { expectRuleSnoozed, expectRuleSnoozedInTable, @@ -26,20 +26,20 @@ import { snoozeRule, snoozeRuleInTable, unsnoozeRuleInTable, -} from '../../../../tasks/rule_snoozing'; -import { createSlackConnector } from '../../../../tasks/api_calls/connectors'; +} from '../../../../../tasks/rule_snoozing'; +import { createSlackConnector } from '../../../../../tasks/api_calls/connectors'; import { disableAutoRefresh, duplicateFirstRule, importRules, -} from '../../../../tasks/alerts_detection_rules'; -import { goToActionsStepTab } from '../../../../tasks/create_new_rule'; -import { goToRuleEditSettings, visitRuleDetailsPage } from '../../../../tasks/rule_details'; -import { actionFormSelector } from '../../../../screens/common/rule_actions'; -import { addEmailConnectorAndRuleAction } from '../../../../tasks/common/rule_actions'; -import { saveEditedRule, visitEditRulePage } from '../../../../tasks/edit_rule'; -import { DISABLED_SNOOZE_BADGE } from '../../../../screens/rule_snoozing'; -import { TOOLTIP } from '../../../../screens/common'; +} from '../../../../../tasks/alerts_detection_rules'; +import { goToActionsStepTab } from '../../../../../tasks/create_new_rule'; +import { goToRuleEditSettings, visitRuleDetailsPage } from '../../../../../tasks/rule_details'; +import { actionFormSelector } from '../../../../../screens/common/rule_actions'; +import { addEmailConnectorAndRuleAction } from '../../../../../tasks/common/rule_actions'; +import { saveEditedRule, visitEditRulePage } 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/test/security_solution_cypress/cypress/e2e/rule_management/rule_details/common_flows.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_details/common_flows.cy.ts similarity index 88% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_details/common_flows.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_details/common_flows.cy.ts index f5704122d9e33..0610786fc1b89 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_details/common_flows.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_details/common_flows.cy.ts @@ -5,17 +5,17 @@ * 2.0. */ -import { deleteRuleFromDetailsPage } from '../../../tasks/alerts_detection_rules'; +import { deleteRuleFromDetailsPage } from '../../../../tasks/alerts_detection_rules'; import { CUSTOM_RULES_BTN, RULES_MANAGEMENT_TABLE, RULES_ROW, -} from '../../../screens/alerts_detection_rules'; -import { createRule } from '../../../tasks/api_calls/rules'; -import { getDetails } from '../../../tasks/rule_details'; -import { ruleFields } from '../../../data/detection_engine'; -import { getTimeline } from '../../../objects/timeline'; -import { getExistingRule, getNewRule } from '../../../objects/rule'; +} from '../../../../screens/alerts_detection_rules'; +import { createRule } from '../../../../tasks/api_calls/rules'; +import { getDetails } from '../../../../tasks/rule_details'; +import { ruleFields } from '../../../../data/detection_engine'; +import { getTimeline } from '../../../../objects/timeline'; +import { getExistingRule, getNewRule } from '../../../../objects/rule'; import { ABOUT_DETAILS, @@ -42,13 +42,13 @@ import { THREAT_TACTIC, THREAT_TECHNIQUE, TIMELINE_TEMPLATE_DETAILS, -} from '../../../screens/rule_details'; +} from '../../../../screens/rule_details'; -import { createTimeline } from '../../../tasks/api_calls/timelines'; -import { deleteAlertsAndRules, deleteConnectors } from '../../../tasks/api_calls/common'; -import { login } from '../../../tasks/login'; -import { visit } from '../../../tasks/navigation'; -import { ruleDetailsUrl } from '../../../urls/rule_details'; +import { createTimeline } from '../../../../tasks/api_calls/timelines'; +import { deleteAlertsAndRules, deleteConnectors } from '../../../../tasks/api_calls/common'; +import { login } from '../../../../tasks/login'; +import { visit } from '../../../../tasks/navigation'; +import { ruleDetailsUrl } from '../../../../urls/rule_details'; // This test is meant to test all common aspects of the rule details page that should function // the same regardless of rule type. For any rule type specific functionalities, please include diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_details/esql_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_details/esql_rule.cy.ts similarity index 69% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_details/esql_rule.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_details/esql_rule.cy.ts index 7d1419e911e33..c59b7db55c743 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rule_details/esql_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_details/esql_rule.cy.ts @@ -5,24 +5,24 @@ * 2.0. */ -import { getEsqlRule } from '../../../objects/rule'; +import { getEsqlRule } from '../../../../objects/rule'; import { ESQL_QUERY_DETAILS, DEFINITION_DETAILS, RULE_NAME_HEADER, RULE_TYPE_DETAILS, -} from '../../../screens/rule_details'; +} from '../../../../screens/rule_details'; -import { createRule } from '../../../tasks/api_calls/rules'; +import { createRule } from '../../../../tasks/api_calls/rules'; -import { getDetails } from '../../../tasks/rule_details'; -import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; +import { getDetails } from '../../../../tasks/rule_details'; +import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; -import { login } from '../../../tasks/login'; -import { visit } from '../../../tasks/navigation'; +import { login } from '../../../../tasks/login'; +import { visit } from '../../../../tasks/navigation'; -import { ruleDetailsUrl } from '../../../urls/rule_details'; +import { ruleDetailsUrl } from '../../../../urls/rule_details'; describe('Detection ES|QL rules, details view', { tags: ['@ess'] }, () => { const rule = getEsqlRule(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_auto_refresh.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_auto_refresh.cy.ts similarity index 92% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_auto_refresh.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_auto_refresh.cy.ts index e5175030908ff..911fe32dd8f7c 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_auto_refresh.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_auto_refresh.cy.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { visitRulesManagementTable } from '../../../tasks/rules_management'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; import { REFRESH_RULES_STATUS, RULES_TABLE_AUTOREFRESH_INDICATOR, RULES_MANAGEMENT_TABLE, -} from '../../../screens/alerts_detection_rules'; -import { EUI_CHECKBOX } from '../../../screens/common/controls'; +} from '../../../../screens/alerts_detection_rules'; +import { EUI_CHECKBOX } from '../../../../screens/common/controls'; import { selectAllRules, clearAllRuleSelection, @@ -24,11 +24,11 @@ import { selectRulesByName, getRuleRow, setRulesTableAutoRefreshIntervalSetting, -} from '../../../tasks/alerts_detection_rules'; -import { login } from '../../../tasks/login'; +} from '../../../../tasks/alerts_detection_rules'; +import { login } from '../../../../tasks/login'; -import { createRule } from '../../../tasks/api_calls/rules'; -import { getNewRule } from '../../../objects/rule'; +import { createRule } from '../../../../tasks/api_calls/rules'; +import { getNewRule } from '../../../../objects/rule'; const RULES_TABLE_REFRESH_INTERVAL_MS = 60000; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_filtering.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_filtering.cy.ts similarity index 84% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_filtering.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_filtering.cy.ts index 3000a7d05151e..117fc0eee632b 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_filtering.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_filtering.cy.ts @@ -5,26 +5,30 @@ * 2.0. */ -import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; -import { resetRulesTableState } from '../../../tasks/common'; -import { login } from '../../../tasks/login'; -import { visitRulesManagementTable } from '../../../tasks/rules_management'; +import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; +import { resetRulesTableState } from '../../../../tasks/common'; +import { login } from '../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../tasks/rules_management'; import { expectRulesWithExecutionStatus, filterByExecutionStatus, expectNumberOfRulesShownOnPage, -} from '../../../tasks/rule_filters'; +} from '../../../../tasks/rule_filters'; import { expectManagementTableRules, filterByTags, unselectTags, -} from '../../../tasks/alerts_detection_rules'; +} from '../../../../tasks/alerts_detection_rules'; -import { createRule, waitForRulesToFinishExecution } from '../../../tasks/api_calls/rules'; -import { deleteIndex, createIndex, createDocument } from '../../../tasks/api_calls/elasticsearch'; -import { disableAutoRefresh } from '../../../tasks/alerts_detection_rules'; -import { getNewRule } from '../../../objects/rule'; +import { createRule, waitForRulesToFinishExecution } from '../../../../tasks/api_calls/rules'; +import { + deleteIndex, + createIndex, + createDocument, +} from '../../../../tasks/api_calls/elasticsearch'; +import { disableAutoRefresh } from '../../../../tasks/alerts_detection_rules'; +import { getNewRule } from '../../../../objects/rule'; describe('Rules table: filtering', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_links.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_links.cy.ts similarity index 65% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_links.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_links.cy.ts index 996f081f47cef..ace4406b1c22a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_links.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_links.cy.ts @@ -5,13 +5,13 @@ * 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 { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; -import { login } from '../../../tasks/login'; -import { visit } from '../../../tasks/navigation'; -import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; +import { getNewRule } from '../../../../objects/rule'; +import { RULES_MONITORING_TAB, RULE_NAME } from '../../../../screens/alerts_detection_rules'; +import { createRule } from '../../../../tasks/api_calls/rules'; +import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; +import { login } from '../../../../tasks/login'; +import { visit } from '../../../../tasks/navigation'; +import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; describe('Rules table: links', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_persistent_state.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_persistent_state.cy.ts similarity index 95% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_persistent_state.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_persistent_state.cy.ts index 0dc648114ed58..15ab7e21d2f38 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_persistent_state.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_persistent_state.cy.ts @@ -7,12 +7,12 @@ import { encode } from '@kbn/rison'; -import { resetRulesTableState } from '../../../tasks/common'; -import { login } from '../../../tasks/login'; -import { visit } from '../../../tasks/navigation'; -import { DASHBOARDS_URL, KIBANA_HOME } from '../../../urls/navigation'; -import { RULES_MANAGEMENT_URL, RULES_MONITORING_URL } from '../../../urls/rules_management'; -import { getNewRule } from '../../../objects/rule'; +import { resetRulesTableState } from '../../../../tasks/common'; +import { login } from '../../../../tasks/login'; +import { visit } from '../../../../tasks/navigation'; +import { DASHBOARDS_URL, KIBANA_HOME } from '../../../../urls/navigation'; +import { RULES_MANAGEMENT_URL, RULES_MONITORING_URL } from '../../../../urls/rules_management'; +import { getNewRule } from '../../../../objects/rule'; import { filterByCustomRules, filterBySearchTerm, @@ -31,8 +31,8 @@ import { expectFilterByEnabledRules, expectManagementTableRules, goToRuleDetailsOf, -} 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, @@ -40,7 +40,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 })); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_selection.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection.cy.ts similarity index 89% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_selection.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection.cy.ts index 12bd51ebf9ffe..6014f1c83b9af 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_selection.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_selection.cy.ts @@ -5,25 +5,25 @@ * 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 { disableAutoRefresh, selectRulesByName, unselectRulesByName, waitForPrebuiltDetectionRulesToBeLoaded, -} from '../../../tasks/alerts_detection_rules'; +} from '../../../../tasks/alerts_detection_rules'; import { getAvailablePrebuiltRulesCount, createAndInstallMockedPrebuiltRules, -} from '../../../tasks/api_calls/prebuilt_rules'; -import { login } from '../../../tasks/login'; -import { visit } from '../../../tasks/navigation'; -import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; +} from '../../../../tasks/api_calls/prebuilt_rules'; +import { login } from '../../../../tasks/login'; +import { visit } from '../../../../tasks/navigation'; +import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; const RULE_1 = createRuleAssetSavedObject({ name: 'Test rule 1', diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_sorting.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_sorting.cy.ts similarity index 83% rename from x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_sorting.cy.ts rename to x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_sorting.cy.ts index 67f9095050fc1..201ae848e6714 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/rule_management/rules_table/rules_table_sorting.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rules_table/rules_table_sorting.cy.ts @@ -12,29 +12,29 @@ import { SECOND_RULE, FOURTH_RULE, RULES_MANAGEMENT_TABLE, -} from '../../../screens/alerts_detection_rules'; +} from '../../../../screens/alerts_detection_rules'; import { enableRule, getRulesManagementTableRows, waitForRuleToUpdate, -} from '../../../tasks/alerts_detection_rules'; -import { login } from '../../../tasks/login'; -import { visit } from '../../../tasks/navigation'; +} from '../../../../tasks/alerts_detection_rules'; +import { login } from '../../../../tasks/login'; +import { visit } from '../../../../tasks/navigation'; -import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; -import { createRule } from '../../../tasks/api_calls/rules'; +import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; +import { createRule } from '../../../../tasks/api_calls/rules'; import { getExistingRule, getNewOverrideRule, getNewRule, getNewThresholdRule, -} from '../../../objects/rule'; +} from '../../../../objects/rule'; import { goToTablePage, setRowsPerPageTo, sortByTableColumn, -} from '../../../tasks/table_pagination'; -import { TABLE_FIRST_PAGE, TABLE_SECOND_PAGE } from '../../../screens/table_pagination'; +} from '../../../../tasks/table_pagination'; +import { TABLE_FIRST_PAGE, TABLE_SECOND_PAGE } from '../../../../screens/table_pagination'; describe('Rules table: sorting', { tags: ['@ess', '@serverless'] }, () => { before(() => { diff --git a/x-pack/test/security_solution_cypress/package.json b/x-pack/test/security_solution_cypress/package.json index 2d1bccf2396df..e20d82bacbc6d 100644 --- a/x-pack/test/security_solution_cypress/package.json +++ b/x-pack/test/security_solution_cypress/package.json @@ -7,10 +7,10 @@ "scripts": { "cypress": "NODE_OPTIONS=--openssl-legacy-provider ../../../node_modules/.bin/cypress", "cypress:open:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel open --spec './cypress/e2e/**/*.cy.ts' --config-file ../../test/security_solution_cypress/cypress/cypress.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", - "cypress:run:ess": "yarn cypress:ess --spec './cypress/e2e/!(investigations|explore|rule_management)/**/*.cy.ts'", + "cypress:run:ess": "yarn cypress:ess --spec './cypress/e2e/!(investigations|explore|detection_response/rule_management)/**/*.cy.ts'", "cypress:run:cases:ess": "yarn cypress:ess --spec './cypress/e2e/explore/cases/*.cy.ts'", "cypress:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel run --config-file ../../test/security_solution_cypress/cypress/cypress_ci.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", - "cypress:rule_management:run:ess":"yarn cypress:ess --spec './cypress/e2e/rule_management/!(prebuilt_rules)/**/*.cy.ts'", + "cypress:rule_management:run:ess":"yarn cypress:ess --spec './cypress/e2e/detection_response/rule_management/!(prebuilt_rules)/**/*.cy.ts'", "cypress:rule_management:prebuilt_rules:run:ess": "yarn cypress:ess --spec './cypress/e2e/rule_management/prebuilt_rules/**/*.cy.ts'", "cypress:run:respops:ess": "yarn cypress:ess --spec './cypress/e2e/(detection_response|exceptions)/**/*.cy.ts'", "cypress:investigations:run:ess": "yarn cypress:ess --spec './cypress/e2e/investigations/**/*.cy.ts'", @@ -23,20 +23,20 @@ "cypress:cloud:serverless": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider NODE_TLS_REJECT_UNAUTHORIZED=0 ../../../node_modules/.bin/cypress", "cypress:open:cloud:serverless": "yarn cypress:cloud:serverless open --config-file ./cypress/cypress_serverless.config.ts --env CLOUD_SERVERLESS=true", "cypress:open:serverless": "yarn cypress:serverless open --config-file ../../test/security_solution_cypress/cypress/cypress_serverless.config.ts --spec './cypress/e2e/**/*.cy.ts'", - "cypress:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/!(investigations|explore|rule_management)/**/*.cy.ts'", + "cypress:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/!(investigations|explore|detection_response/rule_management)/**/*.cy.ts'", "cypress:run:cloud:serverless": "yarn cypress:cloud:serverless run --config-file ./cypress/cypress_ci_serverless.config.ts --env CLOUD_SERVERLESS=true", - "cypress:rule_management:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/rule_management/**/*.cy.ts'", - "cypress:rule_management:prebuilt_rules:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", + "cypress:rule_management:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/rule_management/**/*.cy.ts'", + "cypress:rule_management:prebuilt_rules:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/**/*.cy.ts'", "cypress:investigations:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", "cypress:explore:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/explore/**/*.cy.ts'", "cypress:changed-specs-only:serverless": "yarn cypress:serverless --changed-specs-only --env burn=5", "cypress:burn:serverless": "yarn cypress:serverless --env burn=2", "cypress:qa:serverless": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel_serverless --config-file ../../test/security_solution_cypress/cypress/cypress_ci_serverless_qa.config.ts", "cypress:open:qa:serverless": "yarn cypress:qa:serverless open", - "cypress:run:qa:serverless": "yarn cypress:qa:serverless --spec './cypress/e2e/!(investigations|explore|rule_management)/**/*.cy.ts'", + "cypress:run:qa:serverless": "yarn cypress:qa:serverless --spec './cypress/e2e/!(investigations|explore|detection_response/rule_management)/**/*.cy.ts'", "cypress:run:qa:serverless:investigations": "yarn cypress:qa:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", "cypress:run:qa:serverless:explore": "yarn cypress:qa:serverless --spec './cypress/e2e/explore/**/*.cy.ts'", - "cypress:run:qa:serverless:rule_management": "yarn cypress:qa:serverless --spec './cypress/e2e/rule_management/!(prebuilt_rules)/**/*.cy.ts'", - "cypress:run:qa:serverless:rule_management:prebuilt_rules": "yarn cypress:qa:serverless --spec './cypress/e2e/rule_management/prebuilt_rules/**/*.cy.ts'" + "cypress:run:qa:serverless:rule_management": "yarn cypress:qa:serverless --spec './cypress/e2e/detection_response/rule_management/!(prebuilt_rules)/**/*.cy.ts'", + "cypress:run:qa:serverless:rule_management:prebuilt_rules": "yarn cypress:qa:serverless --spec './cypress/e2e/detection_response/prebuilt_rules/**/*.cy.ts'" } } \ No newline at end of file From babfb12b197db2cabe1cb82717649a1c508538ee Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Mon, 27 Nov 2023 20:21:14 +0100 Subject: [PATCH 15/17] Update x-pack/test/security_solution_cypress/package.json Co-authored-by: Georgii Gorbachev --- x-pack/test/security_solution_cypress/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/security_solution_cypress/package.json b/x-pack/test/security_solution_cypress/package.json index e20d82bacbc6d..ac1e2d1cf3660 100644 --- a/x-pack/test/security_solution_cypress/package.json +++ b/x-pack/test/security_solution_cypress/package.json @@ -37,6 +37,6 @@ "cypress:run:qa:serverless:investigations": "yarn cypress:qa:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", "cypress:run:qa:serverless:explore": "yarn cypress:qa:serverless --spec './cypress/e2e/explore/**/*.cy.ts'", "cypress:run:qa:serverless:rule_management": "yarn cypress:qa:serverless --spec './cypress/e2e/detection_response/rule_management/!(prebuilt_rules)/**/*.cy.ts'", - "cypress:run:qa:serverless:rule_management:prebuilt_rules": "yarn cypress:qa:serverless --spec './cypress/e2e/detection_response/prebuilt_rules/**/*.cy.ts'" + "cypress:run:qa:serverless:rule_management:prebuilt_rules": "yarn cypress:qa:serverless --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/**/*.cy.ts'" } } \ No newline at end of file From 9a3db2df6db22e5dfc432f2c73a919f469e677d8 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Mon, 27 Nov 2023 20:21:29 +0100 Subject: [PATCH 16/17] Update x-pack/test/security_solution_cypress/package.json Co-authored-by: Georgii Gorbachev --- x-pack/test/security_solution_cypress/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/security_solution_cypress/package.json b/x-pack/test/security_solution_cypress/package.json index ac1e2d1cf3660..f5933b61a06fb 100644 --- a/x-pack/test/security_solution_cypress/package.json +++ b/x-pack/test/security_solution_cypress/package.json @@ -25,7 +25,7 @@ "cypress:open:serverless": "yarn cypress:serverless open --config-file ../../test/security_solution_cypress/cypress/cypress_serverless.config.ts --spec './cypress/e2e/**/*.cy.ts'", "cypress:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/!(investigations|explore|detection_response/rule_management)/**/*.cy.ts'", "cypress:run:cloud:serverless": "yarn cypress:cloud:serverless run --config-file ./cypress/cypress_ci_serverless.config.ts --env CLOUD_SERVERLESS=true", - "cypress:rule_management:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/rule_management/**/*.cy.ts'", + "cypress:rule_management:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/rule_management/!(prebuilt_rules)/**/*.cy.ts'", "cypress:rule_management:prebuilt_rules:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/**/*.cy.ts'", "cypress:investigations:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", "cypress:explore:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/explore/**/*.cy.ts'", From 69e7c7902594ecf6da6b80d445cbb0a45c501170 Mon Sep 17 00:00:00 2001 From: Gloria Hornero Date: Mon, 27 Nov 2023 20:21:49 +0100 Subject: [PATCH 17/17] Update x-pack/test/security_solution_cypress/package.json Co-authored-by: Georgii Gorbachev --- x-pack/test/security_solution_cypress/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/security_solution_cypress/package.json b/x-pack/test/security_solution_cypress/package.json index f5933b61a06fb..e1f552fdba9de 100644 --- a/x-pack/test/security_solution_cypress/package.json +++ b/x-pack/test/security_solution_cypress/package.json @@ -11,7 +11,7 @@ "cypress:run:cases:ess": "yarn cypress:ess --spec './cypress/e2e/explore/cases/*.cy.ts'", "cypress:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel run --config-file ../../test/security_solution_cypress/cypress/cypress_ci.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", "cypress:rule_management:run:ess":"yarn cypress:ess --spec './cypress/e2e/detection_response/rule_management/!(prebuilt_rules)/**/*.cy.ts'", - "cypress:rule_management:prebuilt_rules:run:ess": "yarn cypress:ess --spec './cypress/e2e/rule_management/prebuilt_rules/**/*.cy.ts'", + "cypress:rule_management:prebuilt_rules:run:ess": "yarn cypress:ess --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/**/*.cy.ts'", "cypress:run:respops:ess": "yarn cypress:ess --spec './cypress/e2e/(detection_response|exceptions)/**/*.cy.ts'", "cypress:investigations:run:ess": "yarn cypress:ess --spec './cypress/e2e/investigations/**/*.cy.ts'", "cypress:explore:run:ess": "yarn cypress:ess --spec './cypress/e2e/explore/**/*.cy.ts'",