|
|
@ -47,17 +47,19 @@ Then("the no links in navigation bar are highlighted") do |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
When("I click to change my password") do |
|
|
|
When("I click to change my password") do |
|
|
|
pending # Write code here that turns the phrase above into concrete actions |
|
|
|
find('[data-qa="change-password"]').click |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
When("I fill in new password and confirmation") do |
|
|
|
When("I fill in new password and confirmation") do |
|
|
|
pending # Write code here that turns the phrase above into concrete actions |
|
|
|
fill_in("user[password]", with: "Password123!") |
|
|
|
|
|
|
|
fill_in("user[password_confirmation]", with: "Password123!") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
When("I click to update my password") do |
|
|
|
When("I click to update my password") do |
|
|
|
pending # Write code here that turns the phrase above into concrete actions |
|
|
|
click_button("Update") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
Then("my password should be updated") do |
|
|
|
Then("my password should be updated") do |
|
|
|
pending # Write code here that turns the phrase above into concrete actions |
|
|
|
expect(page).to have_current_path("/account") |
|
|
|
|
|
|
|
expect(User.find(@user.id).valid_password?("Password123!")).to be true |
|
|
|
end |
|
|
|
end |
|
|
|