Skip to content
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

[PipelineViewer] Test PipelineViewer sub-components #20329

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`CollapsibleStatement component renders child components 1`] = `
<EuiFlexGroup
alignItems="center"
className="pipelineViewer__statement"
component="div"
direction="row"
gutterSize="none"
justifyContent="flexStart"
responsive={false}
wrap={false}
>
<EuiFlexItem
component="div"
grow={false}
key="statementId"
>
<EuiButtonIcon
aria-label={true}
color="text"
iconType="arrowDown"
onClick={[Function]}
size="s"
type="button"
/>
</EuiFlexItem>
<div>
child element
</div>
</EuiFlexGroup>
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Metric component does not render warning badge when no warning present 1`] = `
<EuiFlexItem
className="pipelineViewer__metricFlexItem"
component="div"
grow={false}
>
<EuiText
className="pipelineViewer__metric metricClass"
color="subdued"
grow={true}
size="s"
>
<span>
220
</span>
</EuiText>
</EuiFlexItem>
`;

exports[`Metric component renders warning badge 1`] = `
<EuiFlexItem
className="pipelineViewer__metricFlexItem"
component="div"
grow={false}
>
<EuiBadge
className="metricClass"
color="warning"
iconSide="left"
>
220
</EuiBadge>
</EuiFlexItem>
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`PipelineViewer component passes expected props 1`] = `
<EuiPage
restrictWidth={false}
>
<EuiPageContent
className="pipelineViewer"
horizontalPosition="center"
panelPaddingSize="l"
verticalPosition="center"
>
<StatementSection
detailVertex={null}
elements={
Array [
Object {
"depth": 0,
"id": "standardInput",
"parentId": null,
},
]
}
headingText="Inputs"
iconType="logstashInput"
onShowVertexDetails={[Function]}
/>
<EuiSpacer
size="l"
/>
<Queue
queue={
Object {
"hasExplicitId": false,
"id": "__QUEUE__",
"meta": null,
"stats": Array [],
}
}
/>
<EuiSpacer
size="l"
/>
<StatementSection
detailVertex={null}
elements={
Array [
Object {
"depth": 0,
"id": "mutate",
"parentId": null,
},
]
}
headingText="Filters"
iconType="logstashFilter"
onShowVertexDetails={[Function]}
/>
<EuiSpacer
size="l"
/>
<StatementSection
detailVertex={null}
elements={
Array [
Object {
"depth": 0,
"id": "elasticsearch",
"parentId": null,
},
]
}
headingText="Outputs"
iconType="logstashOutput"
onShowVertexDetails={[Function]}
/>
</EuiPageContent>
</EuiPage>
`;

exports[`PipelineViewer component renders DetailDrawer when selected vertex is not null 1`] = `
<EuiPage
restrictWidth={false}
>
<EuiPageContent
className="pipelineViewer"
horizontalPosition="center"
panelPaddingSize="l"
verticalPosition="center"
>
<StatementSection
detailVertex={
Object {
"id": "stdin",
}
}
elements={
Array [
Object {
"depth": 0,
"id": "standardInput",
"parentId": null,
},
]
}
headingText="Inputs"
iconType="logstashInput"
onShowVertexDetails={[Function]}
/>
<EuiSpacer
size="l"
/>
<Queue
queue={
Object {
"hasExplicitId": false,
"id": "__QUEUE__",
"meta": null,
"stats": Array [],
}
}
/>
<EuiSpacer
size="l"
/>
<StatementSection
detailVertex={
Object {
"id": "stdin",
}
}
elements={
Array [
Object {
"depth": 0,
"id": "mutate",
"parentId": null,
},
]
}
headingText="Filters"
iconType="logstashFilter"
onShowVertexDetails={[Function]}
/>
<EuiSpacer
size="l"
/>
<StatementSection
detailVertex={
Object {
"id": "stdin",
}
}
elements={
Array [
Object {
"depth": 0,
"id": "elasticsearch",
"parentId": null,
},
]
}
headingText="Outputs"
iconType="logstashOutput"
onShowVertexDetails={[Function]}
/>
<DetailDrawer
onHide={[Function]}
vertex={
Object {
"id": "stdin",
}
}
/>
</EuiPageContent>
</EuiPage>
`;
Loading