-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Security Solution] Per-field diffs test coverage #177399
Conversation
Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management) |
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
Pinging @elastic/security-solution (Team: SecuritySolution) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dplumlee thank you for covering per-field diffs by tests 🙏
Changes look good overall I left a few questions and comments to improve readability.
cy.get(PER_FIELD_DIFF_WRAPPER).last().contains('Outdated rule 1').should('be.visible'); | ||
cy.get(PER_FIELD_DIFF_WRAPPER).last().contains('Updated rule 1').should('be.visible'); | ||
|
||
/* Select another rule without closing the preview for the current rule */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Starting from this point it looks like a new scenario. It shouldn't be a significant overhead to move lines below to a separate scenario but will help us catch problems related to rules switching more efficiently. On top of that the test can varify Outdated rule 2
content as well to make sure not only title changed.
.../public/detection_engine/rule_management/components/rule_details/per_field_rule_diff_tab.tsx
Outdated
Show resolved
Hide resolved
...ic/detection_engine/rule_management/components/rule_details/per_field_rule_diff_tab.test.tsx
Show resolved
Hide resolved
...ic/detection_engine/rule_management/components/rule_details/per_field_rule_diff_tab.test.tsx
Outdated
Show resolved
Hide resolved
@@ -978,14 +978,13 @@ Then the preview should display the changes for the newly selected rule | |||
|
|||
#### **Scenario: User can see changes when updated rule is a different rule type** | |||
|
|||
**Automation**: 1 UI integration test | |||
**Automation**: 1 e2e test | |||
|
|||
```Gherkin | |||
Given a prebuilt rule is installed in Kibana | |||
And this rule has an update available that changes the rule type | |||
When user opens the upgrade preview | |||
Then the rule type changes should be displayed in grouped field diffs with corresponding query fields |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did I get it right the tooltip isn't implement yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we are pushing it back since we're not sure how best to implement it yet. I figured the best move would be to take it off here for now, but maybe we leave it in and just make a note to rewrite the test whenever it becomes available? What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion a note in the test plan should convey the intention much better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dplumlee thank you for addressing my comments 👍
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @dplumlee |
## Summary Addresses test coverage acceptance criteria for elastic#166489 Adds test coverage in accordance to the recently merged [test plan](elastic#176474) [Flaky test runner](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5279) (cherry picked from commit 3c34b53)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…177645) # Backport This will backport the following commits from `main` to `8.13`: - [[Security Solution] Per-field diffs test coverage (#177399)](#177399) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Davis Plumlee","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-02-22T19:57:41Z","message":"[Security Solution] Per-field diffs test coverage (#177399)\n\n## Summary\r\n\r\nAddresses test coverage acceptance criteria for\r\nhttps://github.com//issues/166489\r\n\r\nAdds test coverage in accordance to the recently merged [test\r\nplan](https://github.com/elastic/kibana/pull/176474)\r\n\r\n[Flaky test\r\nrunner](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5279)","sha":"3c34b535ceac5a5c869719998d9e03a0d44ce21a","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","test-coverage","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","v8.13.0","v8.14.0"],"title":"[Security Solution] Per-field diffs test coverage","number":177399,"url":"https://github.com/elastic/kibana/pull/177399","mergeCommit":{"message":"[Security Solution] Per-field diffs test coverage (#177399)\n\n## Summary\r\n\r\nAddresses test coverage acceptance criteria for\r\nhttps://github.com//issues/166489\r\n\r\nAdds test coverage in accordance to the recently merged [test\r\nplan](https://github.com/elastic/kibana/pull/176474)\r\n\r\n[Flaky test\r\nrunner](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5279)","sha":"3c34b535ceac5a5c869719998d9e03a0d44ce21a"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/177399","number":177399,"mergeCommit":{"message":"[Security Solution] Per-field diffs test coverage (#177399)\n\n## Summary\r\n\r\nAddresses test coverage acceptance criteria for\r\nhttps://github.com//issues/166489\r\n\r\nAdds test coverage in accordance to the recently merged [test\r\nplan](https://github.com/elastic/kibana/pull/176474)\r\n\r\n[Flaky test\r\nrunner](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5279)","sha":"3c34b535ceac5a5c869719998d9e03a0d44ce21a"}}]}] BACKPORT--> Co-authored-by: Davis Plumlee <[email protected]>
## Summary Addresses test coverage acceptance criteria for elastic#166489 Adds test coverage in accordance to the recently merged [test plan](elastic#176474) [Flaky test runner](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5279)
Summary
Addresses test coverage acceptance criteria for #166489
Adds test coverage in accordance to the recently merged test plan
Flaky test runner