Open
Description
Epics: https://github.com/elastic/security-team/issues/1974 (internal), #174168
Summary
Write test plans (one or a few) and create a comprehensive suite of automated tests for the workflow of customizing prebuilt rules.
Features to cover:
- Editing prebuilt rules (actions as a whole)
- from the Rule Details page
- from the Rule Management page (single edit via the context menu)
- from the Rule Management page (bulk edit via the bulk actions menu)
- I think every bulk editing action should be smoke tested
- Calculating the
is_customized
field and theModified
badge in the UI- on the Rule Details page
- on the Rule Management page -> Installed Rules table
- on the Rule Management page -> Rule Updates table
- filtering by
Modified
in the Rule Updates table
- Editing prebuilt rules and calculating
is_customized
- per each rule field - in API and UI- name
- description
- etc - I feel that we need to cover literally every rule field
Please cover both the features under the feature flag turned ON and OFF.
Related tickets
Related functional tickets to cover with tests:
- [Security Solution] Calculate and save
ruleSource.isCustomized
in API endpoint handlers #180145 - [Security Solution] Calculate and save
ruleSource.isCustomized
in bulk edit API #187706 - [Security Solution] Prevent from updating "non-customizable" fields in prebuilt rules #180273
- [Security Solution] Show if a rule is customized on the Rule Details page #180170
- [Security Solution] Support filtering by "Modified rules" and "Unmodified rules" #180169
- [Security Solution] Add support for editing prebuilt rules to the Rule Management and Rule Details pages #180171
- [Security Solution] Add support for editing prebuilt rules to the Rule Editing page #180172
Related bugs to cover with tests:
- [Security Solution] Rules mistakenly marked as customized #199629
- [Security Solution] Required fields are getting erased on rule PATCH #199665
- [Security Solution] Prebuilt rules with missing base version are marked as customized on edit #201632
- [Security Solution] Prebuilt rules marked as customized after applying updates #201631
- [Security Solution] “Author” and “License” Fields Are Editable in UI but Result in Errors When Updated #200251
- [Security Solution] Editing rules independently of source data: improve validation errors UX #191832
- Anything else from Milestone 3 bugs under the corresponding section