diff options
Diffstat (limited to 'spec/frontend/monitoring/store/actions_spec.js')
-rw-r--r-- | spec/frontend/monitoring/store/actions_spec.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/spec/frontend/monitoring/store/actions_spec.js b/spec/frontend/monitoring/store/actions_spec.js index 8eda46a2ff1..b3b198d6b51 100644 --- a/spec/frontend/monitoring/store/actions_spec.js +++ b/spec/frontend/monitoring/store/actions_spec.js @@ -1,7 +1,7 @@ import MockAdapter from 'axios-mock-adapter'; import { backoffMockImplementation } from 'helpers/backoff_helper'; import testAction from 'helpers/vuex_action_helper'; -import { createAlert } from '~/flash'; +import { createAlert } from '~/alert'; import axios from '~/lib/utils/axios_utils'; import * as commonUtils from '~/lib/utils/common_utils'; import { @@ -61,7 +61,7 @@ import { mockDashboardsErrorResponse, } from '../mock_data'; -jest.mock('~/flash'); +jest.mock('~/alert'); describe('Monitoring store actions', () => { const { convertObjectPropsToCamelCase } = commonUtils; @@ -177,7 +177,6 @@ describe('Monitoring store actions', () => { }); it('dispatches when feature metricsDashboardAnnotations is on', () => { - const origGon = window.gon; window.gon = { features: { metricsDashboardAnnotations: true } }; return testAction( @@ -190,9 +189,7 @@ describe('Monitoring store actions', () => { { type: 'fetchDashboard' }, { type: 'fetchAnnotations' }, ], - ).then(() => { - window.gon = origGon; - }); + ); }); }); @@ -263,7 +260,7 @@ describe('Monitoring store actions', () => { }); }); - it('does not show a flash error when showErrorBanner is disabled', async () => { + it('does not show an alert when showErrorBanner is disabled', async () => { state.showErrorBanner = false; await result(); |