diff options
Diffstat (limited to 'spec/frontend/monitoring/components/charts/bar_spec.js')
-rw-r--r-- | spec/frontend/monitoring/components/charts/bar_spec.js | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/spec/frontend/monitoring/components/charts/bar_spec.js b/spec/frontend/monitoring/components/charts/bar_spec.js deleted file mode 100644 index 5339a7a525b..00000000000 --- a/spec/frontend/monitoring/components/charts/bar_spec.js +++ /dev/null @@ -1,53 +0,0 @@ -import { GlBarChart } from '@gitlab/ui/dist/charts'; -import { shallowMount } from '@vue/test-utils'; -import Bar from '~/monitoring/components/charts/bar.vue'; -import { barGraphData } from '../../graph_data'; - -jest.mock('~/lib/utils/icon_utils', () => ({ - getSvgIconPathContent: jest.fn().mockResolvedValue('mockSvgPathContent'), -})); - -describe('Bar component', () => { - let barChart; - let store; - let graphData; - - beforeEach(() => { - graphData = barGraphData(); - - barChart = shallowMount(Bar, { - propsData: { - graphData, - }, - store, - }); - }); - - afterEach(() => { - barChart.destroy(); - }); - - describe('wrapped components', () => { - describe('GitLab UI bar chart', () => { - let glbarChart; - let chartData; - - beforeEach(() => { - glbarChart = barChart.findComponent(GlBarChart); - chartData = barChart.vm.chartData[graphData.metrics[0].label]; - }); - - it('should display a label on the x axis', () => { - expect(glbarChart.props('xAxisTitle')).toBe(graphData.xLabel); - }); - - it('should return chartData as array of arrays', () => { - expect(chartData).toBeInstanceOf(Array); - - chartData.forEach((item) => { - expect(item).toBeInstanceOf(Array); - }); - }); - }); - }); -}); |