Commit 7039c986 authored by Patricio Cano's avatar Patricio Cano

Updated the IDs of the fields, so that it wouldn't mess with many tests

Updated some tests to match new IDs
parent 10528341
...@@ -29,6 +29,6 @@ $(document).ready -> ...@@ -29,6 +29,6 @@ $(document).ready ->
deviseOptions.rules = deviseOptions.rules =
activated: overwritten_rules activated: overwritten_rules
$("#user_password").pwstrength profileOptions $("#user_password_profile").pwstrength profileOptions
$("#user_password_sign_up").pwstrength deviseOptions $("#user_password_sign_up").pwstrength deviseOptions
$("#user_password_recover").pwstrength deviseOptions $("#user_password_recover").pwstrength deviseOptions
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
.form-group#password-strength .form-group#password-strength
= f.label :password, 'New password', class: 'control-label' = f.label :password, 'New password', class: 'control-label'
.col-sm-10 .col-sm-10
= f.password_field :password, required: true, class: 'form-control' = f.password_field :password, required: true, class: 'form-control', id: 'user_password_profile'
.form-group .form-group
= f.label :password_confirmation, class: 'control-label' = f.label :password_confirmation, class: 'control-label'
.col-sm-10 .col-sm-10
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
.col-sm-10= f.password_field :current_password, required: true, class: 'form-control' .col-sm-10= f.password_field :current_password, required: true, class: 'form-control'
.form-group#password-strength .form-group#password-strength
= f.label :password, class: 'control-label' = f.label :password, class: 'control-label'
.col-sm-10= f.password_field :password, required: true, class: 'form-control' .col-sm-10= f.password_field :password, required: true, class: 'form-control', id: 'user_password_profile'
.form-group .form-group
= f.label :password_confirmation, class: 'control-label' = f.label :password_confirmation, class: 'control-label'
.col-sm-10 .col-sm-10
......
...@@ -58,7 +58,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps ...@@ -58,7 +58,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
step 'I try change my password w/o old one' do step 'I try change my password w/o old one' do
within '.update-password' do within '.update-password' do
fill_in "user_password", with: "22233344" fill_in "user_password_profile", with: "22233344"
fill_in "user_password_confirmation", with: "22233344" fill_in "user_password_confirmation", with: "22233344"
click_button "Save" click_button "Save"
end end
...@@ -67,7 +67,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps ...@@ -67,7 +67,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
step 'I change my password' do step 'I change my password' do
within '.update-password' do within '.update-password' do
fill_in "user_current_password", with: "12345678" fill_in "user_current_password", with: "12345678"
fill_in "user_password", with: "22233344" fill_in "user_password_profile", with: "22233344"
fill_in "user_password_confirmation", with: "22233344" fill_in "user_password_confirmation", with: "22233344"
click_button "Save" click_button "Save"
end end
...@@ -76,7 +76,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps ...@@ -76,7 +76,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
step 'I unsuccessfully change my password' do step 'I unsuccessfully change my password' do
within '.update-password' do within '.update-password' do
fill_in "user_current_password", with: "12345678" fill_in "user_current_password", with: "12345678"
fill_in "user_password", with: "password" fill_in "user_password_profile", with: "password"
fill_in "user_password_confirmation", with: "confirmation" fill_in "user_password_confirmation", with: "confirmation"
click_button "Save" click_button "Save"
end end
......
...@@ -11,7 +11,7 @@ describe 'Users', feature: true do ...@@ -11,7 +11,7 @@ describe 'Users', feature: true do
fill_in "user_name", with: "Name Surname" fill_in "user_name", with: "Name Surname"
fill_in "user_username", with: "Great" fill_in "user_username", with: "Great"
fill_in "user_email", with: "name@mail.com" fill_in "user_email", with: "name@mail.com"
fill_in "user_password", with: "password1234" fill_in "user_password_sign_up", with: "password1234"
fill_in "user_password_confirmation", with: "password1234" fill_in "user_password_confirmation", with: "password1234"
expect { click_button "Sign up" }.to change {User.count}.by(1) expect { click_button "Sign up" }.to change {User.count}.by(1)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment