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

blank_state_spec.js « pipelines « javascripts « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b7a9b60d85c44d1e57f778890cec88f458983080 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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');
  });
});