summaryrefslogtreecommitdiffstats
path: root/qa
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-09-10 00:11:19 +0200
committerDavid Lawrence <dkl@mozilla.com>2015-09-10 00:11:19 +0200
commit39be67dc8ff1d2295c776a36ce6157191bd5d375 (patch)
treeffff0ca6885010cdc6cf23277c8da871c39281a6 /qa
parent377b019b6e7822aa566b54def1f2b902a0b0e6db (diff)
downloadbugzilla-39be67dc8ff1d2295c776a36ce6157191bd5d375.tar.gz
bugzilla-39be67dc8ff1d2295c776a36ce6157191bd5d375.tar.xz
Bug 1202461 - update test script for account creation
Diffstat (limited to 'qa')
-rw-r--r--qa/t/test_create_user_accounts.t24
1 files changed, 22 insertions, 2 deletions
diff --git a/qa/t/test_create_user_accounts.t b/qa/t/test_create_user_accounts.t
index 92145f18c..d9c0c4404 100644
--- a/qa/t/test_create_user_accounts.t
+++ b/qa/t/test_create_user_accounts.t
@@ -63,8 +63,28 @@ foreach my $account (@accounts) {
$sel->is_text_present_ok("User account creation has been restricted.");
}
-# These accounts are illegal.
-@accounts = ('test\bugzilla@bugzilla.test', 'test@bugzilla.org@bugzilla.test', 'test@bugzilla..test');
+# These accounts are illegal and should cause a javascript alert.
+@accounts = qw(
+ test\bugzilla@bugzilla.test
+ testbugzilla.test
+ test@bugzilla
+ test@bugzilla.
+ 'test'@bugzilla.test
+ test&test@bugzilla.test
+ [test]@bugzilla.test
+);
+foreach my $account (@accounts) {
+ $sel->click_ok("link=New Account");
+ $sel->wait_for_page_to_load_ok(WAIT_TIME);
+ $sel->title_is("Create a new Bugzilla account");
+ $sel->type_ok("login", $account);
+ $sel->click_ok('//input[@value="Create Account"]');
+ ok($sel->get_alert() =~ /The e-mail address doesn't pass our syntax checking for a legal email address/,
+ 'Invalid email address detected');
+}
+
+# These accounts are illegal but do not cause a javascript alert
+@accounts = ('test@bugzilla.org@bugzilla.test', 'test@bugzilla..test');
foreach my $account (@accounts) {
$sel->click_ok("link=New Account");
$sel->wait_for_page_to_load_ok(WAIT_TIME);