mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Test AuthLayout
This commit is contained in:
parent
97a4379527
commit
e539298c98
51
frontend/src/views/Layout/AuthLayout_gdd.spec.js
Normal file
51
frontend/src/views/Layout/AuthLayout_gdd.spec.js
Normal file
@ -0,0 +1,51 @@
|
||||
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()
|
||||
})
|
||||
})
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user