summaryrefslogtreecommitdiff
path: root/spec/javascripts/monitoring
diff options
context:
space:
mode:
authorJose Vargas <jvargas@gitlab.com>2019-03-20 13:52:24 -0600
committerJose Vargas <jvargas@gitlab.com>2019-04-04 14:53:03 -0600
commit481d25bf482941c48c335f8895a828544a7df873 (patch)
treea900f1a25b3368b2c5d947e7511ff58914cc4a11 /spec/javascripts/monitoring
parent268b727a5c7723d2beb057fbf985ba0b854e4d9f (diff)
downloadgitlab-ce-481d25bf482941c48c335f8895a828544a7df873.tar.gz
Add feature flag
Also added relevant tests that make use of a stubbed feature flag, prettified files
Diffstat (limited to 'spec/javascripts/monitoring')
-rw-r--r--spec/javascripts/monitoring/dashboard_spec.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/javascripts/monitoring/dashboard_spec.js b/spec/javascripts/monitoring/dashboard_spec.js
index ebf3972b00d..b152ac82ca4 100644
--- a/spec/javascripts/monitoring/dashboard_spec.js
+++ b/spec/javascripts/monitoring/dashboard_spec.js
@@ -39,11 +39,17 @@ describe('Dashboard', () => {
ee: false,
};
+ gon.features = {
+ metricsTimeWindow: true,
+ };
+
mock = new MockAdapter(axios);
DashboardComponent = Vue.extend(Dashboard);
});
afterEach(() => {
+ gon.features = {};
+
mock.restore();
});
@@ -186,9 +192,9 @@ describe('Dashboard', () => {
const numberOfTimeWindows = Object.keys(timeWindows).length;
setTimeout(() => {
- const timeWindowDropdown = component.$el.querySelector('#time-window-dropdown');
+ const timeWindowDropdown = component.$el.querySelector('.js-time-window-dropdown');
const timeWindowDropdownEls = component.$el.querySelectorAll(
- '#time-window-dropdown .dropdown-item',
+ '.js-time-window-dropdown .dropdown-item',
);
expect(timeWindowDropdown).not.toBeNull();