diff options
author | Adriel Santiago <adriel@gitlab.com> | 2019-06-07 20:00:12 +0300 |
---|---|---|
committer | Adriel Santiago <adriel@gitlab.com> | 2019-06-07 20:02:47 +0300 |
commit | a3d419b312406fde8ef90a9f5c752305ad5378c1 (patch) | |
tree | 995bfa1cfae9eee0f687ed65d858196af6f4153d /spec | |
parent | d94b092e3824e7be3e4fe26c27c9b0196795d197 (diff) |
Remove external dashboard link feature flagadriel-remove-external-dashboard-feature-flag
Enables external dashboard link on metrics dashboard
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(); }); }); }); |