Add close button to job detail and test

This commit is contained in:
Marliana Lara
2019-06-13 13:47:48 -04:00
parent cda5cc25b8
commit 416d30a189
3 changed files with 35 additions and 6 deletions

View File

@@ -10,7 +10,7 @@ describe('<Jobs />', () => {
);
});
test('should display correct breadcrumb heading', () => {
test('should display a breadcrumb heading', () => {
const history = createMemoryHistory({
initialEntries: ['/jobs'],
});
@@ -30,7 +30,7 @@ describe('<Jobs />', () => {
}
}
);
expect(wrapper.find('BreadcrumbHeading').text()).toEqual('Jobs');
expect(wrapper.find('BreadcrumbHeading').length).toBe(1);
wrapper.unmount();
});
});

View File

@@ -12,4 +12,13 @@ describe('<JobDetail />', () => {
<JobDetail job={ mockDetails } />
);
});
test('should display a Close button', () => {
const wrapper = mountWithContexts(
<JobDetail job={ mockDetails } />
);
expect(wrapper.find('Button[aria-label="close"]').length).toBe(1);
wrapper.unmount();
});
});