Browse Source

code for change password scenario

cucumber-rails
JG 3 years ago
parent
commit
7ec50fa4f0
  1. 10
      features/step_definitions/data_coordinator_steps.rb
  2. 1
      features/users/data_coordinator.feature

10
features/step_definitions/data_coordinator_steps.rb

@ -47,17 +47,19 @@ Then("the no links in navigation bar are highlighted") do
end
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
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
When("I click to update my password") do
pending # Write code here that turns the phrase above into concrete actions
click_button("Update")
end
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

1
features/users/data_coordinator.feature

@ -18,7 +18,6 @@ Feature: Data Coordinator Features
Then I see information about my account
And the no links in navigation bar are highlighted
@wip
Scenario: Changing your password
When I visit the your account page
And I click to change my password

Loading…
Cancel
Save