mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'master' into 2140-add-updated-at-to-contributions
This commit is contained in:
commit
677519dda7
181
.github/workflows/test.yml
vendored
181
.github/workflows/test.yml
vendored
@ -1,6 +1,6 @@
|
||||
name: gradido test CI
|
||||
|
||||
on: [push]
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
##############################################################################
|
||||
@ -15,7 +15,7 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# FRONTEND ###############################################################
|
||||
##########################################################################
|
||||
@ -24,7 +24,7 @@ jobs:
|
||||
docker build --target test -t "gradido/frontend:test" frontend/
|
||||
docker save "gradido/frontend:test" > /tmp/frontend.tar
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: docker-frontend-test
|
||||
path: /tmp/frontend.tar
|
||||
@ -41,7 +41,7 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# ADMIN INTERFACE ########################################################
|
||||
##########################################################################
|
||||
@ -50,7 +50,7 @@ jobs:
|
||||
docker build --target test -t "gradido/admin:test" admin/ --build-arg NODE_ENV="test"
|
||||
docker save "gradido/admin:test" > /tmp/admin.tar
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: docker-admin-test
|
||||
path: /tmp/admin.tar
|
||||
@ -67,7 +67,7 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# BACKEND ################################################################
|
||||
##########################################################################
|
||||
@ -76,7 +76,7 @@ jobs:
|
||||
docker build -f ./backend/Dockerfile --target test -t "gradido/backend:test" .
|
||||
docker save "gradido/backend:test" > /tmp/backend.tar
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: docker-backend-test
|
||||
path: /tmp/backend.tar
|
||||
@ -93,7 +93,7 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# DATABASE UP ############################################################
|
||||
##########################################################################
|
||||
@ -102,7 +102,7 @@ jobs:
|
||||
docker build --target test_up -t "gradido/database:test_up" database/
|
||||
docker save "gradido/database:test_up" > /tmp/database_up.tar
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: docker-database-test_up
|
||||
path: /tmp/database_up.tar
|
||||
@ -119,7 +119,7 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# BUILD MARIADB DOCKER IMAGE #############################################
|
||||
##########################################################################
|
||||
@ -128,7 +128,7 @@ jobs:
|
||||
docker build --target mariadb_server -t "gradido/mariadb:test" -f ./mariadb/Dockerfile ./
|
||||
docker save "gradido/mariadb:test" > /tmp/mariadb.tar
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: docker-mariadb-test
|
||||
path: /tmp/mariadb.tar
|
||||
@ -145,7 +145,7 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# BUILD NGINX DOCKER IMAGE ###############################################
|
||||
##########################################################################
|
||||
@ -154,7 +154,7 @@ jobs:
|
||||
docker build -t "gradido/nginx:test" nginx/
|
||||
docker save "gradido/nginx:test" > /tmp/nginx.tar
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: docker-nginx-test
|
||||
path: /tmp/nginx.tar
|
||||
@ -171,12 +171,12 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# DOWNLOAD DOCKER IMAGE ##################################################
|
||||
##########################################################################
|
||||
- name: Download Docker Image (Frontend)
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: docker-frontend-test
|
||||
path: /tmp
|
||||
@ -200,12 +200,12 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# DOWNLOAD DOCKER IMAGE ##################################################
|
||||
##########################################################################
|
||||
- name: Download Docker Image (Frontend)
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: docker-frontend-test
|
||||
path: /tmp
|
||||
@ -229,12 +229,12 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# DOWNLOAD DOCKER IMAGE ##################################################
|
||||
##########################################################################
|
||||
- name: Download Docker Image (Frontend)
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: docker-frontend-test
|
||||
path: /tmp
|
||||
@ -258,12 +258,12 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# DOWNLOAD DOCKER IMAGE ##################################################
|
||||
##########################################################################
|
||||
- name: Download Docker Image (Admin Interface)
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: docker-admin-test
|
||||
path: /tmp
|
||||
@ -287,12 +287,12 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# DOWNLOAD DOCKER IMAGE ##################################################
|
||||
##########################################################################
|
||||
- name: Download Docker Image (Admin Interface)
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: docker-admin-test
|
||||
path: /tmp
|
||||
@ -308,7 +308,7 @@ jobs:
|
||||
# JOB: LOCALES ADMIN #########################################################
|
||||
##############################################################################
|
||||
locales_admin:
|
||||
name: Locales - Admin
|
||||
name: Locales - Admin Interface
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build_test_admin]
|
||||
steps:
|
||||
@ -316,12 +316,12 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# DOWNLOAD DOCKER IMAGE ##################################################
|
||||
##########################################################################
|
||||
- name: Download Docker Image (Admin Interface)
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: docker-admin-test
|
||||
path: /tmp
|
||||
@ -345,12 +345,12 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# DOWNLOAD DOCKER IMAGE ##################################################
|
||||
##########################################################################
|
||||
- name: Download Docker Image (Backend)
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: docker-backend-test
|
||||
path: /tmp
|
||||
@ -374,12 +374,12 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# DOWNLOAD DOCKER IMAGE ##################################################
|
||||
##########################################################################
|
||||
- name: Download Docker Image (Backend)
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: docker-database-test_up
|
||||
path: /tmp
|
||||
@ -403,12 +403,12 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# DOWNLOAD DOCKER IMAGES #################################################
|
||||
##########################################################################
|
||||
- name: Download Docker Image (Frontend)
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: docker-frontend-test
|
||||
path: /tmp
|
||||
@ -453,12 +453,12 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# DOWNLOAD DOCKER IMAGES #################################################
|
||||
##########################################################################
|
||||
- name: Download Docker Image (Admin Interface)
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: docker-admin-test
|
||||
path: /tmp
|
||||
@ -495,12 +495,12 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# DOWNLOAD DOCKER IMAGES #################################################
|
||||
##########################################################################
|
||||
- name: Download Docker Image (Mariadb)
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: docker-mariadb-test
|
||||
path: /tmp
|
||||
@ -543,7 +543,7 @@ jobs:
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# DOCKER COMPOSE DATABASE UP + RESET #####################################
|
||||
##########################################################################
|
||||
@ -553,3 +553,110 @@ jobs:
|
||||
run: docker-compose -f docker-compose.yml run -T database yarn up
|
||||
- name: database | reset
|
||||
run: docker-compose -f docker-compose.yml run -T database yarn reset
|
||||
|
||||
##############################################################################
|
||||
# JOB: END-TO-END TESTS #####################################################
|
||||
##############################################################################
|
||||
end-to-end-tests:
|
||||
name: End-to-End Tests
|
||||
runs-on: ubuntu-latest
|
||||
# needs: [build_test_mariadb, build_test_database_up, build_test_backend, build_test_admin, build_test_frontend, build_test_nginx]
|
||||
steps:
|
||||
##########################################################################
|
||||
# CHECKOUT CODE ##########################################################
|
||||
##########################################################################
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
##########################################################################
|
||||
# DOWNLOAD DOCKER IMAGES #################################################
|
||||
##########################################################################
|
||||
# - name: Download Docker Image (Mariadb)
|
||||
# uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: docker-mariadb-test
|
||||
# path: /tmp
|
||||
# - name: Load Docker Image (Mariadb)
|
||||
# run: docker load < /tmp/mariadb.tar
|
||||
# - name: Download Docker Image (Database Up)
|
||||
# uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: docker-database-test_up
|
||||
# path: /tmp
|
||||
# - name: Load Docker Image (Database Up)
|
||||
# run: docker load < /tmp/database_up.tar
|
||||
# - name: Download Docker Image (Backend)
|
||||
# uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: docker-backend-test
|
||||
# path: /tmp
|
||||
# - name: Load Docker Image (Backend)
|
||||
# run: docker load < /tmp/backend.tar
|
||||
# - name: Download Docker Image (Frontend)
|
||||
# uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: docker-frontend-test
|
||||
# path: /tmp
|
||||
# - name: Load Docker Image (Frontend)
|
||||
# run: docker load < /tmp/frontend.tar
|
||||
# - name: Download Docker Image (Admin Interface)
|
||||
# uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: docker-admin-test
|
||||
# path: /tmp
|
||||
# - name: Load Docker Image (Admin Interface)
|
||||
# run: docker load < /tmp/admin.tar
|
||||
# - name: Download Docker Image (Nginx)
|
||||
# uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: docker-nginx-test
|
||||
# path: /tmp
|
||||
# - name: Load Docker Image (Nginx)
|
||||
# run: docker load < /tmp/nginx.tar
|
||||
##########################################################################
|
||||
# BOOT UP THE TEST SYSTEM ################################################
|
||||
##########################################################################
|
||||
- name: Boot up test system | docker-compose mariadb
|
||||
run: docker-compose up --detach mariadb
|
||||
|
||||
- name: Sleep for 30 seconds
|
||||
run: sleep 30s
|
||||
|
||||
- name: Boot up test system | docker-compose database
|
||||
run: docker-compose up --detach --no-deps database
|
||||
|
||||
- name: Boot up test system | docker-compose backend
|
||||
run: docker-compose up --detach --no-deps backend
|
||||
|
||||
- name: Sleep for 90 seconds
|
||||
run: sleep 90s
|
||||
|
||||
- name: Boot up test system | seed backend
|
||||
run: |
|
||||
sudo chown runner:docker -R *
|
||||
cd database
|
||||
yarn && yarn dev_reset
|
||||
cd ../backend
|
||||
yarn && yarn seed
|
||||
cd ..
|
||||
|
||||
- name: Boot up test system | docker-compose frontends
|
||||
run: docker-compose up --detach --no-deps frontend admin nginx
|
||||
|
||||
- name: Sleep for 2.5 minutes
|
||||
run: sleep 150s
|
||||
|
||||
##########################################################################
|
||||
# END-TO-END TESTS #######################################################
|
||||
##########################################################################
|
||||
- name: End-to-end tests | run tests
|
||||
id: e2e-tests
|
||||
run: |
|
||||
cd e2e-tests/cypress/tests/
|
||||
yarn
|
||||
yarn run cypress run --spec cypress/e2e/User.Authentication.feature
|
||||
- name: End-to-end tests | if tests failed, upload screenshots
|
||||
if: steps.e2e-tests.outcome == 'failure'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cypress-screenshots
|
||||
path: /home/runner/work/gradido/gradido/e2e-tests/cypress/tests/cypress/screenshots/
|
||||
|
||||
29
CHANGELOG.md
29
CHANGELOG.md
@ -4,8 +4,37 @@ 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.3](https://github.com/gradido/gradido/compare/1.13.2...1.13.3)
|
||||
|
||||
- 2294 contribution links on its own page [`#2312`](https://github.com/gradido/gradido/pull/2312)
|
||||
- fix: Change Orange Color [`#2302`](https://github.com/gradido/gradido/pull/2302)
|
||||
- fix: Release Statistic Query Runner [`#2320`](https://github.com/gradido/gradido/pull/2320)
|
||||
- bug: 2295 remove horizontal scrollbar in admin overview [`#2311`](https://github.com/gradido/gradido/pull/2311)
|
||||
- 2292 community information contact [`#2313`](https://github.com/gradido/gradido/pull/2313)
|
||||
- bug: 2315 Contribution Month and TEST FAIL in MASTER [`#2316`](https://github.com/gradido/gradido/pull/2316)
|
||||
- 2291 add button for close contribution messages box [`#2314`](https://github.com/gradido/gradido/pull/2314)
|
||||
|
||||
#### [1.13.2](https://github.com/gradido/gradido/compare/1.13.1...1.13.2)
|
||||
|
||||
> 28 October 2022
|
||||
|
||||
- release: Version 1.13.2 [`#2307`](https://github.com/gradido/gradido/pull/2307)
|
||||
- fix: 🍰 Links In Contribution Messages Target Blank [`#2306`](https://github.com/gradido/gradido/pull/2306)
|
||||
- fix: Link in Contribution Messages [`#2305`](https://github.com/gradido/gradido/pull/2305)
|
||||
- Refactor: 🍰 Change the query so that we only look on the ``contributions`` table. [`#2217`](https://github.com/gradido/gradido/pull/2217)
|
||||
- Refactor: Admin Resolver Events and Logging [`#2244`](https://github.com/gradido/gradido/pull/2244)
|
||||
- contibution messages, links are recognised [`#2248`](https://github.com/gradido/gradido/pull/2248)
|
||||
- fix: Include Deleted Email Contacts in User Search [`#2281`](https://github.com/gradido/gradido/pull/2281)
|
||||
- fix: Pagination Contributions jumps to wrong Page [`#2284`](https://github.com/gradido/gradido/pull/2284)
|
||||
- fix: Changed some texts in E-Mails and Frontend [`#2276`](https://github.com/gradido/gradido/pull/2276)
|
||||
- Feat: 🍰 Add `deletedBy` To Contributions And Admin Can Not Delete Own User Contribution [`#2236`](https://github.com/gradido/gradido/pull/2236)
|
||||
- deleted contributions are displayed to the user [`#2277`](https://github.com/gradido/gradido/pull/2277)
|
||||
|
||||
#### [1.13.1](https://github.com/gradido/gradido/compare/1.13.0...1.13.1)
|
||||
|
||||
> 20 October 2022
|
||||
|
||||
- release: Version 1.13.1 [`#2279`](https://github.com/gradido/gradido/pull/2279)
|
||||
- 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)
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"description": "Administraion Interface for Gradido",
|
||||
"main": "index.js",
|
||||
"author": "Moriz Wahl",
|
||||
"version": "1.13.1",
|
||||
"version": "1.13.3",
|
||||
"license": "Apache-2.0",
|
||||
"private": false,
|
||||
"scripts": {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="content-footer">
|
||||
<hr />
|
||||
<b-row align-v="center" class="mt-4 justify-content-lg-between">
|
||||
<div align-v="center" class="mt-4 mb-4 justify-content-lg-between">
|
||||
<b-col>
|
||||
<div class="copyright text-center text-lg-center text-muted">
|
||||
{{ $t('footer.copyright.year', { year }) }}
|
||||
@ -25,7 +25,7 @@
|
||||
</a>
|
||||
</div>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ContributionLinkForm from './ContributionLinkForm.vue'
|
||||
import ContributionLinkList from './ContributionLinkList.vue'
|
||||
import ContributionLinkForm from '../ContributionLink/ContributionLinkForm.vue'
|
||||
import ContributionLinkList from '../ContributionLink/ContributionLinkList.vue'
|
||||
|
||||
export default {
|
||||
name: 'ContributionLink',
|
||||
@ -1,6 +1,6 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import ContributionLinkForm from './ContributionLinkForm.vue'
|
||||
import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup'
|
||||
import { toastErrorSpy, toastSuccessSpy } from '../../../test/testSetup'
|
||||
import { createContributionLink } from '@/graphql/createContributionLink.js'
|
||||
|
||||
const localVue = global.localVue
|
||||
@ -1,6 +1,6 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import ContributionLinkList from './ContributionLinkList.vue'
|
||||
import { toastSuccessSpy, toastErrorSpy } from '../../test/testSetup'
|
||||
import { toastSuccessSpy, toastErrorSpy } from '../../../test/testSetup'
|
||||
// import { deleteContributionLink } from '../graphql/deleteContributionLink'
|
||||
|
||||
const localVue = global.localVue
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="contribution-link-list">
|
||||
<b-table striped hover :items="items" :fields="fields">
|
||||
<b-table :items="items" :fields="fields" striped hover stacked="lg">
|
||||
<template #cell(delete)="data">
|
||||
<b-button
|
||||
variant="danger"
|
||||
@ -46,7 +46,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { deleteContributionLink } from '@/graphql/deleteContributionLink.js'
|
||||
import FigureQrCode from './FigureQrCode.vue'
|
||||
import FigureQrCode from '../FigureQrCode.vue'
|
||||
|
||||
export default {
|
||||
name: 'ContributionLinkList',
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="mt-2">
|
||||
<span v-for="({ type, text }, index) in linkifiedMessage" :key="index">
|
||||
<b-link v-if="type === 'link'" :href="text">{{ text }}</b-link>
|
||||
<b-link v-if="type === 'link'" :href="text" target="_blank">{{ text }}</b-link>
|
||||
<span v-else>{{ text }}</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -7,6 +7,10 @@ const apolloMutateMock = jest.fn()
|
||||
const storeDispatchMock = jest.fn()
|
||||
const routerPushMock = jest.fn()
|
||||
|
||||
const stubs = {
|
||||
RouterLink: true,
|
||||
}
|
||||
|
||||
const mocks = {
|
||||
$t: jest.fn((t) => t),
|
||||
$apollo: {
|
||||
@ -28,7 +32,7 @@ describe('NavBar', () => {
|
||||
let wrapper
|
||||
|
||||
const Wrapper = () => {
|
||||
return mount(NavBar, { mocks, localVue })
|
||||
return mount(NavBar, { mocks, localVue, stubs })
|
||||
}
|
||||
|
||||
describe('mount', () => {
|
||||
@ -41,13 +45,35 @@ describe('NavBar', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('Navbar Menu', () => {
|
||||
it('has a link to overview', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(0).find('a').attributes('href')).toBe('/')
|
||||
})
|
||||
it('has a link to /user', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(1).find('a').attributes('href')).toBe('/user')
|
||||
})
|
||||
it('has a link to /creation', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(2).find('a').attributes('href')).toBe('/creation')
|
||||
})
|
||||
it('has a link to /creation-confirm', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(3).find('a').attributes('href')).toBe(
|
||||
'/creation-confirm',
|
||||
)
|
||||
})
|
||||
it('has a link to /contribution-links', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(4).find('a').attributes('href')).toBe(
|
||||
'/contribution-links',
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
describe('wallet', () => {
|
||||
const assignLocationSpy = jest.fn()
|
||||
beforeEach(async () => {
|
||||
await wrapper.findAll('a').at(5).trigger('click')
|
||||
await wrapper.findAll('.nav-item').at(5).find('a').trigger('click')
|
||||
})
|
||||
|
||||
it.skip('changes widnow location to wallet', () => {
|
||||
it.skip('changes window location to wallet', () => {
|
||||
expect(assignLocationSpy).toBeCalledWith('valid-token')
|
||||
})
|
||||
|
||||
@ -63,7 +89,7 @@ describe('NavBar', () => {
|
||||
window.location = {
|
||||
assign: windowLocationMock,
|
||||
}
|
||||
await wrapper.findAll('a').at(6).trigger('click')
|
||||
await wrapper.findAll('.nav-item').at(6).find('a').trigger('click')
|
||||
})
|
||||
|
||||
it('redirects to /logout', () => {
|
||||
|
||||
@ -19,6 +19,9 @@
|
||||
>
|
||||
{{ $store.state.openCreations }} {{ $t('navbar.open_creation') }}
|
||||
</b-nav-item>
|
||||
<b-nav-item to="/contribution-links">
|
||||
{{ $t('navbar.automaticContributions') }}
|
||||
</b-nav-item>
|
||||
<b-nav-item @click="wallet">{{ $t('navbar.my-account') }}</b-nav-item>
|
||||
<b-nav-item @click="logout">{{ $t('navbar.logout') }}</b-nav-item>
|
||||
</b-navbar-nav>
|
||||
|
||||
@ -95,6 +95,7 @@
|
||||
"multiple_creation_text": "Bitte wähle ein oder mehrere Mitglieder aus für die du Schöpfen möchtest.",
|
||||
"name": "Name",
|
||||
"navbar": {
|
||||
"automaticContributions": "automatische Beiträge",
|
||||
"logout": "Abmelden",
|
||||
"multi_creation": "Mehrfachschöpfung",
|
||||
"my-account": "Mein Konto",
|
||||
|
||||
@ -95,6 +95,7 @@
|
||||
"multiple_creation_text": "Please select one or more members for which you would like to perform creations.",
|
||||
"name": "Name",
|
||||
"navbar": {
|
||||
"automaticContributions": "Automatic Contributions",
|
||||
"logout": "Logout",
|
||||
"multi_creation": "Multiple creation",
|
||||
"my-account": "My Account",
|
||||
|
||||
58
admin/src/pages/ContributionLinks.spec.js
Normal file
58
admin/src/pages/ContributionLinks.spec.js
Normal file
@ -0,0 +1,58 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import ContributionLinks from './ContributionLinks.vue'
|
||||
import { listContributionLinks } from '@/graphql/listContributionLinks.js'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
const apolloQueryMock = jest.fn().mockResolvedValueOnce({
|
||||
data: {
|
||||
listContributionLinks: {
|
||||
links: [
|
||||
{
|
||||
id: 1,
|
||||
name: 'Meditation',
|
||||
memo: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut l',
|
||||
amount: '200',
|
||||
validFrom: '2022-04-01',
|
||||
validTo: '2022-08-01',
|
||||
cycle: 'täglich',
|
||||
maxPerCycle: '3',
|
||||
maxAmountPerMonth: 0,
|
||||
link: 'https://localhost/redeem/CL-1a2345678',
|
||||
},
|
||||
],
|
||||
count: 1,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
const mocks = {
|
||||
$t: jest.fn((t) => t),
|
||||
$d: jest.fn((d) => d),
|
||||
$apollo: {
|
||||
query: apolloQueryMock,
|
||||
},
|
||||
}
|
||||
|
||||
describe('ContributionLinks', () => {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
let wrapper
|
||||
|
||||
const Wrapper = () => {
|
||||
return mount(ContributionLinks, { localVue, mocks })
|
||||
}
|
||||
|
||||
describe('mount', () => {
|
||||
beforeEach(() => {
|
||||
wrapper = Wrapper()
|
||||
})
|
||||
|
||||
it('calls listContributionLinks', () => {
|
||||
expect(apolloQueryMock).toBeCalledWith(
|
||||
expect.objectContaining({
|
||||
query: listContributionLinks,
|
||||
}),
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
||||
45
admin/src/pages/ContributionLinks.vue
Normal file
45
admin/src/pages/ContributionLinks.vue
Normal file
@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div class="contribution-link">
|
||||
<contribution-link
|
||||
:items="items"
|
||||
:count="count"
|
||||
@get-contribution-links="getContributionLinks"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { listContributionLinks } from '@/graphql/listContributionLinks.js'
|
||||
import ContributionLink from '../components/ContributionLink/ContributionLink.vue'
|
||||
|
||||
export default {
|
||||
name: 'ContributionLinks',
|
||||
components: {
|
||||
ContributionLink,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
count: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getContributionLinks() {
|
||||
this.$apollo
|
||||
.query({
|
||||
query: listContributionLinks,
|
||||
fetchPolicy: 'network-only',
|
||||
})
|
||||
.then((result) => {
|
||||
this.count = result.data.listContributionLinks.count
|
||||
this.items = result.data.listContributionLinks.links
|
||||
})
|
||||
.catch(() => {
|
||||
this.toastError('listContributionLinks has no result, use default data')
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getContributionLinks()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@ -1,6 +1,5 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import Overview from './Overview.vue'
|
||||
import { listContributionLinks } from '@/graphql/listContributionLinks.js'
|
||||
import { communityStatistics } from '@/graphql/communityStatistics.js'
|
||||
import { listUnconfirmedContributions } from '@/graphql/listUnconfirmedContributions.js'
|
||||
|
||||
@ -36,27 +35,6 @@ const apolloQueryMock = jest
|
||||
},
|
||||
},
|
||||
})
|
||||
.mockResolvedValueOnce({
|
||||
data: {
|
||||
listContributionLinks: {
|
||||
links: [
|
||||
{
|
||||
id: 1,
|
||||
name: 'Meditation',
|
||||
memo: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut l',
|
||||
amount: '200',
|
||||
validFrom: '2022-04-01',
|
||||
validTo: '2022-08-01',
|
||||
cycle: 'täglich',
|
||||
maxPerCycle: '3',
|
||||
maxAmountPerMonth: 0,
|
||||
link: 'https://localhost/redeem/CL-1a2345678',
|
||||
},
|
||||
],
|
||||
count: 1,
|
||||
},
|
||||
},
|
||||
})
|
||||
.mockResolvedValue({
|
||||
data: {
|
||||
listUnconfirmedContributions: [
|
||||
@ -118,14 +96,6 @@ describe('Overview', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('calls listContributionLinks', () => {
|
||||
expect(apolloQueryMock).toBeCalledWith(
|
||||
expect.objectContaining({
|
||||
query: listContributionLinks,
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
it('commits three pending creations to store', () => {
|
||||
expect(storeCommitMock).toBeCalledWith('setOpenCreations', 3)
|
||||
})
|
||||
|
||||
@ -28,31 +28,21 @@
|
||||
</b-link>
|
||||
</b-card-text>
|
||||
</b-card>
|
||||
<contribution-link
|
||||
:items="items"
|
||||
:count="count"
|
||||
@get-contribution-links="getContributionLinks"
|
||||
/>
|
||||
<community-statistic class="mt-5" v-model="statistics" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { listContributionLinks } from '@/graphql/listContributionLinks.js'
|
||||
import { communityStatistics } from '@/graphql/communityStatistics.js'
|
||||
import ContributionLink from '../components/ContributionLink.vue'
|
||||
import CommunityStatistic from '../components/CommunityStatistic.vue'
|
||||
import { listUnconfirmedContributions } from '@/graphql/listUnconfirmedContributions.js'
|
||||
|
||||
export default {
|
||||
name: 'overview',
|
||||
components: {
|
||||
ContributionLink,
|
||||
CommunityStatistic,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
count: 0,
|
||||
statistics: {
|
||||
totalUsers: null,
|
||||
activeUsers: null,
|
||||
@ -75,20 +65,6 @@ export default {
|
||||
this.$store.commit('setOpenCreations', result.data.listUnconfirmedContributions.length)
|
||||
})
|
||||
},
|
||||
getContributionLinks() {
|
||||
this.$apollo
|
||||
.query({
|
||||
query: listContributionLinks,
|
||||
fetchPolicy: 'network-only',
|
||||
})
|
||||
.then((result) => {
|
||||
this.count = result.data.listContributionLinks.count
|
||||
this.items = result.data.listContributionLinks.links
|
||||
})
|
||||
.catch(() => {
|
||||
this.toastError('listContributionLinks has no result, use default data')
|
||||
})
|
||||
},
|
||||
getCommunityStatistics() {
|
||||
this.$apollo
|
||||
.query({
|
||||
@ -113,7 +89,6 @@ export default {
|
||||
created() {
|
||||
this.getPendingCreations()
|
||||
this.getCommunityStatistics()
|
||||
this.getContributionLinks()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -45,7 +45,7 @@ describe('router', () => {
|
||||
|
||||
describe('routes', () => {
|
||||
it('has seven routes defined', () => {
|
||||
expect(routes).toHaveLength(7)
|
||||
expect(routes).toHaveLength(8)
|
||||
})
|
||||
|
||||
it('has "/overview" as default', async () => {
|
||||
@ -81,6 +81,13 @@ describe('router', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('contribution-links', () => {
|
||||
it('loads the "ContributionLinks" component', async () => {
|
||||
const component = await routes.find((r) => r.path === '/contribution-links').component()
|
||||
expect(component.default.name).toBe('ContributionLinks')
|
||||
})
|
||||
})
|
||||
|
||||
describe('not found page', () => {
|
||||
it('renders the "NotFound" component', async () => {
|
||||
const component = await routes.find((r) => r.path === '*').component()
|
||||
|
||||
@ -23,6 +23,10 @@ const routes = [
|
||||
path: '/creation-confirm',
|
||||
component: () => import('@/pages/CreationConfirm.vue'),
|
||||
},
|
||||
{
|
||||
path: '/contribution-links',
|
||||
component: () => import('@/pages/ContributionLinks.vue'),
|
||||
},
|
||||
{
|
||||
path: '*',
|
||||
component: () => import('@/components/NotFoundPage.vue'),
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gradido-backend",
|
||||
"version": "1.13.1",
|
||||
"version": "1.13.3",
|
||||
"description": "Gradido unified backend providing an API-Service for Gradido Transactions",
|
||||
"main": "src/index.ts",
|
||||
"repository": "https://github.com/gradido/gradido/backend",
|
||||
|
||||
@ -63,6 +63,8 @@ export class StatisticsResolver {
|
||||
.where('transaction.decay IS NOT NULL')
|
||||
.getRawOne()
|
||||
|
||||
await queryRunner.release()
|
||||
|
||||
return {
|
||||
totalUsers,
|
||||
activeUsers,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gradido-database",
|
||||
"version": "1.13.1",
|
||||
"version": "1.13.3",
|
||||
"description": "Gradido Database Tool to execute database migrations",
|
||||
"main": "src/index.ts",
|
||||
"repository": "https://github.com/gradido/gradido/database",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bootstrap-vue-gradido-wallet",
|
||||
"version": "1.13.1",
|
||||
"version": "1.13.3",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "node run/server.js",
|
||||
|
||||
@ -33,7 +33,9 @@ $indigo: #5603ad !default;
|
||||
$purple: #8965e0 !default;
|
||||
$pink: #f3a4b5 !default;
|
||||
$red: #f5365c !default;
|
||||
$orange: #fb6340 !default;
|
||||
|
||||
// $orange: #fb6340 !default;
|
||||
$orange: #8c0505 !default;
|
||||
$yellow: #ffd600 !default;
|
||||
$green: #2dce89 !default;
|
||||
$teal: #11cdef !default;
|
||||
|
||||
@ -5,15 +5,23 @@
|
||||
<contribution-messages-list-item :message="message" />
|
||||
</div>
|
||||
</b-container>
|
||||
<contribution-messages-formular
|
||||
v-if="['PENDING', 'IN_PROGRESS'].includes(state)"
|
||||
:contributionId="contributionId"
|
||||
@get-list-contribution-messages="getListContributionMessages"
|
||||
@update-state="updateState"
|
||||
/>
|
||||
<div v-b-toggle="'collapse' + String(contributionId)" class="text-center pointer h2">
|
||||
<b-icon icon="arrow-up-short"></b-icon>
|
||||
{{ $t('form.close') }}
|
||||
<b-container>
|
||||
<contribution-messages-formular
|
||||
v-if="['PENDING', 'IN_PROGRESS'].includes(state)"
|
||||
:contributionId="contributionId"
|
||||
@get-list-contribution-messages="getListContributionMessages"
|
||||
@update-state="updateState"
|
||||
/>
|
||||
</b-container>
|
||||
|
||||
<div
|
||||
v-b-toggle="'collapse' + String(contributionId)"
|
||||
class="text-center pointer h2 clearboth pt-1"
|
||||
>
|
||||
<b-button variant="outline-primary" block class="mt-4">
|
||||
<b-icon icon="arrow-up-short"></b-icon>
|
||||
{{ $t('form.close') }}
|
||||
</b-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -55,4 +63,7 @@ export default {
|
||||
.temp-message {
|
||||
margin-top: 50px;
|
||||
}
|
||||
.clearboth {
|
||||
clear: both;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="mt-2">
|
||||
<span v-for="({ type, text }, index) in linkifiedMessage" :key="index">
|
||||
<b-link v-if="type === 'link'" :href="text">{{ text }}</b-link>
|
||||
<b-link v-if="type === 'link'" :href="text" target="_blank">{{ text }}</b-link>
|
||||
<span v-else>{{ text }}</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -198,6 +198,75 @@ describe('ContributionForm', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('date with the 31st day of the month', () => {
|
||||
describe('same month', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.setData({
|
||||
maximalDate: new Date('2022-10-31T00:00:00.000Z'),
|
||||
form: { date: new Date('2022-10-31T00:00:00.000Z') },
|
||||
})
|
||||
})
|
||||
|
||||
describe('minimalDate', () => {
|
||||
it('has "2022-09-01T00:00:00.000Z"', () => {
|
||||
expect(wrapper.vm.minimalDate.toISOString()).toBe('2022-09-01T00:00:00.000Z')
|
||||
})
|
||||
})
|
||||
|
||||
describe('isThisMonth', () => {
|
||||
it('has true', () => {
|
||||
expect(wrapper.vm.isThisMonth).toBe(true)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('date with the 28th day of the month', () => {
|
||||
describe('same month', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.setData({
|
||||
maximalDate: new Date('2023-02-28T00:00:00.000Z'),
|
||||
form: { date: new Date('2023-02-28T00:00:00.000Z') },
|
||||
})
|
||||
})
|
||||
|
||||
describe('minimalDate', () => {
|
||||
it('has "2023-01-01T00:00:00.000Z"', () => {
|
||||
expect(wrapper.vm.minimalDate.toISOString()).toBe('2023-01-01T00:00:00.000Z')
|
||||
})
|
||||
})
|
||||
|
||||
describe('isThisMonth', () => {
|
||||
it('has true', () => {
|
||||
expect(wrapper.vm.isThisMonth).toBe(true)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('date with 29.02.2024 leap year', () => {
|
||||
describe('same month', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.setData({
|
||||
maximalDate: new Date('2024-02-29T00:00:00.000Z'),
|
||||
form: { date: new Date('2024-02-29T00:00:00.000Z') },
|
||||
})
|
||||
})
|
||||
|
||||
describe('minimalDate', () => {
|
||||
it('has "2024-01-01T00:00:00.000Z"', () => {
|
||||
expect(wrapper.vm.minimalDate.toISOString()).toBe('2024-01-01T00:00:00.000Z')
|
||||
})
|
||||
})
|
||||
|
||||
describe('isThisMonth', () => {
|
||||
it('has true', () => {
|
||||
expect(wrapper.vm.isThisMonth).toBe(true)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('set contrubtion', () => {
|
||||
|
||||
@ -131,10 +131,8 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
minimalDate() {
|
||||
// sets the date to the 1st of the previous month
|
||||
let date = new Date(this.maximalDate) // has to be a new object, because of 'setMonth' changes the objects date
|
||||
date = new Date(date.setMonth(date.getMonth() - 1))
|
||||
return new Date(date.getFullYear(), date.getMonth(), 1)
|
||||
const date = new Date(this.maximalDate)
|
||||
return new Date(date.setMonth(date.getMonth() - 1, 1))
|
||||
},
|
||||
disabled() {
|
||||
return (
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
"submitContribution": "Beitrag einreichen",
|
||||
"switch-to-this-community": "zu dieser Gemeinschaft wechseln"
|
||||
},
|
||||
"contact": "Kontakt",
|
||||
"contribution": {
|
||||
"activity": "Tätigkeit",
|
||||
"alert": {
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
"submitContribution": "Submit contribution",
|
||||
"switch-to-this-community": "Switch to this community"
|
||||
},
|
||||
"contact": "Contact",
|
||||
"contribution": {
|
||||
"activity": "Activity",
|
||||
"alert": {
|
||||
|
||||
@ -44,6 +44,9 @@
|
||||
{{ item.firstName }} {{ item.lastName }}
|
||||
</li>
|
||||
</ul>
|
||||
</b-container>
|
||||
<b-container>
|
||||
<div class="h3">{{ $t('contact') }}</div>
|
||||
<b-link href="mailto: abc@example.com">{{ supportMail }}</b-link>
|
||||
</b-container>
|
||||
<!--
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gradido",
|
||||
"version": "1.13.1",
|
||||
"version": "1.13.3",
|
||||
"description": "Gradido",
|
||||
"main": "index.js",
|
||||
"repository": "git@github.com:gradido/gradido.git",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user