Newer
Older
import React from 'react'
import { createMockEcolyoStore } from '../../../tests/__mocks__/store'
import DataShareConsentContent from './DataShareConsentContent'
jest.mock('cozy-ui/transpiled/react/I18n', () => ({
useI18n: jest.fn(() => ({
t: (str: string) => str,
})),
}))
describe('DataShareConsentContent component', () => {
it('should be rendered correctly with first connexion text', () => {
const store = createMockEcolyoStore({
profile: { isFirstConnection: true },
)
expect(toJson(component)).toMatchSnapshot()
it('should be rendered correctly without first connexion text', () => {
const store = createMockEcolyoStore({
profile: { isFirstConnection: false },
expect(toJson(component)).toMatchSnapshot()