diff options
Diffstat (limited to 'plugins/Login/tests/UI/Login_spec.js')
-rw-r--r-- | plugins/Login/tests/UI/Login_spec.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/Login/tests/UI/Login_spec.js b/plugins/Login/tests/UI/Login_spec.js index 28f4020b20..89fc353559 100644 --- a/plugins/Login/tests/UI/Login_spec.js +++ b/plugins/Login/tests/UI/Login_spec.js @@ -149,7 +149,7 @@ describe("Login", function () { expect(await page.screenshot({ fullPage: true })).to.matchImage('password_reset'); }); - it("should reset password when password reset link is clicked", async function() { + it("should show reset password confirmation page when password reset link is clicked", async function() { var expectedMailOutputFile = PIWIK_INCLUDE_PATH + '/tmp/Login.resetPassword.mail.json', fileContents = require("fs").readFileSync(expectedMailOutputFile), mailSent = JSON.parse(fileContents), @@ -163,6 +163,15 @@ describe("Login", function () { await page.goto(resetUrl); await page.waitForNetworkIdle(); + expect(await page.screenshot({ fullPage: true })).to.matchImage('password_reset_confirm'); + }); + + it("should reset password when password reset link is clicked", async function() { + + await page.type("#mtmpasswordconfirm", "superUserPass2"); + await page.click("#login_reset_confirm"); + await page.waitForNetworkIdle(); + expect(await page.screenshot({ fullPage: true })).to.matchImage('password_reset_complete'); }); |