mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
In register vue added the input-password components for new and confirm Password.
This commit is contained in:
parent
4c51a1429b
commit
ec401d3908
@ -80,13 +80,39 @@ describe('Register', () => {
|
||||
expect(wrapper.find('button[type="submit"]').exists()).toBe(false)
|
||||
})
|
||||
|
||||
it('shows a warning when no valid Email is entered', async () => {
|
||||
it('displays a message that Email is required', async () => {
|
||||
await wrapper.find('form').trigger('submit')
|
||||
await flushPromises()
|
||||
expect(wrapper.findAll('div.invalid-feedback').at(0).text()).toBe(
|
||||
'validations.messages.required',
|
||||
)
|
||||
})
|
||||
|
||||
it('displays a message that password is required', async () => {
|
||||
await wrapper.find('form').trigger('submit')
|
||||
await flushPromises()
|
||||
expect(wrapper.findAll('div.invalid-feedback').at(1).text()).toBe(
|
||||
'validations.messages.required',
|
||||
)
|
||||
})
|
||||
|
||||
it('displays a message that passwordConfirm is required', async () => {
|
||||
await wrapper.find('form').trigger('submit')
|
||||
await flushPromises()
|
||||
expect(wrapper.findAll('div.invalid-feedback').at(2).text()).toBe(
|
||||
'validations.messages.required',
|
||||
)
|
||||
})
|
||||
|
||||
/**
|
||||
* it('shows a warning when no valid Email is entered', async () => {
|
||||
wrapper.find('#registerEmail').setValue('no_valid@Email')
|
||||
await flushPromises()
|
||||
await expect(wrapper.find('#registerEmailLiveFeedback').text()).toEqual(
|
||||
'validations.messages.email',
|
||||
)
|
||||
})
|
||||
*/
|
||||
|
||||
it('shows 4 warnings when no password is set', async () => {
|
||||
const passwords = wrapper.findAll('input[type="password"]')
|
||||
|
||||
@ -79,8 +79,8 @@
|
||||
<input-email v-model="form.email" id="registerEmail"></input-email>
|
||||
|
||||
<hr />
|
||||
<input-password v-model="form.password" id="registerPassword"></input-password>
|
||||
<input-password-confirmation v-model="form.passwordRepeat" id="registerPasswordRepeat"></input-password-confirmation>
|
||||
<input-password v-model="form.password" id="registerPassword" />
|
||||
<input-password v-model="form.passwordRepeat" id="registerPasswordRepeat" />
|
||||
|
||||
<transition name="hint" appear>
|
||||
<div v-if="passwordValidation.errors.length > 0 && !submitted" class="hints">
|
||||
@ -154,10 +154,9 @@
|
||||
import loginAPI from '../../apis/loginAPI'
|
||||
import InputEmail from '../../components/Inputs/InputEmail.vue'
|
||||
import InputPassword from '../../components/Inputs/InputPassword.vue'
|
||||
import InputPasswordConfirmation from '../../components/Inputs/InputPasswordConfirmation.vue'
|
||||
|
||||
export default {
|
||||
components: { InputPassword, InputPasswordConfirmation, InputEmail },
|
||||
components: { InputPassword, InputEmail },
|
||||
name: 'register',
|
||||
data() {
|
||||
return {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user