mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 00:38:45 -03:30
37 lines
861 B
JavaScript
37 lines
861 B
JavaScript
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 a 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').length).toBe(1);
|
|
wrapper.unmount();
|
|
});
|
|
});
|