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:
authorSimon Knox <psimyn@gmail.com>2019-03-26 06:41:17 +0300
committerSimon Knox <psimyn@gmail.com>2019-03-26 16:55:04 +0300
commitc02b60261c09919ec0ee48f4fa35163612f43bc2 (patch)
treee6378231ac4d71740d73ace7c83922474fff9731 /spec
parenta1aa9241d582ea148ed2c6abf938f96d5f9788a9 (diff)
Remove EE differences for monitoring dashboard
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/monitoring/dashboard_spec.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/javascripts/monitoring/dashboard_spec.js b/spec/javascripts/monitoring/dashboard_spec.js
index 6078a0e7872..454777fa912 100644
--- a/spec/javascripts/monitoring/dashboard_spec.js
+++ b/spec/javascripts/monitoring/dashboard_spec.js
@@ -33,6 +33,11 @@ describe('Dashboard', () => {
<div class="layout-page"></div>
`);
+ window.gon = {
+ ...window.gon,
+ ee: false,
+ };
+
mock = new MockAdapter(axios);
DashboardComponent = Vue.extend(Dashboard);
});
@@ -152,6 +157,25 @@ describe('Dashboard', () => {
done();
});
});
+
+ it('hides the dropdown', done => {
+ const component = new DashboardComponent({
+ el: document.querySelector('.prometheus-graphs'),
+ propsData: {
+ ...propsData,
+ hasMetrics: true,
+ showPanels: false,
+ environmentsEndpoint: '',
+ },
+ });
+
+ Vue.nextTick(() => {
+ const dropdownIsActiveElement = component.$el.querySelectorAll('.environments');
+
+ expect(dropdownIsActiveElement.length).toEqual(0);
+ done();
+ });
+ });
});
describe('when the window resizes', () => {