From f6776576284a19bb110b16744d8e448ef6ba0f25 Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 17 Feb 2022 10:01:19 +0100 Subject: [PATCH] yarn test fixed adminarea --- admin/src/components/NotFoundPage.spec.js | 10 +++++++++- admin/src/components/NotFoundPage.vue | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/admin/src/components/NotFoundPage.spec.js b/admin/src/components/NotFoundPage.spec.js index 709b24807..99eef569b 100644 --- a/admin/src/components/NotFoundPage.spec.js +++ b/admin/src/components/NotFoundPage.spec.js @@ -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() + }) }) }) diff --git a/admin/src/components/NotFoundPage.vue b/admin/src/components/NotFoundPage.vue index 2efa6a4dc..b42c3d8bb 100755 --- a/admin/src/components/NotFoundPage.vue +++ b/admin/src/components/NotFoundPage.vue @@ -1186,7 +1186,9 @@
- {{ $t('back') }} + + {{ $t('back') }} +