gitlab-org--gitlab-foss/spec/javascripts/pipelines/blank_state_spec.js
Filipa Lacerda 64857a9bf3 Manage empty states in Pipelines page
Adds i18n
Adds test

Fix broken tests

Fixes empty tab state for external CI
2018-03-05 11:22:50 +00:00

29 lines
682 B
JavaScript

import Vue from 'vue';
import component from '~/pipelines/components/blank_state.vue';
import mountComponent from '../helpers/vue_mount_component_helper';
describe('Pipelines Blank State', () => {
let vm;
let Component;
beforeEach(() => {
Component = Vue.extend(component);
vm = mountComponent(Component,
{
svgPath: 'foo',
message: 'Blank State',
},
);
});
it('should render svg', () => {
expect(vm.$el.querySelector('.svg-content img').getAttribute('src')).toEqual('foo');
});
it('should render message', () => {
expect(
vm.$el.querySelector('h4').textContent.trim(),
).toEqual('Blank State');
});
});