mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
52 lines
1.0 KiB
JavaScript
52 lines
1.0 KiB
JavaScript
import { mount } from '@vue/test-utils'
|
|
import AuthLayoutGdd from './AuthLayout_gdd'
|
|
|
|
const localVue = global.localVue
|
|
|
|
describe('AuthLayoutGdd', () => {
|
|
let wrapper
|
|
|
|
const mocks = {
|
|
$i18n: {
|
|
locale: 'en',
|
|
},
|
|
$t: jest.fn((t) => t),
|
|
$route: {
|
|
meta: {
|
|
hideFooter: false,
|
|
},
|
|
},
|
|
$store: {
|
|
state: {},
|
|
commit: jest.fn(),
|
|
},
|
|
}
|
|
|
|
const stubs = {
|
|
// RouterLink: RouterLinkStub,
|
|
RouterView: true,
|
|
}
|
|
|
|
const Wrapper = () => {
|
|
return mount(AuthLayoutGdd, { localVue, mocks, stubs })
|
|
}
|
|
|
|
describe('mount', () => {
|
|
beforeEach(() => {
|
|
wrapper = Wrapper()
|
|
})
|
|
|
|
it('has no sidebar', () => {
|
|
expect(wrapper.find('nav#sidenav-main').exists()).not.toBeTruthy()
|
|
})
|
|
|
|
it('has a main content div', () => {
|
|
expect(wrapper.find('div.main-content').exists()).toBeTruthy()
|
|
})
|
|
|
|
it('has a footer inside the main content', () => {
|
|
expect(wrapper.find('div.main-content').find('footer.footer').exists()).toBeTruthy()
|
|
})
|
|
})
|
|
})
|