2017-03-20 11:36:02 -04:00
|
|
|
import Vue from 'vue';
|
2017-04-19 07:44:37 -04:00
|
|
|
import errorStateComp from '~/pipelines/components/error_state.vue';
|
2017-03-20 11:36:02 -04:00
|
|
|
|
|
|
|
describe('Pipelines Error State', () => {
|
|
|
|
let component;
|
|
|
|
let ErrorStateComponent;
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
ErrorStateComponent = Vue.extend(errorStateComp);
|
|
|
|
|
|
|
|
component = new ErrorStateComponent().$mount();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should render error state SVG', () => {
|
|
|
|
expect(component.$el.querySelector('.svg-content svg')).toBeDefined();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should render emtpy state information', () => {
|
|
|
|
expect(
|
|
|
|
component.$el.querySelector('h4').textContent,
|
|
|
|
).toContain('The API failed to fetch the pipelines');
|
|
|
|
});
|
|
|
|
});
|