diff --git a/frontend/src/plugins/dashboard-plugin.js b/frontend/src/plugins/dashboard-plugin.js index e48da4e9e..4825377c7 100755 --- a/frontend/src/plugins/dashboard-plugin.js +++ b/frontend/src/plugins/dashboard-plugin.js @@ -1,7 +1,6 @@ import GlobalComponents from './globalComponents' import GlobalDirectives from './globalDirectives' -import Toasted from 'vue-toasted' import PortalVue from 'portal-vue' // vue-bootstrap @@ -30,16 +29,5 @@ export default { Vue.use(FlatPickr) Vue.use(Loading) Vue.use(VueApollo) - Vue.use(Toasted, { - position: 'top-center', - duration: 5000, - fullWidth: true, - action: { - text: 'x', - onClick: (e, toastObject) => { - toastObject.goAway(0) - }, - }, - }) }, } diff --git a/frontend/src/plugins/dashboard-plugin.test.js b/frontend/src/plugins/dashboard-plugin.test.js index 689855c12..6881cd0d4 100644 --- a/frontend/src/plugins/dashboard-plugin.test.js +++ b/frontend/src/plugins/dashboard-plugin.test.js @@ -4,13 +4,10 @@ import Vue from 'vue' import GlobalComponents from './globalComponents' import GlobalDirectives from './globalDirectives' -import Toasted from 'vue-toasted' - import './assets/scss/app.scss' jest.mock('./globalComponents') jest.mock('./globalDirectives') -jest.mock('vue-toasted') jest.mock('vue') @@ -27,21 +24,4 @@ describe('dashboard plugin', () => { it('installs the global directives', () => { expect(vueUseMock).toBeCalledWith(GlobalDirectives) }) - - describe('vue toasted', () => { - const toastedAction = vueUseMock.mock.calls[9][1].action.onClick - const goAwayMock = jest.fn() - const toastObject = { - goAway: goAwayMock, - } - - it('installs vue toasted', () => { - expect(vueUseMock).toBeCalledWith(Toasted, expect.anything()) - }) - - it('onClick calls goAway(0)', () => { - toastedAction({}, toastObject) - expect(goAwayMock).toBeCalledWith(0) - }) - }) })