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

empty_state_spec.js « commit_sidebar « components « ide « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4f81c0aa5d38f56ce9b0bd152e8b8c368d6c85e0 (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 { createComponentWithStore } from 'helpers/vue_mount_component_helper';
import emptyState from '~/ide/components/commit_sidebar/empty_state.vue';
import { createStore } from '~/ide/stores';

describe('IDE commit panel empty state', () => {
  let vm;
  let store;

  beforeEach(() => {
    store = createStore();

    const Component = Vue.extend(emptyState);

    Vue.set(store.state, 'noChangesStateSvgPath', 'no-changes');

    vm = createComponentWithStore(Component, store);

    vm.$mount();
  });

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

  it('renders no changes text when last commit message is empty', () => {
    expect(vm.$el.textContent).toContain('No changes');
  });
});