debian-mirror-gitlab/spec/frontend/pipelines/blank_state_spec.js

26 lines
666 B
JavaScript
Raw Normal View History

2018-03-27 19:54:05 +05:30
import Vue from 'vue';
2020-07-28 23:09:34 +05:30
import component from '~/pipelines/components/pipelines_list/blank_state.vue';
2018-03-27 19:54:05 +05:30
import mountComponent from '../helpers/vue_mount_component_helper';
describe('Pipelines Blank State', () => {
let vm;
let Component;
beforeEach(() => {
Component = Vue.extend(component);
2018-12-13 13:39:08 +05:30
vm = mountComponent(Component, {
svgPath: 'foo',
message: 'Blank State',
});
2018-03-27 19:54:05 +05:30
});
it('should render svg', () => {
expect(vm.$el.querySelector('.svg-content img').getAttribute('src')).toEqual('foo');
});
it('should render message', () => {
2018-12-13 13:39:08 +05:30
expect(vm.$el.querySelector('h4').textContent.trim()).toEqual('Blank State');
2018-03-27 19:54:05 +05:30
});
});