Updating PrivacyPolicy to use react-testing-library
This commit is contained in:
parent
9f15287fcc
commit
ced6c42c3d
@ -1,56 +1,63 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`PrivacyPolicy rendering 1`] = `
|
exports[`PrivacyPolicy rendering 1`] = `
|
||||||
<Message
|
<DocumentFragment>
|
||||||
heading="TRANSLATE(Privacy Policy)"
|
<span
|
||||||
onClose={[MockFunction]}
|
data-component="Message"
|
||||||
type="info"
|
data-props="{
|
||||||
>
|
\\"type\\": \\"info\\",
|
||||||
<Trans
|
\\"heading\\": \\"TRANSLATE(Privacy Policy)\\"
|
||||||
i18nKey="Privacy policy copy"
|
}"
|
||||||
>
|
>
|
||||||
<p>
|
<span
|
||||||
Regexper and the tools used to create it are all open source. If you are concerned that the JavaScript being delivered is in any way malicious, please inspect the source in the
|
data-component="Trans"
|
||||||
<a
|
data-props="{
|
||||||
href="https://gitlab.com/javallone/regexper-static"
|
\\"i18nKey\\": \\"Privacy policy copy\\"
|
||||||
rel="external noopener noreferrer"
|
}"
|
||||||
target="_blank"
|
>
|
||||||
>
|
<p>
|
||||||
GitLab repository
|
Regexper and the tools used to create it are all open source. If you are concerned that the JavaScript being delivered is in any way malicious, please inspect the source in the
|
||||||
</a>
|
<a
|
||||||
.
|
href="https://gitlab.com/javallone/regexper-static"
|
||||||
</p>
|
rel="external noopener noreferrer"
|
||||||
<p>
|
target="_blank"
|
||||||
There are two data collection tools integrated in the app. These tools are not used to collect personal information:
|
>
|
||||||
</p>
|
GitLab repository
|
||||||
<ul>
|
</a>
|
||||||
<li>
|
.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
There are two data collection tools integrated in the app. These tools are not used to collect personal information:
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<b>
|
||||||
|
Google Analytics
|
||||||
|
</b>
|
||||||
|
is used to track browser usage data and application performance. It is configured to anonymize the client IP address.
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<b>
|
||||||
|
Sentry.io
|
||||||
|
</b>
|
||||||
|
is a tool used to capture and report client-side JavaScript errors. It is configured to not store the client IP address.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p>
|
||||||
|
Regexper honors the browser
|
||||||
<b>
|
<b>
|
||||||
Google Analytics
|
“Do Not Track”
|
||||||
</b>
|
</b>
|
||||||
is used to track browser usage data and application performance. It is configured to anonymize the client IP address.
|
setting and will not enable these data collection tools if that setting is enabled. Also, most popular ad blockers will prevent these tools from sending any tracking data. Disabling or blocking these data collection tools will
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<b>
|
<b>
|
||||||
Sentry.io
|
not
|
||||||
</b>
|
</b>
|
||||||
is a tool used to capture and report client-side JavaScript errors. It is configured to not store the client IP address.
|
impact the performance of this app. The information collected by these tools is used to monitor application performance, determine browser support, and collect error reports.
|
||||||
</li>
|
</p>
|
||||||
</ul>
|
<p>
|
||||||
<p>
|
Regexper is not supported by ad revenue or sales of any kind.
|
||||||
Regexper honors the browser
|
</p>
|
||||||
<b>
|
</span>
|
||||||
“Do Not Track”
|
</span>
|
||||||
</b>
|
</DocumentFragment>
|
||||||
setting and will not enable these data collection tools if that setting is enabled. Also, most popular ad blockers will prevent these tools from sending any tracking data. Disabling or blocking these data collection tools will
|
|
||||||
<b>
|
|
||||||
not
|
|
||||||
</b>
|
|
||||||
impact the performance of this app. The information collected by these tools is used to monitor application performance, determine browser support, and collect error reports.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Regexper is not supported by ad revenue or sales of any kind.
|
|
||||||
</p>
|
|
||||||
</Trans>
|
|
||||||
</Message>
|
|
||||||
`;
|
`;
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
|
jest.mock('components/Message', () =>
|
||||||
|
require('__mocks__/component-mock')('components/Message'));
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { shallow } from 'enzyme';
|
import { render } from 'react-testing-library';
|
||||||
|
|
||||||
import { mockT } from 'i18n';
|
import { mockT } from 'i18n';
|
||||||
import { PrivacyPolicy } from 'components/PrivacyPolicy';
|
import { PrivacyPolicy } from 'components/PrivacyPolicy';
|
||||||
|
|
||||||
describe('PrivacyPolicy', () => {
|
describe('PrivacyPolicy', () => {
|
||||||
test('rendering', () => {
|
test('rendering', () => {
|
||||||
const component = shallow(
|
const { asFragment } = render(
|
||||||
<PrivacyPolicy onClose={ jest.fn() } t={ mockT } />
|
<PrivacyPolicy onClose={ jest.fn() } t={ mockT } />
|
||||||
);
|
);
|
||||||
expect(component).toMatchSnapshot();
|
expect(asFragment()).toMatchSnapshot();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user