diff --git a/frontend/src/components/ContributionMessages/ContributionMessagesFormular.spec.js b/frontend/src/components/ContributionMessages/ContributionMessagesFormular.spec.js index aba5abc34..42deac9cb 100644 --- a/frontend/src/components/ContributionMessages/ContributionMessagesFormular.spec.js +++ b/frontend/src/components/ContributionMessages/ContributionMessagesFormular.spec.js @@ -67,9 +67,9 @@ describe('ContributionMessagesFormular', () => { await wrapper.find('form').trigger('submit') }) - it('emitted "get-list-contribution-messages" with data', async () => { + it('emitted "get-list-contribution-messages" with false', async () => { expect(wrapper.emitted('get-list-contribution-messages')).toEqual( - expect.arrayContaining([expect.arrayContaining([42])]), + expect.arrayContaining([expect.arrayContaining([false])]), ) }) diff --git a/frontend/src/components/Contributions/ContributionListItem.spec.js b/frontend/src/components/Contributions/ContributionListItem.spec.js index f477d1c2c..66e3bcef9 100644 --- a/frontend/src/components/Contributions/ContributionListItem.spec.js +++ b/frontend/src/components/Contributions/ContributionListItem.spec.js @@ -9,6 +9,7 @@ describe('ContributionListItem', () => { const mocks = { $t: jest.fn((t) => t), $d: jest.fn((d) => d), + $apollo: { query: jest.fn().mockResolvedValue() }, } const propsData = { @@ -143,5 +144,16 @@ describe('ContributionListItem', () => { }) }) }) + + describe('getListContributionMessages', () => { + beforeEach(() => { + wrapper + .findComponent({ name: 'ContributionMessagesList' }) + .vm.$emit('get-list-contribution-messages') + }) + it('emits closeAllOpenCollapse', () => { + expect(wrapper.emitted('closeAllOpenCollapse')).toBeTruthy() + }) + }) }) })