blob: 18b03ed98025bd0da590639a5a4c9e50f7e98a7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import { shallowMount } from '@vue/test-utils';
import { getParameterValues } from '~/lib/utils/url_utility';
import BulkImportDetailsApp from '~/import/details/components/bulk_import_details_app.vue';
jest.mock('~/lib/utils/url_utility');
describe('Bulk import details app', () => {
let wrapper;
const mockId = 151;
const createComponent = () => {
wrapper = shallowMount(BulkImportDetailsApp);
};
beforeEach(() => {
getParameterValues.mockReturnValueOnce([mockId]);
});
describe('template', () => {
it('renders heading', () => {
createComponent();
const headingText = wrapper.find('h1').text();
expect(headingText).toBe(`Items that failed to be imported for ${mockId}`);
});
});
});
|