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

ci_cd_analytics_area_chart_spec.js « components « charts « pipelines « projects « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5fc121b5c9f2f1a27eaaf11d3dffcc6ea1198366 (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 { mount } from '@vue/test-utils';
import CiCdAnalyticsAreaChart from '~/vue_shared/components/ci_cd_analytics/ci_cd_analytics_area_chart.vue';
import { transformedAreaChartData } from '../mock_data';

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

  beforeEach(() => {
    wrapper = mount(CiCdAnalyticsAreaChart, {
      propsData: {
        chartData: transformedAreaChartData,
        areaChartOptions: {
          xAxis: {
            name: 'X axis title',
            type: 'category',
          },
          yAxis: {
            name: 'Y axis title',
          },
        },
      },
      slots: {
        default: 'Some title',
      },
      stubs: {
        GlAreaChart: true,
      },
    });
  });

  it('matches the snapshot', () => {
    expect(wrapper.element).toMatchSnapshot();
  });
});