diff options
-rw-r--r-- | t/cobrand/isleofwight.t | 16 | ||||
-rw-r--r-- | templates/web/isleofwight/report/_item_heading.html | 7 |
2 files changed, 23 insertions, 0 deletions
diff --git a/t/cobrand/isleofwight.t b/t/cobrand/isleofwight.t index 0c985e2fb..3cac710da 100644 --- a/t/cobrand/isleofwight.t +++ b/t/cobrand/isleofwight.t @@ -137,6 +137,22 @@ subtest "check moderation label uses correct name" => sub { }; }; +subtest "front page summary uses report category not title" => sub { + my $category = $reports[0]->category; + ok $category, "category is not blank"; + my $title = $reports[0]->title; + ok $title, "title is not blank"; + FixMyStreet::override_config { + MAPIT_URL => 'http://mapit.uk/', + ALLOWED_COBRANDS => ['isleofwight'], + }, sub { + $mech->log_out_ok; + $mech->get_ok('/'); + $mech->content_like( qr/item-list__heading">$category/ ); + $mech->content_unlike( qr/item-list__heading">$title/ ); + }; +}; + $_->delete for @reports; my $system_user = $mech->create_user_ok('system_user@example.org'); diff --git a/templates/web/isleofwight/report/_item_heading.html b/templates/web/isleofwight/report/_item_heading.html new file mode 100644 index 000000000..90010a548 --- /dev/null +++ b/templates/web/isleofwight/report/_item_heading.html @@ -0,0 +1,7 @@ +[% + SET title = problem.title; + IF c.req.uri.path == '/'; + title = problem.category_display; + END; +%] +<h3 class="item-list__heading">[% title %]</h3> |