diff --git a/frontend/public/json-example/communitys.json b/frontend/public/json-example/communities.json similarity index 100% rename from frontend/public/json-example/communitys.json rename to frontend/public/json-example/communities.json diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index fb346c79a..c9bd7932c 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -2,8 +2,7 @@ "back": "Zurück", "community": { "choose-another-community": "Eine andere Gemeinschaft auswählen", - "community": "Gemeinschaft", - "communitys": { + "communities": { "form": { "date_period": "Datum / Zeitraum", "hours": "Stunden", @@ -12,8 +11,10 @@ "submit": "Einreichen" } }, + "community": "Gemeinschaft", "continue-to-registration": "Weiter zur Registrierung", "current-community": "Aktuelle Gemeinschaft", + "location": "Ort:", "other-communities": "Weitere Gemeinschaften", "switch-to-this-community": "zu dieser Gemeinschaft wechseln" }, diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index e5ce1f91e..100d759c4 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -2,8 +2,7 @@ "back": "Back", "community": { "choose-another-community": "Choose another community", - "community": "Community", - "communitys": { + "communities": { "form": { "date_period": "Date / Period", "hours": "hours", @@ -12,8 +11,10 @@ "submit": "submit" } }, + "community": "Community", "continue-to-registration": "Continue to registration", "current-community": "Current community", + "location": "Location:", "other-communities": "Other communities", "switch-to-this-community": "switch to this community" }, diff --git a/frontend/src/routes/routes.js b/frontend/src/routes/routes.js index 18af20d61..6bd1ac75d 100755 --- a/frontend/src/routes/routes.js +++ b/frontend/src/routes/routes.js @@ -49,7 +49,7 @@ const routes = [ component: () => import('../views/Pages/ForgotPassword.vue'), }, { - path: '/regist-community', + path: '/register-community', component: () => import('../views/Pages/RegisterCommunity.vue'), }, { diff --git a/frontend/src/views/Pages/Login.spec.js b/frontend/src/views/Pages/Login.spec.js index 6c2dfcd6e..2d0daede0 100644 --- a/frontend/src/views/Pages/Login.spec.js +++ b/frontend/src/views/Pages/Login.spec.js @@ -76,6 +76,18 @@ describe('Login', () => { }) }) + describe('Community Data', () => { + it('has a Community name?', () => { + expect(wrapper.find('.test-communitydata b').text()).toBe('Gradido Entwicklung') + }) + + it('has a Community description?', () => { + expect(wrapper.find('.test-communitydata p').text()).toBe( + 'Die lokale Entwicklungsumgebung von Gradido.', + ) + }) + }) + describe('links', () => { it('has a link "Forgot Password?"', () => { expect(wrapper.findAllComponents(RouterLinkStub).at(0).text()).toEqual( @@ -94,7 +106,9 @@ describe('Login', () => { }) it('links to /register when clicking "Create new account"', () => { - expect(wrapper.findAllComponents(RouterLinkStub).at(1).props().to).toBe('/regist-community') + expect(wrapper.findAllComponents(RouterLinkStub).at(1).props().to).toBe( + '/register-community', + ) }) }) diff --git a/frontend/src/views/Pages/Login.vue b/frontend/src/views/Pages/Login.vue index ed6a2d25a..81ed69067 100755 --- a/frontend/src/views/Pages/Login.vue +++ b/frontend/src/views/Pages/Login.vue @@ -18,7 +18,7 @@ -
+
{{ $store.state.community.name }}

{{ $store.state.community.description }} @@ -53,7 +53,7 @@ class="text-center text-sm-right col-12 col-sm-6" v-show="allowRegister" > - + {{ $t('site.login.new_wallet') }} diff --git a/frontend/src/views/Pages/Register.spec.js b/frontend/src/views/Pages/Register.spec.js index 7120ed557..3dd41cd0e 100644 --- a/frontend/src/views/Pages/Register.spec.js +++ b/frontend/src/views/Pages/Register.spec.js @@ -59,6 +59,18 @@ describe('Register', () => { }) }) + describe('Community Data', () => { + it('has a Community name?', () => { + expect(wrapper.find('.test-communitydata b').text()).toBe('Gradido Entwicklung') + }) + + it('has a Community description?', () => { + expect(wrapper.find('.test-communitydata p').text()).toBe( + 'Die lokale Entwicklungsumgebung von Gradido.', + ) + }) + }) + describe('links', () => { it('has a link "Back"', () => { expect(wrapper.find('.test-button-back').text()).toEqual('back') diff --git a/frontend/src/views/Pages/Register.vue b/frontend/src/views/Pages/Register.vue index c9905e6c7..85fe51325 100755 --- a/frontend/src/views/Pages/Register.vue +++ b/frontend/src/views/Pages/Register.vue @@ -22,7 +22,7 @@ -

+
{{ $store.state.community.name }}

{{ $store.state.community.description }} diff --git a/frontend/src/views/Pages/RegisterCommunity.spec.js b/frontend/src/views/Pages/RegisterCommunity.spec.js index 177689ba1..5740815aa 100644 --- a/frontend/src/views/Pages/RegisterCommunity.spec.js +++ b/frontend/src/views/Pages/RegisterCommunity.spec.js @@ -49,7 +49,7 @@ describe('RegisterCommunity', () => { it('has a current community location', () => { expect(wrapper.find('.header p.community-location').text()).toBe( - 'Location: http://localhost:3000/vue/', + 'community.location http://localhost:3000/vue/', ) }) }) diff --git a/frontend/src/views/Pages/RegisterCommunity.vue b/frontend/src/views/Pages/RegisterCommunity.vue index 8c1c3ddf2..ea25664bd 100644 --- a/frontend/src/views/Pages/RegisterCommunity.vue +++ b/frontend/src/views/Pages/RegisterCommunity.vue @@ -10,7 +10,9 @@

{{ $store.state.community.description }}

-

Location: {{ $store.state.community.url }}

+

+ {{ $t('community.location') }} {{ $store.state.community.url }} +

diff --git a/frontend/src/views/Pages/RegisterSelectCommunity.spec.js b/frontend/src/views/Pages/RegisterSelectCommunity.spec.js index 986caf368..d2b0b1259 100644 --- a/frontend/src/views/Pages/RegisterSelectCommunity.spec.js +++ b/frontend/src/views/Pages/RegisterSelectCommunity.spec.js @@ -1,5 +1,6 @@ import { mount } from '@vue/test-utils' import RegisterSelectCommunity from './RegisterSelectCommunity' +// const testObject = require('../../../public/json-example/communities.json') const localVue = global.localVue diff --git a/frontend/src/views/Pages/RegisterSelectCommunity.vue b/frontend/src/views/Pages/RegisterSelectCommunity.vue index 5137a9d2a..7ea4e4fac 100644 --- a/frontend/src/views/Pages/RegisterSelectCommunity.vue +++ b/frontend/src/views/Pages/RegisterSelectCommunity.vue @@ -3,9 +3,9 @@
{{ $t('community.current-community') }}
-
+
@@ -23,13 +23,13 @@
{{ $t('community.other-communities') }}
-
- +
+ {{ community.name }}
{{ community.description }}
- Location: + {{ $t('community.location') }} {{ community.url }} @@ -49,13 +49,13 @@