Skip to content

Commit d674546

Browse files
committed
1 parent c5eef33 commit d674546

File tree

6 files changed

+85
-43
lines changed

6 files changed

+85
-43
lines changed

perllib/FixMyStreet/Cobrand/Kingston.pm

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,37 @@ sub image_for_unit {
7171
return $images->{$service_id};
7272
}
7373

74+
=head2 service_name_override
75+
76+
Customer facing names for services
77+
78+
=cut
79+
80+
sub service_name_override {
81+
my ($self, $service) = @_;
82+
83+
my %service_name_override = (
84+
2238 => 'Non-recyclable Refuse',
85+
2239 => 'Food waste',
86+
2240 => 'Paper and card',
87+
2241 => 'Mixed recycling',
88+
2242 => 'Non-recyclable Refuse',
89+
2243 => 'Non-recyclable Refuse',
90+
2246 => 'Mixed recycling',
91+
2247 => 'Garden Waste',
92+
2248 => 'Food waste',
93+
2249 => 'Paper and card',
94+
2250 => 'Mixed recycling',
95+
2632 => 'Paper and card',
96+
3571 => 'Mixed recycling',
97+
3576 => 'Non-recyclable Refuse',
98+
2256 => '', # Deliver refuse bags
99+
2257 => '', # Deliver recycling bags
100+
);
101+
102+
return $service_name_override{$service->{ServiceId}} // '';
103+
}
104+
74105
=head2 garden_waste_renewal_cost_pa
75106
76107
The price change for a renewal is based upon the end

perllib/FixMyStreet/Cobrand/Sutton.pm

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,37 @@ sub image_for_unit {
9999
return $images->{$service_id};
100100
}
101101

102+
=head2 service_name_override
103+
104+
Customer facing names for services
105+
106+
=cut
107+
108+
sub service_name_override {
109+
my ($self, $service) = @_;
110+
111+
my %service_name_override = (
112+
2238 => 'Non-Recyclable Refuse',
113+
2239 => 'Food Waste',
114+
2240 => 'Paper & Card',
115+
2241 => 'Mixed Recycling (Cans, Plastics & Glass)',
116+
2242 => 'Non-Recyclable Refuse',
117+
2243 => 'Non-Recyclable Refuse',
118+
2246 => 'Mixed Recycling (Cans, Plastics & Glass)',
119+
2247 => 'Garden Waste',
120+
2248 => 'Food Waste',
121+
2249 => 'Paper & Card',
122+
2250 => 'Mixed Recycling (Cans, Plastics & Glass)',
123+
2632 => 'Paper & Card',
124+
3571 => 'Mixed Recycling (Cans, Plastics & Glass)',
125+
3576 => 'Non-Recyclable Refuse',
126+
2256 => '', # Deliver refuse bags
127+
2257 => '', # Deliver recycling bags
128+
);
129+
130+
return $service_name_override{$service->{ServiceId}} // '';
131+
}
132+
102133
sub waste_cc_munge_form_details {
103134
my ($self, $c) = @_;
104135

perllib/FixMyStreet/Roles/Cobrand/KingstonSutton.pm

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -109,31 +109,6 @@ sub garden_due_days { 30 }
109109

110110
sub garden_staff_provide_email { 1 }
111111

112-
sub service_name_override {
113-
my ($self, $service) = @_;
114-
115-
my %service_name_override = (
116-
2238 => 'Non-recyclable Refuse',
117-
2239 => 'Food waste',
118-
2240 => 'Paper and card',
119-
2241 => 'Mixed recycling',
120-
2242 => 'Non-recyclable Refuse',
121-
2243 => 'Non-recyclable Refuse',
122-
2246 => 'Mixed recycling',
123-
2247 => 'Garden Waste',
124-
2248 => "Food waste",
125-
2249 => "Paper and card",
126-
2250 => "Mixed recycling",
127-
2632 => 'Paper and card',
128-
3571 => 'Mixed recycling',
129-
3576 => 'Non-recyclable Refuse',
130-
2256 => '', # Deliver refuse bags
131-
2257 => '', # Deliver recycling bags
132-
);
133-
134-
return $service_name_override{$service->{ServiceId}} // '';
135-
}
136-
137112
sub waste_password_hidden { 1 }
138113

139114
# For renewal/modify

t/app/controller/waste_kands_bulky.t

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,11 @@ FixMyStreet::override_config {
877877
};
878878
});
879879

