[Security Solution][Detections] Adds exception modal tests#74596
[Security Solution][Detections] Adds exception modal tests#74596dplumlee merged 8 commits intoelastic:masterfrom
Conversation
7ebdf20 to
4b54bdb
Compare
|
Pinging @elastic/siem (Team:SIEM) |
9c1524b to
2346c39
Compare
There was a problem hiding this comment.
I don't think you need this id here do you? Looks like above you're using data-test-subj successfully?
There was a problem hiding this comment.
i believe the id is a required field for the EuiCheckbox, would spit out a console warning and potentially cause usage problems if not there.
There was a problem hiding this comment.
Yeah looking at the docs and searching around this looks like it is required.
There was a problem hiding this comment.
nit: If you search through the code base most of the time people across the plugins and code base do this when stubbing out no operations:
jest.fn()Makes it easier as a stub that it won't blow up later on as it's more accepting of what can call it, etc...
For example:
onCancel={jest.fn()}There was a problem hiding this comment.
nit: Seems weird to have a new line break here but not between the describe blocks or other it blocks?
I would change the newlines you have to be consistent. The new lines between test/it/describe blocks seem to be what most people do everywhere across plugins. Some people don't though (which is not a biggie to me which way to choose as long as consistency within a single file is maintained.
For a "science based reason" if I was going to make the argument of using new line blocks between it blocks and it/describe blocks is that spacing is a "pre-attentive attribute" meaning that when reading blocks of code we will naturally group things based on spacial distance between things before having to think consciously so it makes it easier to read them. Several posts about this and the other preattentive attributes is out there and good reads IMHO.
http://daydreamingnumbers.com/blog/preattentive-attributes-example/
makes kind of sense when you think about how the IDE adds color in some aspects to make things stand out.
94f0ca3 to
4cf0023
Compare
💚 Build SucceededBuild metricsasync chunks size
History
To update your PR or re-run it, just comment with: |
FrankHassanabad
left a comment
There was a problem hiding this comment.
LGTM, thanks for the good catches on aria-label, explanations on the id, and the unit tests
peluja1012
left a comment
There was a problem hiding this comment.
Thanks for adding this coverage!
* master: Skip failing test in CI (elastic#75266) [Task Manager] time out work when it overruns in poller (elastic#74980) [Drilldowns] misc improvements & fixes (elastic#75276) Small README note on bumping memory for builds (elastic#75247) [Security Solution][Detections] Adds exception modal tests (elastic#74596) [Dashboard] Sample data link does not work (elastic#75262) [Dashboard First] Unlink from Library Action With ReferenceOrValueEmbeddable (elastic#74905) [Form lib] Fix issue where serializer on fields are called on every change (elastic#75166) convert processor labels to sentence case (elastic#75278) [Monaco] Refactor the way XJSON grammar checker gets registered (elastic#75160) Clarify no documents error message when filtering by is_training (elastic#75227) [Lens] Fix crash when two layers xychart switches to pie (elastic#75267) [Observability Homepage] Fix console error because of side effect (elastic#75258) [Usage Collection] Add `legacy=true` option to the /api/stats request in the docs (elastic#75146) [ML] Functional tests - re-activate DFA test suites (elastic#75257) GS providers improvements (elastic#75174) [Visualize] First version of by-value visualize editor (elastic#72256)
…emove-header * saved-objects/version-on-create: (59 commits) remove version when loading sample data omit version from SO import/export Skip failing test in CI (elastic#75266) [Task Manager] time out work when it overruns in poller (elastic#74980) [Drilldowns] misc improvements & fixes (elastic#75276) Small README note on bumping memory for builds (elastic#75247) [Security Solution][Detections] Adds exception modal tests (elastic#74596) Revert "Revert "added missing core docs"" Revert "Revert "added version to saved object bulk creation"" [Dashboard] Sample data link does not work (elastic#75262) [Dashboard First] Unlink from Library Action With ReferenceOrValueEmbeddable (elastic#74905) [Form lib] Fix issue where serializer on fields are called on every change (elastic#75166) convert processor labels to sentence case (elastic#75278) [Monaco] Refactor the way XJSON grammar checker gets registered (elastic#75160) Clarify no documents error message when filtering by is_training (elastic#75227) [Lens] Fix crash when two layers xychart switches to pie (elastic#75267) [Observability Homepage] Fix console error because of side effect (elastic#75258) [Usage Collection] Add `legacy=true` option to the /api/stats request in the docs (elastic#75146) [ML] Functional tests - re-activate DFA test suites (elastic#75257) GS providers improvements (elastic#75174) ...
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
Summary
Adds jest tests for the add and edit exception modals to cover all current state variations based on props
Checklist
Delete any items that are not applicable to this PR.
For maintainers