mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
load provide from dashboard layout, test set tunneled email
This commit is contained in:
parent
78aaf629d2
commit
31dcf30c46
@ -1,6 +1,7 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import TransactionForm from './TransactionForm'
|
||||
import flushPromises from 'flush-promises'
|
||||
import DashboardLayout from '@/layouts/DashboardLayout_gdd.vue'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
@ -29,11 +30,7 @@ describe('TransactionForm', () => {
|
||||
localVue,
|
||||
mocks,
|
||||
propsData,
|
||||
provide: {
|
||||
getTunneledEmail() {
|
||||
return null
|
||||
},
|
||||
},
|
||||
provide: DashboardLayout.provide,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -284,5 +284,14 @@ describe('DashboardLayoutGdd', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('set tunneled email', () => {
|
||||
it('updates tunneled email', async () => {
|
||||
await wrapper
|
||||
.findComponent({ ref: 'router-view' })
|
||||
.vm.$emit('set-tunneled-email', 'bibi@bloxberg.de')
|
||||
expect(wrapper.vm.tunneledEmail).toBe('bibi@bloxberg.de')
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -3,6 +3,7 @@ import Send, { SEND_TYPES } from './Send'
|
||||
import { toastErrorSpy, toastSuccessSpy } from '@test/testSetup'
|
||||
import { TRANSACTION_STEPS } from '@/components/GddSend.vue'
|
||||
import { sendCoins, createTransactionLink } from '@/graphql/mutations.js'
|
||||
import DashboardLayout from '@/layouts/DashboardLayout_gdd.vue'
|
||||
|
||||
const apolloMutationMock = jest.fn()
|
||||
apolloMutationMock.mockResolvedValue('success')
|
||||
@ -43,11 +44,7 @@ describe('Send', () => {
|
||||
localVue,
|
||||
mocks,
|
||||
propsData,
|
||||
provide: {
|
||||
getTunneledEmail() {
|
||||
return null
|
||||
},
|
||||
},
|
||||
provide: DashboardLayout.provide,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user