[web] Fix 100% coverage for js/components/FlowTable/FlowColumns.js

This commit is contained in:
Matthew Shao 2017-05-22 10:46:03 +08:00
parent 2935ff5f3a
commit 546bac68d4
2 changed files with 17 additions and 1 deletions

View File

@ -45,6 +45,12 @@ describe('FlowColumns Components', () => {
iconColumn = renderer.create(<Columns.IconColumn flow={cssFlow}/>)
tree = iconColumn.toJSON()
expect(tree).toMatchSnapshot()
// html
let htmlFlow = TFlow()
htmlFlow.response.headers = [['Content-Type', 'text/html']]
iconColumn = renderer.create(<Columns.IconColumn flow={htmlFlow}/>)
tree = iconColumn.toJSON()
expect(tree).toMatchSnapshot()
// default
let fooFlow = TFlow()
fooFlow.response.headers = [['Content-Type', 'foo']]

View File

@ -65,7 +65,7 @@ exports[`FlowColumns Components should render IconColumn 7`] = `
className="col-icon"
>
<div
className="resource-icon resource-icon-plain"
className="resource-icon resource-icon-document"
/>
</td>
`;
@ -80,6 +80,16 @@ exports[`FlowColumns Components should render IconColumn 8`] = `
</td>
`;
exports[`FlowColumns Components should render IconColumn 9`] = `
<td
className="col-icon"
>
<div
className="resource-icon resource-icon-plain"
/>
</td>
`;
exports[`FlowColumns Components should render MethodColumn 1`] = `
<td
className="col-method"