blob: 5465615bf383718228cea711b9807a5bc26e0a0d (
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
31
32
33
34
35
|
import { mount } from '@vue/test-utils';
import { GlIcon } from '@gitlab/ui';
import Description from '~/ide/components/jobs/detail/description.vue';
import { jobs } from '../../../mock_data';
describe('IDE job description', () => {
let wrapper;
beforeEach(() => {
wrapper = mount(Description, {
propsData: {
job: jobs[0],
},
});
});
it('renders job details', () => {
expect(wrapper.text()).toContain('#1');
expect(wrapper.text()).toContain('test');
});
it('renders CI icon', () => {
expect(wrapper.find('.ci-status-icon').findComponent(GlIcon).exists()).toBe(true);
});
it('renders bridge job details without the job link', () => {
wrapper = mount(Description, {
propsData: {
job: { ...jobs[0], path: undefined },
},
});
expect(wrapper.find('[data-testid="description-detail-link"]').exists()).toBe(false);
});
});
|