880+
subtest 'Sutton specific Bulky Waste text' => sub {
881+
$mech->get_ok('/waste/12346/');
882+
$mech->content_contains('Bulky Waste');
883+
};
884+
880885
subtest 'Sutton dates window after 11pm does not include the next day' => sub {
881886
set_fixed_time('2023-07-06T23:00:00Z');
882887
$mech->log_in_ok($sutton_staff->email);

t/app/controller/waste_sutton_r.t

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ FixMyStreet::override_config {
9090
$mech->content_contains('2 Example Street, Sutton');
9191
$mech->content_contains('Every Friday fortnightly');
9292
$mech->content_contains('Friday, 2nd September');
93-
$mech->content_contains('Report a mixed recycling collection as missed');
93+
$mech->content_contains('Report a mixed recycling (cans, plastics & glass) collection as missed');
9494
};
9595
subtest 'In progress collection' => sub {
9696
$e->mock('GetTasks', sub { [ {
@@ -106,12 +106,12 @@ FixMyStreet::override_config {
106106
$mech->get_ok('/waste/12345');
107107
$mech->content_like(qr/Friday, 9th September\s+\(this collection has been adjusted from its usual time\)\s+\(In progress\)/);
108108
$mech->content_lacks(', at 4:00pm');
109-
$mech->content_lacks('Report a mixed recycling collection as missed');
109+
$mech->content_lacks('Report a mixed recycling (cans, plastics & glass) collection as missed');
110110
$mech->content_lacks('Report a non-recyclable refuse collection as missed');
111111
set_fixed_time('2022-09-09T19:00:00Z');
112112
$mech->get_ok('/waste/12345');
113113
$mech->content_contains(', at 4:00pm');
114-
$mech->content_contains('Report a mixed recycling collection as missed');
114+
$mech->content_contains('Report a mixed recycling (cans, plastics & glass) collection as missed');
115115
$mech->content_contains('Report a non-recyclable refuse collection as missed');
116116
$e->mock('GetTasks', sub { [] });
117117
};
@@ -219,24 +219,24 @@ FixMyStreet::override_config {
219219

220220
subtest 'Report missed collection' => sub {
221221
$mech->get_ok('/waste/12345/report');
222-
$mech->content_contains('Food waste');
223-
$mech->content_contains('Mixed recycling');
224-
$mech->content_contains('Non-recyclable Refuse');
225-
$mech->content_lacks('Paper and card');
222+
$mech->content_contains('Food Waste');
223+
$mech->content_contains('Mixed Recycling (Cans, Plastics & Glass)');
224+
$mech->content_contains('Non-Recyclable Refuse');
225+
$mech->content_lacks('Paper & Card');
226226

227227
$mech->submit_form_ok({ with_fields => { 'service-2239' => 1 } });
228228
$mech->submit_form_ok({ with_fields => { name => 'Bob Marge', email => $user->email }});
229229
$mech->submit_form_ok({ with_fields => { process => 'summary' } });
230230
$mech->content_contains('Thank you for reporting a missed collection');
231231
my $report = FixMyStreet::DB->resultset("Problem")->order_by('-id')->first;
232232
is $report->get_extra_field_value('uprn'), 1000000002;
233-
is $report->detail, "Report missed Food waste\n\n2 Example Street, Sutton, SM1 1AA";
234-
is $report->title, 'Report missed Food waste';
233+
is $report->detail, "Report missed Food Waste\n\n2 Example Street, Sutton, SM1 1AA";
234+
is $report->title, 'Report missed Food Waste';
235235
};
236236
subtest 'No reporting/requesting if open request' => sub {
237237
$mech->get_ok('/waste/12345');
238-
$mech->content_contains('Report a mixed recycling collection as missed');
239-
$mech->content_lacks('Request a mixed recycling container');
238+
$mech->content_contains('Report a mixed recycling (cans, plastics & glass) collection as missed');
239+
$mech->content_lacks('Request a mixed recycling (cans, plastics & glass) container');
240240

241241
$e->mock('GetEventsForObject', sub { [ {
242242
# Request
@@ -252,8 +252,8 @@ FixMyStreet::override_config {
252252
] },
253253
} ] });
254254
$mech->get_ok('/waste/12345');
255-
$mech->content_contains('A mixed recycling container request has been made');
256-
$mech->content_contains('Report a mixed recycling collection as missed');
255+
$mech->content_contains('A mixed recycling (cans, plastics & glass) container request has been made');
256+
$mech->content_contains('Report a mixed recycling (cans, plastics & glass) collection as missed');
257257
$mech->get_ok('/waste/12345/request');
258258
$mech->content_like(qr/name="container-choice" value="16"\s+disabled/s); # green
259259

@@ -285,8 +285,8 @@ FixMyStreet::override_config {
285285
] },
286286
} ] });
287287
$mech->get_ok('/waste/12345');
288-
$mech->content_contains('A mixed recycling collection has been reported as missed');
289-
$mech->content_lacks('Request a mixed recycling container');
288+
$mech->content_contains('A mixed recycling (cans, plastics & glass) collection has been reported as missed');
289+
$mech->content_lacks('Request a mixed recycling (cans, plastics & glass) container');
290290

291291
$e->mock('GetEventsForObject', sub { [ {
292292
EventTypeId => 1566,
@@ -297,7 +297,7 @@ FixMyStreet::override_config {
297297
} },
298298
} ] });
299299
$mech->get_ok('/waste/12345');
300-
$mech->content_contains('A paper and card collection has been reported as missed');
300+
$mech->content_contains('A paper & card collection has been reported as missed');
301301

302302
$e->mock('GetEventsForObject', sub { [] }); # reset
303303
};
@@ -316,7 +316,7 @@ FixMyStreet::override_config {
316316
} ]
317317
});
318318
$mech->get_ok('/waste/12345');
319-
$mech->content_contains('A mixed recycling collection has been reported as missed');
319+
$mech->content_contains('A mixed recycling (cans, plastics & glass) collection has been reported as missed');
320320
$e->mock('GetEventsForObject', sub { [] }); # reset
321321
};
322322
subtest 'No requesting if open request of different size' => sub {

templates/web/base/waste/bin_days.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ <h3 class="govuk-heading-l govuk-warning-text__heading">Your subscription is soo
209209
%]
210210
[% IF c.cobrand.moniker != 'peterborough' %]
211211
<h3 id="bulky-waste" class="govuk-heading-m waste-service-name">[%
212-
IF c.cobrand.moniker == 'brent' %]Small items[% ELSE %]Bulky waste[% END
212+
IF c.cobrand.moniker == 'brent' %]Small items[% ELSIF c.cobrand.moniker == 'sutton' %]Bulky Waste[% ELSE %]Bulky waste[% END
213213
%]</h3>
214214
[% IF c.cobrand.moniker == 'kingston' || c.cobrand.moniker == 'sutton' %]
215215
<p>Pay to have large household items like furniture or appliances collected from your address.</p>

0 commit comments

Comments
 (0)