yarn test fixed adminarea

This commit is contained in:
ogerly 2022-02-17 10:01:19 +01:00
parent f7fa134346
commit f677657628
2 changed files with 12 additions and 2 deletions

View File

@ -3,11 +3,15 @@ import NotFoundPage from './NotFoundPage'
const localVue = global.localVue
const mocks = {
$t: jest.fn((t) => t),
}
describe('NotFoundPage', () => {
let wrapper
const Wrapper = () => {
return mount(NotFoundPage, { localVue })
return mount(NotFoundPage, { localVue, mocks })
}
describe('mount', () => {
@ -18,5 +22,9 @@ describe('NotFoundPage', () => {
it('has a svg', () => {
expect(wrapper.find('svg').exists()).toBeTruthy()
})
it('has a back button', () => {
expect(wrapper.find('.test-back').exists()).toBeTruthy()
})
})
})

View File

@ -1186,7 +1186,9 @@
</b-container>
</div>
<div class="text-center">
<b-button variant="light" @click="$router.go(-1)">{{ $t('back') }}</b-button>
<b-button class="test-back" variant="light" @click="$router.go(-1)">
{{ $t('back') }}
</b-button>
</div>
</div>
</template>