diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b7000100e..34ebeff11 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -528,7 +528,7 @@ jobs: report_name: Coverage Backend type: lcov result_path: ./backend/coverage/lcov.info - min_coverage: 68 + min_coverage: 74 token: ${{ github.token }} ########################################################################## diff --git a/CHANGELOG.md b/CHANGELOG.md index 46a704739..d4eb48283 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,54 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [1.13.1](https://github.com/gradido/gradido/compare/1.13.0...1.13.1) + +- Fix: correctly evaluate to EMAIL_TEST_MODE to false [`#2273`](https://github.com/gradido/gradido/pull/2273) +- Refactor: Contribution resolver logs and events [`#2231`](https://github.com/gradido/gradido/pull/2231) + +#### [1.13.0](https://github.com/gradido/gradido/compare/1.12.1...1.13.0) + +> 18 October 2022 + +- release: Version 1.13.0 [`#2269`](https://github.com/gradido/gradido/pull/2269) +- fix: Linked User Email in Transaction List [`#2268`](https://github.com/gradido/gradido/pull/2268) +- concept capturing alias [`#2148`](https://github.com/gradido/gradido/pull/2148) +- fix: 🍰 Daily Redeem Of Contribution Link [`#2265`](https://github.com/gradido/gradido/pull/2265) +- fix: 🐛 Prevent Loosing Redeem Code When Changing Between Register and Login in Auth Navbar [`#2260`](https://github.com/gradido/gradido/pull/2260) +- fix: Disable Change of Month on Update Contribution [`#2264`](https://github.com/gradido/gradido/pull/2264) +- feat: 🍰 Global Jest Extension For Decimal Equal [`#2261`](https://github.com/gradido/gradido/pull/2261) +- feat: 🍰 Daily Rule For Contribution Links In Admin Interface [`#2262`](https://github.com/gradido/gradido/pull/2262) +- feat: 🍰 Do Not Show Expired Contribution Links In Wallet [`#2257`](https://github.com/gradido/gradido/pull/2257) +- fix: 🍰 Disable Change Of Month For Update Contribution (wallet and admin) [`#2258`](https://github.com/gradido/gradido/pull/2258) +- refactor: 🍰 Login And Logout To Mutations [`#2232`](https://github.com/gradido/gradido/pull/2232) +- fix: 🐛 Verify Token Before Redeeming A Link [`#2254`](https://github.com/gradido/gradido/pull/2254) +- Refactor: Add all events to documentation table [`#2240`](https://github.com/gradido/gradido/pull/2240) +- reconfig log4js with rollover feature and userid in logevent-message [`#2221`](https://github.com/gradido/gradido/pull/2221) +- refactor: 🍰 Refactoring Components Of `CotributionMessagesListItem` [`#2251`](https://github.com/gradido/gradido/pull/2251) +- style: add border-radius on send form [`#2233`](https://github.com/gradido/gradido/pull/2233) +- 2198 adminarea more dates on created transaction [`#2212`](https://github.com/gradido/gradido/pull/2212) +- Bug: delete contribution link [`#2213`](https://github.com/gradido/gradido/pull/2213) +- chore: 🍰 Fix Cypress Tests Unreliability [`#2245`](https://github.com/gradido/gradido/pull/2245) +- docs: 🍰 Refine Deployment Documentation [`#2209`](https://github.com/gradido/gradido/pull/2209) +- End-to-end test setup [`#2047`](https://github.com/gradido/gradido/pull/2047) +- config testmodus flag for sending emails to test or team account instead of user account [`#2216`](https://github.com/gradido/gradido/pull/2216) +- GradidoID 1: adapt and migrate database schema [`#2058`](https://github.com/gradido/gradido/pull/2058) +- feat: Add Client Request Time to Context [`#2206`](https://github.com/gradido/gradido/pull/2206) +- 2219 feature rework eventprotocol [`#2234`](https://github.com/gradido/gradido/pull/2234) +- Refactor: Test register with redeem code [`#2214`](https://github.com/gradido/gradido/pull/2214) +- 2203 delete query modal when redeeming the redeem link [`#2211`](https://github.com/gradido/gradido/pull/2211) +- Refactor: 🍰 Change email templates [`#2228`](https://github.com/gradido/gradido/pull/2228) +- Refactor: Events and logs completed in User Resolver [`#2204`](https://github.com/gradido/gradido/pull/2204) +- change support mail [`#2210`](https://github.com/gradido/gradido/pull/2210) +- feat: 🍰 Send email when contribution is confirmed [`#2193`](https://github.com/gradido/gradido/pull/2193) +- feat: 🍰 Send email when admin writes message to contribution [`#2187`](https://github.com/gradido/gradido/pull/2187) +- feat: 🍰 Send Email To Transaction Link Sender After Receiver Redeemed It [`#2063`](https://github.com/gradido/gradido/pull/2063) + #### [1.12.1](https://github.com/gradido/gradido/compare/1.12.0...1.12.1) +> 13 September 2022 + +- release: Version 1.12.1 [`#2196`](https://github.com/gradido/gradido/pull/2196) - fix: 🍰 Show Not Icons In `allContribution` List [`#2195`](https://github.com/gradido/gradido/pull/2195) #### [1.12.0](https://github.com/gradido/gradido/compare/1.11.0...1.12.0) diff --git a/admin/package.json b/admin/package.json index f56ae0a87..2db889771 100644 --- a/admin/package.json +++ b/admin/package.json @@ -3,7 +3,7 @@ "description": "Administraion Interface for Gradido", "main": "index.js", "author": "Moriz Wahl", - "version": "1.12.1", + "version": "1.13.1", "license": "Apache-2.0", "private": false, "scripts": { diff --git a/admin/src/components/ContributionLink.spec.js b/admin/src/components/ContributionLink.spec.js index f1b9cfb97..9818e8b93 100644 --- a/admin/src/components/ContributionLink.spec.js +++ b/admin/src/components/ContributionLink.spec.js @@ -5,6 +5,7 @@ const localVue = global.localVue const mocks = { $t: jest.fn((t) => t), + $d: jest.fn((d) => d), } const propsData = { diff --git a/admin/src/components/ContributionLink.vue b/admin/src/components/ContributionLink.vue index 893e202f4..5621e4330 100644 --- a/admin/src/components/ContributionLink.vue +++ b/admin/src/components/ContributionLink.vue @@ -15,7 +15,10 @@

