Skip to content

Commit

Permalink
[ML] Adds Jest tests for the rules editor flyout components (#21636)
Browse files Browse the repository at this point in the history
  • Loading branch information
peteharverson authored Aug 6, 2018
1 parent cb8fcdc commit 2f7c400
Show file tree
Hide file tree
Showing 24 changed files with 3,284 additions and 15 deletions.
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>
`;
Loading

0 comments on commit 2f7c400

Please sign in to comment.