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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSarah Yasonik <syasonik@gitlab.com>2019-04-05 23:41:31 +0300
committerClement Ho <clemmakesapps@gmail.com>2019-04-05 23:41:31 +0300
commitf44737e453a35ef7361cd90af2b5a5ae09473992 (patch)
tree53a3489b547a4d605a59890e9e9fdd74e809e77a /spec
parenta5eb29c16045f5ae96ad107474f8fde974c3197e (diff)
Support multiple queries per chart on metrics dash
Adding support for metrics alerts disabled multiple query support. To avoid a data model refactor, this enables the visual of multiple queries per chart on the front end, combining queries based on metric group, title, and y-axis label. This also adds support for adding and editing alerts based on the query selected rather than the single metric associated with the chart.
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/monitoring/charts/area_spec.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/javascripts/monitoring/charts/area_spec.js b/spec/javascripts/monitoring/charts/area_spec.js
index 549a7935c0f..4ff519ae0e7 100644
--- a/spec/javascripts/monitoring/charts/area_spec.js
+++ b/spec/javascripts/monitoring/charts/area_spec.js
@@ -65,7 +65,7 @@ describe('Area component', () => {
expect(props.data).toBe(areaChart.vm.chartData);
expect(props.option).toBe(areaChart.vm.chartOptions);
expect(props.formatTooltipText).toBe(areaChart.vm.formatTooltipText);
- expect(props.thresholds).toBe(areaChart.props('alertData'));
+ expect(props.thresholds).toBe(areaChart.vm.thresholds);
});
it('recieves a tooltip title', () => {
@@ -105,12 +105,13 @@ describe('Area component', () => {
seriesName: areaChart.vm.chartData[0].name,
componentSubType: type,
value: [mockDate, 5.55555],
+ seriesIndex: 0,
},
],
value: mockDate,
});
- describe('series is of line type', () => {
+ describe('when series is of line type', () => {
beforeEach(() => {
areaChart.vm.formatTooltipText(generateSeriesData('line'));
});
@@ -131,7 +132,7 @@ describe('Area component', () => {
});
});
- describe('series is of scatter type', () => {
+ describe('when series is of scatter type', () => {
beforeEach(() => {
areaChart.vm.formatTooltipText(generateSeriesData('scatter'));
});