Skip to content

Commit

Permalink
[Bromley] Update pin colours.
Browse files Browse the repository at this point in the history
From FD-4899.
  • Loading branch information
dracos committed Dec 12, 2024
1 parent 1ef58af commit 7eb2407
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion perllib/FixMyStreet/Cobrand/Bromley.pm
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ sub geocode_postcode {
# Bromley pins always yellow
sub pin_colour {
my ( $self, $p, $context ) = @_;
return 'grey' if ($context||'') ne 'reports' && !$self->owns_problem($p);
return 'green-bromley' if $p->is_fixed;
return 'grey' if $p->is_closed;
return 'red' if ($context||'') ne 'reports' && !$self->owns_problem($p);
return 'yellow';
}

Expand Down
2 changes: 1 addition & 1 deletion t/cobrand/bromley.t
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ subtest 'check display of TfL reports' => sub {
}, sub {
$mech->follow_link_ok({ text_regex => qr/Back to all reports/i });
};
$mech->content_like(qr{<a title="TfL Test[^>]*www.example.org[^>]*><img[^>]*grey});
$mech->content_like(qr{<a title="TfL Test[^>]*www.example.org[^>]*><img[^>]*red});
$mech->content_like(qr{<a title="Test Test[^>]*href="/[^>]*><img[^>]*yellow});
};

Expand Down
2 changes: 1 addition & 1 deletion t/cobrand/bromley_waste.t
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ $report->update({ category => 'Other' });
}, sub {
$mech->follow_link_ok({ text_regex => qr/Back to all reports/i });
};
$mech->content_like(qr{<a title="Test Test[^>]*href="/[^>]*><img[^>]*yellow});
$mech->content_like(qr{<a title="Test Test[^>]*href="/[^>]*><img[^>]*grey});
$mech->content_lacks('Report missed collection');
};

Expand Down
Binary file added web/i/pins/green-bromley/big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/i/pins/green-bromley/mini.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/i/pins/green-bromley/pin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web/i/pins/green-bromley/small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7eb2407

Please sign in to comment.