summaryrefslogtreecommitdiff
path: root/spec/frontend/analytics/instance_statistics/components/app_spec.js
blob: df13c9f82a9e559f65ae224337a23c8882915807 (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
30
31
32
33
34
import { shallowMount } from '@vue/test-utils';
import InstanceStatisticsApp from '~/analytics/instance_statistics/components/app.vue';
import InstanceCounts from '~/analytics/instance_statistics/components//instance_counts.vue';
import PipelinesChart from '~/analytics/instance_statistics/components/pipelines_chart.vue';
import UsersChart from '~/analytics/instance_statistics/components/users_chart.vue';

describe('InstanceStatisticsApp', () => {
  let wrapper;

  const createComponent = () => {
    wrapper = shallowMount(InstanceStatisticsApp);
  };

  beforeEach(() => {
    createComponent();
  });

  afterEach(() => {
    wrapper.destroy();
    wrapper = null;
  });

  it('displays the instance counts component', () => {
    expect(wrapper.find(InstanceCounts).exists()).toBe(true);
  });

  it('displays the pipelines chart component', () => {
    expect(wrapper.find(PipelinesChart).exists()).toBe(true);
  });

  it('displays the users chart component', () => {
    expect(wrapper.find(UsersChart).exists()).toBe(true);
  });
});