validates phone champ server side

This commit is contained in:
Christophe Robillard 2020-07-29 15:45:25 +02:00
parent 7faae3a438
commit 090a247ba9
4 changed files with 35 additions and 3 deletions

View file

@ -19,7 +19,7 @@ feature 'The user' do
check('checkbox')
choose('Madame')
fill_in('email', with: 'loulou@yopmail.com')
fill_in('phone', with: '1234567890')
fill_in('phone', with: '0123456789')
choose('Non')
choose('val2')
check('val1')
@ -55,7 +55,7 @@ feature 'The user' do
expect(champ_value_for('checkbox')).to eq('on')
expect(champ_value_for('civilite')).to eq('Mme')
expect(champ_value_for('email')).to eq('loulou@yopmail.com')
expect(champ_value_for('phone')).to eq('1234567890')
expect(champ_value_for('phone')).to eq('0123456789')
expect(champ_value_for('yes_no')).to eq('false')
expect(champ_value_for('simple_drop_down_list')).to eq('val2')
expect(champ_value_for('simple_choice_drop_down_list_long')).to eq('bravo')
@ -79,7 +79,7 @@ feature 'The user' do
expect(page).to have_checked_field('checkbox')
expect(page).to have_checked_field('Madame')
expect(page).to have_field('email', with: 'loulou@yopmail.com')
expect(page).to have_field('phone', with: '1234567890')
expect(page).to have_field('phone', with: '0123456789')
expect(page).to have_checked_field('Non')
expect(page).to have_checked_field('val2')
expect(page).to have_checked_field('val1')