diff options
Diffstat (limited to 'spec/frontend/monitoring/components/dashboard_spec.js')
-rw-r--r-- | spec/frontend/monitoring/components/dashboard_spec.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/spec/frontend/monitoring/components/dashboard_spec.js b/spec/frontend/monitoring/components/dashboard_spec.js index 8a10857d0ff..f77e8b61050 100644 --- a/spec/frontend/monitoring/components/dashboard_spec.js +++ b/spec/frontend/monitoring/components/dashboard_spec.js @@ -10,7 +10,6 @@ import DateTimePicker from '~/monitoring/components/date_time_picker/date_time_p import GroupEmptyState from '~/monitoring/components/group_empty_state.vue'; import { createStore } from '~/monitoring/stores'; import * as types from '~/monitoring/stores/mutation_types'; -import * as monitoringUtils from '~/monitoring/utils'; import { setupComponentStore, propsData } from '../init_utils'; import { metricsGroupsAPIResponse, @@ -24,13 +23,12 @@ const localVue = createLocalVue(); const expectedPanelCount = 2; describe('Dashboard', () => { - let DashboardComponent; let store; let wrapper; let mock; const createShallowWrapper = (props = {}, options = {}) => { - wrapper = shallowMount(localVue.extend(DashboardComponent), { + wrapper = shallowMount(Dashboard, { localVue, sync: false, propsData: { ...propsData, ...props }, @@ -40,7 +38,7 @@ describe('Dashboard', () => { }; const createMountedWrapper = (props = {}, options = {}) => { - wrapper = mount(localVue.extend(DashboardComponent), { + wrapper = mount(Dashboard, { localVue, sync: false, propsData: { ...propsData, ...props }, @@ -51,7 +49,6 @@ describe('Dashboard', () => { beforeEach(() => { store = createStore(); - DashboardComponent = localVue.extend(Dashboard); mock = new MockAdapter(axios); }); @@ -137,7 +134,6 @@ describe('Dashboard', () => { }); it('fetches the metrics data with proper time window', done => { - const getTimeDiffSpy = jest.spyOn(monitoringUtils, 'getTimeDiff'); jest.spyOn(store, 'dispatch'); createMountedWrapper( @@ -154,7 +150,6 @@ describe('Dashboard', () => { .$nextTick() .then(() => { expect(store.dispatch).toHaveBeenCalled(); - expect(getTimeDiffSpy).toHaveBeenCalled(); done(); }) |