diff --git a/Gemfile.lock b/Gemfile.lock index 2ef6c2899..c4a2211b5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -139,9 +139,9 @@ GEM activesupport (>= 3.0.0) uniform_notifier (~> 1.10.0) byebug (9.1.0) - capybara (2.13.0) + capybara (2.16.1) addressable - mime-types (>= 1.16) + mini_mime (>= 0.1.3) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) @@ -281,11 +281,12 @@ GEM loofah (2.1.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.6.6) - mime-types (>= 1.16, < 4) + mail (2.7.0) + mini_mime (>= 0.1.1) method_source (0.9.0) mime-types (1.25.1) mimemagic (0.3.2) + mini_mime (1.0.0) mini_portile2 (2.1.0) minitest (5.10.3) momentjs-rails (2.17.1) @@ -329,7 +330,7 @@ GEM pry (~> 0.10) pry-rails (0.3.6) pry (>= 0.10.4) - public_suffix (3.0.0) + public_suffix (3.0.1) puma (3.10.0) rack (2.0.3) rack-test (0.6.3) diff --git a/features/sessions/forgot_password.feature b/features/sessions/forgot_password.feature index fd922d700..81a175430 100644 --- a/features/sessions/forgot_password.feature +++ b/features/sessions/forgot_password.feature @@ -24,6 +24,7 @@ Scenario: User forgot their password and enters non valid email And I click "Send me reset password instruction" button Then I should see "Email not found" +@javascript Scenario: User has got Reset Your Password email and click to link Given I click on Reset Password link in the reset password email for user "nonadmin@myorg.com" Then I should be on Change your password page diff --git a/features/step_definitions/users_steps.rb b/features/step_definitions/users_steps.rb index 0691515bb..631b6af4a 100644 --- a/features/step_definitions/users_steps.rb +++ b/features/step_definitions/users_steps.rb @@ -34,18 +34,16 @@ Given("I am on reset password page") do end Given("I click on Reset Password link in the reset password email for user {string}") do |email| - clear_emails visit new_user_password_path fill_in 'user_email', with: email click_button 'Send me reset password instruction' Delayed::Worker.new.work_off - sleep 1 open_email(email) current_email.click_link 'Change my password' end Then("I should be on Change your password page") do - expect(page).to have_current_path(edit_user_password_path, only_path: true) + expect(page).to have_current_path(edit_user_password_path, ignore_query: true) end Given(/^I am on Log in page$/) do