diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/threat_match_enrichments.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/threat_match_enrichments.cy.ts index 2bda5a6acadc2..7ef766d14bfc4 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/threat_match_enrichments.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/threat_match_enrichments.cy.ts @@ -7,7 +7,6 @@ import { disableExpandableFlyout } from '../../../tasks/api_calls/kibana_advanced_settings'; import { getNewThreatIndicatorRule, indicatorRuleMatchingDoc } from '../../../objects/rule'; -import { cleanKibana } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { JSON_TEXT, @@ -31,7 +30,6 @@ describe( { tags: ['@ess', '@serverless', '@brokenInServerless'] }, () => { before(() => { - cleanKibana(); // illegal_argument_exception: unknown setting [index.lifecycle.rollover_alias] cy.task('esArchiverLoad', { archiveName: 'threat_indicator' }); cy.task('esArchiverLoad', { archiveName: 'suspicious_source_event' }); 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/detection_response/prebuilt_rules/install_update_authorization.cy.ts index d40aca2054372..e0078dd54e7ea 100644 --- 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/detection_response/prebuilt_rules/install_update_authorization.cy.ts @@ -32,7 +32,6 @@ import { RULE_CHECKBOX, UPGRADE_ALL_RULES_BUTTON, } from '../../../screens/alerts_detection_rules'; -import { cleanKibana } from '../../../tasks/common'; import { login } from '../../../tasks/login'; // Rule to test update @@ -72,7 +71,6 @@ describe( () => { beforeEach(() => { preventPrebuiltRulesPackageInstallation(); - cleanKibana(); }); describe('User with read privileges on Security Solution', () => { 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/detection_response/prebuilt_rules/install_update_error_handling.cy.ts index a02486e580f20..7e288910ccb60 100644 --- 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/detection_response/prebuilt_rules/install_update_error_handling.cy.ts @@ -21,7 +21,6 @@ import { createAndInstallMockedPrebuiltRules, preventPrebuiltRulesPackageInstallation, } from '../../../tasks/api_calls/prebuilt_rules'; -import { cleanKibana } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { clickAddElasticRulesButton, @@ -43,7 +42,6 @@ describe( () => { beforeEach(() => { preventPrebuiltRulesPackageInstallation(); - cleanKibana(); login(); visitRulesManagementTable(); }); 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/detection_response/prebuilt_rules/management.cy.ts index b0ad9b9da100a..d5a3f3bb85326 100644 --- 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/detection_response/prebuilt_rules/management.cy.ts @@ -35,11 +35,7 @@ import { getAvailablePrebuiltRulesCount, preventPrebuiltRulesPackageInstallation, } from '../../../tasks/api_calls/prebuilt_rules'; -import { - cleanKibana, - deleteAlertsAndRules, - deletePrebuiltRulesAssets, -} from '../../../tasks/common'; +import { deleteAlertsAndRules, deletePrebuiltRulesAssets } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; @@ -52,10 +48,6 @@ const rules = Array.from(Array(5)).map((_, i) => { }); describe('Prebuilt rules', { tags: ['@ess', '@serverless', '@brokenInServerlessQA'] }, () => { - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); deleteAlertsAndRules(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_actions/rule_actions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_actions/rule_actions.cy.ts index 7916458c29ba0..98080cb3b47e8 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_actions/rule_actions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_actions/rule_actions.cy.ts @@ -10,12 +10,7 @@ import { getSimpleCustomQueryRule } from '../../../objects/rule'; import { goToRuleDetailsOf } from '../../../tasks/alerts_detection_rules'; import { deleteIndex, waitForNewDocumentToBeIndexed } from '../../../tasks/api_calls/elasticsearch'; -import { - cleanKibana, - deleteAlertsAndRules, - deleteConnectors, - deleteDataView, -} from '../../../tasks/common'; +import { deleteAlertsAndRules, deleteConnectors, deleteDataView } from '../../../tasks/common'; import { createAndEnableRule, fillAboutRuleAndContinue, @@ -35,10 +30,6 @@ describe( () => { const indexConnector = getIndexConnector(); - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); deleteAlertsAndRules(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_actions/rule_actions_pli_complete.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_actions/rule_actions_pli_complete.cy.ts index 6d3491a7e3acc..23421b218bcb6 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_actions/rule_actions_pli_complete.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_actions/rule_actions_pli_complete.cy.ts @@ -18,7 +18,7 @@ import { import { createRule } from '../../../tasks/api_calls/rules'; import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; -import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common'; +import { deleteAlertsAndRules } from '../../../tasks/common'; import { goToActionsStepTab } from '../../../tasks/create_new_rule'; import { login } from '../../../tasks/login'; @@ -43,15 +43,10 @@ describe( }, }, () => { - before(() => { - cleanKibana(); - login(); - }); - beforeEach(() => { + login(); deleteAlertsAndRules(); createRule(rule); - login(); }); it('more than 3 rule actions should be available', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_actions/rule_actions_pli_essentials.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_actions/rule_actions_pli_essentials.cy.ts index 1555b1788f6ce..83503ea98738d 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_actions/rule_actions_pli_essentials.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_actions/rule_actions_pli_essentials.cy.ts @@ -18,7 +18,7 @@ import { import { createRule } from '../../../tasks/api_calls/rules'; import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; -import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common'; +import { deleteAlertsAndRules } from '../../../tasks/common'; import { goToActionsStepTab } from '../../../tasks/create_new_rule'; import { login } from '../../../tasks/login'; @@ -43,15 +43,10 @@ describe( }, }, () => { - before(() => { - cleanKibana(); - login(); - }); - beforeEach(() => { + login(); deleteAlertsAndRules(); createRule(rule); - login(); }); it('only 3 rule actions should be available', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/custom_saved_query_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/custom_saved_query_rule.cy.ts index c0498bdfcbcb1..03ba3db7f25ff 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/custom_saved_query_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/custom_saved_query_rule.cy.ts @@ -24,7 +24,7 @@ import { import { editFirstRule, goToRuleDetailsOf } from '../../../tasks/alerts_detection_rules'; import { createSavedQuery, deleteSavedQueries } from '../../../tasks/api_calls/saved_queries'; -import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common'; +import { deleteAlertsAndRules } from '../../../tasks/common'; import { createAndEnableRule, fillAboutRuleAndContinue, @@ -53,10 +53,6 @@ const savedQueryFilterKey = 'testAgent.value'; // TODO: https://github.com/elastic/kibana/issues/161539 describe('Saved query rules', { tags: ['@ess', '@serverless', '@brokenInServerless'] }, () => { - before(() => { - cleanKibana(); - }); - describe('Custom saved_query detection rule creation', () => { beforeEach(() => { login(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/esql_rule_ess.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/esql_rule_ess.cy.ts index a22d24a9fd537..2fa97e4f76e40 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/esql_rule_ess.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/esql_rule_ess.cy.ts @@ -18,7 +18,7 @@ import { ESQL_TYPE, ESQL_QUERY_BAR } from '../../../screens/create_new_rule'; import { getDetails, goBackToRulesTable } from '../../../tasks/rule_details'; import { expectNumberOfRules } from '../../../tasks/alerts_detection_rules'; -import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common'; +import { deleteAlertsAndRules } from '../../../tasks/common'; import { fillAboutRuleAndContinue, fillDefineEsqlRuleAndContinue, @@ -35,11 +35,6 @@ import { visit } from '../../../tasks/navigation'; import { CREATE_RULE_URL } from '../../../urls/navigation'; describe('Detection ES|QL rules, creation', { tags: ['@ess'] }, () => { - before(() => { - cleanKibana(); - login(); - }); - const rule = getEsqlRule(); const expectedNumberOfRules = 1; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/esql_rule_serverless.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/esql_rule_serverless.cy.ts index 7d1d8893357fc..108731a74680c 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/esql_rule_serverless.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/esql_rule_serverless.cy.ts @@ -9,7 +9,6 @@ import { getEsqlRule } from '../../../objects/rule'; import { ESQL_TYPE, NEW_TERMS_TYPE, THRESHOLD_TYPE } from '../../../screens/create_new_rule'; -import { cleanKibana } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; @@ -17,10 +16,6 @@ import { CREATE_RULE_URL } from '../../../urls/navigation'; import { createRule } from '../../../tasks/api_calls/rules'; describe('Detection ES|QL rules, creation', { tags: ['@serverless'] }, () => { - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/indicator_match_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/indicator_match_rule.cy.ts index 8a0e74c2987ee..6dbe81076c91e 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/indicator_match_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/indicator_match_rule.cy.ts @@ -68,7 +68,6 @@ import { import { duplicateSelectedRulesWithExceptions } from '../../../tasks/rules_bulk_actions'; import { createRule } from '../../../tasks/api_calls/rules'; import { loadPrepackagedTimelineTemplates } from '../../../tasks/api_calls/timelines'; -import { cleanKibana } from '../../../tasks/common'; import { createAndEnableRule, fillAboutRuleAndContinue, @@ -112,6 +111,7 @@ import { import { CREATE_RULE_URL } from '../../../urls/navigation'; import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; import { openRuleManagementPageViaBreadcrumbs } from '../../../tasks/rules_management'; +import { deleteAlertsAndRules } from '../../../tasks/common'; const DEFAULT_THREAT_MATCH_QUERY = '@timestamp >= "now-30d/d"'; @@ -127,9 +127,9 @@ describe('indicator match', { tags: ['@ess', '@serverless', '@brokenInServerless const expectedNumberOfAlerts = '1 alert'; beforeEach(() => { - cleanKibana(); cy.task('esArchiverLoad', { archiveName: 'threat_indicator' }); cy.task('esArchiverLoad', { archiveName: 'suspicious_source_event' }); + deleteAlertsAndRules(); login(); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/new_terms_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/new_terms_rule.cy.ts index f45be3af38a2a..8b8c6fe4e1457 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/new_terms_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/new_terms_rule.cy.ts @@ -45,7 +45,7 @@ import { import { getDetails, waitForTheRuleToBeExecuted } from '../../../tasks/rule_details'; import { expectNumberOfRules, goToRuleDetailsOf } from '../../../tasks/alerts_detection_rules'; -import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common'; +import { deleteAlertsAndRules } from '../../../tasks/common'; import { createAndEnableRule, fillAboutRuleAndContinue, @@ -60,10 +60,6 @@ import { CREATE_RULE_URL } from '../../../urls/navigation'; import { openRuleManagementPageViaBreadcrumbs } from '../../../tasks/rules_management'; describe('New Terms rules', { tags: ['@ess', '@serverless'] }, () => { - before(() => { - cleanKibana(); - login(); - }); describe('Detection rules, New Terms', () => { const rule = getNewTermsRule(); const expectedUrls = rule.references?.join(''); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/threshold_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/threshold_rule.cy.ts index 1928fd8098f91..503b40f568303 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/threshold_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/threshold_rule.cy.ts @@ -45,7 +45,7 @@ import { import { getDetails, waitForTheRuleToBeExecuted } from '../../../tasks/rule_details'; import { expectNumberOfRules, goToRuleDetailsOf } from '../../../tasks/alerts_detection_rules'; -import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common'; +import { deleteAlertsAndRules } from '../../../tasks/common'; import { createAndEnableRule, fillAboutRuleAndContinue, @@ -67,10 +67,6 @@ describe('Threshold rules', { tags: ['@ess', '@serverless'] }, () => { const mitreAttack = rule.threat; const expectedMitre = formatMitreAttackDescription(mitreAttack ?? []); - before(() => { - cleanKibana(); - }); - beforeEach(() => { deleteAlertsAndRules(); login(); 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/detection_response/rule_details/esql_rule.cy.ts index c4cdba4416f26..93100216692a4 100644 --- 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/detection_response/rule_details/esql_rule.cy.ts @@ -17,7 +17,7 @@ import { import { createRule } from '../../../tasks/api_calls/rules'; import { getDetails } from '../../../tasks/rule_details'; -import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common'; +import { deleteAlertsAndRules } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; @@ -25,10 +25,6 @@ import { visit } from '../../../tasks/navigation'; import { ruleDetailsUrl } from '../../../urls/rule_details'; describe('Detection ES|QL rules, details view', { tags: ['@ess'] }, () => { - before(() => { - cleanKibana(); - login(); - }); const rule = getEsqlRule(); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_edit/esql_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_edit/esql_rule.cy.ts index fe236f369567a..eb16d89a6af8c 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_edit/esql_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_edit/esql_rule.cy.ts @@ -15,7 +15,7 @@ import { createRule } from '../../../tasks/api_calls/rules'; import { RULES_MANAGEMENT_URL } from '../../../urls/rules_management'; import { getDetails } from '../../../tasks/rule_details'; -import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common'; +import { deleteAlertsAndRules } from '../../../tasks/common'; import { clearEsqlQueryBar, fillEsqlQueryBar, @@ -35,15 +35,10 @@ const rule = getEsqlRule(); const expectedValidEsqlQuery = 'from auditbeat* | stats count(event.category) by event.category'; describe('Detection ES|QL rules, edit', { tags: ['@ess'] }, () => { - before(() => { - cleanKibana(); - login(); - }); - beforeEach(() => { + login(); deleteAlertsAndRules(); createRule(rule); - login(); }); it('edits ES|QL rule and checks details page', () => { 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/detection_response/rule_management/authorization/all_rules_read_only.cy.ts index 51fdcd6c242f1..244637126ecc2 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/detection_response/rule_management/authorization/all_rules_read_only.cy.ts @@ -15,7 +15,6 @@ import { } from '../../../../screens/alerts_detection_rules'; import { VALUE_LISTS_MODAL_ACTIVATOR } from '../../../../screens/lists'; import { createRule } from '../../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../../tasks/common'; import { dismissCallOut, getCallOut, @@ -29,7 +28,6 @@ import { visitRulesManagementTable } from '../../../../tasks/rules_management'; // TODO: https://github.com/elastic/kibana/issues/161540 describe('All rules - read only', { tags: ['@ess', '@serverless', '@skipInServerless'] }, () => { before(() => { - cleanKibana(); createRule(getNewRule({ rule_id: '1', enabled: false })); }); 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/detection_response/rule_management/maintenance_windows/maintenance_window_callout.cy.ts index 7bec16557d8f0..b5e7218aaa293 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/detection_response/rule_management/maintenance_windows/maintenance_window_callout.cy.ts @@ -8,7 +8,6 @@ import { INTERNAL_ALERTING_API_MAINTENANCE_WINDOW_PATH } from '@kbn/alerting-plugin/common'; import type { MaintenanceWindowCreateBody } from '@kbn/alerting-plugin/common'; import type { AsApiContract } from '@kbn/alerting-plugin/server/routes/lib'; -import { cleanKibana } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; @@ -19,10 +18,6 @@ describe( () => { let maintenanceWindowId = ''; - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); 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/detection_response/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts index 266fc09530df7..fd6b28fbe57ec 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/detection_response/rule_management/rule_actions/bulk_actions/bulk_duplicate_rules.cy.ts @@ -21,11 +21,7 @@ import { login } from '../../../../../tasks/login'; import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; import { createRule } from '../../../../../tasks/api_calls/rules'; -import { - cleanKibana, - resetRulesTableState, - deleteAlertsAndRules, -} from '../../../../../tasks/common'; +import { resetRulesTableState, deleteAlertsAndRules } from '../../../../../tasks/common'; import { getNewRule } from '../../../../../objects/rule'; @@ -54,10 +50,6 @@ const EXPIRED_EXCEPTION_ITEM_NAME = 'Sample exception item'; const NON_EXPIRED_EXCEPTION_ITEM_NAME = 'Sample exception item with future expiration'; describe('Detection rules, bulk duplicate', { tags: ['@ess', '@serverless'] }, () => { - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); // Make sure persisted rules table state is cleared 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/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts index ef3754c898ecf..920c03529c112 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/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts @@ -79,11 +79,7 @@ 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 { - cleanKibana, - resetRulesTableState, - deleteAlertsAndRules, -} from '../../../../../tasks/common'; +import { resetRulesTableState, deleteAlertsAndRules } from '../../../../../tasks/common'; import { getEqlRule, @@ -681,9 +677,6 @@ describe('Detection rules, bulk edit', { tags: ['@ess', '@serverless'] }, () => // Having 2 sets of complete scenarios for both envs would have a high maintenance cost // When ES|QL enabled on serverless this rule type can be added to complete set of tests, with minimal changes to tests itself (adding creation of new rule, change number of expected rules, etc) describe('Detection rules, bulk edit, ES|QL rule type', { tags: ['@ess'] }, () => { - before(() => { - cleanKibana(); - }); beforeEach(() => { login(); preventPrebuiltRulesPackageInstallation(); // Make sure prebuilt rules aren't pulled from Fleet API 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/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts index 6f110207a3d6e..d543843641b78 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/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts @@ -20,7 +20,7 @@ import { } from '../../../../../screens/rules_bulk_actions'; import { actionFormSelector } from '../../../../../screens/common/rule_actions'; -import { cleanKibana, deleteAlertsAndRules, deleteConnectors } from '../../../../../tasks/common'; +import { deleteAlertsAndRules, deleteConnectors } from '../../../../../tasks/common'; import type { RuleActionCustomFrequency } from '../../../../../tasks/common/rule_actions'; import { addSlackRuleAction, @@ -79,7 +79,6 @@ describe( { tags: ['@ess', '@serverless', '@brokenInServerlessQA'] }, () => { beforeEach(() => { - cleanKibana(); login(); deleteAlertsAndRules(); deleteConnectors(); 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/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts index 3983b5e8f534e..0fb3d6f08613f 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/detection_response/rule_management/rule_actions/import_export/export_rule.cy.ts @@ -29,11 +29,7 @@ import { } from '../../../../../tasks/api_calls/exceptions'; import { getExceptionList } from '../../../../../objects/exception'; import { createRule } from '../../../../../tasks/api_calls/rules'; -import { - cleanKibana, - resetRulesTableState, - deleteAlertsAndRules, -} from '../../../../../tasks/common'; +import { resetRulesTableState, deleteAlertsAndRules } from '../../../../../tasks/common'; import { login } from '../../../../../tasks/login'; import { visit } from '../../../../../tasks/navigation'; @@ -58,10 +54,6 @@ const prebuiltRules = Array.from(Array(7)).map((_, i) => { describe('Export rules', { tags: ['@ess', '@serverless'] }, () => { const downloadsFolder = Cypress.config('downloadsFolder'); - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); // Make sure persisted rules table state is cleared 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/detection_response/rule_management/rule_actions/import_export/import_rules.cy.ts index ed8a2ddc28c07..197ad5a9a82f5 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/detection_response/rule_management/rule_actions/import_export/import_rules.cy.ts @@ -11,7 +11,7 @@ import { importRules, importRulesWithOverwriteAll, } from '../../../../../tasks/alerts_detection_rules'; -import { cleanKibana, deleteAlertsAndRules } from '../../../../../tasks/common'; +import { deleteAlertsAndRules } from '../../../../../tasks/common'; import { deleteExceptionList } from '../../../../../tasks/api_calls/exceptions'; import { login } from '../../../../../tasks/login'; import { visit } from '../../../../../tasks/navigation'; @@ -21,10 +21,6 @@ const RULES_TO_IMPORT_FILENAME = 'cypress/fixtures/7_16_rules.ndjson'; const IMPORTED_EXCEPTION_ID = 'b8dfd17f-1e11-41b0-ae7e-9e7f8237de49'; describe('Import rules', { tags: ['@ess', '@serverless'] }, () => { - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); deleteAlertsAndRules(); 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/detection_response/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts index fd300c04bfe4f..025aff9510d9d 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/detection_response/rule_management/rule_actions/snoozing/rule_snoozing.cy.ts @@ -9,7 +9,7 @@ import { INTERNAL_ALERTING_API_FIND_RULES_PATH } from '@kbn/alerting-plugin/comm import type { RuleResponse } from '@kbn/security-solution-plugin/common/api/detection_engine'; import { createRule, snoozeRule as snoozeRuleViaAPI } from '../../../../../tasks/api_calls/rules'; -import { cleanKibana, deleteAlertsAndRules, deleteConnectors } from '../../../../../tasks/common'; +import { deleteAlertsAndRules, deleteConnectors } from '../../../../../tasks/common'; import { login } from '../../../../../tasks/login'; import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; import { getNewRule } from '../../../../../objects/rule'; @@ -44,10 +44,6 @@ import { TOOLTIP } from '../../../../../screens/common'; const RULES_TO_IMPORT_FILENAME = 'cypress/fixtures/7_16_rules.ndjson'; describe('rule snoozing', { tags: ['@ess', '@serverless'] }, () => { - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); deleteAlertsAndRules(); 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/detection_response/rule_management/rules_table/rules_table_auto_refresh.cy.ts index f03d5c1088857..911fe32dd8f7c 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/detection_response/rule_management/rules_table/rules_table_auto_refresh.cy.ts @@ -28,16 +28,13 @@ import { import { login } from '../../../../tasks/login'; import { createRule } from '../../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../../tasks/common'; import { getNewRule } from '../../../../objects/rule'; const RULES_TABLE_REFRESH_INTERVAL_MS = 60000; describe('Rules table: auto-refresh', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); login(); - setRulesTableAutoRefreshIntervalSetting({ enabled: true, refreshInterval: RULES_TABLE_REFRESH_INTERVAL_MS, 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/detection_response/rule_management/rules_table/rules_table_filtering.cy.ts index 31001edf7e923..b76b862c70d02 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/detection_response/rule_management/rules_table/rules_table_filtering.cy.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { cleanKibana, resetRulesTableState, deleteAlertsAndRules } from '../../../../tasks/common'; +import { resetRulesTableState, deleteAlertsAndRules } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visitRulesManagementTable } from '../../../../tasks/rules_management'; import { @@ -30,10 +30,6 @@ import { disableAutoRefresh } from '../../../../tasks/alerts_detection_rules'; import { getNewRule } from '../../../../objects/rule'; describe('Rules table: filtering', { tags: ['@ess', '@serverless'] }, () => { - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); // Make sure persisted rules table state is cleared 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/detection_response/rule_management/rules_table/rules_table_persistent_state.cy.ts index 9d5a36b76d543..15ab7e21d2f38 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/detection_response/rule_management/rules_table/rules_table_persistent_state.cy.ts @@ -7,7 +7,7 @@ import { encode } from '@kbn/rison'; -import { cleanKibana, resetRulesTableState } from '../../../../tasks/common'; +import { resetRulesTableState } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { DASHBOARDS_URL, KIBANA_HOME } from '../../../../urls/navigation'; @@ -97,7 +97,6 @@ function expectDefaultRulesTableState(): void { describe('Rules table: persistent state', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); createTestRules(); }); 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/detection_response/rule_management/rules_table/rules_table_selection.cy.ts index ab957879885e8..b31bd620400a0 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/detection_response/rule_management/rules_table/rules_table_selection.cy.ts @@ -20,7 +20,6 @@ import { getAvailablePrebuiltRulesCount, createAndInstallMockedPrebuiltRules, } from '../../../../tasks/api_calls/prebuilt_rules'; -import { cleanKibana } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; @@ -38,10 +37,6 @@ describe( 'Rules table: selection', { tags: ['@ess', '@serverless', '@brokenInServerlessQA'] }, () => { - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); /* Create and install two mock rules */ 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/detection_response/rule_management/rules_table/rules_table_sorting.cy.ts index 4945b2676b56d..201ae848e6714 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/detection_response/rule_management/rules_table/rules_table_sorting.cy.ts @@ -23,7 +23,6 @@ import { visit } from '../../../../tasks/navigation'; import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; import { createRule } from '../../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../../tasks/common'; import { getExistingRule, getNewOverrideRule, @@ -39,7 +38,6 @@ import { TABLE_FIRST_PAGE, TABLE_SECOND_PAGE } from '../../../../screens/table_p describe('Rules table: sorting', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); login(); createRule(getNewRule({ rule_id: '1', enabled: false })); createRule(getExistingRule({ rule_id: '2', enabled: false })); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/enrichments.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/enrichments.cy.ts index c93b83b448e3a..fe8d51cae795c 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/enrichments.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/enrichments.cy.ts @@ -17,7 +17,7 @@ import { import { ENRICHED_DATA_ROW } from '../../screens/alerts_details'; import { createRule } from '../../tasks/api_calls/rules'; -import { cleanKibana, deleteAlertsAndRules } from '../../tasks/common'; +import { deleteAlertsAndRules } from '../../tasks/common'; import { waitForAlertsToPopulate } from '../../tasks/create_new_rule'; import { expandFirstAlert, @@ -39,7 +39,6 @@ const ORIGINAL_HOST_RISK_LEVEL = 'Original host risk level'; // FLAKY: https://github.com/elastic/kibana/issues/169154 describe.skip('Enrichment', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); cy.task('esArchiverUnload', 'risk_scores_new'); cy.task('esArchiverUnload', 'risk_scores_new_updated'); cy.task('esArchiverLoad', { archiveName: 'risk_users' }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts index 1e93f1fb21421..a676fe5038d3e 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts @@ -21,7 +21,6 @@ import { deleteRiskScore, installRiskScoreModule } from '../../tasks/api_calls/r import { RiskScoreEntity } from '../../tasks/risk_scores/common'; import { login } from '../../tasks/login'; import { visit } from '../../tasks/navigation'; -import { cleanKibana } from '../../tasks/common'; import { ENTITY_ANALYTICS_MANAGEMENT_URL } from '../../urls/navigation'; import { getNewRule } from '../../objects/rule'; import { createRule } from '../../tasks/api_calls/rules'; @@ -47,7 +46,6 @@ describe( }, () => { before(() => { - cleanKibana(); cy.task('esArchiverLoad', { archiveName: 'all_users' }); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_alert_to_case.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_alert_to_case.cy.ts index 83f31f35bc7ad..a105040361a47 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_alert_to_case.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_alert_to_case.cy.ts @@ -10,7 +10,6 @@ import { getNewRule } from '../../../objects/rule'; import { expandFirstAlertActions } from '../../../tasks/alerts'; import { createRule } from '../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../tasks/common'; import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; @@ -28,7 +27,6 @@ const loadDetectionsPage = (role: SecurityRoleName) => { describe('Alerts timeline', { tags: ['@ess'] }, () => { before(() => { // First we login as a privileged user to create alerts. - cleanKibana(); login(); createRule(getNewRule()); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_timeline.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_timeline.cy.ts index 446f34632f4cd..e040c98730986 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_timeline.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_timeline.cy.ts @@ -17,15 +17,11 @@ import { DESCRIPTION_INPUT, ADD_COMMENT_INPUT } from '../../../screens/create_ne import { getCase1 } from '../../../objects/case'; import { getTimeline } from '../../../objects/timeline'; import { createTimeline } from '../../../tasks/api_calls/timelines'; -import { cleanKibana, deleteTimelines } from '../../../tasks/common'; +import { deleteTimelines } from '../../../tasks/common'; import { createCase } from '../../../tasks/api_calls/cases'; describe('attach timeline to case', { tags: ['@ess', '@serverless'] }, () => { context('without cases created', () => { - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); deleteTimelines(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/connectors.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/connectors.cy.ts index ff5b776743841..aaa785cc8f392 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/connectors.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/connectors.cy.ts @@ -10,7 +10,7 @@ import { getServiceNowConnector, getServiceNowITSMHealthResponse } from '../../. import { SERVICE_NOW_MAPPING } from '../../../screens/configure_cases'; import { goToEditExternalConnection } from '../../../tasks/all_cases'; -import { cleanKibana, deleteAllCasesItems, deleteConnectors } from '../../../tasks/common'; +import { deleteAllCasesItems, deleteConnectors } from '../../../tasks/common'; import { addServiceNowConnector, openAddNewConnectorOption, @@ -48,10 +48,6 @@ describe('Cases connectors', { tags: ['@ess', '@serverless'] }, () => { const snConnector = getServiceNowConnector(); - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); deleteAllCasesItems(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/privileges.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/privileges.cy.ts index b866fb01475b4..f1cdbc0d7af90 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/privileges.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/privileges.cy.ts @@ -9,7 +9,7 @@ import type { TestCaseWithoutTimeline } from '../../../objects/case'; import { ALL_CASES_CREATE_NEW_CASE_BTN, ALL_CASES_NAME } from '../../../screens/all_cases'; import { goToCreateNewCase } from '../../../tasks/all_cases'; -import { cleanKibana, deleteAllCasesItems } from '../../../tasks/common'; +import { deleteAllCasesItems } from '../../../tasks/common'; import { backToCases, @@ -51,7 +51,6 @@ const testCase: TestCaseWithoutTimeline = { describe('Cases privileges', { tags: ['@ess'] }, () => { before(() => { - cleanKibana(); createUsersAndRoles(usersToCreate, rolesToCreate); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/enable_risk_score_redirect.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/enable_risk_score_redirect.cy.ts index 43fc7c399593c..91488eeb57506 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/enable_risk_score_redirect.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/enable_risk_score_redirect.cy.ts @@ -10,7 +10,6 @@ import { ENABLE_USER_RISK_SCORE_BUTTON, } from '../../../screens/entity_analytics'; -import { cleanKibana } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; import { clickEnableRiskScore } from '../../../tasks/risk_scores'; @@ -21,11 +20,6 @@ import { PAGE_TITLE } from '../../../screens/entity_analytics_management'; // FLAKY: https://github.com/elastic/kibana/issues/165644 describe('Enable risk scores from dashboard', { tags: ['@ess', '@serverless'] }, () => { - before(() => { - cleanKibana(); - login(); - }); - beforeEach(() => { login(); visit(ENTITY_ANALYTICS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics.cy.ts index db07fcc84061d..83b9d086db5f2 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics.cy.ts @@ -67,6 +67,7 @@ const OLDEST_DATE = moment('2019-01-19T16:22:56.217Z').format(DATE_FORMAT); describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => { before(() => { + login(); deleteRiskEngineConfiguration(); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/upgrade_risk_score.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/upgrade_risk_score.cy.ts index 55376429f8edc..2f399416122d2 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/upgrade_risk_score.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/upgrade_risk_score.cy.ts @@ -24,7 +24,6 @@ import { import { clickUpgradeRiskScore } from '../../../tasks/risk_scores'; import { createRule } from '../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { visitWithTimeRange } from '../../../tasks/navigation'; @@ -38,7 +37,6 @@ const spaceId = 'default'; describe('Upgrade risk scores', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); login(); deleteRiskEngineConfiguration(); createRule(getNewRule({ rule_id: 'rule1' })); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/guided_onboarding/tour.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/guided_onboarding/tour.cy.ts index fc2896b2e6403..fbe1ebf91cbff 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/guided_onboarding/tour.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/guided_onboarding/tour.cy.ts @@ -21,7 +21,6 @@ import { goToStep, startTour, } from '../../../tasks/guided_onboarding'; -import { cleanKibana } from '../../../tasks/common'; import { createRule } from '../../../tasks/api_calls/rules'; import { getNewRule } from '../../../objects/rule'; import { ALERTS_URL, DASHBOARDS_URL } from '../../../urls/navigation'; @@ -32,7 +31,6 @@ import { startAlertsCasesTour } from '../../../tasks/api_calls/tour'; describe('Guided onboarding tour', { tags: ['@ess'] }, () => { before(() => { - cleanKibana(); login(); createRule(getNewRule({ query: 'user.name:*' })); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/host_details/risk_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/host_details/risk_tab.cy.ts index a6a9bc405c9e3..2248b37fa4876 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/host_details/risk_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/host_details/risk_tab.cy.ts @@ -8,7 +8,7 @@ import { login } from '../../../tasks/login'; import { visitHostDetailsPage } from '../../../tasks/navigation'; -import { cleanKibana, waitForTableToLoad } from '../../../tasks/common'; +import { waitForTableToLoad } from '../../../tasks/common'; import { TABLE_CELL, TABLE_ROWS } from '../../../screens/alerts_details'; import { deleteRiskEngineConfiguration } from '../../../tasks/api_calls/risk_engine'; import { openRiskInformationFlyout, enableRiskEngine } from '../../../tasks/entity_analytics'; @@ -21,7 +21,6 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { // FLAKY: https://github.com/elastic/kibana/issues/169034 describe.skip('with legacy risk score', () => { before(() => { - cleanKibana(); // illegal_argument_exception: unknown setting [index.lifecycle.rollover_alias] cy.task('esArchiverLoad', { archiveName: 'risk_hosts' }); }); @@ -60,7 +59,6 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { describe('with new risk score', () => { before(() => { - cleanKibana(); cy.task('esArchiverLoad', { archiveName: 'risk_scores_new' }); cy.task('esArchiverLoad', { archiveName: 'query_alert', useCreate: true, docsOnly: true }); login(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/host_risk_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/host_risk_tab.cy.ts index 9fcc16406793f..e0ea108e38a00 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/host_risk_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/host_risk_tab.cy.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { cleanKibana } from '../../../tasks/common'; import { navigateToHostRiskDetailTab, openRiskTableFilterAndSelectTheCriticalOption, @@ -28,7 +27,6 @@ import { enableRiskEngine } from '../../../tasks/entity_analytics'; describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { describe('with legacy risk score', () => { before(() => { - cleanKibana(); login(); deleteRiskEngineConfiguration(); cy.task('esArchiverLoad', { archiveName: 'risk_hosts' }); @@ -78,7 +76,6 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { describe('with new risk score', () => { before(() => { - cleanKibana(); cy.task('esArchiverLoad', { archiveName: 'risk_scores_new' }); login(); enableRiskEngine(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/hosts_risk_column.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/hosts_risk_column.cy.ts index d5ca12dc63f6f..4b034d77ed07d 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/hosts_risk_column.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/hosts_risk_column.cy.ts @@ -9,7 +9,6 @@ import { login } from '../../../tasks/login'; import { visitWithTimeRange } from '../../../tasks/navigation'; import { hostsUrl } from '../../../urls/navigation'; -import { cleanKibana } from '../../../tasks/common'; import { TABLE_CELL } from '../../../screens/alerts_details'; import { kqlSearch } from '../../../tasks/security_header'; import { deleteRiskEngineConfiguration } from '../../../tasks/api_calls/risk_engine'; @@ -18,7 +17,6 @@ import { enableRiskEngine } from '../../../tasks/entity_analytics'; describe('All hosts table', { tags: ['@ess', '@serverless'] }, () => { describe('with legacy risk score', () => { before(() => { - cleanKibana(); // illegal_argument_exception: unknown setting [index.lifecycle.name] cy.task('esArchiverLoad', { archiveName: 'risk_hosts' }); }); @@ -43,7 +41,6 @@ describe('All hosts table', { tags: ['@ess', '@serverless'] }, () => { describe('with new risk score', () => { before(() => { - cleanKibana(); // illegal_argument_exception: unknown setting [index.lifecycle.name] cy.task('esArchiverLoad', { archiveName: 'risk_scores_new' }); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts index 6ab6e76efd946..0fcb7f86cd0de 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts @@ -13,13 +13,11 @@ import { visitWithTimeRange } from '../../../tasks/navigation'; import { OVERVIEW_URL } from '../../../urls/navigation'; -import { cleanKibana } from '../../../tasks/common'; import { createTimeline, favoriteTimeline } from '../../../tasks/api_calls/timelines'; import { getTimeline } from '../../../objects/timeline'; describe('Overview Page', { tags: ['@ess', '@serverless', '@serverlessQA'] }, () => { before(() => { - cleanKibana(); cy.task('esArchiverLoad', { archiveName: 'overview' }); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/user_details.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/user_details.cy.ts index 3076a7f1fcccd..fd7aa715819a3 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/user_details.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/user_details.cy.ts @@ -7,7 +7,6 @@ import { ALERT_FLYOUT } from '../../../screens/alerts_details'; import { createRule } from '../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../tasks/common'; import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; @@ -23,7 +22,6 @@ import { USER_COLUMN } from '../../../screens/alerts'; describe('user details flyout', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { - cleanKibana(); login(); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts index e066c5c9ec533..0d884816ad964 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts @@ -13,7 +13,6 @@ import { } from '../../../screens/users/user_authentications'; import { EVENTS_TAB, EVENTS_TAB_CONTENT } from '../../../screens/users/user_events'; import { RISK_SCORE_TAB, RISK_SCORE_TAB_CONTENT } from '../../../screens/users/user_risk_score'; -import { cleanKibana } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { visitUserDetailsPage, visitWithTimeRange } from '../../../tasks/navigation'; @@ -22,7 +21,6 @@ import { USERS_URL } from '../../../urls/navigation'; describe('Users stats and tables', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); cy.task('esArchiverLoad', { archiveName: 'users' }); cy.task('esArchiverLoad', { archiveName: 'risk_users' }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts index d35cc7dd1f7c1..df8136f3e74d9 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts @@ -10,7 +10,6 @@ import { openAnalyzerForFirstAlertInTimeline, openSessionViewerFromAlertTable, } from '../../../tasks/alerts'; -import { cleanKibana } from '../../../tasks/common'; import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; import { login } from '../../../tasks/login'; import { visitWithTimeRange } from '../../../tasks/navigation'; @@ -18,7 +17,6 @@ import { ALERTS_URL } from '../../../urls/navigation'; describe('Alerts Table Action column', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); cy.task('esArchiverLoad', { archiveName: 'process_ancestry', useCreate: true, diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_controls.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_controls.cy.ts index fbdfd47249941..29ef82c419ac0 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_controls.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_controls.cy.ts @@ -27,7 +27,6 @@ import { GET_DATA_GRID_HEADER_CELL_ACTION_GROUP, } from '../../../screens/common/data_grid'; import { createRule } from '../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../tasks/common'; import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; @@ -42,10 +41,6 @@ import { DATAGRID_HEADER } from '../../../screens/timeline'; * */ describe(`Alert Table Controls`, { tags: ['@ess', '@serverless'] }, () => { - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); createRule(getNewRule()); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_cell_actions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_cell_actions.cy.ts index c19ffc4d8ac6b..84cfcc8b52aad 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_cell_actions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_cell_actions.cy.ts @@ -24,7 +24,6 @@ import { filterOutAlertProperty, } from '../../../tasks/alerts'; import { createRule } from '../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../tasks/common'; import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; @@ -39,7 +38,6 @@ import { ALERTS_URL } from '../../../urls/navigation'; describe('Alerts cell actions', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); createRule(getNewRule()); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_charts.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_charts.cy.ts index 45eccfc68fa5c..1868435825597 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_charts.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_charts.cy.ts @@ -15,7 +15,6 @@ import { selectAlertsHistogram, } from '../../../tasks/alerts'; import { createRule } from '../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { visitWithTimeRange } from '../../../tasks/navigation'; import { ALERTS_URL } from '../../../urls/navigation'; @@ -31,10 +30,6 @@ describe( () => { const ruleConfigs = getNewRule(); - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); createRule(getNewRule({ rule_id: 'new custom rule' })); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts index 50e953cef0309..ee51f507e37c7 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts @@ -25,7 +25,7 @@ import { openTable, } from '../../../tasks/alerts_details'; import { createRule } from '../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../tasks/common'; +import { deleteAlertsAndRules } from '../../../tasks/common'; import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; import { login } from '../../../tasks/login'; import { visit, visitWithTimeRange } from '../../../tasks/navigation'; @@ -43,7 +43,7 @@ import { describe('Alert details flyout', { tags: ['@ess', '@serverless'] }, () => { describe('Basic functions', () => { beforeEach(() => { - cleanKibana(); + deleteAlertsAndRules(); login(); disableExpandableFlyout(); createRule(getNewRule()); @@ -65,7 +65,7 @@ describe('Alert details flyout', { tags: ['@ess', '@serverless'] }, () => { describe('With unmapped fields', () => { before(() => { - cleanKibana(); + deleteAlertsAndRules(); cy.task('esArchiverLoad', { archiveName: 'unmapped_fields' }); createRule({ ...getUnmappedRule(), investigation_fields: { field_names: ['event.kind'] } }); }); @@ -138,7 +138,7 @@ describe('Alert details flyout', { tags: ['@ess', '@serverless'] }, () => { describe('Url state management', () => { before(() => { - cleanKibana(); + deleteAlertsAndRules(); cy.task('esArchiverLoad', { archiveName: 'query_alert', useCreate: true, docsOnly: true }); }); @@ -187,7 +187,7 @@ describe('Alert details flyout', { tags: ['@ess', '@serverless'] }, () => { const ARCHIVED_RULE_NAME = 'Endpoint Security'; before(() => { - cleanKibana(); + deleteAlertsAndRules(); // It just imports an alert without a rule but rule details page should work anyway cy.task('esArchiverLoad', { archiveName: 'query_alert', useCreate: true, docsOnly: true }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts index 2b5a85c28f22c..d913d1701c2c8 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts @@ -9,7 +9,6 @@ import { getBuildingBlockRule } from '../../../objects/rule'; import { OVERVIEW_ALERTS_HISTOGRAM_EMPTY } from '../../../screens/overview'; import { HIGHLIGHTED_ROWS_IN_TABLE } from '../../../screens/rule_details'; import { createRule } from '../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../tasks/common'; import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; @@ -28,7 +27,6 @@ describe('Alerts generated by building block rules', { tags: ['@ess', '@serverle }); beforeEach(() => { - cleanKibana(); login(); createRule(getBuildingBlockRule()).then((rule) => visitRuleDetailsPage(rule.body.id)); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts index 7a413849559bb..3ee54dd437942 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts @@ -32,7 +32,7 @@ import { parseAlertsCountToInt, } from '../../../tasks/alerts'; import { createRule } from '../../../tasks/api_calls/rules'; -import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common'; +import { deleteAlertsAndRules } from '../../../tasks/common'; import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; @@ -43,7 +43,6 @@ import { ALERTS_URL } from '../../../urls/navigation'; describe('Changing alert status', { tags: ['@ess', '@brokenInServerless'] }, () => { before(() => { cy.task('esArchiverLoad', { archiveName: 'auditbeat_big' }); - cleanKibana(); }); after(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts index 9231b73843b1c..a60df4a64ab87 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts @@ -23,7 +23,6 @@ import { FILTER_GROUP_EDIT_CONTROL_PANEL_ITEMS, } from '../../../screens/common/filter_group'; import { createRule } from '../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { visitWithTimeRange } from '../../../tasks/navigation'; import { ALERTS_URL } from '../../../urls/navigation'; @@ -113,7 +112,6 @@ const assertFilterControlsWithFilterObject = ( // Failing: See https://github.com/elastic/kibana/issues/167914 describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@brokenInServerless'] }, () => { before(() => { - cleanKibana(); createRule(getNewRule({ rule_id: 'custom_rule_filters' })); }); @@ -240,7 +238,6 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@brokenInServerless context.skip('with data modificiation', () => { after(() => { - cleanKibana(); createRule(getNewRule({ rule_id: 'custom_rule_filters' })); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/event_rendered_view.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/event_rendered_view.cy.ts index 66672cf66ec19..bafac61acff6b 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/event_rendered_view.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/event_rendered_view.cy.ts @@ -24,7 +24,6 @@ import { waitForAlerts, } from '../../../tasks/alerts'; import { createRule } from '../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; import { ALERTS_URL } from '../../../urls/navigation'; @@ -35,10 +34,6 @@ import { } from '../../../screens/shared'; describe(`Event Rendered View`, { tags: ['@ess', '@serverless'] }, () => { - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); createRule(getNewRule()); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_analyzer_graph_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_analyzer_graph_tab.cy.ts index b4a8f90959124..9e1ace19972a8 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_analyzer_graph_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_analyzer_graph_tab.cy.ts @@ -17,7 +17,6 @@ import { openGraphAnalyzerTab } from '../../../../tasks/expandable_flyout/alert_ import { expandDocumentDetailsExpandableFlyoutLeftSection } from '../../../../tasks/expandable_flyout/alert_details_right_panel'; import { expandFirstAlertExpandableFlyout } from '../../../../tasks/expandable_flyout/common'; import { ANALYZER_NODE } from '../../../../screens/alerts'; -import { cleanKibana } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { createRule } from '../../../../tasks/api_calls/rules'; @@ -31,7 +30,6 @@ describe.skip( { tags: ['@ess', '@brokenInServerless'] }, () => { beforeEach(() => { - cleanKibana(); login(); createRule(getNewRule()); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_correlations_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_correlations_tab.cy.ts index c7692f5703c73..a0e080e71ce12 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_correlations_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_correlations_tab.cy.ts @@ -31,7 +31,6 @@ import { createNewCaseFromExpandableFlyout, expandFirstAlertExpandableFlyout, } from '../../../../tasks/expandable_flyout/common'; -import { cleanKibana } from '../../../../tasks/common'; import { waitForAlertsToPopulate } from '../../../../tasks/create_new_rule'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; @@ -39,7 +38,6 @@ import { ALERTS_URL } from '../../../../urls/navigation'; describe('Expandable flyout left panel correlations', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { - cleanKibana(); login(); createRule(getNewRule()); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_entities_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_entities_tab.cy.ts index 088a4c0dc87ee..06bba72700c2b 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_entities_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_entities_tab.cy.ts @@ -18,7 +18,6 @@ import { openEntitiesTab } from '../../../../tasks/expandable_flyout/alert_detai import { openInsightsTab } from '../../../../tasks/expandable_flyout/alert_details_left_panel'; import { expandDocumentDetailsExpandableFlyoutLeftSection } from '../../../../tasks/expandable_flyout/alert_details_right_panel'; import { expandFirstAlertExpandableFlyout } from '../../../../tasks/expandable_flyout/common'; -import { cleanKibana } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { createRule } from '../../../../tasks/api_calls/rules'; @@ -31,7 +30,6 @@ describe( { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { - cleanKibana(); login(); createRule(getNewRule()); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_investigation_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_investigation_tab.cy.ts index de6bfd1272fec..36bd13e5c103d 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_investigation_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_investigation_tab.cy.ts @@ -12,7 +12,6 @@ import { import { openInvestigationTab } from '../../../../tasks/expandable_flyout/alert_details_left_panel_investigation_tab'; import { expandDocumentDetailsExpandableFlyoutLeftSection } from '../../../../tasks/expandable_flyout/alert_details_right_panel'; import { expandFirstAlertExpandableFlyout } from '../../../../tasks/expandable_flyout/common'; -import { cleanKibana } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { createRule } from '../../../../tasks/api_calls/rules'; @@ -25,7 +24,6 @@ describe( { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { - cleanKibana(); login(); createRule(getNewRule()); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_prevalence_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_prevalence_tab.cy.ts index 3979a28046790..d0f12799c795a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_prevalence_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_prevalence_tab.cy.ts @@ -24,7 +24,6 @@ import { DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE, DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_DATE_PICKER, } from '../../../../screens/expandable_flyout/alert_details_left_panel_prevalence_tab'; -import { cleanKibana } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { createRule } from '../../../../tasks/api_calls/rules'; @@ -37,7 +36,6 @@ describe( { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { - cleanKibana(); login(); createRule({ ...getNewRule(), investigation_fields: { field_names: ['host.os.name'] } }); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_response_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_response_tab.cy.ts index 7ba5def9b29b2..8948480911c96 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_response_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_response_tab.cy.ts @@ -9,7 +9,6 @@ import { DOCUMENT_DETAILS_FLYOUT_RESPONSE_EMPTY } from '../../../../screens/expa import { openResponseTab } from '../../../../tasks/expandable_flyout/alert_details_left_panel_response_tab'; import { expandDocumentDetailsExpandableFlyoutLeftSection } from '../../../../tasks/expandable_flyout/alert_details_right_panel'; import { expandFirstAlertExpandableFlyout } from '../../../../tasks/expandable_flyout/common'; -import { cleanKibana } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { createRule } from '../../../../tasks/api_calls/rules'; @@ -22,7 +21,6 @@ describe( { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { - cleanKibana(); login(); createRule(getNewRule()); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_session_view_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_session_view_tab.cy.ts index dd0af1e610b2c..cbe17d55271e2 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_session_view_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_session_view_tab.cy.ts @@ -12,7 +12,6 @@ import { } from '../../../../screens/expandable_flyout/alert_details_left_panel'; import { expandDocumentDetailsExpandableFlyoutLeftSection } from '../../../../tasks/expandable_flyout/alert_details_right_panel'; import { expandFirstAlertExpandableFlyout } from '../../../../tasks/expandable_flyout/common'; -import { cleanKibana } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { createRule } from '../../../../tasks/api_calls/rules'; @@ -26,7 +25,6 @@ describe.skip( { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { - cleanKibana(); login(); createRule(getNewRule()); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_preview_panel_alert_reason_preview.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_preview_panel_alert_reason_preview.cy.ts index 27e85c0066de5..09d90627d8b1b 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_preview_panel_alert_reason_preview.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_preview_panel_alert_reason_preview.cy.ts @@ -8,7 +8,6 @@ import { DOCUMENT_DETAILS_FLYOUT_ALERT_REASON_PREVIEW_CONTAINER } from '../../../../screens/expandable_flyout/alert_details_preview_panel_alert_reason_preview'; import { expandFirstAlertExpandableFlyout } from '../../../../tasks/expandable_flyout/common'; import { clickAlertReasonButton } from '../../../../tasks/expandable_flyout/alert_details_right_panel_overview_tab'; -import { cleanKibana } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { createRule } from '../../../../tasks/api_calls/rules'; @@ -23,7 +22,6 @@ describe( const rule = getNewRule(); beforeEach(() => { - cleanKibana(); login(); createRule(rule); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_preview_panel_rule_preview.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_preview_panel_rule_preview.cy.ts index b56dfbfdf6ecf..13c98358ec3ee 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_preview_panel_rule_preview.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_preview_panel_rule_preview.cy.ts @@ -27,7 +27,6 @@ import { toggleRulePreviewScheduleSection, } from '../../../../tasks/expandable_flyout/alert_details_preview_panel_rule_preview'; import { clickRuleSummaryButton } from '../../../../tasks/expandable_flyout/alert_details_right_panel_overview_tab'; -import { cleanKibana } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { createRule } from '../../../../tasks/api_calls/rules'; @@ -42,7 +41,6 @@ describe( const rule = getNewRule(); beforeEach(() => { - cleanKibana(); login(); createRule(rule); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel.cy.ts index 495fba8dd9c86..950d804ae352c 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel.cy.ts @@ -57,7 +57,7 @@ import { openTakeActionButtonAndSelectItem, selectTakeActionItem, } from '../../../../tasks/expandable_flyout/alert_details_right_panel'; -import { cleanKibana } from '../../../../tasks/common'; +import { deleteAlertsAndRules } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { createRule } from '../../../../tasks/api_calls/rules'; @@ -70,7 +70,7 @@ describe.skip('Alert details expandable flyout right panel', () => { const rule = getNewRule(); beforeEach(() => { - cleanKibana(); + deleteAlertsAndRules(); login(); createRule(rule); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_json_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_json_tab.cy.ts index ca2605c47a1a2..a7bb39381ad9a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_json_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_json_tab.cy.ts @@ -8,7 +8,6 @@ import { openJsonTab } from '../../../../tasks/expandable_flyout/alert_details_right_panel'; import { expandFirstAlertExpandableFlyout } from '../../../../tasks/expandable_flyout/common'; import { DOCUMENT_DETAILS_FLYOUT_JSON_TAB_CONTENT } from '../../../../screens/expandable_flyout/alert_details_right_panel_json_tab'; -import { cleanKibana } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { createRule } from '../../../../tasks/api_calls/rules'; @@ -21,7 +20,6 @@ describe( { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { - cleanKibana(); login(); createRule(getNewRule()); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_overview_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_overview_tab.cy.ts index 0843be4a919fe..bea868ac48828 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_overview_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_overview_tab.cy.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { deleteAlertsAndRules } from '../../../../tasks/common'; import { collapseDocumentDetailsExpandableFlyoutLeftSection } from '../../../../tasks/expandable_flyout/alert_details_right_panel'; import { DOCUMENT_DETAILS_FLYOUT_INVESTIGATION_TAB_CONTENT } from '../../../../screens/expandable_flyout/alert_details_left_panel_investigation_tab'; import { @@ -55,7 +56,6 @@ import { toggleOverviewTabResponseSection, toggleOverviewTabVisualizationsSection, } from '../../../../tasks/expandable_flyout/alert_details_right_panel_overview_tab'; -import { cleanKibana } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { createRule } from '../../../../tasks/api_calls/rules'; @@ -75,7 +75,7 @@ describe( const rule = { ...getNewRule(), investigation_fields: { field_names: ['host.os.name'] } }; beforeEach(() => { - cleanKibana(); + deleteAlertsAndRules(); login(); createRule(rule); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_table_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_table_tab.cy.ts index 1ae5093f0a213..9f10b73065ba8 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_table_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_table_tab.cy.ts @@ -25,7 +25,7 @@ import { filterTableTabTable, toggleColumnTableTabTable, } from '../../../../tasks/expandable_flyout/alert_details_right_panel_table_tab'; -import { cleanKibana } from '../../../../tasks/common'; +import { deleteAlertsAndRules } from '../../../../tasks/common'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; import { createRule } from '../../../../tasks/api_calls/rules'; @@ -38,7 +38,7 @@ describe( { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { - cleanKibana(); + deleteAlertsAndRules(); login(); createRule(getNewRule()); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_url_sync.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_url_sync.cy.ts index e4025c4679534..5e46dea3ee245 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_url_sync.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_url_sync.cy.ts @@ -6,7 +6,6 @@ */ import { getNewRule } from '../../../../objects/rule'; -import { cleanKibana } from '../../../../tasks/common'; import { waitForAlertsToPopulate } from '../../../../tasks/create_new_rule'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; @@ -20,7 +19,6 @@ describe('Expandable flyout state sync', { tags: ['@ess', '@serverless'] }, () = const rule = getNewRule(); beforeEach(() => { - cleanKibana(); login(); createRule(rule); visit(ALERTS_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/investigate_in_timeline.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/investigate_in_timeline.cy.ts index 89bae99047759..db3fad7b57b2d 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/investigate_in_timeline.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/investigate_in_timeline.cy.ts @@ -12,7 +12,6 @@ import { FILTER_BADGE } from '../../../screens/alerts'; import { expandFirstAlert, investigateFirstAlertInTimeline } from '../../../tasks/alerts'; import { createRule } from '../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../tasks/common'; import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; import { login } from '../../../tasks/login'; import { visitWithTimeRange } from '../../../tasks/navigation'; @@ -30,7 +29,6 @@ import { verifyInsightCount } from '../../../tasks/alerts_details'; describe('Investigate in timeline', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); createRule(getNewRule()); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/resolver.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/resolver.cy.ts index ba33a9fde8902..9f7708a6c0d3a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/resolver.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/resolver.cy.ts @@ -10,7 +10,6 @@ import { ANALYZER_NODE } from '../../../screens/alerts'; import { openAnalyzerForFirstAlertInTimeline } from '../../../tasks/alerts'; import { createRule } from '../../../tasks/api_calls/rules'; import { getNewRule } from '../../../objects/rule'; -import { cleanKibana } from '../../../tasks/common'; import { setStartDate } from '../../../tasks/date_picker'; import { TOASTER } from '../../../screens/alerts_detection_rules'; import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; @@ -20,7 +19,6 @@ import { ALERTS_URL } from '../../../urls/navigation'; describe('Analyze events view for alerts', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); createRule(getNewRule()); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/dasbhoards/detection_response.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/dasbhoards/detection_response.cy.ts index fd7d1ec688d14..694209bbc8b22 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/dasbhoards/detection_response.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/dasbhoards/detection_response.cy.ts @@ -31,7 +31,6 @@ import { import { QUERY_TAB_BUTTON, TIMELINE_DATA_PROVIDERS_CONTAINER } from '../../../screens/timeline'; import { waitForAlerts } from '../../../tasks/alerts'; import { createRule } from '../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../tasks/common'; import { investigateDashboardItemInTimeline } from '../../../tasks/dashboards/common'; import { waitToNavigateAwayFrom } from '../../../tasks/kibana_navigation'; import { login } from '../../../tasks/login'; @@ -47,7 +46,6 @@ const SIEM_KIBANA_HOST_NAME = 'siem-kibana'; // FLAKY: https://github.com/elastic/kibana/issues/168771 describe.skip('Detection response view', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); createRule(getNewRule()); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts index 348b3a930a92b..0518326e4ca32 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts @@ -10,7 +10,6 @@ import { SELECTED_ALERTS } from '../../../screens/alerts'; import { SERVER_SIDE_EVENT_COUNT } from '../../../screens/timeline'; import { selectAllAlerts, selectFirstPageAlerts } from '../../../tasks/alerts'; import { createRule } from '../../../tasks/api_calls/rules'; -import { cleanKibana } from '../../../tasks/common'; import { bulkInvestigateSelectedEventsInTimeline, selectAllEvents, @@ -25,7 +24,6 @@ import { ALERTS_URL, hostsUrl } from '../../../urls/navigation'; describe('Bulk Investigate in Timeline', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); cy.task('esArchiverLoad', { archiveName: 'bulk_process' }); login(); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/creation.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/creation.cy.ts index 9ffeade285dc7..644e63ca399a8 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/creation.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/creation.cy.ts @@ -23,7 +23,7 @@ import { } from '../../../screens/timeline'; import { createTimelineTemplate } from '../../../tasks/api_calls/timelines'; -import { cleanKibana, deleteTimelines } from '../../../tasks/common'; +import { deleteTimelines } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { visit, visitWithTimeRange } from '../../../tasks/navigation'; import { openTimelineUsingToggle } from '../../../tasks/security_main'; @@ -69,7 +69,7 @@ describe('Create a timeline from a template', { tags: ['@ess', '@serverless'] }, describe('Timelines', (): void => { before(() => { - cleanKibana(); + deleteTimelines(); }); describe('Toggle create timeline from plus icon', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/data_providers.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/data_providers.cy.ts index d4c2c64ad5dd4..c3920c786ef1d 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/data_providers.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/data_providers.cy.ts @@ -28,15 +28,11 @@ import { } from '../../../tasks/timeline'; import { getTimeline } from '../../../objects/timeline'; import { hostsUrl } from '../../../urls/navigation'; -import { cleanKibana, scrollToBottom } from '../../../tasks/common'; +import { scrollToBottom } from '../../../tasks/common'; // Failing in serverless // FLAKY: https://github.com/elastic/kibana/issues/169396 describe.skip('timeline data providers', { tags: ['@ess', '@serverless'] }, () => { - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); visitWithTimeRange(hostsUrl('allHosts')); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/export.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/export.cy.ts index 294ecf5c9127f..408fa14cd0acf 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/export.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/export.cy.ts @@ -19,12 +19,11 @@ import { TOASTER } from '../../../screens/alerts_detection_rules'; import { TIMELINE_CHECKBOX } from '../../../screens/timelines'; import { createTimeline } from '../../../tasks/api_calls/timelines'; import { expectedExportedTimeline, getTimeline } from '../../../objects/timeline'; -import { deleteTimelines } from '../../../tasks/common'; // FLAKY: https://github.com/elastic/kibana/issues/165744 describe('Export timelines', { tags: ['@ess', '@serverless'] }, () => { before(() => { - deleteTimelines(); + login(); cy.intercept({ method: 'POST', path: '/api/timeline/_export?file_name=timelines_export.ndjson', @@ -37,10 +36,6 @@ describe('Export timelines', { tags: ['@ess', '@serverless'] }, () => { cy.wrap(response).as('timelineResponse2'); cy.wrap(response.body.data.persistTimeline.timeline.savedObjectId).as('timelineId2'); }); - }); - - beforeEach(() => { - login(); visit(TIMELINES_URL); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/fields_browser.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/fields_browser.cy.ts index 5620fb953e0d3..776770060e85b 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/fields_browser.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/fields_browser.cy.ts @@ -18,7 +18,6 @@ import { FIELDS_BROWSER_VIEW_BUTTON, } from '../../../screens/fields_browser'; import { TIMELINE_FIELDS_BUTTON } from '../../../screens/timeline'; -import { cleanKibana } from '../../../tasks/common'; import { addsHostGeoCityNameToTimeline, @@ -53,10 +52,6 @@ const defaultHeaders = [ // Flaky in serverless tests // FLAKY: https://github.com/elastic/kibana/issues/169363 describe.skip('Fields Browser', { tags: ['@ess', '@serverless'] }, () => { - before(() => { - cleanKibana(); - }); - context('Fields Browser rendering', () => { beforeEach(() => { login(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/flyout_button.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/flyout_button.cy.ts index a6896de020a5a..3ba7e607bbfb1 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/flyout_button.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/flyout_button.cy.ts @@ -7,7 +7,6 @@ import { TIMELINE_BOTTOM_BAR_TOGGLE_BUTTON } from '../../../screens/security_main'; import { CREATE_NEW_TIMELINE, TIMELINE_FLYOUT_HEADER } from '../../../screens/timeline'; -import { cleanKibana } from '../../../tasks/common'; import { waitForAllHostsToBeLoaded } from '../../../tasks/hosts/all_hosts'; import { login } from '../../../tasks/login'; @@ -25,10 +24,6 @@ import { import { hostsUrl } from '../../../urls/navigation'; describe('timeline flyout button', () => { - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); visitWithTimeRange(hostsUrl('allHosts')); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/full_screen.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/full_screen.cy.ts index 72f5aa576449c..0c2132a168560 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/full_screen.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/full_screen.cy.ts @@ -6,7 +6,6 @@ */ import { TIMELINE_HEADER, TIMELINE_TABS } from '../../../screens/timeline'; -import { cleanKibana } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { visitWithTimeRange } from '../../../tasks/navigation'; @@ -21,10 +20,6 @@ import { hostsUrl } from '../../../urls/navigation'; // FLAKY: https://github.com/elastic/kibana/issues/165638 describe('Toggle full screen', { tags: ['@ess', '@serverless'] }, () => { - before(() => { - cleanKibana(); - }); - beforeEach(() => { login(); visitWithTimeRange(hostsUrl('allHosts')); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/notes_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/notes_tab.cy.ts index c5d0c66032fd3..ce2d261db5cad 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/notes_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/notes_tab.cy.ts @@ -20,8 +20,6 @@ import { import { MODAL_CONFIRMATION_BTN } from '../../../screens/alerts_detection_rules'; import { createTimeline } from '../../../tasks/api_calls/timelines'; -import { cleanKibana } from '../../../tasks/common'; - import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; import { @@ -38,7 +36,6 @@ const link = 'https://www.elastic.co/'; describe.skip('Timeline notes tab', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); login(); visit(TIMELINES_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/overview.cy.tsx b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/overview.cy.tsx index fc262829d039c..e1ab38d669d03 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/overview.cy.tsx +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/overview.cy.tsx @@ -17,8 +17,6 @@ import { sharedTimelineTitleFragment, } from '../../../objects/timeline'; -import { cleanKibana } from '../../../tasks/common'; - import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; import { createTimeline, favoriteTimeline } from '../../../tasks/api_calls/timelines'; @@ -27,8 +25,6 @@ import { TIMELINES_URL } from '../../../urls/navigation'; describe('timeline overview search', { tags: ['@ess', 'serverless'] }, () => { before(() => { - cleanKibana(); - createTimeline(getFavoritedTimeline()) .then((response) => response.body.data.persistTimeline.timeline.savedObjectId) .then((timelineId) => favoriteTimeline({ timelineId, timelineType: 'default' })); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts index 482bf04c048bc..f16f7120dd0fb 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts @@ -14,7 +14,6 @@ import { TIMELINE_EVENTS_COUNT_PREV_PAGE, TIMELINE_FLYOUT, } from '../../../screens/timeline'; -import { cleanKibana } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { visitWithTimeRange } from '../../../tasks/navigation'; @@ -27,7 +26,6 @@ import { hostsUrl } from '../../../urls/navigation'; const defaultPageSize = 25; describe('Pagination', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); cy.task('esArchiverLoad', { archiveName: 'timeline' }); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/query_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/query_tab.cy.ts index 7ed79dc4d797c..b5b610a387ffa 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/query_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/query_tab.cy.ts @@ -16,8 +16,6 @@ import { } from '../../../screens/timeline'; import { createTimeline } from '../../../tasks/api_calls/timelines'; -import { cleanKibana } from '../../../tasks/common'; - import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; import { @@ -31,7 +29,6 @@ import { TIMELINES_URL } from '../../../urls/navigation'; describe.skip('Timeline query tab', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); login(); visit(TIMELINES_URL); createTimeline(getTimeline()) diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/search_or_filter.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/search_or_filter.cy.ts index a6f5ae49f5d8a..00ff7a47a5a4b 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/search_or_filter.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/search_or_filter.cy.ts @@ -13,7 +13,6 @@ import { TIMELINE_SEARCH_OR_FILTER, } from '../../../screens/timeline'; import { LOADING_INDICATOR } from '../../../screens/security_header'; -import { cleanKibana } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { visit, visitWithTimeRange } from '../../../tasks/navigation'; @@ -28,10 +27,6 @@ import { waitForTimelinesPanelToBeLoaded } from '../../../tasks/timelines'; import { hostsUrl, TIMELINES_URL } from '../../../urls/navigation'; describe('Timeline search and filters', { tags: ['@ess', '@serverless'] }, () => { - before(() => { - cleanKibana(); - }); - describe('timeline search or filter KQL bar', () => { beforeEach(() => { login(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/toggle_column.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/toggle_column.cy.ts index 6845d402d21f1..5aec79f66d3ab 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/toggle_column.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/toggle_column.cy.ts @@ -6,7 +6,6 @@ */ import { ID_HEADER_FIELD, TIMESTAMP_HEADER_FIELD } from '../../../screens/timeline'; -import { cleanKibana } from '../../../tasks/common'; import { login } from '../../../tasks/login'; import { visitWithTimeRange } from '../../../tasks/navigation'; @@ -22,7 +21,6 @@ import { hostsUrl } from '../../../urls/navigation'; describe('toggle column in timeline', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cleanKibana(); cy.intercept('POST', '/api/timeline/_export?file_name=timelines_export.ndjson').as('export'); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/unsaved_timeline.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/unsaved_timeline.cy.ts index 9f368ca7b1220..16c99c26e24ca 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/unsaved_timeline.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/unsaved_timeline.cy.ts @@ -18,7 +18,6 @@ import { OBSERVABILITY_ALERTS_PAGE, } from '../../../screens/kibana_navigation'; import { TIMELINE_SAVE_MODAL } from '../../../screens/timeline'; -import { cleanKibana } from '../../../tasks/common'; import { navigateFromKibanaCollapsibleTo, openKibanaNavigation, @@ -38,7 +37,6 @@ import { hostsUrl, MANAGE_URL } from '../../../urls/navigation'; describe('Save Timeline Prompts', { tags: ['@ess', '@serverless', '@brokenInServerless'] }, () => { before(() => { - cleanKibana(); login(); /* * When timeline changes are pending, chrome would popup with diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/url_state.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/url_state.cy.ts index c49f1d51d9617..75ad3fc2036cd 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/url_state.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/url_state.cy.ts @@ -12,7 +12,6 @@ import { TIMELINE_HEADER } from '../../../screens/timeline'; import { createTimeline } from '../../../tasks/api_calls/timelines'; -import { cleanKibana } from '../../../tasks/common'; import { ALERTS_URL } from '../../../urls/navigation'; import { createRule } from '../../../tasks/api_calls/rules'; import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; @@ -26,7 +25,6 @@ import { TIMELINES_URL } from '../../../urls/navigation'; describe('Open timeline', { tags: ['@serverless', '@ess'] }, () => { let timelineSavedObjectId: string | null = null; before(function () { - cleanKibana(); login(); visit(TIMELINES_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/common.ts b/x-pack/test/security_solution_cypress/cypress/tasks/common.ts index 72b85c961ab1f..fc8ee6e2f5b34 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/common.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/common.ts @@ -90,19 +90,10 @@ const clearSessionStorage = () => { }); }; -/** Clears the rules and monitoring tables state. Automatically called in `cleanKibana()`. */ export const resetRulesTableState = () => { clearSessionStorage(); }; -export const cleanKibana = () => { - resetRulesTableState(); - deletePrebuiltRulesAssets(); - deleteAlertsAndRules(); - deleteAllCasesItems(); - deleteTimelines(); -}; - export const deleteAlertsAndRules = () => { cy.log('Delete all alerts and rules'); const kibanaIndexUrl = `${Cypress.env('ELASTICSEARCH_URL')}/.kibana_\*`;