{{ $t('contributionLink.contributionLinks') }}

- +
@@ -24,6 +27,7 @@ v-if="count > 0" :items="items" @editContributionLinkData="editContributionLinkData" + @get-contribution-links="$emit('get-contribution-links')" />
{{ $t('contributionLink.noContributionLinks') }}
diff --git a/admin/src/components/ContributionLinkForm.spec.js b/admin/src/components/ContributionLinkForm.spec.js index 7182fb2e9..2baefcbe2 100644 --- a/admin/src/components/ContributionLinkForm.spec.js +++ b/admin/src/components/ContributionLinkForm.spec.js @@ -1,6 +1,7 @@ import { mount } from '@vue/test-utils' import ContributionLinkForm from './ContributionLinkForm.vue' -import { toastErrorSpy } from '../../test/testSetup' +import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup' +import { createContributionLink } from '@/graphql/createContributionLink.js' const localVue = global.localVue @@ -72,48 +73,70 @@ describe('ContributionLinkForm', () => { }) }) - // describe('successfull submit', () => { - // beforeEach(async () => { - // mockAPIcall.mockResolvedValue({ - // data: { - // createContributionLink: { - // link: 'https://localhost/redeem/CL-1a2345678', - // }, - // }, - // }) - // await wrapper.find('input.test-validFrom').setValue('2022-6-18') - // await wrapper.find('input.test-validTo').setValue('2022-7-18') - // await wrapper.find('input.test-name').setValue('test name') - // await wrapper.find('input.test-memo').setValue('test memo') - // await wrapper.find('input.test-amount').setValue('100') - // await wrapper.find('form').trigger('submit') - // }) + describe('successfull submit', () => { + beforeEach(async () => { + apolloMutateMock.mockResolvedValue({ + data: { + createContributionLink: { + link: 'https://localhost/redeem/CL-1a2345678', + }, + }, + }) + await wrapper + .findAllComponents({ name: 'BFormDatepicker' }) + .at(0) + .vm.$emit('input', '2022-6-18') + await wrapper + .findAllComponents({ name: 'BFormDatepicker' }) + .at(1) + .vm.$emit('input', '2022-7-18') + await wrapper.find('input.test-name').setValue('test name') + await wrapper.find('textarea.test-memo').setValue('test memo') + await wrapper.find('input.test-amount').setValue('100') + await wrapper.find('form').trigger('submit') + }) - // it('calls the API', () => { - // expect(mockAPIcall).toHaveBeenCalledWith( - // expect.objectContaining({ - // variables: { - // link: 'https://localhost/redeem/CL-1a2345678', - // }, - // }), - // ) - // }) + it('calls the API', () => { + expect(apolloMutateMock).toHaveBeenCalledWith({ + mutation: createContributionLink, + variables: { + validFrom: '2022-6-18', + validTo: '2022-7-18', + name: 'test name', + amount: '100', + memo: 'test memo', + cycle: 'ONCE', + maxPerCycle: 1, + maxAmountPerMonth: '0', + }, + }) + }) - // it('displays the new username', () => { - // expect(wrapper.find('div.display-username').text()).toEqual('@username') - // }) - // }) - }) - - describe('send createContributionLink with error', () => { - beforeEach(() => { - apolloMutateMock.mockRejectedValue({ message: 'OUCH!' }) - wrapper = Wrapper() - wrapper.vm.onSubmit() + it('toasts a succes message', () => { + expect(toastSuccessSpy).toBeCalledWith('https://localhost/redeem/CL-1a2345678') + }) }) - it('toasts an error message', () => { - expect(toastErrorSpy).toBeCalledWith('contributionLink.noStartDate') + describe('send createContributionLink with error', () => { + beforeEach(async () => { + apolloMutateMock.mockRejectedValue({ message: 'OUCH!' }) + await wrapper + .findAllComponents({ name: 'BFormDatepicker' }) + .at(0) + .vm.$emit('input', '2022-6-18') + await wrapper + .findAllComponents({ name: 'BFormDatepicker' }) + .at(1) + .vm.$emit('input', '2022-7-18') + await wrapper.find('input.test-name').setValue('test name') + await wrapper.find('textarea.test-memo').setValue('test memo') + await wrapper.find('input.test-amount').setValue('100') + await wrapper.find('form').trigger('submit') + }) + + it('toasts an error message', () => { + expect(toastErrorSpy).toBeCalledWith('OUCH!') + }) }) }) }) diff --git a/admin/src/components/ContributionLinkForm.vue b/admin/src/components/ContributionLinkForm.vue index a159d33d3..c21a7f17c 100644 --- a/admin/src/components/ContributionLinkForm.vue +++ b/admin/src/components/ContributionLinkForm.vue @@ -1,8 +1,5 @@