-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Adds Jest tests for the rules editor flyout components (#21636)
- Loading branch information
1 parent
cb8fcdc
commit 2f7c400
Showing
24 changed files
with
3,284 additions
and
15 deletions.
There are no files selected for viewing
265 changes: 265 additions & 0 deletions
265
x-pack/plugins/ml/public/components/rule_editor/__snapshots__/actions_section.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,265 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`ActionsSection renders with no actions selected 1`] = ` | ||
<React.Fragment> | ||
<EuiText | ||
grow={true} | ||
> | ||
<p> | ||
Choose the action(s) to take when the rule matches an anomaly. | ||
</p> | ||
</EuiText> | ||
<EuiSpacer | ||
size="s" | ||
/> | ||
<EuiFlexGroup | ||
alignItems="center" | ||
component="div" | ||
direction="row" | ||
gutterSize="s" | ||
justifyContent="flexStart" | ||
responsive={false} | ||
wrap={false} | ||
> | ||
<EuiFlexItem | ||
component="div" | ||
grow={false} | ||
> | ||
<EuiCheckbox | ||
checked={false} | ||
compressed={false} | ||
disabled={false} | ||
id="skip_result_cb" | ||
label="Skip result (recommended)" | ||
onChange={[MockFunction]} | ||
/> | ||
</EuiFlexItem> | ||
<EuiFlexItem | ||
component="div" | ||
grow={false} | ||
> | ||
<EuiIconTip | ||
aria-label="Info" | ||
content="The result will not be created." | ||
position="right" | ||
size="s" | ||
type="questionInCircle" | ||
/> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
<EuiSpacer | ||
size="s" | ||
/> | ||
<EuiFlexGroup | ||
alignItems="center" | ||
component="div" | ||
direction="row" | ||
gutterSize="s" | ||
justifyContent="flexStart" | ||
responsive={false} | ||
wrap={false} | ||
> | ||
<EuiFlexItem | ||
component="div" | ||
grow={false} | ||
> | ||
<EuiCheckbox | ||
checked={false} | ||
compressed={false} | ||
disabled={false} | ||
id="skip_model_update_cb" | ||
label="Skip model update" | ||
onChange={[MockFunction]} | ||
/> | ||
</EuiFlexItem> | ||
<EuiFlexItem | ||
component="div" | ||
grow={false} | ||
> | ||
<EuiIconTip | ||
aria-label="Info" | ||
content="The value for that series will not be used to update the model." | ||
position="right" | ||
size="s" | ||
type="questionInCircle" | ||
/> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</React.Fragment> | ||
`; | ||
|
||
exports[`ActionsSection renders with skip_result and skip_model_update selected 1`] = ` | ||
<React.Fragment> | ||
<EuiText | ||
grow={true} | ||
> | ||
<p> | ||
Choose the action(s) to take when the rule matches an anomaly. | ||
</p> | ||
</EuiText> | ||
<EuiSpacer | ||
size="s" | ||
/> | ||
<EuiFlexGroup | ||
alignItems="center" | ||
component="div" | ||
direction="row" | ||
gutterSize="s" | ||
justifyContent="flexStart" | ||
responsive={false} | ||
wrap={false} | ||
> | ||
<EuiFlexItem | ||
component="div" | ||
grow={false} | ||
> | ||
<EuiCheckbox | ||
checked={true} | ||
compressed={false} | ||
disabled={false} | ||
id="skip_result_cb" | ||
label="Skip result (recommended)" | ||
onChange={[Function]} | ||
/> | ||
</EuiFlexItem> | ||
<EuiFlexItem | ||
component="div" | ||
grow={false} | ||
> | ||
<EuiIconTip | ||
aria-label="Info" | ||
content="The result will not be created." | ||
position="right" | ||
size="s" | ||
type="questionInCircle" | ||
/> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
<EuiSpacer | ||
size="s" | ||
/> | ||
<EuiFlexGroup | ||
alignItems="center" | ||
component="div" | ||
direction="row" | ||
gutterSize="s" | ||
justifyContent="flexStart" | ||
responsive={false} | ||
wrap={false} | ||
> | ||
<EuiFlexItem | ||
component="div" | ||
grow={false} | ||
> | ||
<EuiCheckbox | ||
checked={true} | ||
compressed={false} | ||
disabled={false} | ||
id="skip_model_update_cb" | ||
label="Skip model update" | ||
onChange={[Function]} | ||
/> | ||
</EuiFlexItem> | ||
<EuiFlexItem | ||
component="div" | ||
grow={false} | ||
> | ||
<EuiIconTip | ||
aria-label="Info" | ||
content="The value for that series will not be used to update the model." | ||
position="right" | ||
size="s" | ||
type="questionInCircle" | ||
/> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</React.Fragment> | ||
`; | ||
|
||
exports[`ActionsSection renders with skip_result selected 1`] = ` | ||
<React.Fragment> | ||
<EuiText | ||
grow={true} | ||
> | ||
<p> | ||
Choose the action(s) to take when the rule matches an anomaly. | ||
</p> | ||
</EuiText> | ||
<EuiSpacer | ||
size="s" | ||
/> | ||
<EuiFlexGroup | ||
alignItems="center" | ||
component="div" | ||
direction="row" | ||
gutterSize="s" | ||
justifyContent="flexStart" | ||
responsive={false} | ||
wrap={false} | ||
> | ||
<EuiFlexItem | ||
component="div" | ||
grow={false} | ||
> | ||
<EuiCheckbox | ||
checked={true} | ||
compressed={false} | ||
disabled={false} | ||
id="skip_result_cb" | ||
label="Skip result (recommended)" | ||
onChange={[MockFunction]} | ||
/> | ||
</EuiFlexItem> | ||
<EuiFlexItem | ||
component="div" | ||
grow={false} | ||
> | ||
<EuiIconTip | ||
aria-label="Info" | ||
content="The result will not be created." | ||
position="right" | ||
size="s" | ||
type="questionInCircle" | ||
/> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
<EuiSpacer | ||
size="s" | ||
/> | ||
<EuiFlexGroup | ||
alignItems="center" | ||
component="div" | ||
direction="row" | ||
gutterSize="s" | ||
justifyContent="flexStart" | ||
responsive={false} | ||
wrap={false} | ||
> | ||
<EuiFlexItem | ||
component="div" | ||
grow={false} | ||
> | ||
<EuiCheckbox | ||
checked={false} | ||
compressed={false} | ||
disabled={false} | ||
id="skip_model_update_cb" | ||
label="Skip model update" | ||
onChange={[MockFunction]} | ||
/> | ||
</EuiFlexItem> | ||
<EuiFlexItem | ||
component="div" | ||
grow={false} | ||
> | ||
<EuiIconTip | ||
aria-label="Info" | ||
content="The value for that series will not be used to update the model." | ||
position="right" | ||
size="s" | ||
type="questionInCircle" | ||
/> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</React.Fragment> | ||
`; |
Oops, something went wrong.