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, password: this.form.password.password,
}, },
}) })
.then((result) => { .then(() => {
if (result.success) { this.form.email = ''
this.form.email = '' this.form.firstname = ''
this.form.firstname = '' this.form.lastname = ''
this.form.lastname = '' this.form.password.password = ''
this.form.password.password = ''
this.$router.push('/thx/register') this.$router.push('/thx/register')
} else {
throw new Error(result.errors[0].message)
}
}) })
.catch((error) => { .catch((error) => {
this.showError = true 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', () => { it('renders the Reset Password form when authenticated', () => {
expect(wrapper.find('div.resetpwd-form').exists()).toBeTruthy() expect(wrapper.find('div.resetpwd-form').exists()).toBeTruthy()
}) })