[9.0] [Security Solution] Add rule upgrade preview FE integration tests (Rule Upgrade Flyout) (#210377)#219828
Merged
kibanamachine merged 1 commit intoelastic:9.0from May 1, 2025
Conversation
…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)
Collaborator
🎉 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) |
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-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto9.0:Questions ?
Please refer to the Backport tool documentation