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 @@
-