Welcome to mirror list, hosted at ThFree Co, Russian Federation.

error_state_spec.js « vue_pipelines_index « javascripts « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f667d351f7296fa3731ed22c327460a2eaba935d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import Vue from 'vue';
import errorStateComp from '~/pipelines/components/error_state.vue';

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');
  });
});