debian-mirror-gitlab/spec/frontend/pipelines/blank_state_spec.js
2021-03-11 19:13:27 +05:30

20 lines
572 B
JavaScript

import { getByText } from '@testing-library/dom';
import { mount } from '@vue/test-utils';
import BlankState from '~/pipelines/components/pipelines_list/blank_state.vue';
describe('Pipelines Blank State', () => {
const wrapper = mount(BlankState, {
propsData: {
svgPath: 'foo',
message: 'Blank State',
},
});
it('should render svg', () => {
expect(wrapper.find('.svg-content img').attributes('src')).toEqual('foo');
});
it('should render message', () => {
expect(getByText(wrapper.element, /Blank State/i)).toBeTruthy();
});
});