Merge pull request #1282 from gradido/1247-language-switch-not-alligned

Don't show the language-switch on the /register page.
This commit is contained in:
Hannes Heine 2022-01-12 10:25:54 +01:00 committed by GitHub
commit e5a79982b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -15,6 +15,7 @@ describe('AuthLayoutGdd', () => {
meta: { meta: {
hideFooter: false, hideFooter: false,
}, },
path: '/',
}, },
$store: { $store: {
state: {}, state: {},
@ -47,5 +48,20 @@ describe('AuthLayoutGdd', () => {
it('has a footer inside the main content', () => { it('has a footer inside the main content', () => {
expect(wrapper.find('div.main-content').find('footer.footer').exists()).toBeTruthy() expect(wrapper.find('div.main-content').find('footer.footer').exists()).toBeTruthy()
}) })
it('has LanguageSwitch', () => {
expect(wrapper.findComponent({ name: 'LanguageSwitch' }).exists()).toBeTruthy()
})
describe('check LanguageSwitch on register page', () => {
beforeEach(() => {
mocks.$route.path = '/register'
wrapper = Wrapper()
})
it('has not LanguageSwitch', () => {
expect(wrapper.findComponent({ name: 'LanguageSwitch' }).exists()).toBeFalsy()
})
})
}) })
}) })

View File

@ -2,7 +2,7 @@
<div class="wrapper"> <div class="wrapper">
<div class="main-content mt-4"> <div class="main-content mt-4">
<router-view></router-view> <router-view></router-view>
<language-switch class="text-center mb-5 mt-5" /> <language-switch v-if="$route.path !== '/register'" class="text-center mb-5 mt-5" />
<content-footer v-if="!$route.meta.hideFooter"></content-footer> <content-footer v-if="!$route.meta.hideFooter"></content-footer>
</div> </div>
</div> </div>