Skip to content

Commit

Permalink
[Sutton] Rename some container types
Browse files Browse the repository at this point in the history
As requested in FD-3510
  • Loading branch information
davea committed Nov 8, 2023
1 parent 08bc41e commit 4209729
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
20 changes: 11 additions & 9 deletions perllib/FixMyStreet/Roles/CobrandSLWP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,6 @@ sub bin_services_for_address {
my $property = shift;

my %shared = (
23 => 'Food waste bin (kitchen)',
24 => 'Food waste bin (outdoor)',
6 => 'Refuse Red Stripe Bag',
18 => 'Recycling Blue Stripe Bag',
21 => 'Paper & Card Reusable Bag',
Expand All @@ -351,14 +349,16 @@ sub bin_services_for_address {
if ($self->moniker eq 'sutton') {
$self->{c}->stash->{containers} = {
%shared,
1 => 'Brown rubbish bin (140L)',
2 => 'Brown rubbish bin (240L)',
3 => 'Brown rubbish bin (360L)',
1 => 'Brown Rubbish Wheelie Bin (140L)',
2 => 'Brown Rubbish Wheelie Bin (240L)',
3 => 'Brown Rubbish Wheelie Bin (360L)',
35 => 'Rubbish bin (180L)',
16 => 'Green recycling box',
19 => 'Green paper and cardboard bin',
26 => 'Garden waste bin',
27 => 'Garden waste bin',
16 => 'Mixed Recycling Green Box (55L)',
19 => 'Paper and Cardboard Green Wheelie Bin (240L)',
23 => 'Small Kitchen Food Waste Caddy (7L)',
24 => 'Large Outdoor Food Waste Caddy (23L)',
26 => 'Garden Waste Wheelie Bin (240L)',
27 => 'Garden Waste Wheelie Bin (140L)',
28 => 'Garden waste sacks',
};
} elsif ($self->moniker eq 'kingston') {
Expand All @@ -373,6 +373,8 @@ sub bin_services_for_address {
16 => 'Green recycling box (55L)',
19 => 'Blue lid paper and cardboard bin (240L)',
20 => 'Blue lid paper and cardboard bin (360L)',
23 => 'Food waste bin (kitchen)',
24 => 'Food waste bin (outdoor)',
36 => 'Blue lid paper and cardboard bin (180L)',
26 => 'Garden waste bin (240L)',
27 => 'Garden waste bin (140L)',
Expand Down
12 changes: 6 additions & 6 deletions t/app/controller/waste_sutton_r.t
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ FixMyStreet::override_config {
is $report->get_extra_field_value('uprn'), 1000000002;
is $report->detail, "Quantity: 1\n\n2 Example Street, Sutton, SM1 1AA\n\nReason: Damaged";
is $report->category, 'Request new container';
is $report->title, 'Request new Green paper and cardboard bin';
is $report->title, 'Request new Paper and Cardboard Green Wheelie Bin (240L)';
FixMyStreet::Script::Reports::send();
my $email = $mech->get_text_body_from_email;
like $email, qr/please allow up to 20 working days/;
Expand All @@ -131,16 +131,16 @@ FixMyStreet::override_config {
my $report = FixMyStreet::DB->resultset("Problem")->search(undef, { order_by => { -desc => 'id' } })->first;
is $report->get_extra_field_value('uprn'), 1000000002;
is $report->detail, "Quantity: 1\n\n2 Example Street, Sutton, SM1 1AA\n\nReason: Missing";
is $report->title, 'Request new Green recycling box';
is $report->title, 'Request new Mixed Recycling Green Box (55L)';
};
subtest 'Request bins from front page' => sub {
$mech->get_ok('/waste/12345');
$mech->submit_form_ok({ form_number => 7 });
$mech->content_contains('name="container-choice" value="1"');
$mech->content_contains('Green paper and cardboard bin');
$mech->content_contains('Green recycling box');
$mech->content_contains('Food waste bin (outdoor)');
$mech->content_contains('Brown rubbish bin');
$mech->content_contains('Paper and Cardboard Green Wheelie Bin (240L)');
$mech->content_contains('Mixed Recycling Green Box (55L)');
$mech->content_contains('Large Outdoor Food Waste Caddy (23L)');
$mech->content_contains('Brown Rubbish Wheelie Bin (140L)');
};
subtest 'Report missed collection' => sub {
$mech->get_ok('/waste/12345/report');
Expand Down

0 comments on commit 4209729

Please sign in to comment.