mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Test that the language switch is present if not on register page.
This commit is contained in:
parent
dccb8cb2ae
commit
29b8e362e2
@ -1,5 +1,6 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import AuthLayoutGdd from './AuthLayout_gdd'
|
||||
import LanguageSwitch from '../../components/LanguageSwitch'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
@ -15,6 +16,7 @@ describe('AuthLayoutGdd', () => {
|
||||
meta: {
|
||||
hideFooter: false,
|
||||
},
|
||||
path: '/',
|
||||
},
|
||||
$store: {
|
||||
state: {},
|
||||
@ -47,5 +49,20 @@ describe('AuthLayoutGdd', () => {
|
||||
it('has a footer inside the main content', () => {
|
||||
expect(wrapper.find('div.main-content').find('footer.footer').exists()).toBeTruthy()
|
||||
})
|
||||
|
||||
it('has LanguageSwitch', () => {
|
||||
expect(wrapper.findComponent(LanguageSwitch).exists()).toBeTruthy()
|
||||
})
|
||||
|
||||
describe('check LanguageSwitch on register page', () => {
|
||||
beforeEach(() => {
|
||||
mocks.$route.path = '/register'
|
||||
wrapper = Wrapper()
|
||||
})
|
||||
|
||||
it('has not LanguageSwitch', () => {
|
||||
expect(wrapper.findComponent(LanguageSwitch).exists()).toBeFalsy()
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user