Commit bdf67f76 authored by David Lawrence's avatar David Lawrence

- Selenium test script fixes to work with recent email/login changes

parent a5e4ef4e
......@@ -249,8 +249,8 @@ $sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Full Text Bug Listing");
$sel->is_text_present_ok("Bug $bug1_id");
$sel->is_text_present_ok("Status: CONFIRMED");
$sel->is_text_present_ok("Reporter: QA-Selenium-TEST <$config->{QA_Selenium_TEST_user_login}>");
$sel->is_text_present_ok("Assignee: admin <$config->{admin_user_login}>");
$sel->is_text_present_ok("Reporter: QA-Selenium-TEST ($config->{QA_Selenium_TEST_user_login})");
$sel->is_text_present_ok("Assignee: admin ($config->{admin_user_login})");
$sel->is_text_present_ok("Severity: blocker");
$sel->is_text_present_ok("Priority: Highest");
$sel->is_text_present_ok("I have no privs, I can only comment");
......
......@@ -35,7 +35,7 @@ $sel->is_text_present_ok("Open a New Account");
$sel->click_ok("link=Open a New Account");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Create a new Bugzilla account");
$sel->type_ok("login", $valid_account);
$sel->type_ok("email", $valid_account);
$sel->click_ok("send");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Request for new user account '$valid_account' submitted");
......@@ -49,7 +49,7 @@ $sel->is_text_present_ok("Open a New Account");
$sel->click_ok("link=Open a New Account");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Create a new Bugzilla account");
$sel->type_ok("login", $valid_account);
$sel->type_ok("email", $valid_account);
$sel->click_ok("send");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Too Soon For New Token");
......@@ -62,7 +62,7 @@ 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->type_ok("email", $account);
$sel->click_ok("send");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Account Creation Restricted");
......@@ -85,7 +85,7 @@ foreach my $account (@accounts) {
document.getElementById('account_creation_form').setAttribute('novalidate', 1);
};
$sel->run_script($script);
$sel->type_ok("login", $account);
$sel->type_ok("email", $account);
$sel->click_ok("send");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Invalid Email Address");
......@@ -97,12 +97,12 @@ 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", $config->{admin_user_login});
$sel->type_ok("email", $config->{admin_user_login});
$sel->click_ok("send");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Account Already Exists");
$error_msg = trim($sel->get_text("error_msg"));
ok($error_msg eq "There is already an account with the login name $config->{admin_user_login}.", "Account already exists");
ok($error_msg eq "There is already an account with the email address $config->{admin_user_login}.", "Account already exists");
# Turn off user account creation.
log_in($sel, $config, 'admin');
......
......@@ -58,6 +58,7 @@ $sel->select_ok("type", "label=Drop Down");
$sel->type_ok("sortkey", $bug1_id);
$sel->click_ok("enter_bug");
$sel->value_is("enter_bug", "on");
sleep(3);
$sel->click_ok("new_bugmail");
$sel->value_is("new_bugmail", "on");
$sel->value_is("obsolete", "off");
......
......@@ -60,7 +60,7 @@ sub check_passwords {
$sel->click_ok('link=add a new user');
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is('Add user');
$sel->type_ok('login', $new_user);
$sel->type_ok('email', $new_user);
foreach my $password (@$invalid_passwords) {
$sel->type_ok('password', $password, 'Enter password');
......
......@@ -123,7 +123,7 @@ foreach my $arg (@args) {
$sel->title_is("Suspicious Action");
if ($arg eq "token=$admin_cookie") {
$sel->is_text_present_ok("Generated by: admin <$admin_user>");
$sel->is_text_present_ok("Generated by: admin ($admin_user)");
$sel->is_text_present_ok("This token has not been generated by you");
}
else {
......
......@@ -90,7 +90,7 @@ $sel->type_ok("matchstr", $qa_user);
$sel->select_ok("matchtype", "label=exact (find this user)");
$sel->click_ok("search");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Edit user QA-Selenium-TEST <$qa_user>");
$sel->title_is("Edit user QA-Selenium-TEST ($qa_user)");
$sel->check_ok("group_$master_gid");
$sel->click_ok("update");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
......@@ -128,7 +128,7 @@ $sel->type_ok("matchstr", $qa_user);
$sel->select_ok("matchtype", "label=exact (find this user)");
$sel->click_ok("search");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Edit user QA-Selenium-TEST <$qa_user>");
$sel->title_is("Edit user QA-Selenium-TEST ($qa_user)");
$sel->uncheck_ok("group_$master_gid");
$sel->click_ok("update");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
......
......@@ -35,8 +35,8 @@ $sel->type_ok("matchstr", $config->{unprivileged_user_login});
$sel->select_ok("matchtype", "label=exact (find this user)");
$sel->click_ok("search");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Edit user no-privs <$config->{unprivileged_user_login}>");
$sel->value_is("login", $config->{unprivileged_user_login});
$sel->title_is("Edit user no-privs ($config->{unprivileged_user_login})");
$sel->value_is("email", $config->{unprivileged_user_login});
$sel->click_ok("link=Impersonate this user");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Begin sudo session");
......@@ -64,8 +64,8 @@ $sel->type_ok("matchstr", $config->{unprivileged_user_login});
$sel->select_ok("matchtype", "label=exact (find this user)");
$sel->click_ok("search");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Edit user no-privs <$config->{unprivileged_user_login}>");
$sel->value_is("login", $config->{unprivileged_user_login});
$sel->title_is("Edit user no-privs ($config->{unprivileged_user_login})");
$sel->value_is("email", $config->{unprivileged_user_login});
$sel->click_ok("link=Impersonate this user");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Begin sudo session");
......
......@@ -67,7 +67,7 @@ $sel->title_is('Search users');
$sel->click_ok('link=add a new user');
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is('Add user');
$sel->type_ok('login', 'master@selenium.bugzilla.org');
$sel->type_ok('email', 'master@selenium.bugzilla.org');
$sel->type_ok('name', 'master-user');
$sel->type_ok('password', 'selenium', 'Enter password');
$sel->type_ok('disabledtext', 'Not for common usage');
......@@ -83,7 +83,7 @@ $sel->is_text_present_ok('The account has been added to the Master group');
$sel->click_ok("link=add a new user");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is('Add user');
$sel->type_ok('login', 'slave@selenium.bugzilla.org');
$sel->type_ok('email', 'slave@selenium.bugzilla.org');
$sel->type_ok('name', 'slave-user');
$sel->type_ok('password', 'selenium', 'Enter password');
$sel->type_ok('disabledtext', 'Not for common usage');
......@@ -99,7 +99,7 @@ $sel->is_text_present_ok('The account has been added to the Slave group');
$sel->click_ok("link=add a new user");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is('Add user');
$sel->type_ok('login', 'reg@selenium.bugzilla.org');
$sel->type_ok('email', 'reg@selenium.bugzilla.org');
$sel->type_ok('name', 'reg-user');
$sel->type_ok('password', 'selenium', 'Enter password');
$sel->type_ok('disabledtext', 'Not for common usage');
......@@ -216,7 +216,7 @@ sub cleanup_users {
$sel->click_ok("link=$login");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Edit user ${user}-user <$login>");
$sel->title_is("Edit user ${user}-user ($login)");
$sel->click_ok("delete");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Confirm deletion of user $login");
......
......@@ -61,7 +61,7 @@ $sel->type_ok("newcc", "$config->{unprivileged_user_login_truncated}*");
$sel->click_ok("commit");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Confirm Match");
$sel->is_text_present_ok("<$config->{unprivileged_user_login}>");
$sel->is_text_present_ok("($config->{unprivileged_user_login})");
$sel->go_back_ok();
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_like(qr/^$bug1_id/);
......@@ -164,7 +164,7 @@ $sel->type_ok("newcc", $config->{tweakparams_user_login_truncated});
$sel->click_ok("commit");
$sel->wait_for_page_to_load_ok(WAIT_TIME);
$sel->title_is("Confirm Match");
$sel->is_text_present_ok("<$config->{tweakparams_user_login}>");
$sel->is_text_present_ok("($config->{tweakparams_user_login})");
# Now test user menus. It must NOT display users we are not allowed to see.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment