-
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] Template unit tests #72399
Conversation
Pinging @elastic/siem (Team:SIEM) |
x-pack/plugins/security_solution/server/lib/timeline/routes/utils/compare_timelines_status.ts
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
...urity_solution/public/detections/components/rules/pre_packaged_rules/update_callout.test.tsx
Outdated
Show resolved
Hide resolved
...ck/plugins/security_solution/public/detections/pages/detection_engine/rules/helpers.test.tsx
Show resolved
Hide resolved
const templateTimelineVersion = this.templateTimelineObject?.getVersion; | ||
return ( | ||
templateTimelineVersion == null || | ||
(isInteger(templateTimelineVersion) && !this.isTemplateVersionConflict) |
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.
If the templateTimelineVersion
is of type string but a number (example: '123'
) then the function will return false
. Is that intended?
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, It only takes number as templateTimelineVersion.
@elasticmachine merge upstream |
💚 Build SucceededBuild metricsasync chunks size
History
To update your PR or re-run it, just comment with: |
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.
LGTM! Great job with those tests!
* add unit test for failure cases * add unit tests * update wording * fix error when update template without ttid or ttversion * fix unit test * add comment * review Co-authored-by: Elastic Machine <[email protected]>
* add unit test for failure cases * add unit tests * update wording * fix error when update template without ttid or ttversion * fix unit test * add comment * review Co-authored-by: Elastic Machine <[email protected]>
* add unit test for failure cases * add unit tests * update wording * fix error when update template without ttid or ttversion * fix unit test * add comment * review Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
* add unit test for failure cases * add unit tests * update wording * fix error when update template without ttid or ttversion * fix unit test * add comment * review Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Pinging @elastic/security-solution (Team: SecuritySolution) |
Summary
To verify this PR:
Download timelines_export.txt
Change
.txt
into.ndjson
Import the file and see if it's created successfully as a custom template.
Checklist
Delete any items that are not applicable to this PR.
Documentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibilityThis renders correctly on smaller devices using a responsive layout. (You can test this in your browserThis was checked for cross-browser compatibilityFor maintainers
This was checked for breaking API changes and was labeled appropriately