Skip to content
Permalink
Browse files Browse the repository at this point in the history
XWIKI-18400: Wrong message after reset password
  • Loading branch information
surli committed Mar 3, 2021
1 parent 0a36dbc commit 0cf7162
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Expand Up @@ -138,7 +138,11 @@ public void resetForgottenPassword(TestUtils setup) throws Exception
// Actually reset the user's password
resetPasswordPage = ResetPasswordPage.gotoPage();
resetPasswordPage.setUserName(userName);
resetPasswordPage.clickResetPassword();
ResetPasswordPage newResetPasswordPage = resetPasswordPage.clickResetPassword();
assertTrue(newResetPasswordPage.getMessage().contains("An e-mail was sent"),
"Actual message: " + newResetPasswordPage.getMessage());
assertFalse(newResetPasswordPage.getMessage().contains("foo@bar.com"),
"Actual message: " + newResetPasswordPage.getMessage());

// Check the result
assertTrue(resetPasswordPage.isResetPasswordSent());
Expand Down
Expand Up @@ -84,7 +84,7 @@ $services.localization.render('xe.admin.passwordReset.instructions')
#displayResetPasswordException()
#else
#resetPasswordBoxStart("default")
$services.localization.render('xe.admin.passwordReset.emailSent', ["$email"])
$services.localization.render('xe.admin.passwordReset.emailSent', ["$services.mail.general.obfuscate($email)"])
#end
#end
<div>
Expand Down

0 comments on commit 0cf7162

Please sign in to comment.