diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/monitoring/dashboard_spec.js | 60 |
1 files changed, 15 insertions, 45 deletions
diff --git a/spec/javascripts/monitoring/dashboard_spec.js b/spec/javascripts/monitoring/dashboard_spec.js index 1a371c3adaf..d07b4ae3d0c 100644 --- a/spec/javascripts/monitoring/dashboard_spec.js +++ b/spec/javascripts/monitoring/dashboard_spec.js @@ -49,9 +49,6 @@ describe('Dashboard', () => { window.gon = { ...window.gon, ee: false, - features: { - grafanaDashboardLink: true, - }, }; store = createStore(); @@ -384,52 +381,25 @@ describe('Dashboard', () => { describe('external dashboard link', () => { beforeEach(() => { mock.onGet(mockApiEndpoint).reply(200, metricsGroupsAPIResponse); - }); - - describe('with feature flag enabled', () => { - beforeEach(() => { - component = new DashboardComponent({ - el: document.querySelector('.prometheus-graphs'), - propsData: { - ...propsData, - hasMetrics: true, - showPanels: false, - externalDashboardUrl: '/mockUrl', - }, - store, - }); - }); - it('shows the link', done => { - setTimeout(() => { - expect(component.$el.querySelector('.js-external-dashboard-link').innerText).toContain( - 'View full dashboard', - ); - done(); - }); + component = new DashboardComponent({ + el: document.querySelector('.prometheus-graphs'), + propsData: { + ...propsData, + hasMetrics: true, + showPanels: false, + externalDashboardUrl: '/mockUrl', + }, + store, }); }); - describe('without feature flage enabled', () => { - beforeEach(() => { - window.gon.features.grafanaDashboardLink = false; - component = new DashboardComponent({ - el: document.querySelector('.prometheus-graphs'), - propsData: { - ...propsData, - hasMetrics: true, - showPanels: false, - externalDashboardUrl: '', - }, - store, - }); - }); - - it('does not show the link', done => { - setTimeout(() => { - expect(component.$el.querySelector('.js-external-dashboard-link')).toBe(null); - done(); - }); + it('shows the link', done => { + setTimeout(() => { + expect(component.$el.querySelector('.js-external-dashboard-link').innerText).toContain( + 'View full dashboard', + ); + done(); }); }); }); |