Skip to content

Commit

Permalink
Merge branch '5.0/self-service-txn-display-paths' into 5.0-trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrandtbuffalo committed Jan 23, 2024
2 parents 35ca6c2 + 4e70c06 commit 94196f7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
10 changes: 9 additions & 1 deletion share/html/SelfService/Transaction/Display.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,12 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
<& /Transaction/Display.html, %ARGS &>
<& /Transaction/Display.html,
DisplayPath => RT->Config->Get('WebPath') . '/SelfService/Display.html',
AttachmentPath => RT->Config->Get('WebPath') . '/SelfService/Attachment',
UpdatePath => RT->Config->Get('WebPath') . '/SelfService/Update.html',
ForwardPath => undef,
EmailRecordPath => undef,
EncryptionPath => undef,
%ARGS,
&>
27 changes: 27 additions & 0 deletions t/web/self_service.t
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,33 @@ $m->follow_link_ok(
$m->content_contains( "<h1>$title</h1>", "contains <h1>$title</h1>" );
$m->content_lacks( "There are unread messages on this ticket." );

$m->follow_link_ok( { url_regex => qr{^/SelfService/Transaction/Display.html}, n => 2 }, 'Followed transaction link' );

$m->text_contains('sample correspondence');

ok( !$m->find_link( url_regex => qr{^/Ticket/} ), 'No privileged ticket links found' );
ok( !$m->find_link( url_regex => qr{^Update.html} ), 'No self service update links found' );


$m->follow_link_ok( { url_regex => qr{^/SelfService/Attachment/}, }, 'Followed self service attachment link' );
$m->text_contains('sample correspondence');
$m->back;

RT::Test->add_rights( { Principal => $Cc, Right => ['ReplyToTicket'] } );
$m->reload;
$m->follow_link_ok( { url_regex => qr{^/SelfService/Update.html}, }, 'Followed self service ticket link' );
$m->submit_form_ok(
{
form_name => 'TicketUpdate',
with_fields => { UpdateContent => 'Test correspondence from self service' },
button => 'SubmitTicket',
},
'Submitted self service update form'
);
$m->text_contains('Correspondence added');
$m->text_contains('Test correspondence from self service');


diag 'Test $SelfServiceUserPrefs config';
{
# Verify the $SelfServiceUserPrefs config option renders the correct display at
Expand Down

0 comments on commit 94196f7

Please sign in to comment.