scratch-www/test/unit/components/page.test.jsx
picklesrus b89fe1a985 Add recognition text and links to the bottom of the page.
Adds a prop to the Page component so each page can say whether or not it 
wants them to appear.
2019-12-04 16:28:23 -05:00

21 lines
623 B
JavaScript

const React = require('react');
const {shallowWithIntl} = require('../../helpers/intl-helpers.jsx');
const Page = require('../../../src/components/page/www/page.jsx');
describe('Page', () => {
test('Do not show donor recognition', () => {
const component = shallowWithIntl(
<Page />
);
expect(component.find('#donor')).toHaveLength(0);
});
test('Show donor recognition', () => {
const component = shallowWithIntl(
<Page
showDonorRecognition
/>
);
expect(component.find('#donor')).toHaveLength(1);
});
});