diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index badb47e87..5eadf1e94 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -550,7 +550,7 @@ jobs: run: | cd e2e-tests/ yarn - yarn run cypress run --spec cypress/e2e/User.Authentication.feature,cypress/e2e/User.Authentication.ResetPassword.feature + yarn run cypress run --spec cypress/e2e/User.Authentication.feature,cypress/e2e/User.Authentication.ResetPassword.feature,cypress/e2e/User.Registration.feature - name: End-to-end tests | if tests failed, upload screenshots if: ${{ failure() && steps.e2e-tests.conclusion == 'failure' }} uses: actions/upload-artifact@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bfc66e39..ce3bd4a10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,56 @@ 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.19.0](https://github.com/gradido/gradido/compare/1.18.2...1.19.0) + +- fix(frontend): change contribution design [`#2731`](https://github.com/gradido/gradido/pull/2731) +- refactor(frontend): commnity navbar- & unauthenticated b-gradido styles [`#2732`](https://github.com/gradido/gradido/pull/2732) +- fix(database): change downwards migration to delete entries with last_announced_at IS NULL [`#2767`](https://github.com/gradido/gradido/pull/2767) +- feat(admin): deleted contributions visible [`#2759`](https://github.com/gradido/gradido/pull/2759) +- feat(other): e2e test user story user registration [`#2753`](https://github.com/gradido/gradido/pull/2753) +- refactor(frontend): style and design changes to a contribution [`#2648`](https://github.com/gradido/gradido/pull/2648) +- test(backend): add tests that ``sendContributionDeleted`` and ``sendContributionDenied`` are called [`#2740`](https://github.com/gradido/gradido/pull/2740) +- fix(backend): set email tls true in test [`#2763`](https://github.com/gradido/gradido/pull/2763) +- refactor(frontend): add visible event an answer question [`#2750`](https://github.com/gradido/gradido/pull/2750) +- refactor(frontend): style sidebar, add icons [`#2737`](https://github.com/gradido/gradido/pull/2737) +- fix(backend): possible flaky test [`#2761`](https://github.com/gradido/gradido/pull/2761) +- fix(backend): emails – adjust namings of menus to new design [`#2756`](https://github.com/gradido/gradido/pull/2756) +- ci(other): rename dht node and federation workflow jobs for better branch protection maintenance [`#2743`](https://github.com/gradido/gradido/pull/2743) +- refactor(backend): combine logic for `listTransactionLinks` & `listTransactionLinksAdmin` [`#2706`](https://github.com/gradido/gradido/pull/2706) +- refactor(backend): remove admin create contributions [`#2724`](https://github.com/gradido/gradido/pull/2724) +- refactor(frontend): remove .vue as imports [`#2725`](https://github.com/gradido/gradido/pull/2725) +- feat(federation): add dht-node to deployment scripts [`#2729`](https://github.com/gradido/gradido/pull/2729) +- fix(frontend): change fetchPolicy, add scripts.update [`#2718`](https://github.com/gradido/gradido/pull/2718) +- refactor(backend): list unconfirmed contribution to admin list all contribution [`#2666`](https://github.com/gradido/gradido/pull/2666) +- refactor(frontend): community routes [`#2721`](https://github.com/gradido/gradido/pull/2721) +- test(backend): authentication tests for TransactionLinkResolver [`#2705`](https://github.com/gradido/gradido/pull/2705) +- refactor(backend): use LogError on errors [`#2679`](https://github.com/gradido/gradido/pull/2679) +- refactor(backend): use LogError on encryptorUtils [`#2678`](https://github.com/gradido/gradido/pull/2678) +- refactor(backend): use LogError on creations [`#2677`](https://github.com/gradido/gradido/pull/2677) +- refactor(other): decrease docker build dependencies in test workflow [`#2719`](https://github.com/gradido/gradido/pull/2719) +- refactor(backend): unit test for the method denyContribution [`#2639`](https://github.com/gradido/gradido/pull/2639) +- refactor(frontend): logo inserted with better quality. [`#2646`](https://github.com/gradido/gradido/pull/2646) +- feat(federation): harmonize and sync modules and data of federation [`#2665`](https://github.com/gradido/gradido/pull/2665) +- feat(federation): add docker and github-workflow files [`#2680`](https://github.com/gradido/gradido/pull/2680) +- feat(other): e2e test user authentication reset password [`#2644`](https://github.com/gradido/gradido/pull/2644) +- refactor(admin): add tabs for all statusus on contributions [`#2623`](https://github.com/gradido/gradido/pull/2623) +- feat(federation): implement a graphql client to request getpublickey [`#2511`](https://github.com/gradido/gradido/pull/2511) +- refactor(frontend): style refactor mobil auth area [`#2643`](https://github.com/gradido/gradido/pull/2643) +- refactor(backend): use LogError on TransactionResolver [`#2676`](https://github.com/gradido/gradido/pull/2676) +- refactor(backend): event protocol rework [`#2691`](https://github.com/gradido/gradido/pull/2691) +- refactor(backend): use LogError on TransactionLinkResolver [`#2673`](https://github.com/gradido/gradido/pull/2673) +- fix(frontend): simple disabled function on submit send [`#2647`](https://github.com/gradido/gradido/pull/2647) +- refactor(frontend): missing message on old transactions [`#2660`](https://github.com/gradido/gradido/pull/2660) +- refactor(admin): remove overview and multi creation menu entry [`#2661`](https://github.com/gradido/gradido/pull/2661) +- feat(other): add locales check to backend and integrate it to test workflow [`#2693`](https://github.com/gradido/gradido/pull/2693) +- refactor(other): add linting rules like in backend modul [`#2695`](https://github.com/gradido/gradido/pull/2695) +- refactor(backend): use LogError on contributionResolver [`#2669`](https://github.com/gradido/gradido/pull/2669) + #### [1.18.2](https://github.com/gradido/gradido/compare/1.18.1...1.18.2) +> 10 February 2023 + +- chore(release): version 1.18.2 [`#2700`](https://github.com/gradido/gradido/pull/2700) - fix(admin): deny contribution button to left [`#2699`](https://github.com/gradido/gradido/pull/2699) #### [1.18.1](https://github.com/gradido/gradido/compare/1.18.0...1.18.1) diff --git a/admin/package.json b/admin/package.json index 941a9bf69..2b9f3032f 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.18.2", + "version": "1.19.0", "license": "Apache-2.0", "private": false, "scripts": { diff --git a/admin/src/graphql/listAllContributions.js b/admin/src/graphql/adminListAllContributions.js similarity index 83% rename from admin/src/graphql/listAllContributions.js rename to admin/src/graphql/adminListAllContributions.js index 655ab679c..cd47cd1d4 100644 --- a/admin/src/graphql/listAllContributions.js +++ b/admin/src/graphql/adminListAllContributions.js @@ -1,13 +1,13 @@ import gql from 'graphql-tag' -export const listAllContributions = gql` +export const adminListAllContributions = gql` query ( $currentPage: Int = 1 $pageSize: Int = 25 $order: Order = DESC $statusFilter: [ContributionStatus!] ) { - listAllContributions( + adminListAllContributions( currentPage: $currentPage pageSize: $pageSize order: $order @@ -28,6 +28,8 @@ export const listAllContributions = gql` messagesCount deniedAt deniedBy + deletedAt + deletedBy } } } diff --git a/admin/src/pages/CreationConfirm.spec.js b/admin/src/pages/CreationConfirm.spec.js index 710f2b26f..87f94e91f 100644 --- a/admin/src/pages/CreationConfirm.spec.js +++ b/admin/src/pages/CreationConfirm.spec.js @@ -2,7 +2,7 @@ import { mount } from '@vue/test-utils' import CreationConfirm from './CreationConfirm' import { adminDeleteContribution } from '../graphql/adminDeleteContribution' import { denyContribution } from '../graphql/denyContribution' -import { listAllContributions } from '../graphql/listAllContributions' +import { adminListAllContributions } from '../graphql/adminListAllContributions' import { confirmContribution } from '../graphql/confirmContribution' import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup' import VueApollo from 'vue-apollo' @@ -38,7 +38,7 @@ const mocks = { const defaultData = () => { return { - listAllContributions: { + adminListAllContributions: { contributionCount: 2, contributionList: [ { @@ -92,14 +92,14 @@ const defaultData = () => { describe('CreationConfirm', () => { let wrapper + const adminListAllContributionsMock = jest.fn() const adminDeleteContributionMock = jest.fn() const adminDenyContributionMock = jest.fn() const confirmContributionMock = jest.fn() mockClient.setRequestHandler( - listAllContributions, - jest - .fn() + adminListAllContributions, + adminListAllContributionsMock .mockRejectedValueOnce({ message: 'Ouch!' }) .mockResolvedValue({ data: defaultData() }), ) @@ -331,78 +331,82 @@ describe('CreationConfirm', () => { describe('filter tabs', () => { describe('click tab "confirmed"', () => { - let refetchSpy - beforeEach(async () => { jest.clearAllMocks() - refetchSpy = jest.spyOn(wrapper.vm.$apollo.queries.ListAllContributions, 'refetch') await wrapper.find('a[data-test="confirmed"]').trigger('click') }) - it('has statusFilter set to ["CONFIRMED"]', () => { - expect( - wrapper.vm.$apollo.queries.ListAllContributions.observer.options.variables, - ).toMatchObject({ statusFilter: ['CONFIRMED'] }) - }) - - it('refetches contributions', () => { - expect(refetchSpy).toBeCalled() + it('refetches contributions with proper filter', () => { + expect(adminListAllContributionsMock).toBeCalledWith({ + currentPage: 1, + order: 'DESC', + pageSize: 25, + statusFilter: ['CONFIRMED'], + }) }) describe('click tab "open"', () => { beforeEach(async () => { jest.clearAllMocks() - refetchSpy = jest.spyOn(wrapper.vm.$apollo.queries.ListAllContributions, 'refetch') await wrapper.find('a[data-test="open"]').trigger('click') }) - it('has statusFilter set to ["IN_PROGRESS", "PENDING"]', () => { - expect( - wrapper.vm.$apollo.queries.ListAllContributions.observer.options.variables, - ).toMatchObject({ statusFilter: ['IN_PROGRESS', 'PENDING'] }) - }) - - it('refetches contributions', () => { - expect(refetchSpy).toBeCalled() + it('refetches contributions with proper filter', () => { + expect(adminListAllContributionsMock).toBeCalledWith({ + currentPage: 1, + order: 'DESC', + pageSize: 25, + statusFilter: ['IN_PROGRESS', 'PENDING'], + }) }) }) describe('click tab "denied"', () => { beforeEach(async () => { jest.clearAllMocks() - refetchSpy = jest.spyOn(wrapper.vm.$apollo.queries.ListAllContributions, 'refetch') await wrapper.find('a[data-test="denied"]').trigger('click') }) - it('has statusFilter set to ["DENIED"]', () => { - expect( - wrapper.vm.$apollo.queries.ListAllContributions.observer.options.variables, - ).toMatchObject({ statusFilter: ['DENIED'] }) + it('refetches contributions with proper filter', () => { + expect(adminListAllContributionsMock).toBeCalledWith({ + currentPage: 1, + order: 'DESC', + pageSize: 25, + statusFilter: ['DENIED'], + }) + }) + }) + + describe('click tab "deleted"', () => { + beforeEach(async () => { + jest.clearAllMocks() + await wrapper.find('a[data-test="deleted"]').trigger('click') }) - it('refetches contributions', () => { - expect(refetchSpy).toBeCalled() + it('refetches contributions with proper filter', () => { + expect(adminListAllContributionsMock).toBeCalledWith({ + currentPage: 1, + order: 'DESC', + pageSize: 25, + statusFilter: ['DELETED'], + }) }) }) describe('click tab "all"', () => { beforeEach(async () => { jest.clearAllMocks() - refetchSpy = jest.spyOn(wrapper.vm.$apollo.queries.ListAllContributions, 'refetch') await wrapper.find('a[data-test="all"]').trigger('click') }) - it('has statusFilter set to ["IN_PROGRESS", "PENDING", "CONFIRMED", "DENIED", "DELETED"]', () => { - expect( - wrapper.vm.$apollo.queries.ListAllContributions.observer.options.variables, - ).toMatchObject({ + it('refetches contributions with proper filter', () => { + expect(adminListAllContributionsMock).toBeCalledWith({ + currentPage: 1, + order: 'DESC', + pageSize: 25, statusFilter: ['IN_PROGRESS', 'PENDING', 'CONFIRMED', 'DENIED', 'DELETED'], }) }) - - it('refetches contributions', () => { - expect(refetchSpy).toBeCalled() - }) }) }) }) @@ -412,10 +416,20 @@ describe('CreationConfirm', () => { await wrapper.findComponent({ name: 'OpenCreationsTable' }).vm.$emit('update-state', 2) }) - it.skip('updates the status', () => { + it('updates the status', () => { expect(wrapper.vm.items.find((obj) => obj.id === 2).messagesCount).toBe(1) expect(wrapper.vm.items.find((obj) => obj.id === 2).state).toBe('IN_PROGRESS') }) }) + + describe('unknown variant', () => { + beforeEach(async () => { + await wrapper.setData({ variant: 'unknown' }) + }) + + it('has overlay icon "info"', () => { + expect(wrapper.vm.overlayIcon).toBe('info') + }) + }) }) }) diff --git a/admin/src/pages/CreationConfirm.vue b/admin/src/pages/CreationConfirm.vue index 7c354fc85..55b819268 100644 --- a/admin/src/pages/CreationConfirm.vue +++ b/admin/src/pages/CreationConfirm.vue @@ -73,7 +73,7 @@ diff --git a/frontend/src/graphql/queries.js b/frontend/src/graphql/queries.js index 6e8d420b8..7193eded0 100644 --- a/frontend/src/graphql/queries.js +++ b/frontend/src/graphql/queries.js @@ -165,13 +165,13 @@ export const listContributions = gql` $currentPage: Int = 1 $pageSize: Int = 25 $order: Order = DESC - $filterConfirmed: Boolean = false + $statusFilter: [ContributionStatus!] ) { listContributions( currentPage: $currentPage pageSize: $pageSize order: $order - filterConfirmed: $filterConfirmed + statusFilter: $statusFilter ) { contributionCount contributionList { diff --git a/frontend/src/layouts/templates/CommunityTemplate.spec.js b/frontend/src/layouts/templates/CommunityTemplate.spec.js index cd4b598ef..534e45125 100644 --- a/frontend/src/layouts/templates/CommunityTemplate.spec.js +++ b/frontend/src/layouts/templates/CommunityTemplate.spec.js @@ -50,7 +50,7 @@ describe('CommunityTemplate', () => { expect(listItems.at(0).find('svg').attributes('aria-label')).toEqual('bell fill') expect(listItems.at(0).text()).toBe('contribution.alert.pending') - expect(listItems.at(1).find('svg').attributes('aria-label')).toEqual('question square') + expect(listItems.at(1).find('svg').attributes('aria-label')).toEqual('question') expect(listItems.at(1).text()).toBe('contribution.alert.in_progress') expect(listItems.at(2).find('svg').attributes('aria-label')).toEqual('check') @@ -80,7 +80,7 @@ describe('CommunityTemplate', () => { expect(listItems.at(0).find('svg').attributes('aria-label')).toEqual('bell fill') expect(listItems.at(0).text()).toBe('contribution.alert.pending') - expect(listItems.at(1).find('svg').attributes('aria-label')).toEqual('question square') + expect(listItems.at(1).find('svg').attributes('aria-label')).toEqual('question') expect(listItems.at(1).text()).toBe('contribution.alert.in_progress') expect(listItems.at(2).find('svg').attributes('aria-label')).toEqual('check') diff --git a/frontend/src/layouts/templates/CommunityTemplate.vue b/frontend/src/layouts/templates/CommunityTemplate.vue index 448c06bd2..f014af2c0 100644 --- a/frontend/src/layouts/templates/CommunityTemplate.vue +++ b/frontend/src/layouts/templates/CommunityTemplate.vue @@ -24,7 +24,7 @@ {{ $t('contribution.alert.pending') }}
  • - + {{ $t('contribution.alert.in_progress') }}
  • @@ -54,7 +54,7 @@ {{ $t('contribution.alert.pending') }}
  • - + {{ $t('contribution.alert.in_progress') }}
  • diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index ef2abe366..719ed4cad 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -56,6 +56,7 @@ "openAmountForMonth": "Für {monthAndYear} kannst du noch {creation} GDD einreichen.", "yourContribution": "Dein Beitrag zum Gemeinwohl" }, + "isEdited": "hat den Beitrag bearbeitet", "lastContribution": "Letzte Beiträge", "noContributions": { "allContributions": "Es wurden noch keine Beiträge eingereicht.", @@ -67,6 +68,7 @@ "lastMonth": "Für den ausgewählten Monat ist das Schöpfungslimit erreicht.", "thisMonth": "Für den aktuellen Monat ist das Schöpfungslimit erreicht." }, + "oldContribution": "Vorherige Version", "selectDate": "Wann war dein Beitrag?", "submit": "Einreichen", "submitted": "Der Beitrag wurde eingereicht.", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 78898266f..a0c06dc56 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -56,6 +56,7 @@ "openAmountForMonth": "For {monthAndYear}, you can still submit {creation} GDD.", "yourContribution": "Your Contributions to the Common Good" }, + "isEdited": "edited the contribution", "lastContribution": "Last Contributions", "noContributions": { "allContributions": "No contributions have been submitted yet.", @@ -67,6 +68,7 @@ "lastMonth": "The creation limit is reached for the selected month.", "thisMonth": "The creation limit has been reached for the current month." }, + "oldContribution": "Previous version", "selectDate": "When was your contribution?", "submit": "Submit", "submitted": "The contribution was submitted.", diff --git a/frontend/src/pages/ForgotPassword.vue b/frontend/src/pages/ForgotPassword.vue index 773b78278..80d07b9ff 100644 --- a/frontend/src/pages/ForgotPassword.vue +++ b/frontend/src/pages/ForgotPassword.vue @@ -5,7 +5,7 @@
    {{ $t('site.forgotPassword.heading') }}
    - + -
    - + + + {{ $t('settings.password.send_now') }} -
    +
    +
    @@ -88,3 +90,13 @@ export default { }, } + diff --git a/frontend/src/pages/Login.vue b/frontend/src/pages/Login.vue index 2a3c05dc7..c02ee0e45 100644 --- a/frontend/src/pages/Login.vue +++ b/frontend/src/pages/Login.vue @@ -2,7 +2,7 @@
    {{ $t('gdd_per_link.isFree') }}
    - + @@ -30,8 +30,15 @@ - - {{ $t('login') }} + + + {{ $t('login') }} + @@ -127,3 +134,13 @@ export default { }, } + diff --git a/frontend/src/pages/Register.vue b/frontend/src/pages/Register.vue index c2877e897..5f53b8ac1 100755 --- a/frontend/src/pages/Register.vue +++ b/frontend/src/pages/Register.vue @@ -81,7 +81,7 @@ - + + diff --git a/frontend/src/pages/ResetPassword.vue b/frontend/src/pages/ResetPassword.vue index 5c791ac61..6fa76d994 100644 --- a/frontend/src/pages/ResetPassword.vue +++ b/frontend/src/pages/ResetPassword.vue @@ -1,20 +1,24 @@