|
1 | 1 | # Test plan: exporting prebuilt rules <!-- omit from toc --> |
2 | 2 |
|
3 | | -**Status**: `in progress`, matches [Milestone 3](https://github.com/elastic/kibana/issues/174168). |
| 3 | +**Status**: `implemented`, matches [Milestone 3](https://github.com/elastic/kibana/issues/174168). |
4 | 4 |
|
5 | 5 | > [!TIP] |
6 | 6 | > If you're new to prebuilt rules, get started [here](./prebuilt_rules.md) and check an overview of the features of prebuilt rules in [this section](./prebuilt_rules_common_info.md#features). |
@@ -40,6 +40,7 @@ https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one |
40 | 40 | - [**Scenario: Exporting a prebuilt rule from rules management table**](#scenario-exporting-a-prebuilt-rule-from-rules-management-table) |
41 | 41 | - [**Scenario: Exporting multiple prebuilt rules in bulk**](#scenario-exporting-multiple-prebuilt-rules-in-bulk) |
42 | 42 | - [**Scenario: Exporting a mix of prebuilt and custom rules in bulk**](#scenario-exporting-a-mix-of-prebuilt-and-custom-rules-in-bulk) |
| 43 | + - [**Scenario: Importing a mix of just bulk exported prebuilt and custom rules**](#scenario-importing-a-mix-of-just-bulk-exported-prebuilt-and-custom-rules) |
43 | 44 | - [Error Handling](#error-handling) |
44 | 45 | - [**Scenario: Exporting beyond the export limit**](#scenario-exporting-beyond-the-export-limit) |
45 | 46 |
|
@@ -177,10 +178,28 @@ And the exported custom rules should include an "immutable" field having false v |
177 | 178 | And the exported custom rules "rule_source.type" should be "internal" |
178 | 179 | ``` |
179 | 180 |
|
| 181 | +#### **Scenario: Importing a mix of just bulk exported prebuilt and custom rules** |
| 182 | + |
| 183 | +**Automation**: 1 integration test and 1 cypress test. |
| 184 | + |
| 185 | +```Gherkin |
| 186 | +Given a mix of customized prebuilt, non-customized prebuilt and custom rules |
| 187 | +When user selects some rules of each type in the rule management table |
| 188 | +And bulk exports them |
| 189 | +Then the selected rules should be exported as an NDJSON file |
| 190 | +When user removes the rules and imports just exported NDJSON file |
| 191 | +Then the rules should be created |
| 192 | +And the created rules should be correctly identified as prebuilt or custom |
| 193 | +And the created rules' is_customized field should be correctly calculated |
| 194 | +And the created rules' parameters should match the import payload |
| 195 | +``` |
| 196 | + |
180 | 197 | ### Error Handling |
181 | 198 |
|
182 | 199 | #### **Scenario: Exporting beyond the export limit** |
183 | 200 |
|
| 201 | +**Automation**: 2 integration tests and 1 cypress test. |
| 202 | + |
184 | 203 | ```Gherkin |
185 | 204 | Given prebuilt and custom rules |
186 | 205 | And the number of rules is greater than the export limit (defaults to 10_000) |
|
0 commit comments