fix test components/Contributions/ContributionListItem.spec.js

This commit is contained in:
ogerly 2022-12-05 12:30:24 +01:00
parent 55ccbb4744
commit d69c6596f9
2 changed files with 5 additions and 4 deletions

View File

@ -89,7 +89,7 @@ describe('ContributionListItem', () => {
describe('edit contribution', () => {
beforeEach(() => {
wrapper.findAll('div.pointer').at(0).trigger('click')
wrapper.find('div.test-edit-contribution').trigger('click')
})
it('emits update contribution form', () => {
@ -110,7 +110,8 @@ describe('ContributionListItem', () => {
beforeEach(() => {
spy = jest.spyOn(wrapper.vm.$bvModal, 'msgBoxConfirm')
spy.mockImplementation(() => Promise.resolve(true))
wrapper.findAll('div.pointer').at(1).trigger('click')
// wrapper.findAll('div.pointer').at(1).trigger('click')
wrapper.findAll('div.test-delete-contribution').trigger('click')
})
it('opens the modal', () => {

View File

@ -42,7 +42,7 @@
<b-col>
<div
v-if="!['CONFIRMED', 'DELETED'].includes(state) && !allContribution"
class="pointer mr-3"
class="test-delete-contribution pointer mr-3"
@click="deleteContribution({ id })"
>
<b-icon icon="trash"></b-icon>
@ -52,7 +52,7 @@
<b-col>
<div
v-if="!['CONFIRMED', 'DELETED'].includes(state) && !allContribution"
class="pointer mr-3"
class="test-edit-contribution pointer mr-3"
@click="
$emit('update-contribution-form', {
id: id,