diff options
author | Jose Vargas <jvargas@gitlab.com> | 2019-04-01 12:38:26 -0600 |
---|---|---|
committer | Jose Vargas <jvargas@gitlab.com> | 2019-04-04 14:53:03 -0600 |
commit | 217e9e4db1a81125a06830b9dbf270a15fb9c284 (patch) | |
tree | 212cb0aeb4bf88ce0317b2b8a0e991657fc738b8 /spec | |
parent | b75e03a6c95d58a9ce0536da314d782c4895ae43 (diff) | |
download | gitlab-ce-217e9e4db1a81125a06830b9dbf270a15fb9c284.tar.gz |
Created `getTimeDiff` utility function
Updated i18n strings and changed the
monitoring service graph data params
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/monitoring/dashboard_spec.js | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/spec/javascripts/monitoring/dashboard_spec.js b/spec/javascripts/monitoring/dashboard_spec.js index a2d1acbe618..6d85e2c6ea2 100644 --- a/spec/javascripts/monitoring/dashboard_spec.js +++ b/spec/javascripts/monitoring/dashboard_spec.js @@ -184,7 +184,23 @@ describe('Dashboard', () => { }); }); - it('renders the time window dropdown with a set of options ', done => { + it('renders the time window dropdown with a set of options', done => { + gon.features.metricsTimeWindow = false; + const component = new DashboardComponent({ + el: document.querySelector('.prometheus-graphs'), + propsData: { ...propsData, hasMetrics: true, showPanels: false }, + }); + + setTimeout(() => { + const timeWindowDropdown = component.$el.querySelector('.js-time-window-dropdown'); + + expect(timeWindowDropdown).toBeNull(); + + done(); + }); + }); + + it('does not show the time window dropdown when the feature flag is not set', done => { const component = new DashboardComponent({ el: document.querySelector('.prometheus-graphs'), propsData: { ...propsData, hasMetrics: true, showPanels: false }, |