@@ -39,7 +39,7 @@ $sel->wait_for_page_to_load_ok(WAIT_TIME);
39
39
$sel -> title_is(" Begin sudo session" );
40
40
$sel -> value_is(" target_login" , $config -> {unprivileged_user_login });
41
41
$sel -> type_ok(" reason" , " Selenium test about sudo sessions" );
42
- $sel -> type_ok(" Bugzilla_password " , $config -> {admin_user_passwd }, " Enter admin password" );
42
+ $sel -> type_ok(" current_password " , $config -> {admin_user_passwd }, " Enter admin password" );
43
43
$sel -> click_ok(' //input[@value="Begin Session"]' );
44
44
$sel -> wait_for_page_to_load_ok(WAIT_TIME);
45
45
$sel -> title_is(" Match Failed" );
@@ -67,7 +67,7 @@ $sel->click_ok("link=Impersonate this user");
67
67
$sel -> wait_for_page_to_load_ok(WAIT_TIME);
68
68
$sel -> title_is(" Begin sudo session" );
69
69
$sel -> value_is(" target_login" , $config -> {unprivileged_user_login });
70
- $sel -> type_ok(" Bugzilla_password " , $config -> {admin_user_passwd }, " Enter admin password" );
70
+ $sel -> type_ok(" current_password " , $config -> {admin_user_passwd }, " Enter admin password" );
71
71
$sel -> click_ok(' //input[@value="Begin Session"]' );
72
72
$sel -> wait_for_page_to_load_ok(WAIT_TIME);
73
73
$sel -> title_is(" Sudo session started" );
@@ -96,23 +96,18 @@ $sel->is_text_present_ok("The sudo session has been ended");
96
96
97
97
# Try to access the sudo page directly, with no credentials.
98
98
99
- $sel -> open_ok(" /$config ->{bugzilla_installation}/relogin.cgi?action=begin-sudo" );
99
+ $sel -> open_ok(" /$config ->{bugzilla_installation}/relogin.cgi?action=begin-sudo&target_login= $config ->{admin_user_login} " );
100
100
$sel -> title_is(" Password Required" );
101
101
102
- # Now try to start a sudo session directly, with all required credentials.
103
-
104
- $sel -> open_ok(" /$config ->{bugzilla_installation}/relogin.cgi?action=begin-sudo&Bugzilla_login=$config ->{admin_user_login}&Bugzilla_password=$config ->{admin_user_passwd}&target_login=$config ->{admin_user_login}" , undef , " Impersonate a user directly by providing all required data" );
105
- $sel -> title_is(" Preparation Required" );
106
-
107
102
# The link should populate the target_login field correctly.
108
103
# Note that we are trying to sudo an admin, which is not allowed.
109
104
110
- $sel -> click_ok(" link=start your session normally " );
105
+ $sel -> click_ok(" link=go back " );
111
106
$sel -> wait_for_page_to_load_ok(WAIT_TIME);
112
107
$sel -> title_is(" Begin sudo session" );
113
108
$sel -> value_is(" target_login" , $config -> {admin_user_login });
114
109
$sel -> type_ok(" reason" , " Selenium hack" );
115
- $sel -> type_ok(" Bugzilla_password " , $config -> {admin_user_passwd }, " Enter admin password" );
110
+ $sel -> type_ok(" current_password " , $config -> {admin_user_passwd }, " Enter admin password" );
116
111
$sel -> click_ok(' //input[@value="Begin Session"]' );
117
112
$sel -> wait_for_page_to_load_ok(WAIT_TIME);
118
113
$sel -> title_is(" User Protected" );
@@ -127,14 +122,14 @@ $sel->title_is("Begin sudo session");
127
122
$sel -> type_ok(" target_login" , ' foo@bar.com' );
128
123
$sel -> click_ok(' //input[@value="Begin Session"]' );
129
124
$sel -> wait_for_page_to_load_ok(WAIT_TIME);
130
- $sel -> title_is(" Invalid Username Or Password" );
125
+ $sel -> title_is(" Password Required " );
131
126
132
127
# Same as above, but with your password.
133
128
134
129
$sel -> open_ok(" /$config ->{bugzilla_installation}/relogin.cgi?action=prepare-sudo&target_login=foo\@ bar.com" );
135
130
$sel -> title_is(" Begin sudo session" );
136
131
$sel -> value_is(" target_login" , ' foo@bar.com' );
137
- $sel -> type_ok(" Bugzilla_password " , $config -> {admin_user_passwd }, " Enter admin password" );
132
+ $sel -> type_ok(" current_password " , $config -> {admin_user_passwd }, " Enter admin password" );
138
133
$sel -> click_ok(' //input[@value="Begin Session"]' );
139
134
$sel -> wait_for_page_to_load_ok(WAIT_TIME);
140
135
$sel -> title_is(" Match Failed" );
0 commit comments