mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge pull request #1515 from gradido/1466-404-Page-needs-Back-to-Login-Button
404 page needs back to login button
This commit is contained in:
commit
d63f93149c
@ -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()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div class="header py-1 py-lg-1 pt-lg-3">
|
||||
<b-container>
|
||||
<div class="header-body text-center mb-3">
|
||||
<a href="login" to="login">
|
||||
<a href="#!" @click="goback">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 mt-5 mb-5">
|
||||
@ -1185,6 +1185,11 @@
|
||||
</div>
|
||||
</b-container>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<b-button class="test-back" variant="light" @click="goback">
|
||||
{{ $t('back') }}
|
||||
</b-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1213,6 +1218,11 @@ export default {
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goback() {
|
||||
this.$router.go(-1)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
{
|
||||
"all_emails": "Alle Nutzer",
|
||||
"back": "zurück",
|
||||
"bookmark": "bookmark",
|
||||
"confirmed": "bestätigt",
|
||||
"creation": "Schöpfung",
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
{
|
||||
"all_emails": "All users",
|
||||
"back": "back",
|
||||
"bookmark": "Remember",
|
||||
"confirmed": "confirmed",
|
||||
"creation": "Creation",
|
||||
|
||||
@ -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()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div class="header py-1 py-lg-1 pt-lg-3">
|
||||
<b-container>
|
||||
<div class="header-body text-center mb-3">
|
||||
<a href="login" to="login">
|
||||
<a href="#!" @click="goback">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12 mt-5 mb-5">
|
||||
@ -1185,6 +1185,11 @@
|
||||
</div>
|
||||
</b-container>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<b-button class="test-back" variant="light" @click="goback">
|
||||
{{ $t('back') }}
|
||||
</b-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1213,6 +1218,11 @@ export default {
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goback() {
|
||||
this.$router.go(-1)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user