From 8e9043d48c07e04c6ecc56dc43e46ca54b6a3650 Mon Sep 17 00:00:00 2001 From: Shane Tomlinson <stomlinson@mozilla.com> Date: Thu, 5 Jan 2012 00:39:47 +0000 Subject: [PATCH] Updating the "password_too_short" tooltip to be "password_length". Add test for password too long in add_email close #845 --- .../static/test/qunit/pages/add_email_address_test.js | 11 +++++++++++ resources/views/add_email_address.ejs | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/resources/static/test/qunit/pages/add_email_address_test.js b/resources/static/test/qunit/pages/add_email_address_test.js index 656e1ac01..06544ba89 100644 --- a/resources/static/test/qunit/pages/add_email_address_test.js +++ b/resources/static/test/qunit/pages/add_email_address_test.js @@ -171,6 +171,17 @@ expectTooltipVisible(); }); + asyncTest("password: too long of a password", function() { + var tooLong = ""; + for(var i = 0; i < 81; i++) { + tooLong += (i % 10); + } + $("#password").val(tooLong); + $("#vpassword").val(tooLong); + + expectTooltipVisible(); + }); + asyncTest("password: mismatched passwords", function() { $("#password").val("passwords"); $("#vpassword").val("password"); diff --git a/resources/views/add_email_address.ejs b/resources/views/add_email_address.ejs index 92b1c0e47..61569dd8f 100644 --- a/resources/views/add_email_address.ejs +++ b/resources/views/add_email_address.ejs @@ -23,8 +23,8 @@ Password is required. </div> - <div class="tooltip" id="password_too_short" for="password"> - Password must be at least 8 characters long. + <div class="tooltip" id="password_length" for="password"> + Password must be between 8 and 80 characters long. </div> </li> <li> -- GitLab