Skip to content

Commit

Permalink
fixup! fixup! [Bucks] Add email alternative to templates
Browse files Browse the repository at this point in the history
  • Loading branch information
MorayMySoc committed Aug 15, 2022
1 parent c6b1cc4 commit 54a1366
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 3 additions & 7 deletions t/app/controller/report_new_update.t
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,11 @@ subtest "test report creation with initial auto-update and alternative email tex
my $counciluser = $mech->create_user_ok('[email protected]', name => 'Council User', from_body => $body, is_superuser => 1);
$mech->log_in_ok($counciluser->email);
$mech->get_ok("/admin/report_edit/$report_id");
$mech->content_contains("Template email response: Thanks for your report.
This is the email alternative.", "Extra template email text displayed");
$mech->content_contains("This is the email alternative.", "Extra template email text displayed");
my $update_id = $report->comments->first->id;
$mech->get_ok("/admin/update_edit/$update_id");
$mech->content_contains("<label for='email_detail'>Template email response:</label>
<textarea class='form-control' name='email_detail' id='email_detail' cols=60 rows=10 readonly>Thanks for your report.
This is the email alternative.</textarea></li>", "Extra template email text displayed");
$mech->content_contains("Template email response:", "Template email input present");
$mech->content_contains("This is the email alternative.", "Template email input populated");
$report->comments->first->delete;
$update_id = $mech->create_comment_for_problem($report, $comment_user, 'User', 'Non-template update', 0, 'confirmed', 'confirmed')->id;
$mech->get_ok("/admin/report_edit/$report_id");
Expand Down
4 changes: 2 additions & 2 deletions templates/web/base/admin/list_updates.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ <h2 id="updates">[% loc('Updates') %]</h2>
<tr>
<td colspan=5>[% update.text | html %]
[% IF update.private_email_text %]
<br />---------------------------
<br />Template email response: [% update.private_email_text | html %]
<hr />
[% loc('Template email response:') %] [% update.private_email_text | html %]
[% END %]
</td>
</tr>
Expand Down

0 comments on commit 54a1366

Please sign in to comment.