Newer
Older
import Connection from 'components/Connection/Connection'
import { mount } from 'enzyme'
import toJson from 'enzyme-to-json'
import { fluidStatusConnectedData } from 'tests/__mocks__/fluidStatusData.mock'
import { createMockEcolyoStore } from 'tests/__mocks__/store'
jest.mock('components/Connection/EPGLConnect/EpglInit', () => 'mock-EpglInit')
jest.mock('components/Connection/GRDFConnect/GrdfInit', () => 'mock-GrdfInit')
describe('Connection component test', () => {
it('should call GrdfInit', () => {
<Provider store={store}>
<Connection fluidStatus={fluidStatusConnectedData[2]} />
</Provider>
)
expect(toJson(wrapper)).toMatchSnapshot()
})
it('should call EpglInit', () => {
<Provider store={store}>
<Connection fluidStatus={fluidStatusConnectedData[0]} />
</Provider>
)
expect(toJson(wrapper)).toMatchSnapshot()
})
})