diff options
author | Matthew Shao <me@matshao.com> | 2017-05-22 10:46:03 +0800 |
---|---|---|
committer | Matthew Shao <me@matshao.com> | 2017-05-22 10:46:03 +0800 |
commit | 546bac68d471d23bee70b549a5179a775fded4fc (patch) | |
tree | c45271b99cbf8b567ee0af37d2d3014422042b5f | |
parent | 2935ff5f3ac01124b8c4c3d2688964ddaba12f4d (diff) | |
download | mitmproxy-546bac68d471d23bee70b549a5179a775fded4fc.tar.gz mitmproxy-546bac68d471d23bee70b549a5179a775fded4fc.tar.bz2 mitmproxy-546bac68d471d23bee70b549a5179a775fded4fc.zip |
[web] Fix 100% coverage for js/components/FlowTable/FlowColumns.js
-rw-r--r-- | web/src/js/__tests__/components/FlowTable/FlowColumnsSpec.js | 6 | ||||
-rw-r--r-- | web/src/js/__tests__/components/FlowTable/__snapshots__/FlowColumnsSpec.js.snap | 12 |
2 files changed, 17 insertions, 1 deletions
diff --git a/web/src/js/__tests__/components/FlowTable/FlowColumnsSpec.js b/web/src/js/__tests__/components/FlowTable/FlowColumnsSpec.js index 1427cb1b..f3373c02 100644 --- a/web/src/js/__tests__/components/FlowTable/FlowColumnsSpec.js +++ b/web/src/js/__tests__/components/FlowTable/FlowColumnsSpec.js @@ -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']] diff --git a/web/src/js/__tests__/components/FlowTable/__snapshots__/FlowColumnsSpec.js.snap b/web/src/js/__tests__/components/FlowTable/__snapshots__/FlowColumnsSpec.js.snap index 9c7cec86..d6946507 100644 --- a/web/src/js/__tests__/components/FlowTable/__snapshots__/FlowColumnsSpec.js.snap +++ b/web/src/js/__tests__/components/FlowTable/__snapshots__/FlowColumnsSpec.js.snap @@ -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" |