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

mr_widget_checking_spec.js « states « components « vue_merge_request_widget « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 02de426204bbc884242494ec337a374236cd8c01 (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
import Vue from 'vue';
import mountComponent from 'helpers/vue_mount_component_helper';
import checkingComponent from '~/vue_merge_request_widget/components/states/mr_widget_checking.vue';

describe('MRWidgetChecking', () => {
  let Component;
  let vm;

  beforeEach(() => {
    Component = Vue.extend(checkingComponent);
    vm = mountComponent(Component);
  });

  afterEach(() => {
    vm.$destroy();
  });

  it('renders loading icon', () => {
    expect(vm.$el.querySelector('.mr-widget-icon span').classList).toContain('gl-spinner');
  });

  it('renders information about merging', () => {
    expect(vm.$el.querySelector('.media-body').textContent.trim()).toEqual(
      'Checking if merge request can be merged…',
    );
  });
});