Skip to content

Commit 54b1008

Browse files
committed
Bug 1202461 - update test script for account creation
1 parent 774494c commit 54b1008

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

qa/t/test_create_user_accounts.t

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ my ($sel, $config) = get_selenium();
1818
# Set the email regexp for new bugzilla accounts to end with @bugzilla.test.
1919

2020
log_in($sel, $config, 'admin');
21-
set_parameters($sel, { "User Authentication" => {"createemailregexp" => {type => "text", value => '[^@]+@bugzilla\.test'}} });
21+
set_parameters($sel, { "User Authentication" => {"createemailregexp" => {type => "text", value => '[^@]+@bugzilla\.test$'}} });
2222
logout($sel);
2323

2424
# Create a valid account. We need to randomize the login address, because a request
@@ -51,7 +51,7 @@ my $error_msg = trim($sel->get_text("error_msg"));
5151
ok($error_msg =~ /Please wait a while and try again/, "Too soon for this account");
5252

5353
# These accounts do not pass the regexp.
54-
my @accounts = ('test@yahoo.com', 'test@bugzilla.net', 'test@bugzilla..test');
54+
my @accounts = ('test@yahoo.com', 'test@bugzilla.net', 'test@bugzilla.test.com');
5555
foreach my $account (@accounts) {
5656
$sel->click_ok("link=New Account");
5757
$sel->wait_for_page_to_load_ok(WAIT_TIME);
@@ -63,16 +63,8 @@ foreach my $account (@accounts) {
6363
$sel->is_text_present_ok("User account creation has been restricted.");
6464
}
6565

66-
# These accounts are illegal and should cause a javascript alert.
67-
@accounts = qw(
68-
test\bugzilla@bugzilla.test
69-
testbugzilla.test
70-
test@bugzilla
71-
test@bugzilla.
72-
'test'@bugzilla.test
73-
test&test@bugzilla.test
74-
[test]@bugzilla.test
75-
);
66+
# These accounts are illegal.
67+
@accounts = ('test\bugzilla@bugzilla.test', 'test@bugzilla.org@bugzilla.test', 'test@bugzilla..test');
7668
foreach my $account (@accounts) {
7769
$sel->click_ok("link=New Account");
7870
$sel->wait_for_page_to_load_ok(WAIT_TIME);

0 commit comments

Comments
 (0)