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 68a8fb3c4..f01f76044 100755 --- a/admin/src/components/NotFoundPage.vue +++ b/admin/src/components/NotFoundPage.vue @@ -4,7 +4,7 @@
- +
@@ -1185,6 +1185,11 @@
+
+ + {{ $t('back') }} + +
@@ -1213,6 +1218,11 @@ export default { }, } }, + methods: { + goback() { + this.$router.go(-1) + }, + }, }