diff --git a/.buildkite/pipelines/chrome_forward_testing.yml b/.buildkite/pipelines/chrome_forward_testing.yml index 2c8d7170ee3ea..3c19c41d9f7c7 100644 --- a/.buildkite/pipelines/chrome_forward_testing.yml +++ b/.buildkite/pipelines/chrome_forward_testing.yml @@ -117,15 +117,57 @@ steps: - exit_status: '-1' limit: 1 - - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh - label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_customization.sh + label: 'Serverless Rule Management - Prebuilt Rules Customization - Security Solution Cypress Tests' agents: machineType: n2-standard-4 preemptible: true depends_on: - build timeout_in_minutes: 60 - parallelism: 2 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_installation.sh + label: 'Serverless Rule Management - Prebuilt Rules Installation - Security Solution Cypress Tests' + agents: + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_management.sh + label: 'Serverless Rule Management - Prebuilt Rules Management - Security Solution Cypress Tests' + agents: + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_upgrade.sh + label: 'Serverless Rule Management - Prebuilt Rules Upgrade - Security Solution Cypress Tests' + agents: + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + timeout_in_minutes: 60 + parallelism: 1 retry: automatic: - exit_status: '-1' @@ -145,15 +187,57 @@ steps: - exit_status: '-1' limit: 1 - - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh - label: 'Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_customization.sh + label: 'Rule Management - Prebuilt Rules Customization - Security Solution Cypress Tests' agents: machineType: n2-standard-4 preemptible: true depends_on: - build timeout_in_minutes: 60 - parallelism: 2 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_installation.sh + label: 'Rule Management - Prebuilt Rules Installation - Security Solution Cypress Tests' + agents: + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_management.sh + label: 'Rule Management - Prebuilt Rules Management - Security Solution Cypress Tests' + agents: + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_upgrade.sh + label: 'Rule Management - Prebuilt Rules Upgrade - Security Solution Cypress Tests' + agents: + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + timeout_in_minutes: 60 + parallelism: 1 retry: automatic: - exit_status: '-1' diff --git a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml index 43c82fa306187..b83579e934298 100644 --- a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml +++ b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml @@ -130,8 +130,8 @@ steps: - exit_status: '-1' limit: 1 - - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh - label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_customization.sh + label: 'Serverless Rule Management - Prebuilt Rules Customization - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: image: family/kibana-ubuntu-2004 @@ -141,7 +141,58 @@ steps: preemptible: true depends_on: build timeout_in_minutes: 60 - parallelism: 2 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_installation.sh + label: 'Serverless Rule Management - Prebuilt Rules Installation - Security Solution Cypress Tests' + if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + depends_on: build + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_management.sh + label: 'Serverless Rule Management - Prebuilt Rules Management - Security Solution Cypress Tests' + if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + depends_on: build + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_upgrade.sh + label: 'Serverless Rule Management - Prebuilt Rules Upgrade - Security Solution Cypress Tests' + if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + depends_on: build + timeout_in_minutes: 60 + parallelism: 1 retry: automatic: - exit_status: '-1' diff --git a/.buildkite/pipelines/flaky_tests/groups.json b/.buildkite/pipelines/flaky_tests/groups.json index 5cfa839b8a529..6b7b49d1895be 100644 --- a/.buildkite/pipelines/flaky_tests/groups.json +++ b/.buildkite/pipelines/flaky_tests/groups.json @@ -33,12 +33,36 @@ "name": "[Serverless] Security Solution Rule Management - Cypress" }, { - "key": "cypress/security_solution_rule_management_prebuilt_rules", - "name": "Security Solution Rule Management - Prebuilt Rules - Cypress" + "key": "cypress/security_solution_rule_management_prebuilt_rules_customization", + "name": "Security Solution Rule Management - Prebuilt Rules Customization - Cypress" }, { - "key": "cypress/security_serverless_rule_management_prebuilt_rules", - "name": "[Serverless] Security Solution Rule Management - Prebuilt Rules - Cypress" + "key": "cypress/security_serverless_rule_management_prebuilt_rules_customization", + "name": "[Serverless] Security Solution Rule Management - Prebuilt Rules Customization - Cypress" + }, + { + "key": "cypress/security_solution_rule_management_prebuilt_rules_installation", + "name": "Security Solution Rule Management - Prebuilt Rules Installation - Cypress" + }, + { + "key": "cypress/security_serverless_rule_management_prebuilt_rules_installation", + "name": "[Serverless] Security Solution Rule Management - Prebuilt Rules Installation - Cypress" + }, + { + "key": "cypress/security_solution_rule_management_prebuilt_rules_management", + "name": "Security Solution Rule Management - Prebuilt Rules Management - Cypress" + }, + { + "key": "cypress/security_serverless_rule_management_prebuilt_rules_management", + "name": "[Serverless] Security Solution Rule Management - Prebuilt Rules Management - Cypress" + }, + { + "key": "cypress/security_solution_rule_management_prebuilt_rules_upgrade", + "name": "Security Solution Rule Management - Prebuilt Rules Upgrade - Cypress" + }, + { + "key": "cypress/security_serverless_rule_management_prebuilt_rules_upgrade", + "name": "[Serverless] Security Solution Rule Management - Prebuilt Rules Upgrade - Cypress" }, { "key": "cypress/security_solution_detection_engine", diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml index 2bf1fc63b95ff..c37b0a4081c1e 100644 --- a/.buildkite/pipelines/on_merge.yml +++ b/.buildkite/pipelines/on_merge.yml @@ -238,8 +238,8 @@ steps: - exit_status: '-1' limit: 1 - - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh - label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_customization.sh + label: 'Serverless Rule Management - Prebuilt Rules Customization - Security Solution Cypress Tests' agents: image: family/kibana-ubuntu-2004 imageProject: elastic-images-prod @@ -247,7 +247,52 @@ steps: machineType: n2-standard-4 preemptible: true timeout_in_minutes: 60 - parallelism: 2 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_installation.sh + label: 'Serverless Rule Management - Prebuilt Rules Installation - Security Solution Cypress Tests' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_management.sh + label: 'Serverless Rule Management - Prebuilt Rules Management - Security Solution Cypress Tests' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_upgrade.sh + label: 'Serverless Rule Management - Prebuilt Rules Upgrade - Security Solution Cypress Tests' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 60 + parallelism: 1 retry: automatic: - exit_status: '-1' @@ -268,8 +313,53 @@ steps: - exit_status: '-1' limit: 1 - - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh - label: 'Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_customization.sh + label: 'Rule Management - Prebuilt Rules Customization - Security Solution Cypress Tests' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 60 + parallelism: 2 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_installation.sh + label: 'Rule Management - Prebuilt Rules Installation - Security Solution Cypress Tests' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 60 + parallelism: 2 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_management.sh + label: 'Rule Management - Prebuilt Rules Management - Security Solution Cypress Tests' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 60 + parallelism: 2 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_upgrade.sh + label: 'Rule Management - Prebuilt Rules Upgrade - Security Solution Cypress Tests' agents: image: family/kibana-ubuntu-2004 imageProject: elastic-images-prod diff --git a/.buildkite/pipelines/pointer_compression.yml b/.buildkite/pipelines/pointer_compression.yml index 715f4bbbf4030..1f7be71eec9be 100644 --- a/.buildkite/pipelines/pointer_compression.yml +++ b/.buildkite/pipelines/pointer_compression.yml @@ -117,8 +117,8 @@ steps: - exit_status: '-1' limit: 1 - - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh - label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_customization.sh + label: 'Serverless Rule Management - Prebuilt Rules Customization - Security Solution Cypress Tests' agents: image: family/kibana-ubuntu-2004 imageProject: elastic-images-prod @@ -128,7 +128,58 @@ steps: depends_on: - build timeout_in_minutes: 60 - parallelism: 2 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_installation.sh + label: 'Serverless Rule Management - Prebuilt Rules Installation - Security Solution Cypress Tests' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_management.sh + label: 'Serverless Rule Management - Prebuilt Rules Management - Security Solution Cypress Tests' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_upgrade.sh + label: 'Serverless Rule Management - Prebuilt Rules Upgrade - Security Solution Cypress Tests' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + timeout_in_minutes: 60 + parallelism: 1 retry: automatic: - exit_status: '-1' @@ -151,8 +202,8 @@ steps: - exit_status: '-1' limit: 1 - - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh - label: 'Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_customization.sh + label: 'Rule Management - Prebuilt Rules Customization - Security Solution Cypress Tests' agents: image: family/kibana-ubuntu-2004 imageProject: elastic-images-prod @@ -162,7 +213,58 @@ steps: depends_on: - build timeout_in_minutes: 60 - parallelism: 2 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_installation.sh + label: 'Rule Management - Prebuilt Rules Installation - Security Solution Cypress Tests' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_management.sh + label: 'Rule Management - Prebuilt Rules Management - Security Solution Cypress Tests' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_upgrade.sh + label: 'Rule Management - Prebuilt Rules Upgrade - Security Solution Cypress Tests' + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + timeout_in_minutes: 60 + parallelism: 1 retry: automatic: - exit_status: '-1' diff --git a/.buildkite/pipelines/pull_request/security_solution/rule_management.yml b/.buildkite/pipelines/pull_request/security_solution/rule_management.yml index f4d7cb420fd97..63f9a1a3df216 100644 --- a/.buildkite/pipelines/pull_request/security_solution/rule_management.yml +++ b/.buildkite/pipelines/pull_request/security_solution/rule_management.yml @@ -19,8 +19,8 @@ steps: - exit_status: '-1' limit: 1 - - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh - label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_customization.sh + label: 'Serverless Rule Management - Prebuilt Rules Customization - Security Solution Cypress Tests' agents: machineType: n2-standard-4 preemptible: true @@ -33,7 +33,67 @@ steps: - check_types - check_oas_snapshot timeout_in_minutes: 60 - parallelism: 2 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_installation.sh + label: 'Serverless Rule Management - Prebuilt Rules Installation - Security Solution Cypress Tests' + agents: + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + - quick_checks + - checks + - linting + - linting_with_types + - check_types + - check_oas_snapshot + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_management.sh + label: 'Serverless Rule Management - Prebuilt Rules Management - Security Solution Cypress Tests' + agents: + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + - quick_checks + - checks + - linting + - linting_with_types + - check_types + - check_oas_snapshot + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_upgrade.sh + label: 'Serverless Rule Management - Prebuilt Rules Upgrade - Security Solution Cypress Tests' + agents: + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + - quick_checks + - checks + - linting + - linting_with_types + - check_types + - check_oas_snapshot + timeout_in_minutes: 60 + parallelism: 1 retry: automatic: - exit_status: '-1' @@ -59,8 +119,68 @@ steps: - exit_status: '-1' limit: 1 - - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh - label: 'Rule Management - Prebuilt Rules - Security Solution Cypress Tests' + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_customization.sh + label: 'Rule Management - Prebuilt Rules Customization - Security Solution Cypress Tests' + agents: + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + - quick_checks + - checks + - linting + - linting_with_types + - check_types + - check_oas_snapshot + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_installation.sh + label: 'Rule Management - Prebuilt Rules Installation - Security Solution Cypress Tests' + agents: + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + - quick_checks + - checks + - linting + - linting_with_types + - check_types + - check_oas_snapshot + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_management.sh + label: 'Rule Management - Prebuilt Rules Management - Security Solution Cypress Tests' + agents: + machineType: n2-standard-4 + preemptible: true + depends_on: + - build + - quick_checks + - checks + - linting + - linting_with_types + - check_types + - check_oas_snapshot + timeout_in_minutes: 60 + parallelism: 1 + retry: + automatic: + - exit_status: '-1' + limit: 1 + + - command: .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_upgrade.sh + label: 'Rule Management - Prebuilt Rules Upgrade - Security Solution Cypress Tests' agents: machineType: n2-standard-4 preemptible: true @@ -73,7 +193,7 @@ steps: - check_types - check_oas_snapshot timeout_in_minutes: 60 - parallelism: 2 + parallelism: 1 retry: automatic: - exit_status: '-1' diff --git a/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_customization.sh b/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_customization.sh new file mode 100644 index 0000000000000..fe1281a102cf4 --- /dev/null +++ b/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_customization.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/steps/functional/common.sh + +export JOB=kibana-security-solution-chrome +export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} + +echo "--- Rule Management - Prebuilt Rules Customization - Cypress Tests on Serverless" + +cd x-pack/solutions/security/test/security_solution_cypress + +set +e +BK_ANALYTICS_API_KEY=$(vault_get security-solution-ci sec-sol-cypress-bk-api-key) + +BK_ANALYTICS_API_KEY=$BK_ANALYTICS_API_KEY yarn cypress:rule_management:prebuilt_rules:customization:run:serverless; status=$?; yarn junit:merge || :; exit $status diff --git a/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_installation.sh b/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_installation.sh new file mode 100644 index 0000000000000..f2f4ff6c976a9 --- /dev/null +++ b/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_installation.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/steps/functional/common.sh + +export JOB=kibana-security-solution-chrome +export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} + +echo "--- Rule Management - Prebuilt Rules Installation - Cypress Tests on Serverless" + +cd x-pack/solutions/security/test/security_solution_cypress + +set +e +BK_ANALYTICS_API_KEY=$(vault_get security-solution-ci sec-sol-cypress-bk-api-key) + +BK_ANALYTICS_API_KEY=$BK_ANALYTICS_API_KEY yarn cypress:rule_management:prebuilt_rules:installation:run:serverless; status=$?; yarn junit:merge || :; exit $status diff --git a/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_management.sh b/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_management.sh new file mode 100644 index 0000000000000..85ce2af0bb6b7 --- /dev/null +++ b/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_management.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/steps/functional/common.sh + +export JOB=kibana-security-solution-chrome +export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} + +echo "--- Rule Management - Prebuilt Rules Management - Cypress Tests on Serverless" + +cd x-pack/solutions/security/test/security_solution_cypress + +set +e +BK_ANALYTICS_API_KEY=$(vault_get security-solution-ci sec-sol-cypress-bk-api-key) + +BK_ANALYTICS_API_KEY=$BK_ANALYTICS_API_KEY yarn cypress:rule_management:prebuilt_rules:management:run:serverless; status=$?; yarn junit:merge || :; exit $status diff --git a/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh b/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_upgrade.sh similarity index 69% rename from .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh rename to .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_upgrade.sh index 57bf6d2f62eae..ff656f81af0f9 100644 --- a/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules.sh +++ b/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules_upgrade.sh @@ -7,11 +7,11 @@ source .buildkite/scripts/steps/functional/common.sh export JOB=kibana-security-solution-chrome export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} -echo "--- Rule Management - Prebuilt Rules - Security Solution Cypress Tests" +echo "--- Rule Management - Prebuilt Rules Upgrade - Cypress Tests on Serverless" cd x-pack/solutions/security/test/security_solution_cypress set +e BK_ANALYTICS_API_KEY=$(vault_get security-solution-ci sec-sol-cypress-bk-api-key) -BK_ANALYTICS_API_KEY=$BK_ANALYTICS_API_KEY yarn cypress:rule_management:prebuilt_rules:run:ess; status=$?; yarn junit:merge || :; exit $status +BK_ANALYTICS_API_KEY=$BK_ANALYTICS_API_KEY yarn cypress:rule_management:prebuilt_rules:upgrade:run:serverless; status=$?; yarn junit:merge || :; exit $status diff --git a/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_customization.sh b/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_customization.sh new file mode 100644 index 0000000000000..a2094989644bf --- /dev/null +++ b/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_customization.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/steps/functional/common.sh + +export JOB=kibana-security-solution-chrome +export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} + +echo "--- Rule Management - Prebuilt Rules Customization - Security Solution Cypress Tests" + +cd x-pack/solutions/security/test/security_solution_cypress + +set +e +BK_ANALYTICS_API_KEY=$(vault_get security-solution-ci sec-sol-cypress-bk-api-key) + +BK_ANALYTICS_API_KEY=$BK_ANALYTICS_API_KEY yarn cypress:rule_management:prebuilt_rules:customization:run:ess; status=$?; yarn junit:merge || :; exit $status diff --git a/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_installation.sh b/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_installation.sh new file mode 100644 index 0000000000000..110b2061c3030 --- /dev/null +++ b/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_installation.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/steps/functional/common.sh + +export JOB=kibana-security-solution-chrome +export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} + +echo "--- Rule Management - Prebuilt Rules Installation - Security Solution Cypress Tests" + +cd x-pack/solutions/security/test/security_solution_cypress + +set +e +BK_ANALYTICS_API_KEY=$(vault_get security-solution-ci sec-sol-cypress-bk-api-key) + +BK_ANALYTICS_API_KEY=$BK_ANALYTICS_API_KEY yarn cypress:rule_management:prebuilt_rules:installation:run:ess; status=$?; yarn junit:merge || :; exit $status diff --git a/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_management.sh b/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_management.sh new file mode 100644 index 0000000000000..074e594b14ea4 --- /dev/null +++ b/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_management.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +source .buildkite/scripts/steps/functional/common.sh + +export JOB=kibana-security-solution-chrome +export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} + +echo "--- Rule Management - Prebuilt Rules Management - Security Solution Cypress Tests" + +cd x-pack/solutions/security/test/security_solution_cypress + +set +e +BK_ANALYTICS_API_KEY=$(vault_get security-solution-ci sec-sol-cypress-bk-api-key) + +BK_ANALYTICS_API_KEY=$BK_ANALYTICS_API_KEY yarn cypress:rule_management:prebuilt_rules:management:run:ess; status=$?; yarn junit:merge || :; exit $status diff --git a/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh b/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_upgrade.sh similarity index 70% rename from .buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh rename to .buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_upgrade.sh index de4744f5bc8a0..573823c1ab83b 100644 --- a/.buildkite/scripts/steps/functional/security_serverless_rule_management_prebuilt_rules.sh +++ b/.buildkite/scripts/steps/functional/security_solution_rule_management_prebuilt_rules_upgrade.sh @@ -7,11 +7,11 @@ source .buildkite/scripts/steps/functional/common.sh export JOB=kibana-security-solution-chrome export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION} -echo "--- Rule Management - Prebuilt Rules - Cypress Tests on Serverless" +echo "--- Rule Management - Prebuilt Rules Upgrade - Security Solution Cypress Tests" cd x-pack/solutions/security/test/security_solution_cypress set +e BK_ANALYTICS_API_KEY=$(vault_get security-solution-ci sec-sol-cypress-bk-api-key) -BK_ANALYTICS_API_KEY=$BK_ANALYTICS_API_KEY yarn cypress:rule_management:prebuilt_rules:run:serverless; status=$?; yarn junit:merge || :; exit $status +BK_ANALYTICS_API_KEY=$BK_ANALYTICS_API_KEY yarn cypress:rule_management:prebuilt_rules:upgrade:run:ess; status=$?; yarn junit:merge || :; exit $status diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/README.md b/x-pack/solutions/security/test/security_solution_cypress/cypress/README.md index be3251d676359..85b44c7582759 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/README.md +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/README.md @@ -61,43 +61,46 @@ When running the tests, FTR is used to spawn both a Kibana instance (http://loca Run the tests with the following yarn scripts from `x-pack/test/security_solution_cypress`: -| Script Name | Description | -| -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| cypress | Runs the default Cypress command | -| cypress:open:ess | Opens the Cypress UI with all tests in the `e2e` directory. This also runs a local kibana and ES instance. The kibana instance will reload when you make code changes. This is the recommended way to debug and develop tests. | -| cypress:open:serverless | Opens the Cypress UI with all tests in the `e2e` directory. This also runs a mocked serverless environment. The kibana instance will reload when you make code changes. This is the recommended way to debug and develop tests. | -| cypress:run:entity_analytics:ess | Runs all tests tagged as ESS placed in the `e2e/entity_analytics` directory in headless mode | -| cypress:run:cases:ess | Runs all tests under `explore/cases` in the `e2e` directory related to the Cases area team in headless mode | -| cypress:ess | Runs all ESS tests with the specified configuration in headless mode and produces a report using `cypress-multi-reporters` | -| cypress:rule_management:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management` excluding `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | -| cypress:rule_management:prebuilt_rules:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | -| cypress:run:respops:ess | Runs all tests related to the Response Ops area team, specifically tests in `detection_alerts`, `detection_rules`, and `exceptions` directories in headless mode | -| cypress:run:entity_analytics:serverless | Runs all tests tagged as SERVERLESS in the `e2e/entity_analytics` directory in headless mode | -| cypress:rule_management:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` excluding `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | -| cypress:rule_management:prebuilt_rules:run:serverless | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | -| cypress:detection_engine:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/detection_engine` excluding `e2e/detection_response/detection_engine/exceptions` directory in headless mode | -| cypress:detection_engine:exceptions:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/detection_engine/exceptions` directory in headless mode | -| cypress:detection_engine:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/detection_engine` excluding `e2e/detection_response/detection_engine` directory in headless mode | -| cypress:ai_assistant:run:ess | Runs all tests tagged as ESS in the `e2e/ai_assistant` directory in headless mode | -| cypress:ai_assistant:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/ai_assistant` directory in headless mode | -| cypress:cloud_security_posture:run:ess | Runs all tests tagged as ESS in the `e2e/cloud_security_posture` directory in headless mode | -| cypress:cloud_security_posture:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/cloud_security_posture` directory in headless mode | -| cypress:detection_engine:exceptions:run:serverless | Runs all tests tagged as ESS in the `e2e/detection_response/detection_engine/exceptions` directory in headless mode | -| cypress:investigations:run:ess | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode | -| cypress:explore:run:ess | Runs all tests tagged as ESS in the `e2e/explore` directory in headless mode | -| cypress:investigations:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode | -| cypress:explore:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode | -| cypress:open:qa:serverless | Opens the Cypress UI with all tests in the `e2e` directory tagged as SERVERLESS. This also creates an MKI project in console.qa enviornment. The kibana instance will reload when you make code changes. This is the recommended way to debug tests in QA. Follow the readme in order to learn about the known limitations. | -| cypress:run:qa:serverless:entity_analytics | Runs all tests tagged as SERVERLESS placed in the `e2e/entity_analytics` directory in headless mode using the QA environment and real MKI projects. | -| cypress:run:qa:serverless:explore | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode using the QA environment and real MKI prorjects. | -| cypress:run:qa:serverless:investigations | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode using the QA environment and reak MKI projects. | -| cypress:run:qa:serverless:cloud_security_posture | Runs all tests tagged as SERVERLESS in the `e2e/cloud_security_posture` directory in headless mode using the QA environment and reak MKI projects. | -| cypress:run:qa:serverless:rule_management | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` directory, excluding `e2e/detection_response/rule_management/prebuilt_rules` in headless mode using the QA environment and reak MKI projects. | -| cypress:run:qa:serverless:rule_management:prebuilt_rules | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode using the QA environment and reak MKI projects. | -| cypress:run:qa:serverless:detection_engine | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/detection_engine` directory, excluding `e2e/detection_response/detection_engine/exceptions` in headless mode using the QA environment and reak MKI projects. | -| cypress:run:qa:serverless:detection_engine:exceptions | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/detection_engine/exceptions` directory in headless mode using the QA environment and reak MKI projects. | -| cypress:run:qa:serverless:ai_assistant | Runs all tests tagged as SERVERLESS in the `e2e/ai_assistant` directory in headless mode using the QA environment and reak MKI projects. | -| junit:merge | Merges individual test reports into a single report and moves the report to the `junit` directory | +| Script Name | Description | +| ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| cypress | Runs the default Cypress command | +| cypress:open:ess | Opens the Cypress UI with all tests in the `e2e` directory. This also runs a local kibana and ES instance. The kibana instance will reload when you make code changes. This is the recommended way to debug and develop tests. | +| cypress:open:serverless | Opens the Cypress UI with all tests in the `e2e` directory. This also runs a mocked serverless environment. The kibana instance will reload when you make code changes. This is the recommended way to debug and develop tests. | +| cypress:run:entity_analytics:ess | Runs all tests tagged as ESS placed in the `e2e/entity_analytics` directory in headless mode | +| cypress:run:cases:ess | Runs all tests under `explore/cases` in the `e2e` directory related to the Cases area team in headless mode | +| cypress:ess | Runs all ESS tests with the specified configuration in headless mode and produces a report using `cypress-multi-reporters` | +| cypress:rule_management:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management` excluding `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | +| cypress:rule_management:prebuilt_rules:customization:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules/customization` directory in headless mode | +| cypress:rule_management:prebuilt_rules:installation:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules/installation` directory in headless mode | +| cypress:rule_management:prebuilt_rules:management:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules/management` directory in headless mode | +| cypress:rule_management:prebuilt_rules:upgrade:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules/upgrade` directory in headless mode | +| cypress:run:respops:ess | Runs all tests related to the Response Ops area team, specifically tests in `detection_alerts`, `detection_rules`, and `exceptions` directories in headless mode | +| cypress:run:entity_analytics:serverless | Runs all tests tagged as SERVERLESS in the `e2e/entity_analytics` directory in headless mode | +| cypress:rule_management:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` excluding `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | +| cypress:rule_management:prebuilt_rules:run:serverless | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | +| cypress:detection_engine:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/detection_engine` excluding `e2e/detection_response/detection_engine/exceptions` directory in headless mode | +| cypress:detection_engine:exceptions:run:ess | Runs all tests tagged as ESS in the `e2e/detection_response/detection_engine/exceptions` directory in headless mode | +| cypress:detection_engine:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/detection_engine` excluding `e2e/detection_response/detection_engine` directory in headless mode | +| cypress:ai_assistant:run:ess | Runs all tests tagged as ESS in the `e2e/ai_assistant` directory in headless mode | +| cypress:ai_assistant:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/ai_assistant` directory in headless mode | +| cypress:cloud_security_posture:run:ess | Runs all tests tagged as ESS in the `e2e/cloud_security_posture` directory in headless mode | +| cypress:cloud_security_posture:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/cloud_security_posture` directory in headless mode | +| cypress:detection_engine:exceptions:run:serverless | Runs all tests tagged as ESS in the `e2e/detection_response/detection_engine/exceptions` directory in headless mode | +| cypress:investigations:run:ess | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode | +| cypress:explore:run:ess | Runs all tests tagged as ESS in the `e2e/explore` directory in headless mode | +| cypress:investigations:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode | +| cypress:explore:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode | +| cypress:open:qa:serverless | Opens the Cypress UI with all tests in the `e2e` directory tagged as SERVERLESS. This also creates an MKI project in console.qa environment. The kibana instance will reload when you make code changes. This is the recommended way to debug tests in QA. Follow the readme in order to learn about the known limitations. | +| cypress:run:qa:serverless:entity_analytics | Runs all tests tagged as SERVERLESS placed in the `e2e/entity_analytics` directory in headless mode using the QA environment and real MKI projects. | +| cypress:run:qa:serverless:explore | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode using the QA environment and real MKI projects. | +| cypress:run:qa:serverless:investigations | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode using the QA environment and real MKI projects. | +| cypress:run:qa:serverless:cloud_security_posture | Runs all tests tagged as SERVERLESS in the `e2e/cloud_security_posture` directory in headless mode using the QA environment and real MKI projects. | +| cypress:run:qa:serverless:rule_management | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` directory, excluding `e2e/detection_response/rule_management/prebuilt_rules` in headless mode using the QA environment and real MKI projects. | +| cypress:run:qa:serverless:rule_management:prebuilt_rules | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode using the QA environment and real MKI projects. | +| cypress:run:qa:serverless:detection_engine | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/detection_engine` directory, excluding `e2e/detection_response/detection_engine/exceptions` in headless mode using the QA environment and real MKI projects. | +| cypress:run:qa:serverless:detection_engine:exceptions | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/detection_engine/exceptions` directory in headless mode using the QA environment and real MKI projects. | +| cypress:run:qa:serverless:ai_assistant | Runs all tests tagged as SERVERLESS in the `e2e/ai_assistant` directory in headless mode using the QA environment and real MKI projects. | +| junit:merge | Merges individual test reports into a single report and moves the report to the `junit` directory | Please note that all the headless mode commands do not open the Cypress UI and are typically used in CI/CD environments. The scripts that open the Cypress UI are useful for development and debugging. @@ -260,15 +263,18 @@ Note that we use tags in order to select which tests we want to execute, if you Run the tests with the following yarn scripts from `x-pack/test/security_solution_cypress`: -| Script Name | Description | -| ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| cypress:open:serverless | Opens the Cypress UI with all tests in the `e2e` directory. This also runs a mocked serverless environment. The kibana instance will reload when you make code changes. This is the recommended way to debug and develop tests. | -| cypress:entity_analytics:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/entity_analytics` directory in headless mode | -| cypress:investigations:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode | -| cypress:explore:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode | -| cypress:rule_management:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` excluding `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | -| cypress:rule_management:prebuilt_rules:run:serverless | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | -| cypress:ai_assistant:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/ai_assistant` directory in headless mode | +| Script Name | Description | +| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| cypress:open:serverless | Opens the Cypress UI with all tests in the `e2e` directory. This also runs a mocked serverless environment. The kibana instance will reload when you make code changes. This is the recommended way to debug and develop tests. | +| cypress:entity_analytics:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/entity_analytics` directory in headless mode | +| cypress:investigations:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode | +| cypress:explore:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode | +| cypress:rule_management:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` excluding `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode | +| cypress:rule_management:prebuilt_rules:customization:run:serverless | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules/customization` directory in headless mode | +| cypress:rule_management:prebuilt_rules:installation:run:serverless | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules/installation` directory in headless mode | +| cypress:rule_management:prebuilt_rules:management:run:serverless | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules/management` directory in headless mode | +| cypress:rule_management:prebuilt_rules:upgrade:run:serverless | Runs all tests tagged as ESS in the `e2e/detection_response/rule_management/prebuilt_rules/upgrade` directory in headless mode | +| cypress:ai_assistant:run:serverless | Runs all tests tagged as SERVERLESS in the `e2e/ai_assistant` directory in headless mode | Please note that all the headless mode commands do not open the Cypress UI and are typically used in CI/CD environments. The scripts that open the Cypress UI are useful for development and debugging. @@ -390,15 +396,15 @@ Run the tests with the following yarn scripts from `x-pack/test/security_solutio | Script Name | Description | | --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| cypress:open:qa:serverless | Opens the Cypress UI with all tests in the `e2e` directory tagged as SERVERLESS. This also creates an MKI project in console.qa enviornment. The kibana instance will reload when you make code changes. This is the recommended way to debug tests in QA. Follow the readme in order to learn about the known limitations. | +| cypress:open:qa:serverless | Opens the Cypress UI with all tests in the `e2e` directory tagged as SERVERLESS. This also creates an MKI project in console.qa environment. The kibana instance will reload when you make code changes. This is the recommended way to debug tests in QA. Follow the readme in order to learn about the known limitations. | | cypress:run:qa:serverless | Runs all tests tagged as SERVERLESS placed in the `e2e` directory excluding `investigations` and `explore` directories in headless mode using the QA environment and real MKI projects. | -| cypress:run:qa:serverless:explore | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode using the QA environment and real MKI prorjects. | -| cypress:run:qa:serverless:investigations | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode using the QA environment and reak MKI projects. | -| cypress:run:qa:serverless:rule_management | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` directory, excluding `e2e/detection_response/rule_management/prebuilt_rules` in headless mode using the QA environment and reak MKI projects. | +| cypress:run:qa:serverless:explore | Runs all tests tagged as SERVERLESS in the `e2e/explore` directory in headless mode using the QA environment and real MKI projects. | +| cypress:run:qa:serverless:investigations | Runs all tests tagged as SERVERLESS in the `e2e/investigations` directory in headless mode using the QA environment and real MKI projects. | +| cypress:run:qa:serverless:rule_management | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management` directory, excluding `e2e/detection_response/rule_management/prebuilt_rules` in headless mode using the QA environment and real MKI projects. | | cypress:run:qa:serverless:rule_management:prebuilt_rules | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/rule_management/prebuilt_rules` directory in headless mode using the QA environment and real MKI projects. | -| cypress:run:qa:serverless:detection_engine | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/detection_engine` directory, excluding `e2e/detection_response/detection_engine/exceptions` in headless mode using the QA environment and reak MKI projects. | +| cypress:run:qa:serverless:detection_engine | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/detection_engine` directory, excluding `e2e/detection_response/detection_engine/exceptions` in headless mode using the QA environment and real MKI projects. | | cypress:run:qa:serverless:detection_engine:prebuilt_rules | Runs all tests tagged as SERVERLESS in the `e2e/detection_response/detection_engine/exceptions` directory in headless mode using the QA environment and real MKI projects. | -| cypress:run:qa:serverless:ai_assistant | Runs all tests tagged as SERVERLESS in the `e2e/ai_assistant` directory in headless mode using the QA environment and reak MKI projects. | +| cypress:run:qa:serverless:ai_assistant | Runs all tests tagged as SERVERLESS in the `e2e/ai_assistant` directory in headless mode using the QA environment and real MKI projects. | Please note that all the headless mode commands do not open the Cypress UI and are typically used in CI/CD environments. The scripts that open the Cypress UI are useful for development and debugging. @@ -520,19 +526,19 @@ For test developing or test debugging purposes on QA, you have avaialable the fo yarn cypress:open:qa:serverless --tier ``` -The above command will open the Cypress UI with all tests in the `e2e` directory tagged as SERVERLESS. This also creates an MKI project in console.qa enviornment with the passed tier essentials or complete. If no flag is passed, the project will be cretaed as complete. +The above command will open the Cypress UI with all tests in the `e2e` directory tagged as SERVERLESS. This also creates an MKI project in console.qa environment with the passed tier essentials or complete. If no flag is passed, the project will be created as complete. ``` yarn cypress:open:qa:serverless --no-endpoint-addon ``` -The above command will open the Cypress UI with all tests in the `e2e` directory tagged as SERVERLESS. This also creates an MKI project in console.qa enviornment without the endpoint add-on. +The above command will open the Cypress UI with all tests in the `e2e` directory tagged as SERVERLESS. This also creates an MKI project in console.qa environment without the endpoint add-on. ``` yarn cypress:open:qa:serverless --no-cloud-addon ``` -The above command will open the Cypress UI with all tests in the `e2e` directory tagged as SERVERLESS. This also creates an MKI project in console.qa enviornment without the cloud add-on. +The above command will open the Cypress UI with all tests in the `e2e` directory tagged as SERVERLESS. This also creates an MKI project in console.qa environment without the cloud add-on. Note that all the above flags can be combined. diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/revert_prebuilt_rule.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/customization/revert_prebuilt_rule.cy.ts similarity index 84% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/revert_prebuilt_rule.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/customization/revert_prebuilt_rule.cy.ts index ae190e30e7522..f63d638d433fb 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/revert_prebuilt_rule.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/customization/revert_prebuilt_rule.cy.ts @@ -5,34 +5,37 @@ * 2.0. */ -import { RULE_CUSTOMIZATIONS_DIFF_FLYOUT } from '../../../../screens/rule_details_flyout'; -import { RULE_UPGRADE_PER_FIELD_DIFF_LABEL } from '../../../../screens/rule_updates'; -import { POPOVER_ACTIONS_TRIGGER_BUTTON, RULE_NAME_HEADER } from '../../../../screens/rule_details'; -import { getIndexPatterns, getNewRule } from '../../../../objects/rule'; +import { RULE_CUSTOMIZATIONS_DIFF_FLYOUT } from '../../../../../screens/rule_details_flyout'; +import { RULE_UPGRADE_PER_FIELD_DIFF_LABEL } from '../../../../../screens/rule_updates'; +import { + POPOVER_ACTIONS_TRIGGER_BUTTON, + RULE_NAME_HEADER, +} from '../../../../../screens/rule_details'; +import { getIndexPatterns, getNewRule } from '../../../../../objects/rule'; import { expectModifiedRuleBadgeToNotBeDisplayed, revertRuleFromDetailsPage, -} from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../tasks/alerts_detection_rules'; import { RULE_DETAILS_REVERT_RULE_BTN, RULE_DETAILS_REVERT_RULE_TOOLTIP, RULE_NAME, TOASTER_MESSAGE, -} from '../../../../screens/alerts_detection_rules'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +} from '../../../../../screens/alerts_detection_rules'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { deleteAlertsAndRules, deletePrebuiltRulesAssets, -} from '../../../../tasks/api_calls/common'; +} from '../../../../../tasks/api_calls/common'; import { createAndInstallMockedPrebuiltRules, preventPrebuiltRulesPackageInstallation, -} from '../../../../tasks/api_calls/prebuilt_rules'; -import { createRule, patchRule } from '../../../../tasks/api_calls/rules'; +} from '../../../../../tasks/api_calls/prebuilt_rules'; +import { createRule, patchRule } from '../../../../../tasks/api_calls/rules'; -import { login } from '../../../../tasks/login'; +import { login } from '../../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; describe( 'Detection rules, Prebuilt Rules reversion workflow', { diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/rule_customization.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/customization/rule_customization.cy.ts similarity index 92% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/rule_customization.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/customization/rule_customization.cy.ts index 2a584026b120b..c932c5dadb22b 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/rule_customization.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/customization/rule_customization.cy.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { clickRuleUpdatesTab } from '../../../../tasks/prebuilt_rules'; +import { clickRuleUpdatesTab } from '../../../../../tasks/prebuilt_rules'; import { clickUpdateScheduleMenuItem, openBulkEditAddIndexPatternsForm, @@ -23,22 +23,22 @@ import { typeScheduleLookback, typeTags, waitForBulkEditActionToFinish, -} from '../../../../tasks/rules_bulk_actions'; +} from '../../../../../tasks/rules_bulk_actions'; import { ABOUT_EDIT_TAB, ACTIONS_EDIT_TAB, DEFINITION_EDIT_TAB, SCHEDULE_EDIT_TAB, -} from '../../../../screens/create_new_rule'; +} from '../../../../../screens/create_new_rule'; import { ABOUT_RULE_DESCRIPTION, MODIFIED_PREBUILT_RULE_BADGE, MODIFIED_PREBUILT_RULE_BADGE_NO_BASE_VERSION, MODIFIED_PREBUILT_RULE_PER_FIELD_BADGE, RULE_CUSTOMIZATIONS_DIFF_FLYOUT, -} from '../../../../screens/rule_details'; -import { goToRuleEditSettings } from '../../../../tasks/rule_details'; -import { getIndexPatterns, getNewRule } from '../../../../objects/rule'; +} from '../../../../../screens/rule_details'; +import { goToRuleEditSettings } from '../../../../../tasks/rule_details'; +import { getIndexPatterns, getNewRule } from '../../../../../objects/rule'; import { editFirstRule, expectModifiedRuleBadgeToBeDisplayed, @@ -50,25 +50,25 @@ import { filterByCustomRules, filterByElasticRules, selectAllRules, -} from '../../../../tasks/alerts_detection_rules'; -import { MODIFIED_RULE_BADGE, RULE_NAME } from '../../../../screens/alerts_detection_rules'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +} from '../../../../../tasks/alerts_detection_rules'; +import { MODIFIED_RULE_BADGE, RULE_NAME } from '../../../../../screens/alerts_detection_rules'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { deleteAlertsAndRules, deletePrebuiltRulesAssets, -} from '../../../../tasks/api_calls/common'; +} from '../../../../../tasks/api_calls/common'; import { createAndInstallMockedPrebuiltRules, installPrebuiltRuleAssets, preventPrebuiltRulesPackageInstallation, -} from '../../../../tasks/api_calls/prebuilt_rules'; -import { createRule, patchRule } from '../../../../tasks/api_calls/rules'; +} from '../../../../../tasks/api_calls/prebuilt_rules'; +import { createRule, patchRule } from '../../../../../tasks/api_calls/rules'; -import { login } from '../../../../tasks/login'; +import { login } from '../../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; -import { fillDescription, goToAboutStepTab } from '../../../../tasks/create_new_rule'; -import { saveEditedRule } from '../../../../tasks/edit_rule'; +import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; +import { fillDescription, goToAboutStepTab } from '../../../../../tasks/create_new_rule'; +import { saveEditedRule } from '../../../../../tasks/edit_rule'; describe( 'Detection rules, Prebuilt Rules Customization workflow', { diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_error_handling.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_error_handling.cy.ts similarity index 95% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_error_handling.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_error_handling.cy.ts index da20429a21d47..d9ca8df13f11b 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_error_handling.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_error_handling.cy.ts @@ -8,8 +8,8 @@ import { deleteAlertsAndRules, deletePrebuiltRulesAssets, -} from '../../../../tasks/api_calls/common'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +} from '../../../../../tasks/api_calls/common'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { getInstallSingleRuleButtonByRuleId, getUpgradeSingleRuleButtonByRuleId, @@ -19,14 +19,14 @@ import { SELECT_ALL_RULES_ON_PAGE_CHECKBOX, UPGRADE_ALL_RULES_BUTTON, UPGRADE_SELECTED_RULES_BUTTON, -} from '../../../../screens/alerts_detection_rules'; -import { expectRulesInTable, selectRulesByName } from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../screens/alerts_detection_rules'; +import { expectRulesInTable, selectRulesByName } from '../../../../../tasks/alerts_detection_rules'; import { installPrebuiltRuleAssets, createAndInstallMockedPrebuiltRules, preventPrebuiltRulesPackageInstallation, -} from '../../../../tasks/api_calls/prebuilt_rules'; -import { login } from '../../../../tasks/login'; +} from '../../../../../tasks/api_calls/prebuilt_rules'; +import { login } from '../../../../../tasks/login'; import { clickAddElasticRulesButton, assertInstallationRequestIsComplete, @@ -41,8 +41,8 @@ import { assertRuleInstallationSuccessToastShown, assertRuleUpgradeSuccessToastShown, interceptUpgradeRequestToFailPartially, -} from '../../../../tasks/prebuilt_rules'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +} from '../../../../../tasks/prebuilt_rules'; +import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; // https://github.com/elastic/kibana/issues/179970 describe( diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_notifications.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_notifications.cy.ts similarity index 89% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_notifications.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_notifications.cy.ts index 5f35627dd0010..1e7189d709d86 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_notifications.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_notifications.cy.ts @@ -5,25 +5,25 @@ * 2.0. */ -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { ADD_ELASTIC_RULES_BTN, ADD_ELASTIC_RULES_EMPTY_PROMPT_BTN, -} from '../../../../screens/alerts_detection_rules'; -import { deleteFirstRule } from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../screens/alerts_detection_rules'; +import { deleteFirstRule } from '../../../../../tasks/alerts_detection_rules'; import { deleteAlertsAndRules, deletePrebuiltRulesAssets, -} from '../../../../tasks/api_calls/common'; +} from '../../../../../tasks/api_calls/common'; import { installAllPrebuiltRulesRequest, installPrebuiltRuleAssets, installMockEmptyPrebuiltRulesPackage, installSpecificPrebuiltRulesRequest, -} from '../../../../tasks/api_calls/prebuilt_rules'; -import { resetRulesTableState } from '../../../../tasks/common'; -import { login } from '../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +} from '../../../../../tasks/api_calls/prebuilt_rules'; +import { resetRulesTableState } from '../../../../../tasks/common'; +import { login } from '../../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; describe( 'Detection rules, Prebuilt Rules Installation and Update Notifications', diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_update_authorization.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_update_authorization.cy.ts similarity index 94% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_update_authorization.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_update_authorization.cy.ts index bc0b531a156f1..d8c94e951338f 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_update_authorization.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_update_authorization.cy.ts @@ -12,14 +12,14 @@ import { } from '@kbn/security-solution-plugin/common/constants'; import { ROLES } from '@kbn/security-solution-plugin/common/test'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { createAndInstallMockedPrebuiltRules, installPrebuiltRuleAssets, preventPrebuiltRulesPackageInstallation, -} from '../../../../tasks/api_calls/prebuilt_rules'; -import { visit } from '../../../../tasks/navigation'; -import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; +} from '../../../../../tasks/api_calls/prebuilt_rules'; +import { visit } from '../../../../../tasks/navigation'; +import { RULES_MANAGEMENT_URL } from '../../../../../urls/rules_management'; import { ADD_ELASTIC_RULES_BTN, getInstallSingleRuleButtonByRuleId, @@ -31,8 +31,8 @@ import { RULES_UPDATES_TAB, RULE_CHECKBOX, UPGRADE_ALL_RULES_BUTTON, -} from '../../../../screens/alerts_detection_rules'; -import { login } from '../../../../tasks/login'; +} from '../../../../../screens/alerts_detection_rules'; +import { login } from '../../../../../tasks/login'; // Rule to test update const RULE_1_ID = 'rule_1'; diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_via_fleet.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_via_fleet.cy.ts similarity index 78% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_via_fleet.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_via_fleet.cy.ts index 820686f8877ed..c5eb17708ef90 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_via_fleet.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_via_fleet.cy.ts @@ -6,14 +6,17 @@ */ import { BOOTSTRAP_PREBUILT_RULES_URL } from '@kbn/security-solution-plugin/common/api/detection_engine'; -import { installSinglePrebuiltRule } from '../../../../tasks/prebuilt_rules/install_prebuilt_rules'; -import { resetRulesTableState } from '../../../../tasks/common'; -import { RULE_NAME } from '../../../../screens/alerts_detection_rules'; -import { deletePrebuiltRulesFleetPackage } from '../../../../tasks/api_calls/prebuilt_rules'; -import { login } from '../../../../tasks/login'; -import { visitAddRulesPage, visitRulesManagementTable } from '../../../../tasks/rules_management'; -import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; -import { expectManagementTableRules } from '../../../../tasks/alerts_detection_rules'; +import { installSinglePrebuiltRule } from '../../../../../tasks/prebuilt_rules/install_prebuilt_rules'; +import { resetRulesTableState } from '../../../../../tasks/common'; +import { RULE_NAME } from '../../../../../screens/alerts_detection_rules'; +import { deletePrebuiltRulesFleetPackage } from '../../../../../tasks/api_calls/prebuilt_rules'; +import { login } from '../../../../../tasks/login'; +import { + visitAddRulesPage, + visitRulesManagementTable, +} from '../../../../../tasks/rules_management'; +import { deleteAlertsAndRules } from '../../../../../tasks/api_calls/common'; +import { expectManagementTableRules } from '../../../../../tasks/alerts_detection_rules'; const PREBUILT_RULES_PACKAGE_INSTALLATION_TIMEOUT_MS = 120000; // 2 minutes diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_with_preview.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_with_preview.cy.ts similarity index 96% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_with_preview.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_with_preview.cy.ts index df10c9ca3aab7..7bde12682d36a 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_with_preview.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_with_preview.cy.ts @@ -13,27 +13,27 @@ import { AlertSuppression, type ThreatMapping, } from '@kbn/security-solution-plugin/common/api/detection_engine/model/rule_schema'; -import { expectRulesInTable } from '../../../../tasks/alerts_detection_rules'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +import { expectRulesInTable } from '../../../../../tasks/alerts_detection_rules'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { INSTALL_PREBUILT_RULE_BUTTON, INSTALL_PREBUILT_RULE_PREVIEW, RULES_MANAGEMENT_TABLE, -} from '../../../../screens/alerts_detection_rules'; -import { RULE_MANAGEMENT_PAGE_BREADCRUMB } from '../../../../screens/breadcrumbs'; +} from '../../../../../screens/alerts_detection_rules'; +import { RULE_MANAGEMENT_PAGE_BREADCRUMB } from '../../../../../screens/breadcrumbs'; import { installMockPrebuiltRulesPackage, installPrebuiltRuleAssets, -} from '../../../../tasks/api_calls/prebuilt_rules'; -import { createSavedQuery, deleteSavedQueries } from '../../../../tasks/api_calls/saved_queries'; -import { fetchMachineLearningModules } from '../../../../tasks/api_calls/machine_learning'; -import { resetRulesTableState } from '../../../../tasks/common'; -import { login } from '../../../../tasks/login'; +} from '../../../../../tasks/api_calls/prebuilt_rules'; +import { createSavedQuery, deleteSavedQueries } from '../../../../../tasks/api_calls/saved_queries'; +import { fetchMachineLearningModules } from '../../../../../tasks/api_calls/machine_learning'; +import { resetRulesTableState } from '../../../../../tasks/common'; +import { login } from '../../../../../tasks/login'; import { assertRuleInstallationSuccessToastShown, assertRulesNotPresentInAddPrebuiltRulesTable, clickAddElasticRulesButton, -} from '../../../../tasks/prebuilt_rules'; +} from '../../../../../tasks/prebuilt_rules'; import { assertAlertSuppressionPropertiesShown, assertCommonPropertiesShown, @@ -51,14 +51,14 @@ import { assertWindowSizePropertyShown, closePrebuiltRuleInstallFlyout, openPrebuiltRuleInstallFlyoutFor, -} from '../../../../tasks/prebuilt_rules_preview'; -import { visitAddRulesPage } from '../../../../tasks/rules_management'; +} from '../../../../../tasks/prebuilt_rules_preview'; +import { visitAddRulesPage } from '../../../../../tasks/rules_management'; import { deleteAlertsAndRules, deleteDataView, deletePrebuiltRulesAssets, postDataView, -} from '../../../../tasks/api_calls/common'; +} from '../../../../../tasks/api_calls/common'; describe( 'Detection rules, Prebuilt Rules Installation workflow', diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_workflow.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_workflow.cy.ts similarity index 85% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_workflow.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_workflow.cy.ts index 75c83d0aa2dab..c0aec2458a5b6 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/install_workflow.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/install_workflow.cy.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { resetRulesTableState } from '../../../../tasks/common'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +import { resetRulesTableState } from '../../../../../tasks/common'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { getInstallSingleRuleButtonByRuleId, GO_BACK_TO_RULES_TABLE_BUTTON, @@ -16,19 +16,19 @@ import { RULE_CHECKBOX, SELECT_ALL_RULES_ON_PAGE_CHECKBOX, TOASTER, -} from '../../../../screens/alerts_detection_rules'; -import { selectRulesByName } from '../../../../tasks/alerts_detection_rules'; -import { RULE_MANAGEMENT_PAGE_BREADCRUMB } from '../../../../screens/breadcrumbs'; -import { installPrebuiltRuleAssets } from '../../../../tasks/api_calls/prebuilt_rules'; -import { login } from '../../../../tasks/login'; +} from '../../../../../screens/alerts_detection_rules'; +import { selectRulesByName } from '../../../../../tasks/alerts_detection_rules'; +import { RULE_MANAGEMENT_PAGE_BREADCRUMB } from '../../../../../screens/breadcrumbs'; +import { installPrebuiltRuleAssets } from '../../../../../tasks/api_calls/prebuilt_rules'; +import { login } from '../../../../../tasks/login'; import { assertInstallationRequestIsComplete, assertRuleInstallationSuccessToastShown, assertRulesPresentInInstalledRulesTable, clickAddElasticRulesButton, -} from '../../../../tasks/prebuilt_rules'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; -import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; +} from '../../../../../tasks/prebuilt_rules'; +import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; +import { deleteAlertsAndRules } from '../../../../../tasks/api_calls/common'; // Failing: See https://github.com/elastic/kibana/issues/182441 describe.skip( diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/export_prebuilt_rule.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/management/export_prebuilt_rule.cy.ts similarity index 92% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/export_prebuilt_rule.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/management/export_prebuilt_rule.cy.ts index 500db42063e22..d0e6db953230a 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/export_prebuilt_rule.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/management/export_prebuilt_rule.cy.ts @@ -5,28 +5,28 @@ * 2.0. */ -import { bulkExportRules } from '../../../../tasks/rules_bulk_actions'; -import { exportRuleFromDetailsPage, visitRuleDetailsPage } from '../../../../tasks/rule_details'; -import { getCustomQueryRuleParams, getIndexPatterns } from '../../../../objects/rule'; +import { bulkExportRules } from '../../../../../tasks/rules_bulk_actions'; +import { exportRuleFromDetailsPage, visitRuleDetailsPage } from '../../../../../tasks/rule_details'; +import { getCustomQueryRuleParams, getIndexPatterns } from '../../../../../objects/rule'; import { expectManagementTableRules, importRules, selectAllRules, selectRulesByName, -} from '../../../../tasks/alerts_detection_rules'; -import { TOASTER, SUCCESS_TOASTER_BODY } from '../../../../screens/alerts_detection_rules'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +} from '../../../../../tasks/alerts_detection_rules'; +import { TOASTER, SUCCESS_TOASTER_BODY } from '../../../../../screens/alerts_detection_rules'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { deleteAlertsAndRules, deletePrebuiltRulesAssets, -} from '../../../../tasks/api_calls/common'; +} from '../../../../../tasks/api_calls/common'; import { createAndInstallMockedPrebuiltRules, installMockPrebuiltRulesPackage, -} from '../../../../tasks/api_calls/prebuilt_rules'; -import { createRule, patchRule } from '../../../../tasks/api_calls/rules'; -import { login } from '../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +} from '../../../../../tasks/api_calls/prebuilt_rules'; +import { createRule, patchRule } from '../../../../../tasks/api_calls/rules'; +import { login } from '../../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; const PREBUILT_RULE_ID = 'test-prebuilt-rule-a'; diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/import_prebuilt_rule.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/management/import_prebuilt_rule.cy.ts similarity index 85% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/import_prebuilt_rule.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/management/import_prebuilt_rule.cy.ts index 724f979f17509..a362864d792bc 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/import_prebuilt_rule.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/management/import_prebuilt_rule.cy.ts @@ -9,23 +9,23 @@ import { expectManagementTableRules, importRules, importRulesWithOverwriteAll, -} from '../../../../tasks/alerts_detection_rules'; -import { TOASTER } from '../../../../screens/alerts_detection_rules'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; -import { getCustomQueryRuleParams } from '../../../../objects/rule'; -import { combineToNdJson } from '../../../../helpers/ndjson'; +} from '../../../../../tasks/alerts_detection_rules'; +import { TOASTER } from '../../../../../screens/alerts_detection_rules'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; +import { getCustomQueryRuleParams } from '../../../../../objects/rule'; +import { combineToNdJson } from '../../../../../helpers/ndjson'; import { deleteAlertsAndRules, deletePrebuiltRulesAssets, -} from '../../../../tasks/api_calls/common'; -import { createRule } from '../../../../tasks/api_calls/rules'; +} from '../../../../../tasks/api_calls/common'; +import { createRule } from '../../../../../tasks/api_calls/rules'; import { installMockPrebuiltRulesPackage, installPrebuiltRuleAssets, installSpecificPrebuiltRulesRequest, -} from '../../../../tasks/api_calls/prebuilt_rules'; -import { login } from '../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; +} from '../../../../../tasks/api_calls/prebuilt_rules'; +import { login } from '../../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; describe( 'Detection rules, Prebuilt Rules Import workflow - With Rule Customization', diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/management.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/management/management.cy.ts similarity index 92% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/management.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/management/management.cy.ts index 35736e319737f..46b5cedaed15d 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/management.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/management/management.cy.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { COLLAPSED_ACTION_BTN, ELASTIC_RULES_BTN, @@ -15,7 +15,7 @@ import { RULE_SWITCH, SELECT_ALL_RULES_ON_PAGE_CHECKBOX, INSTALL_ALL_RULES_BUTTON, -} from '../../../../screens/alerts_detection_rules'; +} from '../../../../../screens/alerts_detection_rules'; import { deleteFirstRule, disableAutoRefresh, @@ -24,24 +24,24 @@ import { selectRulesByName, waitForPrebuiltDetectionRulesToBeLoaded, waitForRuleToUpdate, -} from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../tasks/alerts_detection_rules'; import { deleteSelectedRules, disableSelectedRules, enableSelectedRules, -} from '../../../../tasks/rules_bulk_actions'; +} from '../../../../../tasks/rules_bulk_actions'; import { createAndInstallMockedPrebuiltRules, getAvailablePrebuiltRulesCount, preventPrebuiltRulesPackageInstallation, -} from '../../../../tasks/api_calls/prebuilt_rules'; +} from '../../../../../tasks/api_calls/prebuilt_rules'; import { deleteAlertsAndRules, deletePrebuiltRulesAssets, -} from '../../../../tasks/api_calls/common'; -import { login } from '../../../../tasks/login'; -import { visit } from '../../../../tasks/navigation'; -import { RULES_MANAGEMENT_URL } from '../../../../urls/rules_management'; +} from '../../../../../tasks/api_calls/common'; +import { login } from '../../../../../tasks/login'; +import { visit } from '../../../../../tasks/navigation'; +import { RULES_MANAGEMENT_URL } from '../../../../../urls/rules_management'; const rules = Array.from(Array(5)).map((_, i) => { return createRuleAssetSavedObject({ diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_error_handling.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_error_handling.cy.ts similarity index 90% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_error_handling.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_error_handling.cy.ts index 852fddd1ba174..fa335a86748d2 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_error_handling.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_error_handling.cy.ts @@ -8,26 +8,26 @@ import { deleteAlertsAndRules, deletePrebuiltRulesAssets, -} from '../../../../tasks/api_calls/common'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +} from '../../../../../tasks/api_calls/common'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { getUpgradeSingleRuleButtonByRuleId, SELECT_ALL_RULES_ON_PAGE_CHECKBOX, UPGRADE_ALL_RULES_BUTTON, UPGRADE_SELECTED_RULES_BUTTON, -} from '../../../../screens/alerts_detection_rules'; -import { selectRulesByName } from '../../../../tasks/alerts_detection_rules'; -import { preventPrebuiltRulesPackageInstallation } from '../../../../tasks/api_calls/prebuilt_rules'; -import { setUpRuleUpgrades } from '../../../../tasks/prebuilt_rules/setup_rule_upgrades'; -import { login } from '../../../../tasks/login'; +} from '../../../../../screens/alerts_detection_rules'; +import { selectRulesByName } from '../../../../../tasks/alerts_detection_rules'; +import { preventPrebuiltRulesPackageInstallation } from '../../../../../tasks/api_calls/prebuilt_rules'; +import { setUpRuleUpgrades } from '../../../../../tasks/prebuilt_rules/setup_rule_upgrades'; +import { login } from '../../../../../tasks/login'; import { interceptUpgradeRequestToFail, assertUpgradeRequestIsComplete, assertRuleUpgradeFailureToastShown, assertRuleUpgradeSuccessToastShown, interceptUpgradeRequestToFailPartially, -} from '../../../../tasks/prebuilt_rules'; -import { visitRulesUpgradeTable } from '../../../../tasks/rules_management'; +} from '../../../../../tasks/prebuilt_rules'; +import { visitRulesUpgradeTable } from '../../../../../tasks/rules_management'; describe( 'Detection rules, Prebuilt Rules Upgrade - Error handling', diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_notifications.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_notifications.cy.ts similarity index 93% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_notifications.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_notifications.cy.ts index 1a9fbca5a4758..ffe2de61b0777 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_notifications.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_notifications.cy.ts @@ -5,33 +5,33 @@ * 2.0. */ -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { ADD_ELASTIC_RULES_EMPTY_PROMPT_BTN, RULES_UPDATES_TAB, RULES_UPDATES_TABLE, UPDATE_PREBUILT_RULE_PREVIEW, -} from '../../../../screens/alerts_detection_rules'; +} from '../../../../../screens/alerts_detection_rules'; import { PREBUILT_RULES_UPGRADE_REMINDER_CALLOUT, SINGLE_PREBUILT_RULE_UPGRADE_REMINDER_CALLOUT, -} from '../../../../screens/prebuilt_rules_upgrade'; -import { expectManagementTableRules } from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../screens/prebuilt_rules_upgrade'; +import { expectManagementTableRules } from '../../../../../tasks/alerts_detection_rules'; import { deleteAlertsAndRules, deletePrebuiltRulesAssets, -} from '../../../../tasks/api_calls/common'; +} from '../../../../../tasks/api_calls/common'; import { installPrebuiltRuleAssets, installMockEmptyPrebuiltRulesPackage, installSpecificPrebuiltRulesRequest, -} from '../../../../tasks/api_calls/prebuilt_rules'; -import { resetRulesTableState } from '../../../../tasks/common'; -import { login } from '../../../../tasks/login'; -import { visitRulesManagementTable } from '../../../../tasks/rules_management'; -import { visitRuleDetailsPage } from '../../../../tasks/rule_details'; -import { visitRuleEditPage } from '../../../../tasks/edit_rule'; -import { EDIT_RULE_SETTINGS_LINK } from '../../../../screens/rule_details'; +} from '../../../../../tasks/api_calls/prebuilt_rules'; +import { resetRulesTableState } from '../../../../../tasks/common'; +import { login } from '../../../../../tasks/login'; +import { visitRulesManagementTable } from '../../../../../tasks/rules_management'; +import { visitRuleDetailsPage } from '../../../../../tasks/rule_details'; +import { visitRuleEditPage } from '../../../../../tasks/edit_rule'; +import { EDIT_RULE_SETTINGS_LINK } from '../../../../../screens/rule_details'; describe( 'Detection rules, Prebuilt Rules Upgrade Notifications', diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_with_preview.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_with_preview.cy.ts similarity index 98% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_with_preview.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_with_preview.cy.ts index 4a678a2f761eb..8e3dfb102929f 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_with_preview.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_with_preview.cy.ts @@ -15,8 +15,8 @@ import { type ThreatMapping, } from '@kbn/security-solution-plugin/common/api/detection_engine/model/rule_schema'; import { getPrebuiltRuleMockOfType } from '@kbn/security-solution-plugin/server/lib/detection_engine/prebuilt_rules/mocks'; -import { setUpRuleUpgrades } from '../../../../tasks/prebuilt_rules/setup_rule_upgrades'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +import { setUpRuleUpgrades } from '../../../../../tasks/prebuilt_rules/setup_rule_upgrades'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { UPDATE_PREBUILT_RULE_PREVIEW, UPDATE_PREBUILT_RULE_BUTTON, @@ -24,17 +24,17 @@ import { PER_FIELD_DIFF_WRAPPER, PER_FIELD_DIFF_DEFINITION_SECTION, RULES_MANAGEMENT_TABLE, -} from '../../../../screens/alerts_detection_rules'; -import { installMockPrebuiltRulesPackage } from '../../../../tasks/api_calls/prebuilt_rules'; -import { createSavedQuery, deleteSavedQueries } from '../../../../tasks/api_calls/saved_queries'; -import { fetchMachineLearningModules } from '../../../../tasks/api_calls/machine_learning'; -import { resetRulesTableState } from '../../../../tasks/common'; -import { login } from '../../../../tasks/login'; +} from '../../../../../screens/alerts_detection_rules'; +import { installMockPrebuiltRulesPackage } from '../../../../../tasks/api_calls/prebuilt_rules'; +import { createSavedQuery, deleteSavedQueries } from '../../../../../tasks/api_calls/saved_queries'; +import { fetchMachineLearningModules } from '../../../../../tasks/api_calls/machine_learning'; +import { resetRulesTableState } from '../../../../../tasks/common'; +import { login } from '../../../../../tasks/login'; import { assertRulesNotPresentInRuleUpdatesTable, assertRuleUpgradeSuccessToastShown, clickRuleUpdatesTab, -} from '../../../../tasks/prebuilt_rules'; +} from '../../../../../tasks/prebuilt_rules'; import { assertAlertSuppressionPropertiesShown, assertCommonPropertiesShown, @@ -54,19 +54,19 @@ import { openPrebuiltRuleUpgradeFlyoutFor, selectPreviewTab, closePrebuiltRuleUpgradeFlyout, -} from '../../../../tasks/prebuilt_rules_preview'; +} from '../../../../../tasks/prebuilt_rules_preview'; import { visitRulesManagementTable, visitRulesUpgradeTable, -} from '../../../../tasks/rules_management'; +} from '../../../../../tasks/rules_management'; import { deleteAlertsAndRules, deleteDataView, deletePrebuiltRulesAssets, postDataView, -} from '../../../../tasks/api_calls/common'; -import { enableRules, waitForRulesToFinishExecution } from '../../../../tasks/api_calls/rules'; -import { expectRulesInTable, goToRuleDetailsOf } from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../tasks/api_calls/common'; +import { enableRules, waitForRulesToFinishExecution } from '../../../../../tasks/api_calls/rules'; +import { expectRulesInTable, goToRuleDetailsOf } from '../../../../../tasks/alerts_detection_rules'; import { acceptFieldValue, cancelFieldValue, @@ -74,7 +74,7 @@ import { switchFieldToEditMode, toggleFieldAccordion, typeRuleName, -} from '../../../../tasks/prebuilt_rules/prebuilt_rules_upgrade_flyout'; +} from '../../../../../tasks/prebuilt_rules/prebuilt_rules_upgrade_flyout'; const PREVIEW_TABS = { OVERVIEW: 'Overview', diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_with_preview_basic_license.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_with_preview_basic_license.cy.ts similarity index 85% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_with_preview_basic_license.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_with_preview_basic_license.cy.ts index 9ca3ba2710383..4698bd4d350b4 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_with_preview_basic_license.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_with_preview_basic_license.cy.ts @@ -5,33 +5,33 @@ * 2.0. */ -import { downgradeLicenseToBasic } from '../../../../tasks/license'; -import { setUpRuleUpgrades } from '../../../../tasks/prebuilt_rules/setup_rule_upgrades'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +import { downgradeLicenseToBasic } from '../../../../../tasks/license'; +import { setUpRuleUpgrades } from '../../../../../tasks/prebuilt_rules/setup_rule_upgrades'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { UPDATE_PREBUILT_RULE_PREVIEW, UPDATE_PREBUILT_RULE_BUTTON, FIELD_UPGRADE_WRAPPER, RULES_MANAGEMENT_TABLE, TAGS_PROPERTY_VALUE_ITEM, -} from '../../../../screens/alerts_detection_rules'; -import { installMockPrebuiltRulesPackage } from '../../../../tasks/api_calls/prebuilt_rules'; -import { resetRulesTableState } from '../../../../tasks/common'; -import { login } from '../../../../tasks/login'; +} from '../../../../../screens/alerts_detection_rules'; +import { installMockPrebuiltRulesPackage } from '../../../../../tasks/api_calls/prebuilt_rules'; +import { resetRulesTableState } from '../../../../../tasks/common'; +import { login } from '../../../../../tasks/login'; import { assertRulesNotPresentInRuleUpdatesTable, assertRuleUpgradeSuccessToastShown, -} from '../../../../tasks/prebuilt_rules'; -import { openPrebuiltRuleUpgradeFlyoutFor } from '../../../../tasks/prebuilt_rules_preview'; +} from '../../../../../tasks/prebuilt_rules'; +import { openPrebuiltRuleUpgradeFlyoutFor } from '../../../../../tasks/prebuilt_rules_preview'; import { visitRulesManagementTable, visitRulesUpgradeTable, -} from '../../../../tasks/rules_management'; +} from '../../../../../tasks/rules_management'; import { deleteAlertsAndRules, deletePrebuiltRulesAssets, -} from '../../../../tasks/api_calls/common'; -import { expectRulesInTable, goToRuleDetailsOf } from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../tasks/api_calls/common'; +import { expectRulesInTable, goToRuleDetailsOf } from '../../../../../tasks/alerts_detection_rules'; describe( 'Detection rules, Prebuilt Rules Upgrade With Preview (Basic License)', diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_without_preview.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_without_preview.cy.ts similarity index 96% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_without_preview.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_without_preview.cy.ts index 9acf50ba6a6c5..d4b859b1f4ccf 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_without_preview.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_without_preview.cy.ts @@ -7,9 +7,9 @@ import { getPrebuiltRuleMockOfType } from '@kbn/security-solution-plugin/server/lib/detection_engine/prebuilt_rules/mocks'; import { ROLES } from '@kbn/security-solution-plugin/common/test'; -import { IS_SERVERLESS } from '../../../../env_var_names_constants'; -import { waitForPageTitleToBeShown } from '../../../../tasks/alert_assignments'; -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +import { IS_SERVERLESS } from '../../../../../env_var_names_constants'; +import { waitForPageTitleToBeShown } from '../../../../../tasks/alert_assignments'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { getReviewSingleRuleButtonByRuleId, getUpgradeSingleRuleButtonByRuleId, @@ -24,31 +24,31 @@ import { CONFLICTS_MODAL_CANCEL, RULES_UPDATES_TABLE, MODIFIED_RULE_BADGE, -} from '../../../../screens/alerts_detection_rules'; +} from '../../../../../screens/alerts_detection_rules'; import { expectRulesInTable, goToRuleDetailsOf, selectRulesByName, -} from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../tasks/alerts_detection_rules'; import { deleteAlertsAndRules, deletePrebuiltRulesAssets, -} from '../../../../tasks/api_calls/common'; -import { installMockPrebuiltRulesPackage } from '../../../../tasks/api_calls/prebuilt_rules'; -import { setUpRuleUpgrades } from '../../../../tasks/prebuilt_rules/setup_rule_upgrades'; -import { resetRulesTableState } from '../../../../tasks/common'; -import { login } from '../../../../tasks/login'; +} from '../../../../../tasks/api_calls/common'; +import { installMockPrebuiltRulesPackage } from '../../../../../tasks/api_calls/prebuilt_rules'; +import { setUpRuleUpgrades } from '../../../../../tasks/prebuilt_rules/setup_rule_upgrades'; +import { resetRulesTableState } from '../../../../../tasks/common'; +import { login } from '../../../../../tasks/login'; import { assertRulesNotPresentInRuleUpdatesTable, assertRuleUpgradeSuccessToastShown, assertUpgradeRequestIsComplete, clickRuleUpdatesTab, filterPrebuiltRulesUpdateTableByRuleCustomization, -} from '../../../../tasks/prebuilt_rules'; +} from '../../../../../tasks/prebuilt_rules'; import { visitRulesManagementTable, visitRulesUpgradeTable, -} from '../../../../tasks/rules_management'; +} from '../../../../../tasks/rules_management'; describe( 'Detection rules, Prebuilt Rules Upgrade Without Preview', diff --git a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_without_preview_basic_license.cy.ts b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_without_preview_basic_license.cy.ts similarity index 84% rename from x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_without_preview_basic_license.cy.ts rename to x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_without_preview_basic_license.cy.ts index 52daf7f0fbd82..c73f097b03cce 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade_without_preview_basic_license.cy.ts +++ b/x-pack/solutions/security/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/upgrade_without_preview_basic_license.cy.ts @@ -5,30 +5,30 @@ * 2.0. */ -import { createRuleAssetSavedObject } from '../../../../helpers/rules'; +import { createRuleAssetSavedObject } from '../../../../../helpers/rules'; import { RULES_MANAGEMENT_TABLE, TAGS_PROPERTY_VALUE_ITEM, UPGRADE_ALL_RULES_BUTTON, -} from '../../../../screens/alerts_detection_rules'; -import { expectRulesInTable, goToRuleDetailsOf } from '../../../../tasks/alerts_detection_rules'; +} from '../../../../../screens/alerts_detection_rules'; +import { expectRulesInTable, goToRuleDetailsOf } from '../../../../../tasks/alerts_detection_rules'; import { deleteAlertsAndRules, deletePrebuiltRulesAssets, -} from '../../../../tasks/api_calls/common'; -import { installMockPrebuiltRulesPackage } from '../../../../tasks/api_calls/prebuilt_rules'; -import { setUpRuleUpgrades } from '../../../../tasks/prebuilt_rules/setup_rule_upgrades'; -import { resetRulesTableState } from '../../../../tasks/common'; -import { login } from '../../../../tasks/login'; +} from '../../../../../tasks/api_calls/common'; +import { installMockPrebuiltRulesPackage } from '../../../../../tasks/api_calls/prebuilt_rules'; +import { setUpRuleUpgrades } from '../../../../../tasks/prebuilt_rules/setup_rule_upgrades'; +import { resetRulesTableState } from '../../../../../tasks/common'; +import { login } from '../../../../../tasks/login'; import { assertRulesNotPresentInRuleUpdatesTable, assertRuleUpgradeSuccessToastShown, -} from '../../../../tasks/prebuilt_rules'; +} from '../../../../../tasks/prebuilt_rules'; import { visitRulesManagementTable, visitRulesUpgradeTable, -} from '../../../../tasks/rules_management'; -import { downgradeLicenseToBasic } from '../../../../tasks/license'; +} from '../../../../../tasks/rules_management'; +import { downgradeLicenseToBasic } from '../../../../../tasks/license'; describe('Detection rules, Prebuilt Rules Upgrade Without Preview', { tags: ['@ess'] }, () => { before(() => { diff --git a/x-pack/solutions/security/test/security_solution_cypress/package.json b/x-pack/solutions/security/test/security_solution_cypress/package.json index 7f99024711489..05ea3cba989c8 100644 --- a/x-pack/solutions/security/test/security_solution_cypress/package.json +++ b/x-pack/solutions/security/test/security_solution_cypress/package.json @@ -6,13 +6,20 @@ "license": "Elastic License 2.0", "scripts": { "cypress": "../../../../../node_modules/.bin/cypress", + "junit:merge": "../../../../../node_modules/.bin/mochawesome-merge ../../../../../target/kibana-security-solution/cypress/results/mochawesome*.json > ../../../../../target/kibana-security-solution/cypress/results/output.json && ../../../../../node_modules/.bin/marge ../../../../../target/kibana-security-solution/cypress/results/output.json --reportDir ../../../../../target/kibana-security-solution/cypress/results && yarn junit:transform && mkdir -p ../../../../../target/junit && cp ../../../../../target/kibana-security-solution/cypress/results/*.xml ../../../../../target/junit/", + "junit:transform": "node ../../plugins/security_solution/scripts/junit_transformer --pathPattern '../../../../../target/kibana-security-solution/cypress/results/*.xml' --rootDirectory ../../../../../ --reportName 'Security Solution Cypress' --writeInPlace", + + "cypress:open:ess": "TZ=UTC node ../../plugins/security_solution/scripts/start_cypress_parallel open --spec './cypress/e2e/**/*.cy.ts' --config-file ./test/security_solution_cypress/cypress/cypress.config.ts --ftr-config-file ./cli_config", "cypress:asset_inventory:run:ess": "yarn cypress:ess --spec '.cypress/screens/asset_inventory/**/*.cy.ts'", "cypress:entity_analytics:run:ess": "yarn cypress:ess --spec './cypress/e2e/entity_analytics/**/*.cy.ts'", "cypress:run:cases:ess": "yarn cypress:ess --spec './cypress/e2e/explore/cases/*.cy.ts'", "cypress:ess": "TZ=UTC node ../../plugins/security_solution/scripts/start_cypress_parallel run --config-file ./test/security_solution_cypress/cypress/cypress_ci.config.ts --ftr-config-file ./cli_config", "cypress:rule_management:run:ess": "yarn cypress:ess --spec './cypress/e2e/detection_response/rule_management/!(prebuilt_rules)/**/*.cy.ts'", - "cypress:rule_management:prebuilt_rules:run:ess": "yarn cypress:ess --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/**/*.cy.ts'", + "cypress:rule_management:prebuilt_rules:management:run:ess": "yarn cypress:ess --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/management/**/*.cy.ts'", + "cypress:rule_management:prebuilt_rules:installation:run:ess": "yarn cypress:ess --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/**/*.cy.ts'", + "cypress:rule_management:prebuilt_rules:upgrade:run:ess": "yarn cypress:ess --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/**/*.cy.ts'", + "cypress:rule_management:prebuilt_rules:customization:run:ess": "yarn cypress:ess --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/customization/**/*.cy.ts'", "cypress:detection_engine:run:ess": "yarn cypress:ess --spec './cypress/e2e/detection_response/detection_engine/!(exceptions)/**/*.cy.ts'", "cypress:detection_engine:exceptions:run:ess": "yarn cypress:ess --spec './cypress/e2e/detection_response/detection_engine/exceptions/**/*.cy.ts'", "cypress:ai_assistant:run:ess": "yarn cypress:ess --spec './cypress/e2e/ai_assistant/**/*.cy.ts'", @@ -22,8 +29,6 @@ "cypress:changed-specs-only:ess": "yarn cypress:ess --changed-specs-only --env burn=5", "cypress:cloud_security_posture:run:ess": "yarn cypress:ess --spec './cypress/e2e/cloud_security_posture/**/*.cy.ts'", "cypress:burn:ess": "yarn cypress:ess --env burn=5", - "junit:merge": "../../../../../node_modules/.bin/mochawesome-merge ../../../../../target/kibana-security-solution/cypress/results/mochawesome*.json > ../../../../../target/kibana-security-solution/cypress/results/output.json && ../../../../../node_modules/.bin/marge ../../../../../target/kibana-security-solution/cypress/results/output.json --reportDir ../../../../../target/kibana-security-solution/cypress/results && yarn junit:transform && mkdir -p ../../../../../target/junit && cp ../../../../../target/kibana-security-solution/cypress/results/*.xml ../../../../../target/junit/", - "junit:transform": "node ../../plugins/security_solution/scripts/junit_transformer --pathPattern '../../../../../target/kibana-security-solution/cypress/results/*.xml' --rootDirectory ../../../../../ --reportName 'Security Solution Cypress' --writeInPlace", "cypress:serverless": "TZ=UTC node ../../plugins/security_solution/scripts/start_cypress_parallel --config-file ./test/security_solution_cypress/cypress/cypress_ci_serverless.config.ts --ftr-config-file ./serverless_config", "cypress:ai4dsoc:serverless": "TZ=UTC node ../../plugins/security_solution/scripts/start_cypress_parallel --config-file ./test/security_solution_cypress/cypress/cypress_ci_serverless.config.ts --ftr-config-file ./ai4dsoc_serverless_config", "cypress:asset_inventory:run:serverless": "yarn cypress:serverless --spec './cypress/screens/asset_inventory/**/*.cy.ts'", @@ -33,7 +38,10 @@ "cypress:open:ai4dsoc:serverless": "yarn cypress:ai4dsoc:serverless open --config-file ./test/security_solution_cypress/cypress/cypress_serverless.config.ts --spec './cypress/e2e/ai4dsoc/**/*.cy.ts'", "cypress:entity_analytics:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/entity_analytics/**/*.cy.ts'", "cypress:rule_management:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/rule_management/!(prebuilt_rules)/**/*.cy.ts'", - "cypress:rule_management:prebuilt_rules:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/**/*.cy.ts'", + "cypress:rule_management:prebuilt_rules:management:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/management/**/*.cy.ts'", + "cypress:rule_management:prebuilt_rules:installation:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/installation/**/*.cy.ts'", + "cypress:rule_management:prebuilt_rules:upgrade:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/upgrade/**/*.cy.ts'", + "cypress:rule_management:prebuilt_rules:customization:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/rule_management/prebuilt_rules/customization/**/*.cy.ts'", "cypress:detection_engine:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/detection_engine/!(exceptions)/**/*.cy.ts'", "cypress:detection_engine:exceptions:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/detection_response/detection_engine/exceptions/**/*.cy.ts'", "cypress:ai_assistant:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/ai_assistant/**/*.cy.ts'",