Skip to content

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

Merged
maximpn merged 5 commits intoelastic:8.18from
maximpn:backport/8.18/pr-210377
Jul 3, 2025
Merged

[8.18] [Security Solution] Add rule upgrade preview FE integration tests (Rule Upgrade Flyout) (#210377)#225549
maximpn merged 5 commits intoelastic:8.18from
maximpn:backport/8.18/pr-210377

Conversation

@maximpn
Copy link
Copy Markdown
Contributor

@maximpn maximpn commented Jun 26, 2025

Backport

This will backport the following commits from main to 8.18:

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)

# Conflicts:
#	x-pack/solutions/security/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts
@maximpn maximpn requested a review from kibanamachine as a code owner June 26, 2025 20:19
@maximpn maximpn added the backport This PR is a backport of another PR label Jun 26, 2025
@maximpn maximpn enabled auto-merge (squash) June 26, 2025 20:19
@maximpn maximpn closed this Jul 3, 2025
auto-merge was automatically disabled July 3, 2025 07:19

Pull request was closed

@maximpn maximpn reopened this Jul 3, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 9.1MB 9.1MB +495.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 588 590 +2

Total ESLint disabled count

id before after diff
securitySolution 671 673 +2

History

@maximpn maximpn merged commit ff09b8b into elastic:8.18 Jul 3, 2025
9 checks passed
@maximpn maximpn deleted the backport/8.18/pr-210377 branch July 3, 2025 20:53
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