diff --git a/backend/src/config/links.js b/backend/src/config/links.js index f8de671f0..4a55fc56e 100644 --- a/backend/src/config/links.js +++ b/backend/src/config/links.js @@ -1,11 +1,11 @@ -// this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding +// this file is duplicated in `backend/src/config/links.js` and `webapp/constants/links.js` and replaced on rebranding by https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/constants/ export default { - LANDING_PAGE: '/login', // examples: '/login', '/registration' - ORGANIZATION: 'https://ocelot.social', - SUPPORT: 'https://ocelot.social', - + LANDING_PAGE: '/login', // examples: '/login', '/registration', '/organization' + SUPPORT: 'https://ocelot.social', // example for internal support page: 'https://staging.ocelot.social/support' + // on null or empty strings internal pages are used, see 'webapp/locales/html/' // you can find and store templates at https://github.com/Ocelot-Social-Community/Ocelot-Social-Deploy-Rebranding/tree/master/branding/templates/ + ORGANIZATION: 'https://ocelot.social', DONATE: 'https://ocelot-social.herokuapp.com/donations', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly IMPRINT: 'https://ocelot-social.herokuapp.com/imprint', // we use 'ocelot-social.herokuapp.com' at the moment, because redirections of 'ocelot.social' subpages are not working correctly TERMS_AND_CONDITIONS: null, diff --git a/webapp/components/PageFooter/PageFooter.spec.js b/webapp/components/PageFooter/PageFooter.spec.js index 53aaaa073..02e788737 100644 --- a/webapp/components/PageFooter/PageFooter.spec.js +++ b/webapp/components/PageFooter/PageFooter.spec.js @@ -47,12 +47,8 @@ describe('PageFooter.vue', () => { wrapper = Wrapper() }) - it('renders ORGANIZATION', () => { - expect(wrapper.find('a[data-test="organization-link"]').exists()).toBe(true) - }) - it('renders version', () => { - expect(wrapper.find('a[data-test="version-link"]').exists()).toBe(true) + expect(wrapper.find('a[data-test="version-link"]').exists()).toBeTruthy() }) }) @@ -60,6 +56,7 @@ describe('PageFooter.vue', () => { beforeEach(async () => { const links = { ...linksDefault, + ORGANIZATION: null, IMPRINT: null, TERMS_AND_CONDITIONS: null, CODE_OF_CONDUCT: null, @@ -71,24 +68,28 @@ describe('PageFooter.vue', () => { await wrapper.vm.$nextTick() }) + it('renders ORGANIZATION as nuxt-link', () => { + expect(wrapper.find('span[data-test="organization-nuxt-link"]').exists()).toBeTruthy() + }) + it('renders IMPRINT as nuxt-link', () => { - expect(wrapper.find('span[data-test="imprint-nuxt-link"]').exists()).toBe(true) + expect(wrapper.find('span[data-test="imprint-nuxt-link"]').exists()).toBeTruthy() }) it('renders TERMS_AND_CONDITIONS as nuxt-link', () => { - expect(wrapper.find('span[data-test="terms-nuxt-link"]').exists()).toBe(true) + expect(wrapper.find('span[data-test="terms-nuxt-link"]').exists()).toBeTruthy() }) it('renders CODE_OF_CONDUCT as nuxt-link', () => { - expect(wrapper.find('span[data-test="code-nuxt-link"]').exists()).toBe(true) + expect(wrapper.find('span[data-test="code-nuxt-link"]').exists()).toBeTruthy() }) it('renders DATA_PRIVACY as nuxt-link', () => { - expect(wrapper.find('span[data-test="data-nuxt-link"]').exists()).toBe(true) + expect(wrapper.find('span[data-test="data-nuxt-link"]').exists()).toBeTruthy() }) it('renders FAQ as nuxt-link', () => { - expect(wrapper.find('span[data-test="faq-nuxt-link"]').exists()).toBe(true) + expect(wrapper.find('span[data-test="faq-nuxt-link"]').exists()).toBeTruthy() }) }) @@ -96,6 +97,7 @@ describe('PageFooter.vue', () => { beforeEach(async () => { const links = { ...linksDefault, + ORGANIZATION: 'https://ocelot.social', IMPRINT: 'https://ocelot.social/IMPRINT', TERMS_AND_CONDITIONS: 'https://ocelot.social/TERMS_AND_CONDITIONS', CODE_OF_CONDUCT: 'https://ocelot.social/CODE_OF_CONDUCT', @@ -107,26 +109,28 @@ describe('PageFooter.vue', () => { await wrapper.vm.$nextTick() }) + it('renders ORGANIZATION as "a" tag link', () => { + expect(wrapper.find(`a[href="https://ocelot.social"]`).exists()).toBeTruthy() + }) + it('renders IMPRINT as "a" tag link', () => { - expect(wrapper.find(`a[href="https://ocelot.social/IMPRINT"]`).exists()).toBe(true) + expect(wrapper.find(`a[href="https://ocelot.social/IMPRINT"]`).exists()).toBeTruthy() }) it('renders TERMS_AND_CONDITIONS as "a" tag link', () => { - expect(wrapper.find(`a[href="https://ocelot.social/TERMS_AND_CONDITIONS"]`).exists()).toBe( - true, - ) + expect(wrapper.find(`a[href="https://ocelot.social/TERMS_AND_CONDITIONS"]`).exists()).toBeTruthy() }) it('renders CODE_OF_CONDUCT as "a" tag link', () => { - expect(wrapper.find(`a[href="https://ocelot.social/CODE_OF_CONDUCT"]`).exists()).toBe(true) + expect(wrapper.find(`a[href="https://ocelot.social/CODE_OF_CONDUCT"]`).exists()).toBeTruthy() }) it('renders DATA_PRIVACY as "a" tag link', () => { - expect(wrapper.find(`a[href="https://ocelot.social/DATA_PRIVACY"]`).exists()).toBe(true) + expect(wrapper.find(`a[href="https://ocelot.social/DATA_PRIVACY"]`).exists()).toBeTruthy() }) it('renders FAQ as "a" tag link', () => { - expect(wrapper.find(`a[href="https://ocelot.social/FAQ"]`).exists()).toBe(true) + expect(wrapper.find(`a[href="https://ocelot.social/FAQ"]`).exists()).toBeTruthy() }) }) }) diff --git a/webapp/components/PageFooter/PageFooter.vue b/webapp/components/PageFooter/PageFooter.vue index e31bc3e2a..ab7ab576b 100644 --- a/webapp/components/PageFooter/PageFooter.vue +++ b/webapp/components/PageFooter/PageFooter.vue @@ -1,7 +1,10 @@