Skip to content

[9.0] [Security Solution] Add rule upgrade preview FE integration tests (Rule Upgrade Flyout) (#210377)#219828

Merged
kibanamachine merged 1 commit intoelastic:9.0from
kibanamachine:backport/9.0/pr-210377
May 1, 2025
Merged

[9.0] [Security Solution] Add rule upgrade preview FE integration tests (Rule Upgrade Flyout) (#210377)#219828
kibanamachine merged 1 commit intoelastic:9.0from
kibanamachine:backport/9.0/pr-210377

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

…le Upgrade Flyout) (elastic#210377)

**Partially addresses:** elastic#205645

## Summary

This PR implements Frontend integration tests from the [upgrading prebuilt rules one-by-one with preview test plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).

## Details

This PR add Jest integration tests (`@kbn/test/jest_integration` preset) for Rule Upgrade Flyout. Test scenarios are described in [upgrading prebuilt rules one-by-one with preview test plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).

Tests cover each `diffable rule` field separately to guarantee visibility on broken functionality.

`esql_query` and `threat_mapping` fields were skipped due to mocking difficulties.

### Tests setup

- Rules Management page is used as the root component to test functionality in integration
- HTTP responses are mocked via mocking return values from `Kibana.http.fetch()` method
- Test scenarios are the same for each diffable rule field and moved out to reusable utility functions

(cherry picked from commit ea7ccca)
@prodsecmachine
Copy link
Copy Markdown
Collaborator

prodsecmachine commented May 1, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@kibanamachine kibanamachine merged commit d9fb304 into elastic:9.0 May 1, 2025
13 checks passed
maximpn added a commit that referenced this pull request Jul 3, 2025
…sts (Rule Upgrade Flyout) (#210377) (#225549)

# Backport

This will backport the following commits from `main` to `8.18`:
 - [[Security Solution] Add rule upgrade preview FE integration tests (Rule Upgrade Flyout) (#210377)](#210377)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Maxim Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2025-05-01T09:39:17Z","message":"[Security Solution] Add rule upgrade preview FE integration tests (Rule Upgrade Flyout) (#210377)\n\n**Partially addresses:** https://github.com/elastic/kibana/pull/205645\n\n## Summary\n\nThis PR implements Frontend integration tests from the [upgrading prebuilt rules one-by-one with preview test plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\n## Details\n\nThis PR add Jest integration tests (`@kbn/test/jest_integration` preset) for Rule Upgrade Flyout. Test scenarios are described in [upgrading prebuilt rules one-by-one with preview test plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\nTests cover each `diffable rule` field separately to guarantee visibility on broken functionality.\n\n`esql_query` and `threat_mapping` fields were skipped due to mocking difficulties.\n\n### Tests setup\n\n- Rules Management page is used as the root component to test functionality in integration\n- HTTP responses are mocked via mocking return values from `Kibana.http.fetch()` method\n- Test scenarios are the same for each diffable rule field and moved out to reusable utility functions","sha":"ea7cccab0884923d46e9bcf3a2b4106b0c3dd0f2","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","impact:high","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v8.18.0","v9.1.0","v8.19.0","v9.0.2"],"title":"[Security Solution] Add rule upgrade preview FE integration tests (Rule Upgrade Flyout)","number":210377,"url":"https://github.com/elastic/kibana/pull/210377","mergeCommit":{"message":"[Security Solution] Add rule upgrade preview FE integration tests (Rule Upgrade Flyout) (#210377)\n\n**Partially addresses:** https://github.com/elastic/kibana/pull/205645\n\n## Summary\n\nThis PR implements Frontend integration tests from the [upgrading prebuilt rules one-by-one with preview test plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\n## Details\n\nThis PR add Jest integration tests (`@kbn/test/jest_integration` preset) for Rule Upgrade Flyout. Test scenarios are described in [upgrading prebuilt rules one-by-one with preview test plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\nTests cover each `diffable rule` field separately to guarantee visibility on broken functionality.\n\n`esql_query` and `threat_mapping` fields were skipped due to mocking difficulties.\n\n### Tests setup\n\n- Rules Management page is used as the root component to test functionality in integration\n- HTTP responses are mocked via mocking return values from `Kibana.http.fetch()` method\n- Test scenarios are the same for each diffable rule field and moved out to reusable utility functions","sha":"ea7cccab0884923d46e9bcf3a2b4106b0c3dd0f2"}},"sourceBranch":"main","suggestedTargetBranches":["8.18","8.19"],"targetPullRequestStates":[{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210377","number":210377,"mergeCommit":{"message":"[Security Solution] Add rule upgrade preview FE integration tests (Rule Upgrade Flyout) (#210377)\n\n**Partially addresses:** https://github.com/elastic/kibana/pull/205645\n\n## Summary\n\nThis PR implements Frontend integration tests from the [upgrading prebuilt rules one-by-one with preview test plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\n## Details\n\nThis PR add Jest integration tests (`@kbn/test/jest_integration` preset) for Rule Upgrade Flyout. Test scenarios are described in [upgrading prebuilt rules one-by-one with preview test plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\nTests cover each `diffable rule` field separately to guarantee visibility on broken functionality.\n\n`esql_query` and `threat_mapping` fields were skipped due to mocking difficulties.\n\n### Tests setup\n\n- Rules Management page is used as the root component to test functionality in integration\n- HTTP responses are mocked via mocking return values from `Kibana.http.fetch()` method\n- Test scenarios are the same for each diffable rule field and moved out to reusable utility functions","sha":"ea7cccab0884923d46e9bcf3a2b4106b0c3dd0f2"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/219828","number":219828,"state":"MERGED","mergeCommit":{"sha":"d9fb3045212de2593577f738b10ee31dfd896a46","message":"[9.0] [Security Solution] Add rule upgrade preview FE integration tests (Rule Upgrade Flyout) (#210377) (#219828)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.0`:\n- [[Security Solution] Add rule upgrade preview FE integration tests\n(Rule Upgrade Flyout)\n(#210377)](https://github.com/elastic/kibana/pull/210377)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Maxim Palenov <maxim.palenov@elastic.co>"}}]}] BACKPORT-->
maximpn added a commit that referenced this pull request Jul 4, 2025
…sts (Rule Upgrade Flyout) (#210377) (#225548)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Security Solution] Add rule upgrade preview FE integration tests
(Rule Upgrade Flyout)
(#210377)](#210377)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Maxim
Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2025-05-01T09:39:17Z","message":"[Security
Solution] Add rule upgrade preview FE integration tests (Rule Upgrade
Flyout) (#210377)\n\n**Partially addresses:**
https://github.com/elastic/kibana/pull/205645\n\n## Summary\n\nThis PR
implements Frontend integration tests from the [upgrading prebuilt rules
one-by-one with preview test
plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\n##
Details\n\nThis PR add Jest integration tests
(`@kbn/test/jest_integration` preset) for Rule Upgrade Flyout. Test
scenarios are described in [upgrading prebuilt rules one-by-one with
preview test
plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\nTests
cover each `diffable rule` field separately to guarantee visibility on
broken functionality.\n\n`esql_query` and `threat_mapping` fields were
skipped due to mocking difficulties.\n\n### Tests setup\n\n- Rules
Management page is used as the root component to test functionality in
integration\n- HTTP responses are mocked via mocking return values from
`Kibana.http.fetch()` method\n- Test scenarios are the same for each
diffable rule field and moved out to reusable utility
functions","sha":"ea7cccab0884923d46e9bcf3a2b4106b0c3dd0f2","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","impact:high","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection
Rules","backport:version","v8.18.0","v9.1.0","v8.19.0","v9.0.2"],"title":"[Security
Solution] Add rule upgrade preview FE integration tests (Rule Upgrade
Flyout)","number":210377,"url":"https://github.com/elastic/kibana/pull/210377","mergeCommit":{"message":"[Security
Solution] Add rule upgrade preview FE integration tests (Rule Upgrade
Flyout) (#210377)\n\n**Partially addresses:**
https://github.com/elastic/kibana/pull/205645\n\n## Summary\n\nThis PR
implements Frontend integration tests from the [upgrading prebuilt rules
one-by-one with preview test
plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\n##
Details\n\nThis PR add Jest integration tests
(`@kbn/test/jest_integration` preset) for Rule Upgrade Flyout. Test
scenarios are described in [upgrading prebuilt rules one-by-one with
preview test
plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\nTests
cover each `diffable rule` field separately to guarantee visibility on
broken functionality.\n\n`esql_query` and `threat_mapping` fields were
skipped due to mocking difficulties.\n\n### Tests setup\n\n- Rules
Management page is used as the root component to test functionality in
integration\n- HTTP responses are mocked via mocking return values from
`Kibana.http.fetch()` method\n- Test scenarios are the same for each
diffable rule field and moved out to reusable utility
functions","sha":"ea7cccab0884923d46e9bcf3a2b4106b0c3dd0f2"}},"sourceBranch":"main","suggestedTargetBranches":["8.18","8.19"],"targetPullRequestStates":[{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210377","number":210377,"mergeCommit":{"message":"[Security
Solution] Add rule upgrade preview FE integration tests (Rule Upgrade
Flyout) (#210377)\n\n**Partially addresses:**
https://github.com/elastic/kibana/pull/205645\n\n## Summary\n\nThis PR
implements Frontend integration tests from the [upgrading prebuilt rules
one-by-one with preview test
plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\n##
Details\n\nThis PR add Jest integration tests
(`@kbn/test/jest_integration` preset) for Rule Upgrade Flyout. Test
scenarios are described in [upgrading prebuilt rules one-by-one with
preview test
plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\nTests
cover each `diffable rule` field separately to guarantee visibility on
broken functionality.\n\n`esql_query` and `threat_mapping` fields were
skipped due to mocking difficulties.\n\n### Tests setup\n\n- Rules
Management page is used as the root component to test functionality in
integration\n- HTTP responses are mocked via mocking return values from
`Kibana.http.fetch()` method\n- Test scenarios are the same for each
diffable rule field and moved out to reusable utility
functions","sha":"ea7cccab0884923d46e9bcf3a2b4106b0c3dd0f2"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/219828","number":219828,"state":"MERGED","mergeCommit":{"sha":"d9fb3045212de2593577f738b10ee31dfd896a46","message":"[9.0]
[Security Solution] Add rule upgrade preview FE integration tests (Rule
Upgrade Flyout) (#210377) (#219828)\n\n# Backport\n\nThis will backport
the following commits from `main` to `9.0`:\n- [[Security Solution] Add
rule upgrade preview FE integration tests\n(Rule Upgrade
Flyout)\n(#210377)](https://github.com/elastic/kibana/pull/210377)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Maxim Palenov <maxim.palenov@elastic.co>"}}]}] BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants