* Move next to download button and match styling Co-authored-by: Aldrin Abastillas <AAbastillas@rcanalytics.com> Co-authored-by: Tim Lai <timothy.lai@gmail.com>
This commit is contained in:
committed by
GitHub
parent
f8dd4e68ec
commit
973e1f7a9b
@@ -2,7 +2,6 @@ import React from "react"
|
||||
import expect from "expect"
|
||||
import { shallow } from "enzyme"
|
||||
import ResponseBody from "components/response-body"
|
||||
import { inferSchema } from "corePlugins/samples/fn"
|
||||
|
||||
describe("<ResponseBody />", function() {
|
||||
const highlightCodeComponent = () => null
|
||||
@@ -33,4 +32,12 @@ describe("<ResponseBody />", function() {
|
||||
console.warn(wrapper.debug())
|
||||
expect(wrapper.find("highlightCodeComponent").length).toEqual(0)
|
||||
})
|
||||
|
||||
it("should render a copyable highlightCodeComponent for text types", function() {
|
||||
props.contentType = "text/plain"
|
||||
props.content = "test text"
|
||||
const wrapper = shallow(<ResponseBody {...props}/>)
|
||||
console.warn(wrapper.debug())
|
||||
expect(wrapper.find("highlightCodeComponent[canCopy]").length).toEqual(1)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user