From d69c6596f914b8d84c6ec384ea73e602e388b001 Mon Sep 17 00:00:00 2001 From: ogerly Date: Mon, 5 Dec 2022 12:30:24 +0100 Subject: [PATCH] fix test components/Contributions/ContributionListItem.spec.js --- .../components/Contributions/ContributionListItem.spec.js | 5 +++-- .../src/components/Contributions/ContributionListItem.vue | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/Contributions/ContributionListItem.spec.js b/frontend/src/components/Contributions/ContributionListItem.spec.js index 66e3bcef9..08d3997fa 100644 --- a/frontend/src/components/Contributions/ContributionListItem.spec.js +++ b/frontend/src/components/Contributions/ContributionListItem.spec.js @@ -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', () => { diff --git a/frontend/src/components/Contributions/ContributionListItem.vue b/frontend/src/components/Contributions/ContributionListItem.vue index 6f8ace66e..938fb271b 100644 --- a/frontend/src/components/Contributions/ContributionListItem.vue +++ b/frontend/src/components/Contributions/ContributionListItem.vue @@ -42,7 +42,7 @@
@@ -52,7 +52,7 @@