summaryrefslogtreecommitdiff
path: root/spec/frontend/pipelines/blank_state_spec.js
blob: dae24efd04197bfaa250eb752708f291862980fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { mount } from '@vue/test-utils';
import { getByText } from '@testing-library/dom';
import BlankState from '~/pipelines/components/pipelines_list/blank_state.vue';

describe('Pipelines Blank State', () => {
  const wrapper = mount(BlankState, {
    propsData: {
      svgPath: 'foo',
      message: 'Blank State',
    },
  });

  it('should render svg', () => {
    expect(wrapper.find('.svg-content img').attributes('src')).toEqual('foo');
  });

  it('should render message', () => {
    expect(getByText(wrapper.element, /Blank State/i)).toBeTruthy();
  });
});