WIP Register.

This commit is contained in:
Hannes Heine 2021-08-09 16:38:40 +02:00
parent 23bf7a7fe9
commit d09e10f699
3 changed files with 12 additions and 11 deletions

View File

@ -105,6 +105,6 @@ describe('Register', () => {
})
})
// To Do: Test lines 156-197,210-213
// To Do: Test lines 160-205,218
})
})

View File

@ -183,17 +183,13 @@ export default {
password: this.form.password.password,
},
})
.then((result) => {
if (result.success) {
this.form.email = ''
this.form.firstname = ''
this.form.lastname = ''
this.form.password.password = ''
.then(() => {
this.form.email = ''
this.form.firstname = ''
this.form.lastname = ''
this.form.password.password = ''
this.$router.push('/thx/register')
} else {
throw new Error(result.errors[0].message)
}
this.$router.push('/thx/register')
})
.catch((error) => {
this.showError = true

View File

@ -86,6 +86,11 @@ describe('ResetPassword', () => {
})
})
it('Has sessionId from API call', async () => {
await wrapper.vm.$nextTick()
expect(wrapper.vm.sessionId).toBe(1)
})
it('renders the Reset Password form when authenticated', () => {
expect(wrapper.find('div.resetpwd-form').exists()).toBeTruthy()
})