Merge pull request #1297 from gradido/1291-Cannot-go-back-to-login

Adding button, to link back to the login page from the error not activated page.
This commit is contained in:
Hannes Heine 2022-01-18 10:52:33 +01:00 committed by GitHub
commit f5f82436c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -88,4 +88,22 @@ describe('Thx', () => {
expect(wrapper.find('a.btn').attributes('href')).toBe('/overview')
})
})
describe('coming from /login', () => {
beforeEach(() => {
wrapper = Wrapper(createMockObject('login'))
})
it('renders the thanks text', () => {
expect(wrapper.find('p.h4').text()).toBe('site.thx.activateEmail')
})
it('renders the thanks redirect button', () => {
expect(wrapper.find('a.btn').text()).toBe('login')
})
it('links the redirect button to /login', () => {
expect(wrapper.find('a.btn').attributes('href')).toBe('/login')
})
})
})

View File

@ -45,6 +45,8 @@ const textFields = {
login: {
headline: 'site.thx.errorTitle',
subtitle: 'site.thx.activateEmail',
button: 'login',
linkTo: '/login',
},
}