aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
diff options
context:
space:
mode:
authorM Somerville <matthew-github@dracos.co.uk>2020-10-19 16:39:45 +0100
committerM Somerville <matthew-github@dracos.co.uk>2020-11-11 10:36:47 +0000
commit3f70d1f0b4d543072eda2d1b59092a5b9e6b3253 (patch)
treee7435af200b8687bfec0a9a8772888e9b2c07abb /t/cobrand
parent22b89e27ac4368bcc4e288bd1fe2faf53f13ac9e (diff)
[Bromley] Handle today’s collection better.
If task is outstanding and before 5pm, show it as next collection and in progress. Allow reporting after 5pm.
Diffstat (limited to 't/cobrand')
-rw-r--r--t/cobrand/bromley.t13
1 files changed, 11 insertions, 2 deletions
diff --git a/t/cobrand/bromley.t b/t/cobrand/bromley.t
index 3b01d308f..fb34f1b6d 100644
--- a/t/cobrand/bromley.t
+++ b/t/cobrand/bromley.t
@@ -288,8 +288,17 @@ FixMyStreet::override_config {
subtest 'test reporting before/after completion' => sub {
set_fixed_time('2020-05-27T11:00:00Z');
$mech->get_ok('/waste/uprn/12345');
- $mech->content_contains('(completed at 10:00am)');
- $mech->content_contains('Wrong Bin Out');
+ $mech->content_like(qr/Refuse collection.*?Last collection<\/dt>\s*<dd[^>]*>\s*Wednesday, 27th May\s+\(completed at 10:00am\)\s*<p>\s*Wrong Bin Out/s);
+ $mech->content_like(qr/Paper &amp; Cardboard.*?Next collection<\/dt>\s*<dd[^>]*>\s*Wednesday, 27th May\s+\(in progress\)/s);
+ $mech->follow_link_ok({ text => 'Report a problem with a paper & cardboard collection' });
+ $mech->content_lacks('Waste spillage');
+
+ set_fixed_time('2020-05-27T19:00:00Z');
+ $mech->get_ok('/waste/uprn/12345');
+ $mech->content_like(qr/Refuse collection.*?Last collection<\/dt>\s*<dd[^>]*>\s*Wednesday, 27th May\s+\(completed at 10:00am\)\s*<p>\s*Wrong Bin Out/s);
+ $mech->content_like(qr/Paper &amp; Cardboard.*?Last collection<\/dt>\s*<dd[^>]*>\s*Wednesday, 27th May\s*<\/dd>/s);
+ $mech->follow_link_ok({ text => 'Report a problem with a paper & cardboard collection' });
+ $mech->content_contains('Waste spillage');
};
subtest 'test template creation' => sub {