Skip to content
Snippets Groups Projects
Commit b37995e2 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

tests

parent 231b4a4c
No related branches found
No related tags found
1 merge request!624Feat/us780 matomo opt out
...@@ -18,6 +18,7 @@ module.exports = { ...@@ -18,6 +18,7 @@ module.exports = {
globals: { globals: {
__ALLOW_HTTP__: false, __ALLOW_HTTP__: false,
__TARGET__: 'browser', __TARGET__: 'browser',
__PIWIK_TRACKER_URL__: 'http://localhost:9800/',
cozy: {}, cozy: {},
}, },
} }
import React from 'react'
import { shallow } from 'enzyme'
import { MatomoOptOut } from './MatomoOptOut'
jest.mock('cozy-ui/transpiled/react/I18n', () => {
return {
useI18n: jest.fn(() => {
return {
t: (str: string) => str,
}
}),
}
})
describe('MatomoOptOut component', () => {
it('should be rendered correctly', () => {
const component = shallow(<MatomoOptOut />).getElement()
expect(component).toMatchSnapshot()
})
})
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`MatomoOptOut component should be rendered correctly 1`] = `
<div
className="matomo-opt-out-container"
>
<div
className="matomo-opt-out"
>
<div
className="opt-out-header text-16-normal-uppercase"
>
matomo.matomo_title
</div>
<iframe
src="http://localhost:9800/index.php?module=CoreAdminHome&action=optOut&language=fr&backgroundColor=121212&fontColor=e0e0e0&fontSize=&fontFamily=sans-serif"
style={
Object {
"height": "250px",
}
}
/>
</div>
</div>
`;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment