2018-03-01 12:40:00 -05:00
|
|
|
import Vue from 'vue';
|
2020-06-23 20:08:43 -04:00
|
|
|
import component from '~/pipelines/components/pipelines_list/blank_state.vue';
|
2018-03-01 12:40:00 -05:00
|
|
|
import mountComponent from '../helpers/vue_mount_component_helper';
|
|
|
|
|
|
|
|
describe('Pipelines Blank State', () => {
|
|
|
|
let vm;
|
|
|
|
let Component;
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
Component = Vue.extend(component);
|
|
|
|
|
2018-10-17 03:13:26 -04:00
|
|
|
vm = mountComponent(Component, {
|
|
|
|
svgPath: 'foo',
|
|
|
|
message: 'Blank State',
|
|
|
|
});
|
2018-03-01 12:40:00 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should render svg', () => {
|
|
|
|
expect(vm.$el.querySelector('.svg-content img').getAttribute('src')).toEqual('foo');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should render message', () => {
|
2018-10-17 03:13:26 -04:00
|
|
|
expect(vm.$el.querySelector('h4').textContent.trim()).toEqual('Blank State');
|
2018-03-01 12:40:00 -05:00
|
|
|
});
|
|
|
|
});
|