import React from 'react'
import renderer from 'react-test-renderer'
import Details, { TimeStamp, ConnectionInfo, CertificateInfo, Timing } from '../../../components/FlowView/Details'
import { TFlow } from '../../ducks/tutils'
let tflow = TFlow()
describe('TimeStamp Component', () => {
it('should render correctly', () => {
let timestamp = renderer.create(),
tree = timestamp.toJSON()
expect(tree).toMatchSnapshot()
// without timestamp
timestamp = renderer.create()
tree = timestamp.toJSON()
expect(tree).toMatchSnapshot()
})
})
describe('ConnectionInfo Component', () => {
it('should render correctly', () => {
let connectionInfo = renderer.create(),
tree = connectionInfo.toJSON()
expect(tree).toMatchSnapshot()
})
})
describe('CertificateInfo Component', () => {
it('should render correctly', () => {
let certificateInfo = renderer.create(),
tree = certificateInfo.toJSON()
expect(tree).toMatchSnapshot()
})
})
describe('Timing Component', () => {
it('should render correctly', () => {
let timing = renderer.create(),
tree = timing.toJSON()
expect(tree).toMatchSnapshot()
})
})
describe('Details Component', () => {
it('should render correctly', () => {
let details = renderer.create(),
tree = details.toJSON()
expect(tree).toMatchSnapshot()
})
})