mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Move to next step after verify code
This commit is contained in:
parent
8fc74b9e14
commit
de40499007
@ -39,7 +39,16 @@ describe('VerifyCode ', () => {
|
||||
})
|
||||
|
||||
describe('after verification code given', () => {
|
||||
it.todo('displays a form to update your password')
|
||||
beforeEach(() => {
|
||||
wrapper = Wrapper()
|
||||
wrapper.find('input').setValue('123456')
|
||||
wrapper.find('form').trigger('submit')
|
||||
})
|
||||
|
||||
it('displays a form to update your password', () => {
|
||||
expect(wrapper.find('.change-password').exists()).toBe(true)
|
||||
})
|
||||
|
||||
describe('submitting new password', () => {
|
||||
it.todo('calls resetPassword graphql mutation')
|
||||
it.todo('delivers new password to backend')
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<ds-card class="verify-code">
|
||||
<ds-space margin="large">
|
||||
<ds-form v-model="formData" :schema="formSchema" @submit="handleSubmit">
|
||||
<ds-form v-if="!codeSubmitted" v-model="formData" :schema="formSchema" @submit="handleSubmit">
|
||||
<ds-input
|
||||
:placeholder="$t('verify-code.form.input')"
|
||||
model="code"
|
||||
@ -24,11 +24,13 @@
|
||||
{{ $t('verify-code.form.submit') }}
|
||||
</ds-button>
|
||||
</ds-form>
|
||||
<div v-else class="change-password" />
|
||||
</ds-space>
|
||||
</ds-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -44,7 +46,13 @@ export default {
|
||||
message: this.$t('common.validations.verification-code'),
|
||||
},
|
||||
},
|
||||
codeSubmitted: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSubmit(){
|
||||
this.codeSubmitted = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user