Updated the IDs of the fields, so that it wouldn't mess with many tests
Updated some tests to match new IDs
This commit is contained in:
parent
10528341c2
commit
7039c9868a
|
@ -29,6 +29,6 @@ $(document).ready ->
|
|||
deviseOptions.rules =
|
||||
activated: overwritten_rules
|
||||
|
||||
$("#user_password").pwstrength profileOptions
|
||||
$("#user_password_profile").pwstrength profileOptions
|
||||
$("#user_password_sign_up").pwstrength deviseOptions
|
||||
$("#user_password_recover").pwstrength deviseOptions
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
.form-group#password-strength
|
||||
= f.label :password, 'New password', class: 'control-label'
|
||||
.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
|
||||
= f.label :password_confirmation, class: 'control-label'
|
||||
.col-sm-10
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
.col-sm-10= f.password_field :current_password, required: true, class: 'form-control'
|
||||
.form-group#password-strength
|
||||
= 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
|
||||
= f.label :password_confirmation, class: 'control-label'
|
||||
.col-sm-10
|
||||
|
|
|
@ -58,7 +58,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
|
|||
|
||||
step 'I try change my password w/o old one' 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"
|
||||
click_button "Save"
|
||||
end
|
||||
|
@ -67,7 +67,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
|
|||
step 'I change my password' do
|
||||
within '.update-password' do
|
||||
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"
|
||||
click_button "Save"
|
||||
end
|
||||
|
@ -76,7 +76,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
|
|||
step 'I unsuccessfully change my password' do
|
||||
within '.update-password' do
|
||||
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"
|
||||
click_button "Save"
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@ describe 'Users', feature: true do
|
|||
fill_in "user_name", with: "Name Surname"
|
||||
fill_in "user_username", with: "Great"
|
||||
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"
|
||||
expect { click_button "Sign up" }.to change {User.count}.by(1)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue