diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /spec/frontend/monitoring/components/dashboard_spec.js | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'spec/frontend/monitoring/components/dashboard_spec.js')
-rw-r--r-- | spec/frontend/monitoring/components/dashboard_spec.js | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/spec/frontend/monitoring/components/dashboard_spec.js b/spec/frontend/monitoring/components/dashboard_spec.js index f899580b3df..9331048bce3 100644 --- a/spec/frontend/monitoring/components/dashboard_spec.js +++ b/spec/frontend/monitoring/components/dashboard_spec.js @@ -46,7 +46,6 @@ describe('Dashboard', () => { stubs: { DashboardHeader, }, - provide: { hasManagedPrometheus: false }, ...options, }); }; @@ -60,9 +59,6 @@ describe('Dashboard', () => { 'dashboard-panel': true, 'dashboard-header': DashboardHeader, }, - provide: { - hasManagedPrometheus: false, - }, ...options, }); }; @@ -412,7 +408,7 @@ describe('Dashboard', () => { }); }); - describe('when all requests have been commited by the store', () => { + describe('when all requests have been committed by the store', () => { beforeEach(() => { store.commit(`monitoringDashboard/${types.SET_INITIAL_STATE}`, { currentEnvironmentName: 'production', @@ -460,7 +456,7 @@ describe('Dashboard', () => { it('shows the links section', () => { expect(wrapper.vm.shouldShowLinksSection).toBe(true); - expect(wrapper.find(LinksSection)).toExist(); + expect(wrapper.findComponent(LinksSection).exists()).toBe(true); }); }); @@ -807,29 +803,4 @@ describe('Dashboard', () => { expect(dashboardPanel.exists()).toBe(true); }); }); - - describe('alerts deprecation', () => { - beforeEach(() => { - setupStoreWithData(store); - }); - - const findDeprecationNotice = () => wrapper.findByTestId('alerts-deprecation-warning'); - - it.each` - managedAlertsDeprecation | hasManagedPrometheus | isVisible - ${false} | ${false} | ${false} - ${false} | ${true} | ${true} - ${true} | ${false} | ${false} - ${true} | ${true} | ${false} - `( - 'when the deprecation feature flag is $managedAlertsDeprecation and has managed prometheus is $hasManagedPrometheus', - ({ hasManagedPrometheus, managedAlertsDeprecation, isVisible }) => { - createMountedWrapper( - {}, - { provide: { hasManagedPrometheus, glFeatures: { managedAlertsDeprecation } } }, - ); - expect(findDeprecationNotice().exists()).toBe(isVisible); - }, - ); - }); }); |