diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-06-07 11:41:00 -0500 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-06-07 11:43:33 -0500 |
commit | 49f94ce97b5953e26a64d3e0a0f49aad9c9a67a8 (patch) | |
tree | 2df5c2e388bb914889bc505131a4966d195d268c | |
parent | 6363a457f2266acb64da7ac8b5e1c3246fd6db49 (diff) | |
download | gitlab-ce-tests-additional-metrics-dashboard.tar.gz |
Added specs for rectTransform for the monitoring_legends componenttests-additional-metrics-dashboard
-rw-r--r-- | spec/javascripts/monitoring/monitoring_legends_spec.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/javascripts/monitoring/monitoring_legends_spec.js b/spec/javascripts/monitoring/monitoring_legends_spec.js index 8358515a652..38988d09152 100644 --- a/spec/javascripts/monitoring/monitoring_legends_spec.js +++ b/spec/javascripts/monitoring/monitoring_legends_spec.js @@ -30,6 +30,8 @@ describe('MonitoringLegends', () => { expect(typeof component.textTransform).toEqual('string'); expect(component.textTransform.indexOf(120)).not.toEqual(-1); + expect(component.textTransform.indexOf('15,')).not.toEqual(-1); + expect(component.textTransform.indexOf('rotate(-90)')).not.toEqual(-1); }); it('xPosition', () => { @@ -61,6 +63,24 @@ describe('MonitoringLegends', () => { expect(component.yPosition).toEqual(240); }); + + it('rectTransform', () => { + const component = createComponent({ + width: 500, + height: 300, + margin: measurements.large.margin, + measurements: measurements.large, + areaColorRgb: '#f0f0f0', + legendTitle: 'Title', + yAxisLabel: 'Values', + metricUsage: 'Value', + }); + + expect(typeof component.rectTransform).toEqual('string'); + expect(component.rectTransform.indexOf(120)).not.toEqual(-1); + expect(component.rectTransform.indexOf('0,')).not.toEqual(-1); + expect(component.rectTransform.indexOf('rotate(-90)')).not.toEqual(-1); + }); }); it('has 2 rect-axis-text rect svg elements', () => { |