mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
remove vue toasted
This commit is contained in:
parent
84d2b9459d
commit
b4d0f5cbed
@ -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)
|
||||
},
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@ -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)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user