diff --git a/spec/features/verification/email_spec.rb b/spec/features/verification/email_spec.rb index 12d248838..95f6360c5 100644 --- a/spec/features/verification/email_spec.rb +++ b/spec/features/verification/email_spec.rb @@ -19,7 +19,7 @@ feature 'Verify email' do within("#verified_user_#{verified_user.id}_email") do expect(page).to have_content 'roc*@example.com' - click_button "Send" + click_button "Send code" end expect(page).to have_content 'We have send you a confirmation email to your email account: rock@example.com' @@ -58,7 +58,7 @@ feature 'Verify email' do visit verified_user_path verified_user.destroy - click_button "Send" + click_button "Send code" expect(page).to have_content "There was a problem sending you an email to your account" end diff --git a/spec/features/verification/letter_spec.rb b/spec/features/verification/letter_spec.rb index a065edfc0..b62ae00f8 100644 --- a/spec/features/verification/letter_spec.rb +++ b/spec/features/verification/letter_spec.rb @@ -25,7 +25,7 @@ feature 'Verify Letter' do login_as(user) visit new_letter_path - expect(page).to have_link "Office of Citizen", href: "http://www.madrid.es/portales/munimadrid/es/Inicio/El-Ayuntamiento/Atencion-al-ciudadano/Oficinas-de-Atencion-al-Ciudadano?vgnextfmt=default&vgnextchannel=5b99cde2e09a4310VgnVCM1000000b205a0aRCRD" + expect(page).to have_link "See Office of Citizen", href: "http://www.madrid.es/portales/munimadrid/es/Inicio/El-Ayuntamiento/Atencion-al-ciudadano/Oficinas-de-Atencion-al-Ciudadano?vgnextfmt=default&vgnextchannel=5b99cde2e09a4310VgnVCM1000000b205a0aRCRD" end scenario 'Errors on verification code' do @@ -51,7 +51,7 @@ feature 'Verify Letter' do allow_any_instance_of(CensusApi).to receive(:address).and_return(nil) - click_button "Send me a letter" + click_button "Send me a letter with the code" expect(page).to have_content "We could not verify your address with the Census please try again later" end diff --git a/spec/features/verification/level_three_verification_spec.rb b/spec/features/verification/level_three_verification_spec.rb index 93f60c175..d755cf424 100644 --- a/spec/features/verification/level_three_verification_spec.rb +++ b/spec/features/verification/level_three_verification_spec.rb @@ -17,7 +17,7 @@ feature 'Level three verification' do verify_residence within("#verified_user_#{verified_user.id}_phone") do - click_button "Send" + click_button "Send code" end expect(page).to have_content 'Security code confirmation' @@ -48,7 +48,7 @@ feature 'Level three verification' do verify_residence within("#verified_user_#{verified_user.id}_email") do - click_button "Send" + click_button "Send code" end expect(page).to have_content 'We have send you a confirmation email to your email account: rock@example.com' diff --git a/spec/features/verification/residence_spec.rb b/spec/features/verification/residence_spec.rb index 61231ea7d..fa11fa48b 100644 --- a/spec/features/verification/residence_spec.rb +++ b/spec/features/verification/residence_spec.rb @@ -15,7 +15,7 @@ feature 'Residence' do fill_in 'residence_postal_code', with: '28013' check 'residence_terms_of_service' - click_button 'Verify' + click_button 'Verify residence' expect(page).to have_content 'Residence verified' end @@ -27,7 +27,7 @@ feature 'Residence' do visit account_path click_link 'Verify my account' - click_button 'Verify' + click_button 'Verify residence' expect(page).to have_content /\d errors? prevented your residence verification/ end @@ -47,7 +47,7 @@ feature 'Residence' do fill_in 'residence_postal_code', with: '28013' check 'residence_terms_of_service' - click_button 'Verify' + click_button 'Verify residence' expect(page).to have_content 'The census of the city of Madrid could not verify your information' end @@ -68,11 +68,11 @@ feature 'Residence' do fill_in 'residence_postal_code', with: '28013' check 'residence_terms_of_service' - click_button 'Verify' + click_button 'Verify residence' expect(page).to have_content 'The census of the city of Madrid could not verify your information' end - click_button 'Verify' + click_button 'Verify residence' expect(page).to have_content 'You have reached the maximum number of Census verification tries' expect(URI.parse(current_url).path).to eq(account_path) diff --git a/spec/features/verification/verified_user_spec.rb b/spec/features/verification/verified_user_spec.rb index e68bb3ee1..c0989e180 100644 --- a/spec/features/verification/verified_user_spec.rb +++ b/spec/features/verification/verified_user_spec.rb @@ -73,7 +73,7 @@ feature 'Verified users' do visit verified_user_path within("#verified_user_#{verified_user.id}_email") do - click_button "Send" + click_button "Send code" end expect(page).to have_content 'We have send you a confirmation email to your email account: rock@example.com' @@ -95,7 +95,7 @@ feature 'Verified users' do visit verified_user_path within("#verified_user_#{verified_user.id}_phone") do - click_button "Send" + click_button "Send code" end expect(page).to have_content 'Enter the confirmation code' diff --git a/spec/support/common_actions.rb b/spec/support/common_actions.rb index b773ca269..4bbfd3bd4 100644 --- a/spec/support/common_actions.rb +++ b/spec/support/common_actions.rb @@ -105,7 +105,7 @@ module CommonActions fill_in 'residence_postal_code', with: '28013' check 'residence_terms_of_service' - click_button 'Verify' + click_button 'Verify residence' expect(page).to have_content 'Residence verified' end end