diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d5f34ff6d..573cd911a 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/.github/workflows/test_dht-node.yml b/.github/workflows/test_dht-node.yml index 5b3a65a70..4ac475351 100644 --- a/.github/workflows/test_dht-node.yml +++ b/.github/workflows/test_dht-node.yml @@ -1,4 +1,4 @@ -name: gradido test_dht-node CI +name: Gradido DHT Node Test CI on: push @@ -7,7 +7,7 @@ jobs: # JOB: DOCKER BUILD TEST ##################################################### ############################################################################## build: - name: Docker Build Test + name: Docker Build Test - DHT Node runs-on: ubuntu-latest steps: - name: Checkout code @@ -28,7 +28,7 @@ jobs: # JOB: LINT ################################################################## ############################################################################## lint: - name: Lint + name: Lint - DHT Node runs-on: ubuntu-latest needs: [build] steps: @@ -50,7 +50,7 @@ jobs: # JOB: UNIT TEST ############################################################# ############################################################################## unit_test: - name: Unit tests + name: Unit Tests - DHT Node runs-on: ubuntu-latest needs: [build] steps: @@ -90,7 +90,7 @@ jobs: - name: Coverage check uses: webcraftmedia/coverage-check-action@master with: - report_name: Coverage dht-node + report_name: Coverage DHT Node type: lcov #result_path: ./dht-node/coverage/lcov.info result_path: ./coverage/lcov.info diff --git a/.github/workflows/test_federation.yml b/.github/workflows/test_federation.yml index 2da78758e..ab943eedd 100644 --- a/.github/workflows/test_federation.yml +++ b/.github/workflows/test_federation.yml @@ -1,4 +1,4 @@ -name: gradido test_federation CI +name: Gradido Federation Test CI on: push @@ -7,7 +7,7 @@ jobs: # JOB: DOCKER BUILD TEST ##################################################### ############################################################################## build: - name: Docker Build Test + name: Docker Build Test - Federation runs-on: ubuntu-latest steps: - name: Checkout code @@ -28,7 +28,7 @@ jobs: # JOB: LINT ################################################################## ############################################################################## lint: - name: Lint + name: Lint - Federation runs-on: ubuntu-latest needs: [build] steps: @@ -50,7 +50,7 @@ jobs: # JOB: UNIT TEST ############################################################# ############################################################################## unit_test: - name: Unit tests + name: Unit Tests - Federation runs-on: ubuntu-latest needs: [build] steps: @@ -90,7 +90,7 @@ jobs: - name: Coverage check uses: webcraftmedia/coverage-check-action@master with: - report_name: Coverage federation + report_name: Coverage Federation type: lcov #result_path: ./federation/coverage/lcov.info result_path: ./coverage/lcov.info 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/components/Template/ContentHeader/NavCommunity.vue b/frontend/src/components/Template/ContentHeader/NavCommunity.vue index ca96ce914..9748eb187 100644 --- a/frontend/src/components/Template/ContentHeader/NavCommunity.vue +++ b/frontend/src/components/Template/ContentHeader/NavCommunity.vue @@ -1,25 +1,19 @@ diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index c826b9e30..5f2b49772 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.", @@ -214,7 +216,6 @@ "factor": "Faktor", "formula": "Berechnungsformel", "funding": "Zu den Förderbeiträgen", - "gdt": "Gradido Transform", "gdt-received": "Gradido Transform (GDT) erhalten", "gdtKonto": "GDT Konto", "no-transactions": "Du hast noch keine Gradido Transform (GDT).", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 193aff666..538d8cd05 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.", @@ -214,7 +216,6 @@ "factor": "Factor", "formula": "Calculation formula", "funding": "To the funding contributions", - "gdt": "Gradido Transform", "gdt-received": "Gradido Transform (GDT) received", "gdtKonto": "GDT Konto", "no-transactions": "You do not have Gradido Transform (GDT) yet.", 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 @@