mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 23:37:39 -02:30
Add Job results skeleton tests
This commit is contained in:
36
__tests__/pages/Jobs/Jobs.test.jsx
Normal file
36
__tests__/pages/Jobs/Jobs.test.jsx
Normal 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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user