remove Gradido link in footline and replace link of Gradido-Akademie. Test Version and members area

This commit is contained in:
Moriz Wahl 2021-04-13 16:22:39 +02:00
parent 5c1415401d
commit aa3e0f7372
2 changed files with 44 additions and 23 deletions

View File

@ -41,63 +41,85 @@ describe('ContentFooter', () => {
}) })
it('links to the login page when clicked on copyright', () => { it('links to the login page when clicked on copyright', () => {
expect(wrapper.find('div.copyright').find('a').attributes('href')).toEqual('#/Login') expect(wrapper.find('div.copyright').find('a').attributes('href')).toEqual(
'https://gradido.net/en',
)
})
})
describe('version', () => {
it('shows the current version', async () => {
wrapper.setData({ version: 1.23 })
await wrapper.vm.$nextTick()
expect(wrapper.find('div.copyright').findAll('a').at(1).text()).toEqual('App version 1.23')
})
it('links to latest release on GitHub', () => {
expect(wrapper.find('div.copyright').findAll('a').at(1).attributes('href')).toEqual(
'https://github.com/gradido/gradido/releases/latest',
)
}) })
}) })
describe('links to gradido.net', () => { describe('links to gradido.net', () => {
it('has a link to the gradido.net', () => {
expect(wrapper.findAll('a.nav-link').at(0).text()).toEqual('Gradido')
})
it('links to the https://gradido.net/en when locale is en', () => {
expect(wrapper.findAll('a.nav-link').at(0).attributes('href')).toEqual(
'https://gradido.net/en',
)
})
it('has a link to the legal notice', () => { it('has a link to the legal notice', () => {
expect(wrapper.findAll('a.nav-link').at(1).text()).toEqual('imprint') expect(wrapper.findAll('a.nav-link').at(0).text()).toEqual('imprint')
}) })
it('links to the https://gradido.net/en/impressum when locale is en', () => { it('links to the https://gradido.net/en/impressum when locale is en', () => {
expect(wrapper.findAll('a.nav-link').at(1).attributes('href')).toEqual( expect(wrapper.findAll('a.nav-link').at(0).attributes('href')).toEqual(
'https://gradido.net/en/impressum/', 'https://gradido.net/en/impressum/',
) )
}) })
it('has a link to the privacy policy', () => { it('has a link to the privacy policy', () => {
expect(wrapper.findAll('a.nav-link').at(2).text()).toEqual('privacy_policy') expect(wrapper.findAll('a.nav-link').at(1).text()).toEqual('privacy_policy')
}) })
it('links to the https://gradido.net/en/datenschutz when locale is en', () => { it('links to the https://gradido.net/en/datenschutz when locale is en', () => {
expect(wrapper.findAll('a.nav-link').at(2).attributes('href')).toEqual( expect(wrapper.findAll('a.nav-link').at(1).attributes('href')).toEqual(
'https://gradido.net/en/datenschutz/', 'https://gradido.net/en/datenschutz/',
) )
}) })
it('has a link to the members area', () => {
expect(wrapper.findAll('a.nav-link').at(2).text()).toEqual('members_area')
})
it('links to the elopage', () => {
expect(wrapper.findAll('a.nav-link').at(2).attributes('href')).toEqual(
'https://elopage.com/s/gradido/sign_in?locale=en',
)
})
describe('links are localized', () => { describe('links are localized', () => {
beforeEach(() => { beforeEach(() => {
mocks.$i18n.locale = 'de' mocks.$i18n.locale = 'de'
}) })
it('links to the https://gradido.net/de when locale is de', () => { it('links to the https://gradido.net/de when locale is de', () => {
expect(wrapper.findAll('a.nav-link').at(0).attributes('href')).toEqual( expect(wrapper.find('div.copyright').find('a').attributes('href')).toEqual(
'https://gradido.net/de', 'https://gradido.net/de',
) )
}) })
it('links to the https://gradido.net/de/impressum when locale is de', () => { it('links to the https://gradido.net/de/impressum when locale is de', () => {
expect(wrapper.findAll('a.nav-link').at(1).attributes('href')).toEqual( expect(wrapper.findAll('a.nav-link').at(0).attributes('href')).toEqual(
'https://gradido.net/de/impressum/', 'https://gradido.net/de/impressum/',
) )
}) })
it('links to the https://gradido.net/de/datenschutz when locale is de', () => { it('links to the https://gradido.net/de/datenschutz when locale is de', () => {
expect(wrapper.findAll('a.nav-link').at(2).attributes('href')).toEqual( expect(wrapper.findAll('a.nav-link').at(1).attributes('href')).toEqual(
'https://gradido.net/de/datenschutz/', 'https://gradido.net/de/datenschutz/',
) )
}) })
it('links to the German elopage when locale is de', () => {
expect(wrapper.findAll('a.nav-link').at(2).attributes('href')).toEqual(
'https://elopage.com/s/gradido/sign_in?locale=de',
)
})
}) })
}) })
}) })

View File

@ -4,10 +4,12 @@
<b-col> <b-col>
<div class="copyright text-center text-lg-center text-muted"> <div class="copyright text-center text-lg-center text-muted">
© {{ year }} © {{ year }}
<a href="#/Login" class="font-weight-bold ml-1">Gradido-Akademie</a> <a :href="`https://gradido.net/${$i18n.locale}`" class="font-weight-bold ml-1">
Gradido-Akademie
</a>
| |
<a href="https://github.com/gradido/gradido/releases/latest" target="_blank"> <a href="https://github.com/gradido/gradido/releases/latest" target="_blank">
App Verion {{ version }} App version {{ version }}
</a> </a>
</div> </div>
</b-col> </b-col>
@ -15,9 +17,6 @@
<b-row align-v="center" class="justify-content-lg-between"> <b-row align-v="center" class="justify-content-lg-between">
<b-col> <b-col>
<b-nav class="nav-footer justify-content-center"> <b-nav class="nav-footer justify-content-center">
<b-nav-item :href="`https://gradido.net/${$i18n.locale}`" target="_blank">
Gradido
</b-nav-item>
<b-nav-item :href="`https://gradido.net/${$i18n.locale}/impressum/`" target="_blank"> <b-nav-item :href="`https://gradido.net/${$i18n.locale}/impressum/`" target="_blank">
{{ $t('imprint') }} {{ $t('imprint') }}
</b-nav-item> </b-nav-item>