diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2020-05-18 17:02:39 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2020-05-18 17:02:39 -0700 |
| commit | 187086c479a09629b7d180eec513fb7657f4e291 (patch) | |
| tree | 3e6236990c91d942105b6fdaf8de8eabdff85186 /rt/t/web | |
| parent | 4639e25a658d9a0bf295415642fae8e8cdad846a (diff) | |
rt 4.2.15
Diffstat (limited to 'rt/t/web')
| -rw-r--r-- | rt/t/web/reminder-permissions.t | 4 | ||||
| -rw-r--r-- | rt/t/web/reminders.t | 6 | ||||
| -rw-r--r-- | rt/t/web/ticket_modify_people.t | 35 |
3 files changed, 15 insertions, 30 deletions
diff --git a/rt/t/web/reminder-permissions.t b/rt/t/web/reminder-permissions.t index dd859cd33..6f2049759 100644 --- a/rt/t/web/reminder-permissions.t +++ b/rt/t/web/reminder-permissions.t @@ -90,7 +90,7 @@ qr!<input[^/]+name="Complete-Reminder-$root_reminder_id"[^/]+disabled="disabled" 'complete user_a reminder' ); $m_a->follow_link_ok( { id => 'page-reminders' } ); - $m_a->title_is( "Reminders for ticket #" . $ticket->id ); + $m_a->title_is("Reminders for ticket #" . $ticket->id . ": " . $ticket->Subject); $m_a->content_contains( 'root reminder', 'can see root reminder' ); $m_a->content_contains( 'user_a reminder', 'can see user_a reminder' ); $m_a->content_lacks( 'New reminder:', 'can not create a new reminder' ); @@ -126,7 +126,7 @@ qr!<input[^/]+name="Complete-Reminder-$root_reminder_id"[^/]+disabled="disabled" 'created user_a from display reminder' ); $m_a->follow_link_ok( { id => 'page-reminders' } ); - $m_a->title_is( "Reminders for ticket #" . $ticket->id ); + $m_a->title_is("Reminders for ticket #" . $ticket->id . ": " . $ticket->Subject); $m_a->content_contains( 'New reminder:', 'can create a new reminder' ); $m_a->content_like( qr!<input[^/]+name="Complete-Reminder-$root_reminder_id"[^/]+disabled="disabled"!, diff --git a/rt/t/web/reminders.t b/rt/t/web/reminders.t index 98a8d6954..e1eb46de6 100644 --- a/rt/t/web/reminders.t +++ b/rt/t/web/reminders.t @@ -17,7 +17,7 @@ $m->content_unlike(qr{Check box to complete}, "we don't display this text when t $m->content_unlike(qr{<th[^>]*>Reminders?</th>}, "no reminder titlebar"); $m->follow_link_ok({id => 'page-reminders'}); -$m->title_is("Reminders for ticket #" . $ticket->id); +$m->title_is("Reminders for ticket #" . $ticket->id . ": " . $ticket->Subject); $m->text_contains('New reminder:', 'can create a new reminder'); $m->content_unlike(qr{Check box to complete}, "we don't display this text when there are no reminders"); $m->content_unlike(qr{<th[^>]*>Reminders?</th>}, "no reminder titlebar"); @@ -63,7 +63,7 @@ $m->content_like(qr{<th[^>]*>Reminders?</th>}, "now we have a reminder titlebar" $m->text_contains("baby's first reminder", "display the reminder's subject"); $m->follow_link_ok({id => 'page-reminders'}); -$m->title_is("Reminders for ticket #" . $ticket->id); +$m->title_is("Reminders for ticket #" . $ticket->id . ": " . $ticket->Subject); $m->form_name('UpdateReminders'); $m->field("Reminder-Subject-$reminder_id" => "changed the subject"); $m->submit; @@ -90,7 +90,7 @@ $m->content_unlike(qr{<th[^>]*>Reminders?</th>}, "no reminder titlebar"); $m->content_unlike(qr{baby's first reminder}, "we don't display resolved reminders"); $m->follow_link_ok({id => 'page-reminders'}); -$m->title_is("Reminders for ticket #" . $ticket->id); +$m->title_is("Reminders for ticket #" . $ticket->id . ": " . $ticket->Subject); $m->text_contains('New reminder:', 'can create a new reminder'); $m->text_contains('Check box to complete', "we DO display this text when there are reminders"); $m->content_contains("changed the subject", "display the resolved reminder's subject"); diff --git a/rt/t/web/ticket_modify_people.t b/rt/t/web/ticket_modify_people.t index cefbf915b..f4821a57d 100644 --- a/rt/t/web/ticket_modify_people.t +++ b/rt/t/web/ticket_modify_people.t @@ -1,7 +1,7 @@ use strict; use warnings; -use RT::Test tests => 25; +use RT::Test tests => undef; my $root = RT::Test->load_or_create_user( Name => 'root' ); my $group_foo = RT::Group->new($RT::SystemUser); @@ -36,11 +36,11 @@ ok( $m->login( 'user', 'password' ), 'logged in' ); $m->get_ok( $url . "/Ticket/ModifyPeople.html?id=" . $ticket->id ); ok( - !$m->find_link( - text => 'Enoch Root', - url_regex => qr!/Admin/Users/Modify\.html!, + $m->find_link( + text => 'root (Enoch Root)', + url_regex => qr!/User/Summary\.html!, ), - 'no link to modify user' + 'contains link to user summary page' ); $m->content_contains('Enoch Root', 'still has the user name' ); @@ -54,24 +54,6 @@ ok( $m->content_contains('group_foo', 'still has the group name' ); -ok( RT::Test->add_rights( { Principal => $user, Right => ['AdminUsers'] }, ), - 'added AdminUsers right' ); -$m->reload; -ok( - !$m->find_link( - text => 'Enoch Root', - url_regex => qr!/Admin/Users/Modify\.html!, - ), - 'still no link to modify user' -); -ok( - !$m->find_link( - text => 'group_foo', - url_regex => qr!/Admin/Groups/Modify\.html!, - ), - 'still no link to modify group' -); - ok( RT::Test->add_rights( { Principal => $user, Right => ['ShowConfigTab'] }, ), 'added ShowConfigTab right', @@ -81,9 +63,9 @@ $m->reload; ok( $m->find_link( text => 'root (Enoch Root)', - url_regex => qr!/Admin/Users/Modify\.html!, + url_regex => qr!/User/Summary\.html!, ), - 'got link to modify user' + 'still contains link to user summary page' ); ok( @@ -119,5 +101,8 @@ $m->submit_form_ok({ my $foo = RT::Test->load_or_create_user( EmailAddress => 'foo@example.com' ); is $foo->RealName, "Foo Bar", "RealName matches"; +undef $m; +done_testing; + # TODO test Add|Delete people |
