Skip to content

Commit

Permalink
addresses comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dplumlee committed May 31, 2024
1 parent 48f1a42 commit 5dfb07b
Showing 1 changed file with 26 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -830,10 +830,9 @@ TODO: add scenarios https://github.com/elastic/kibana/issues/166215
```Gherkin
Given at least 1 prebuilt rule is installed in Kibana
And for this rule there is a new version available
And this rule has an existing base version
And the current version of <field> is unchanged from the base version
And there is no update for <field> in this upgrade
Then the merged output should be the current verison of <field>
Then the merged output should be the current version of <field>
And there should be no conflict
Examples:
Expand All @@ -849,10 +848,9 @@ Examples:
```Gherkin
Given at least 1 prebuilt rule is installed in Kibana
And for this rule there is a new version available
And this rule has an existing base version
And the current version of <field> has changed from the base version
And there is no update for <field> in this upgrade
Then the merged output should be the current verison of <field>
Then the merged output should be the current version of <field>
And there should be no conflict
Examples:
Expand All @@ -868,10 +866,9 @@ Examples:
```Gherkin
Given at least 1 prebuilt rule is installed in Kibana
And for this rule there is a new version available
And this rule has an existing base version
And the current version of <field> is unchanged from the base version
And there is a update for <field> in this upgrade
Then the merged output should be the target verison of <field>
Then the merged output should be the target version of <field>
And there should be no conflict
Examples:
Expand All @@ -887,14 +884,13 @@ Examples:
```Gherkin
Given at least 1 prebuilt rule is installed in Kibana
And for this rule there is a new version available
And this rule has an existing base version
And the current version of <field> has changed from the base version
And there is a update for <field> in this upgrade
And the current version and the update have the same value
Then the merged output should be the current verison of <field>
Then the merged output should be the current version of <field>
And there should be no conflict
CASE: should work the same if rule does not have an existing base version
CASE: should work the same if rule's base version exists or not
Examples:
| field | base_version | current_version | target_version |
Expand All @@ -909,21 +905,38 @@ Examples:
```Gherkin
Given at least 1 prebuilt rule is installed in Kibana
And for this rule there is a new version available
And this rule has an existing base version
And the current version of <field> has changed from the base version
And there is a update for <field> in this upgrade
And the current version and the update do not have the same value
Then the merged output should be the current verison of <field>
Then the merged output should be the current version of <field>
And there should be a conflict
CASE: should return target version if rule does not have an existing base version
Examples:
| field | base_version | current_version | target_version |
| name | "A" | "B" | "C" |
| risk_score | 1 | 2 | 3 |
```

#### **Scenario: Rule field has an update and a custom value that are NOT the same and the rule base version doesn't exist**

**Automation** 1 integration test

```Gherkin
Given at least 1 prebuilt rule is installed in Kibana
And for this rule there is a new version available
And the base version of the rule cannot be determined
And the current version of <field> has changed from the base version
And there is a update for <field> in this upgrade
And the current version and the update do not have the same value
Then the merged output should be the target version of <field>
And there should be a conflict
Examples:
| field | base_version | current_version | target_version |
| name | N/A | "B" | "C" |
| risk_score | N/A | 2 | 3 |
```

### Rule upgrade workflow: viewing rule changes in JSON diff view

#### **Scenario: User can see changes in a side-by-side JSON diff view**
Expand Down

0 comments on commit 5dfb07b

Please sign in to comment.