diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 09:09:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 09:09:24 +0000 |
commit | 4720b569f0fcbb47e9f1a60e95172ae63b6f065a (patch) | |
tree | 5c6bcecbca227e608753a57a9aad19ccfe0567b6 /spec/frontend/monitoring | |
parent | cefe554b7ce2d0b52f9de855be832a47c2bc24ab (diff) | |
download | gitlab-ce-4720b569f0fcbb47e9f1a60e95172ae63b6f065a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/monitoring')
-rw-r--r-- | spec/frontend/monitoring/components/charts/time_series_spec.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/spec/frontend/monitoring/components/charts/time_series_spec.js b/spec/frontend/monitoring/components/charts/time_series_spec.js index cfd812002a4..a911b925b66 100644 --- a/spec/frontend/monitoring/components/charts/time_series_spec.js +++ b/spec/frontend/monitoring/components/charts/time_series_spec.js @@ -358,6 +358,45 @@ describe('Time series component', () => { expect(optionSeries[0].name).toEqual(mockSeriesName); }); }); + + it('additional y axis data', () => { + const mockCustomYAxisOption = { + name: 'Custom y axis label', + axisLabel: { + formatter: jest.fn(), + }, + }; + + timeSeriesChart.setProps({ + option: { + yAxis: mockCustomYAxisOption, + }, + }); + + return timeSeriesChart.vm.$nextTick().then(() => { + const { yAxis } = getChartOptions(); + + expect(yAxis[0]).toMatchObject(mockCustomYAxisOption); + }); + }); + + it('additional x axis data', () => { + const mockCustomXAxisOption = { + name: 'Custom x axis label', + }; + + timeSeriesChart.setProps({ + option: { + xAxis: mockCustomXAxisOption, + }, + }); + + return timeSeriesChart.vm.$nextTick().then(() => { + const { xAxis } = getChartOptions(); + + expect(xAxis).toMatchObject(mockCustomXAxisOption); + }); + }); }); describe('yAxis formatter', () => { |