diff --git a/spec/system/management/account_spec.rb b/spec/system/management/account_spec.rb index 0507affe1..6802a711d 100644 --- a/spec/system/management/account_spec.rb +++ b/spec/system/management/account_spec.rb @@ -27,7 +27,7 @@ describe "Account" do expect(email).to have_text "Change your password" end - scenario "Manager changes the password by hand (writen by them)" do + scenario "Manager manually writes the new password" do user = create(:user, :level_three) login_managed_user(user) @@ -39,6 +39,8 @@ describe "Account" do click_button "Save password" expect(page).to have_content "Password reseted successfully" + expect(page).to have_link "Print password", href: "javascript:window.print();" + expect(page).to have_css "div.for-print-only", text: "new_password", visible: :hidden logout @@ -68,22 +70,6 @@ describe "Account" do expect(page).to have_content "You have been signed in successfully." end - scenario "The password is printed" do - user = create(:user, :level_three) - login_managed_user(user) - - login_as_manager - click_link "Reset password manually" - - fill_in "Password", with: "another_new_password" - - click_button "Save password" - - expect(page).to have_content "Password reseted successfully" - expect(page).to have_link "Print password", href: "javascript:window.print();" - expect(page).to have_css("div.for-print-only", text: "another_new_password", visible: :hidden) - end - describe "When a user has not been selected" do before do Setting["feature.user.skip_verification"] = "true"