Add Job results skeleton tests

This commit is contained in:
Marliana Lara
2019-06-12 16:54:01 -04:00
parent 508d8311dd
commit cda5cc25b8
7 changed files with 77 additions and 31 deletions

View File

@@ -0,0 +1,36 @@
import React from 'react';
import { createMemoryHistory } from 'history';
import { mountWithContexts } from '../../enzymeHelpers';
import Jobs from '../../../src/pages/Jobs';
describe('<Jobs />', () => {
test('initially renders succesfully', () => {
mountWithContexts(
<Jobs />
);
});
test('should display correct breadcrumb heading', () => {
const history = createMemoryHistory({
initialEntries: ['/jobs'],
});
const match = { path: '/jobs', url: '/jobs', isExact: true };
const wrapper = mountWithContexts(
<Jobs />,
{
context: {
router: {
history,
route: {
location: history.location,
match
}
}
}
}
);
expect(wrapper.find('BreadcrumbHeading').text()).toEqual('Jobs');
wrapper.unmount();
});
});

View File

@@ -0,0 +1,10 @@
import React from 'react';
import { mountWithContexts } from '../../../../enzymeHelpers';
import Job from '../../../../../src/pages/Jobs/Job';
describe('<Job />', () => {
test('initially renders succesfully', () => {
mountWithContexts(<Job />);
});
});

View File

@@ -0,0 +1,15 @@
import React from 'react';
import { mountWithContexts } from '../../../../enzymeHelpers';
import JobDetail from '../../../../../src/pages/Jobs/JobDetail/';
describe('<JobDetail />', () => {
const mockDetails = {
name: 'Foo'
};
test('initially renders succesfully', () => {
mountWithContexts(
<JobDetail job={ mockDetails } />
);
});
});

View File

@@ -0,0 +1,15 @@
import React from 'react';
import { mountWithContexts } from '../../../../enzymeHelpers';
import JobOutput from '../../../../../src/pages/Jobs/JobOutput/';
describe('<JobOutput />', () => {
const mockDetails = {
name: 'Foo'
};
test('initially renders succesfully', () => {
mountWithContexts(
<JobOutput job={ mockDetails } />
);
});
});