blob: 82b655dd59812b7728a51ba1ee57fab34bd44451 (
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
|
import { shallowMount } from '@vue/test-utils';
import ReportItem from '~/ci/reports/components/issue_status_icon.vue';
import { STATUS_FAILED, STATUS_NEUTRAL, STATUS_SUCCESS } from '~/ci/reports/constants';
describe('IssueStatusIcon', () => {
let wrapper;
const createComponent = ({ status }) => {
wrapper = shallowMount(ReportItem, {
propsData: {
status,
},
});
};
it.each([STATUS_SUCCESS, STATUS_NEUTRAL, STATUS_FAILED])(
'renders "%s" state correctly',
(status) => {
createComponent({ status });
expect(wrapper.element).toMatchSnapshot();
},
);
});
|