diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2016-03-07 00:11:06 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2016-03-07 00:11:06 +0300 |
commit | af591ccb591091a8fd3e850fa09a5dceea799620 (patch) | |
tree | c90488d7e5c6670cbbf90c8bd6d05b1dba087da0 | |
parent | 05e8e1f35f53d4bb51f1a0d3151c879d0126804a (diff) | |
parent | 072d4c2e46523d84d99c7769097d70e06faa65d4 (diff) |
Merge pull request #9880 from piwik/fixpwresetform
Fix behaviour of reset password form on error
-rwxr-xr-x | plugins/Login/javascripts/login.js | 2 | ||||
-rw-r--r-- | tests/UI/specs/Login_spec.js | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/Login/javascripts/login.js b/plugins/Login/javascripts/login.js index 3ffb0e132e..b2c7d59162 100755 --- a/plugins/Login/javascripts/login.js +++ b/plugins/Login/javascripts/login.js @@ -63,7 +63,7 @@ var ajaxDone = function (response) { $('.loadingPiwik').hide(); - var isSuccess = response.indexOf('id="login_error"') === -1, + var isSuccess = response.indexOf('message_error') === -1, fadeOutIds = '#message_container'; if (isSuccess) { fadeOutIds += ',#reset_form,#reset_form_nav'; diff --git a/tests/UI/specs/Login_spec.js b/tests/UI/specs/Login_spec.js index ed4ad31ba3..dc0fbb558a 100644 --- a/tests/UI/specs/Login_spec.js +++ b/tests/UI/specs/Login_spec.js @@ -60,6 +60,14 @@ describe("Login", function () { }, done); }); + it("should show reset password form and error message on error", function (done) { + expect.screenshot("password_reset_error").to.be.capture(function (page) { + page.sendKeys("#reset_form_login", "superUserLogin"); + page.sendKeys("#reset_form_password", "superUserPass2"); + page.click("#reset_form_submit", 3000); + }, done); + }); + it("should send email when password reset form submitted", function (done) { expect.screenshot("password_reset").to.be.capture(function (page) { page.sendKeys("#reset_form_login", "superUserLogin"); |