change tests add trigger event

This commit is contained in:
ogerly 2022-08-30 13:22:25 +02:00
parent 0d3e96b42f
commit a2a0e660f4
4 changed files with 9 additions and 10 deletions

View File

@ -58,12 +58,12 @@ describe('ContributionMessagesFormular', () => {
})
describe('call onSubmit', () => {
it('response with the contribution message', () => {
wrapper.vm.onSubmit()
it('response with the contribution message', async () => {
await wrapper.find('form').trigger('submit')
})
})
describe('send createContributionLink with error', () => {
describe('send contribution message with error', () => {
beforeEach(async () => {
apolloMutateMock.mockRejectedValue({ message: 'OUCH!' })
wrapper = Wrapper()
@ -75,7 +75,7 @@ describe('ContributionMessagesFormular', () => {
})
})
describe('send createContributionLink with success', () => {
describe('send contribution message with success', () => {
beforeEach(async () => {
wrapper.setData({
form: {

View File

@ -38,7 +38,6 @@ export default {
},
methods: {
getListContributionMessages(id) {
this.messages = []
this.$apollo
.query({
query: listContributionMessages,

View File

@ -83,7 +83,7 @@
"plus": "+"
},
"message": {
"request": "Request has been sent."
"request": "Die Anfrage wurde gesendet."
},
"moderator": "Moderator",
"multiple_creation_text": "Bitte wähle ein oder mehrere Mitglieder aus für die du Schöpfen möchtest.",

View File

@ -58,12 +58,12 @@ describe('ContributionMessagesFormular', () => {
})
describe('call onSubmit', () => {
it('response with the contribution message', () => {
wrapper.vm.onSubmit()
it('response with the contribution message', async () => {
await wrapper.find('form').trigger('submit')
})
})
describe('send createContributionLink with error', () => {
describe('send contribution message with error', () => {
beforeEach(async () => {
apolloMutateMock.mockRejectedValue({ message: 'OUCH!' })
wrapper = Wrapper()
@ -75,7 +75,7 @@ describe('ContributionMessagesFormular', () => {
})
})
describe('send createContributionLink with success', () => {
describe('send contribution message with success', () => {
beforeEach(async () => {
wrapper.setData({
form: {