diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index de45a35aa..badb47e87 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -163,7 +163,6 @@ jobs:
locales_frontend:
name: Locales - Frontend
runs-on: ubuntu-latest
- needs: [build_test_frontend]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
@@ -171,20 +170,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
##########################################################################
- # DOWNLOAD DOCKER IMAGE ##################################################
- ##########################################################################
- - name: Download Docker Image (Frontend)
- uses: actions/download-artifact@v3
- with:
- name: docker-frontend-test
- path: /tmp
- - name: Load Docker Image
- run: docker load < /tmp/frontend.tar
- ##########################################################################
# LOCALES FRONTEND #######################################################
##########################################################################
- name: Frontend | Locales
- run: docker run --rm gradido/frontend:test yarn run locales
+ run: cd frontend && yarn && yarn run locales
##############################################################################
# JOB: LINT FRONTEND #########################################################
@@ -192,7 +181,6 @@ jobs:
lint_frontend:
name: Lint - Frontend
runs-on: ubuntu-latest
- needs: [build_test_frontend]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
@@ -200,20 +188,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
##########################################################################
- # DOWNLOAD DOCKER IMAGE ##################################################
- ##########################################################################
- - name: Download Docker Image (Frontend)
- uses: actions/download-artifact@v3
- with:
- name: docker-frontend-test
- path: /tmp
- - name: Load Docker Image
- run: docker load < /tmp/frontend.tar
- ##########################################################################
# LINT FRONTEND ##########################################################
##########################################################################
- name: Frontend | Lint
- run: docker run --rm gradido/frontend:test yarn run lint
+ run: cd frontend && yarn && yarn run lint
##############################################################################
# JOB: STYLELINT FRONTEND ####################################################
@@ -221,7 +199,6 @@ jobs:
stylelint_frontend:
name: Stylelint - Frontend
runs-on: ubuntu-latest
- needs: [build_test_frontend]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
@@ -229,20 +206,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
##########################################################################
- # DOWNLOAD DOCKER IMAGE ##################################################
- ##########################################################################
- - name: Download Docker Image (Frontend)
- uses: actions/download-artifact@v3
- with:
- name: docker-frontend-test
- path: /tmp
- - name: Load Docker Image
- run: docker load < /tmp/frontend.tar
- ##########################################################################
# STYLELINT FRONTEND #####################################################
##########################################################################
- name: Frontend | Stylelint
- run: docker run --rm gradido/frontend:test yarn run stylelint
+ run: cd frontend && yarn && yarn run stylelint
##############################################################################
# JOB: LINT ADMIN INTERFACE ##################################################
@@ -250,7 +217,6 @@ jobs:
lint_admin:
name: Lint - Admin Interface
runs-on: ubuntu-latest
- needs: [build_test_admin]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
@@ -258,20 +224,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
##########################################################################
- # DOWNLOAD DOCKER IMAGE ##################################################
- ##########################################################################
- - name: Download Docker Image (Admin Interface)
- uses: actions/download-artifact@v3
- with:
- name: docker-admin-test
- path: /tmp
- - name: Load Docker Image
- run: docker load < /tmp/admin.tar
- ##########################################################################
# LINT ADMIN INTERFACE ###################################################
##########################################################################
- name: Admin Interface | Lint
- run: docker run --rm gradido/admin:test yarn run lint
+ run: cd admin && yarn && yarn run lint
##############################################################################
# JOB: STYLELINT ADMIN INTERFACE #############################################
@@ -279,7 +235,6 @@ jobs:
stylelint_admin:
name: Stylelint - Admin Interface
runs-on: ubuntu-latest
- needs: [build_test_admin]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
@@ -287,20 +242,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
##########################################################################
- # DOWNLOAD DOCKER IMAGE ##################################################
- ##########################################################################
- - name: Download Docker Image (Admin Interface)
- uses: actions/download-artifact@v3
- with:
- name: docker-admin-test
- path: /tmp
- - name: Load Docker Image
- run: docker load < /tmp/admin.tar
- ##########################################################################
# STYLELINT ADMIN INTERFACE ##############################################
##########################################################################
- name: Admin Interface | Stylelint
- run: docker run --rm gradido/admin:test yarn run stylelint
+ run: cd admin && yarn && yarn run stylelint
##############################################################################
# JOB: LOCALES ADMIN #########################################################
@@ -308,7 +253,6 @@ jobs:
locales_admin:
name: Locales - Admin Interface
runs-on: ubuntu-latest
- needs: [build_test_admin]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
@@ -316,20 +260,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
##########################################################################
- # DOWNLOAD DOCKER IMAGE ##################################################
- ##########################################################################
- - name: Download Docker Image (Admin Interface)
- uses: actions/download-artifact@v3
- with:
- name: docker-admin-test
- path: /tmp
- - name: Load Docker Image
- run: docker load < /tmp/admin.tar
- ##########################################################################
# LOCALES FRONTEND #######################################################
##########################################################################
- - name: admin | Locales
- run: docker run --rm gradido/admin:test yarn run locales
+ - name: Admin | Locales
+ run: cd admin && yarn && yarn run locales
##############################################################################
# JOB: LINT BACKEND ##########################################################
@@ -337,7 +271,6 @@ jobs:
lint_backend:
name: Lint - Backend
runs-on: ubuntu-latest
- needs: [build_test_backend]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
@@ -345,20 +278,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
##########################################################################
- # DOWNLOAD DOCKER IMAGE ##################################################
- ##########################################################################
- - name: Download Docker Image (Backend)
- uses: actions/download-artifact@v3
- with:
- name: docker-backend-test
- path: /tmp
- - name: Load Docker Image
- run: docker load < /tmp/backend.tar
- ##########################################################################
# LINT BACKEND ###########################################################
##########################################################################
- name: backend | Lint
- run: docker run --rm gradido/backend:test yarn run lint
+ run: cd backend && yarn && yarn run lint
##############################################################################
# JOB: LOCALES BACKEND #######################################################
@@ -366,7 +289,6 @@ jobs:
locales_backend:
name: Locales - Backend
runs-on: ubuntu-latest
- needs: [build_test_backend]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
@@ -385,7 +307,6 @@ jobs:
lint_database_up:
name: Lint - Database Up
runs-on: ubuntu-latest
- needs: [build_test_database_up]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
@@ -393,20 +314,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
##########################################################################
- # DOWNLOAD DOCKER IMAGE ##################################################
- ##########################################################################
- - name: Download Docker Image (Backend)
- uses: actions/download-artifact@v3
- with:
- name: docker-database-test_up
- path: /tmp
- - name: Load Docker Image
- run: docker load < /tmp/database_up.tar
- ##########################################################################
# LINT DATABASE ##########################################################
##########################################################################
- - name: database | Lint
- run: docker run --rm gradido/database:test_up yarn run lint
+ - name: Database | Lint
+ run: cd database && yarn && yarn run lint
##############################################################################
# JOB: UNIT TEST FRONTEND ###################################################
@@ -414,7 +325,6 @@ jobs:
unit_test_frontend:
name: Unit tests - Frontend
runs-on: ubuntu-latest
- needs: [build_test_frontend]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
@@ -422,30 +332,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
##########################################################################
- # DOWNLOAD DOCKER IMAGES #################################################
- ##########################################################################
- - name: Download Docker Image (Frontend)
- uses: actions/download-artifact@v3
- with:
- name: docker-frontend-test
- path: /tmp
- - name: Load Docker Image
- run: docker load < /tmp/frontend.tar
- ##########################################################################
# UNIT TESTS FRONTEND ####################################################
##########################################################################
- - name: frontend | Unit tests
+ - name: Frontend | Unit tests
run: |
- docker run --env NODE_ENV=test -v ~/coverage:/app/coverage --rm gradido/frontend:test yarn run test
- cp -r ~/coverage ./coverage
- ##########################################################################
- # COVERAGE REPORT FRONTEND ###############################################
- ##########################################################################
- #- name: frontend | Coverage report
- # uses: romeovs/lcov-reporter-action@v0.2.21
- # with:
- # github-token: ${{ secrets.GITHUB_TOKEN }}
- # lcov-file: ./coverage/lcov.info
+ cd frontend && yarn && yarn run test
+ cp -r ./coverage ../
##########################################################################
# COVERAGE CHECK FRONTEND ################################################
##########################################################################
@@ -454,7 +346,7 @@ jobs:
with:
report_name: Coverage Frontend
type: lcov
- result_path: ./coverage/lcov.info
+ result_path: ./frontend/coverage/lcov.info
min_coverage: 95
token: ${{ github.token }}
@@ -464,7 +356,6 @@ jobs:
unit_test_admin:
name: Unit tests - Admin Interface
runs-on: ubuntu-latest
- needs: [build_test_admin]
steps:
##########################################################################
# CHECKOUT CODE ##########################################################
@@ -472,22 +363,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
##########################################################################
- # DOWNLOAD DOCKER IMAGES #################################################
- ##########################################################################
- - name: Download Docker Image (Admin Interface)
- uses: actions/download-artifact@v3
- with:
- name: docker-admin-test
- path: /tmp
- - name: Load Docker Image
- run: docker load < /tmp/admin.tar
- ##########################################################################
# UNIT TESTS ADMIN INTERFACE #############################################
##########################################################################
- name: Admin Interface | Unit tests
run: |
- docker run -v ~/coverage:/app/coverage --rm gradido/admin:test yarn run test
- cp -r ~/coverage ./coverage
+ cd admin && yarn && yarn run test
+ cp -r ./coverage ../
##########################################################################
# COVERAGE CHECK ADMIN INTERFACE #########################################
##########################################################################
@@ -496,7 +377,7 @@ jobs:
with:
report_name: Coverage Admin Interface
type: lcov
- result_path: ./coverage/lcov.info
+ result_path: ./admin/coverage/lcov.info
min_coverage: 97
token: ${{ github.token }}
@@ -534,8 +415,9 @@ jobs:
- name: backend | docker-compose database
run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps database
- name: backend Unit tests | test
- run: cd database && yarn && yarn build && cd ../backend && yarn && yarn test
- # run: docker-compose -f docker-compose.yml -f docker-compose.test.yml exec -T backend yarn test
+ run: |
+ cd database && yarn && yarn build && cd ../backend && yarn && yarn test
+ cp -r ./coverage ../
##########################################################################
# COVERAGE CHECK BACKEND #################################################
##########################################################################
diff --git a/admin/src/App.vue b/admin/src/App.vue
index bcaab2ef9..2094e06b1 100644
--- a/admin/src/App.vue
+++ b/admin/src/App.vue
@@ -6,7 +6,7 @@
diff --git a/frontend/src/components/Template/RightSide/LastTransactions.vue b/frontend/src/components/Template/RightSide/LastTransactions.vue
index 83b4bae7e..54e959436 100644
--- a/frontend/src/components/Template/RightSide/LastTransactions.vue
+++ b/frontend/src/components/Template/RightSide/LastTransactions.vue
@@ -55,7 +55,7 @@
diff --git a/frontend/src/layouts/templates/ContentHeader.vue b/frontend/src/layouts/templates/ContentHeader.vue
index 407d8dcad..78252e450 100644
--- a/frontend/src/layouts/templates/ContentHeader.vue
+++ b/frontend/src/layouts/templates/ContentHeader.vue
@@ -9,7 +9,7 @@ export default {
name: 'ContentHeader',
computed: {
path() {
- return this.$route.path.replace(/^\//, '')
+ return this.$route.path.replace(/^\/(.+?)(\/.+)?$/, '$1')
},
},
}
diff --git a/frontend/src/layouts/templates/RightSide.vue b/frontend/src/layouts/templates/RightSide.vue
index 0a92cb1a1..315c374ed 100644
--- a/frontend/src/layouts/templates/RightSide.vue
+++ b/frontend/src/layouts/templates/RightSide.vue
@@ -10,7 +10,7 @@ export default {
name: 'RightSide',
computed: {
name() {
- switch (this.$route.path.replace(/^\//, '')) {
+ switch (this.$route.path.replace(/^\/(.+?)(\/.+)?$/, '$1')) {
case 'settings':
return 'empty'
case 'community':
diff --git a/frontend/src/main.js b/frontend/src/main.js
index 0edcb7211..4809e490c 100755
--- a/frontend/src/main.js
+++ b/frontend/src/main.js
@@ -1,6 +1,6 @@
import Vue from 'vue'
import DashboardPlugin from './plugins/dashboard-plugin'
-import App from './App.vue'
+import App from './App'
import i18n from './i18n.js'
import { loadAllRules } from './validation-rules'
import { toasters } from './mixins/toaster'
diff --git a/frontend/src/pages/Community.spec.js b/frontend/src/pages/Community.spec.js
index b4d1677df..28d742fe9 100644
--- a/frontend/src/pages/Community.spec.js
+++ b/frontend/src/pages/Community.spec.js
@@ -215,7 +215,9 @@ describe('Community', () => {
push: routerPushMock,
},
$route: {
- hash: '#edit',
+ params: {
+ tab: 'contribute',
+ },
},
}
@@ -260,7 +262,11 @@ describe('Community', () => {
})
it('check for correct tabIndex if state is "IN_PROGRESS" or not', () => {
- expect(routerPushMock).toBeCalledWith({ path: '/community#my' })
+ expect(routerPushMock).toBeCalledWith({ params: { tab: 'contributions' } })
+ })
+
+ it('sets tab index to 1', () => {
+ expect(wrapper.vm.tabIndex).toBe(1)
})
it('toasts an info', () => {
@@ -268,16 +274,6 @@ describe('Community', () => {
})
})
- describe('API calls after creation', () => {
- it('has a DIV .community-page', () => {
- expect(wrapper.find('div.community-page').exists()).toBe(true)
- })
-
- it('emits update transactions', () => {
- expect(wrapper.emitted('update-transactions')).toEqual([[0]])
- })
- })
-
describe('save contrubtion', () => {
describe('with error', () => {
const now = new Date().toISOString()
@@ -491,6 +487,10 @@ describe('Community', () => {
it('sets tab index back to 0', () => {
expect(wrapper.vm.tabIndex).toBe(0)
})
+
+ it('pushes contribute parameter to router', () => {
+ expect(routerPushMock).toBeCalledWith({ params: { tab: 'contribute' } })
+ })
})
describe('update list all contributions', () => {
diff --git a/frontend/src/pages/Community.vue b/frontend/src/pages/Community.vue
index 113bcd4e4..20e7d3fe6 100644
--- a/frontend/src/pages/Community.vue
+++ b/frontend/src/pages/Community.vue
@@ -58,12 +58,14 @@