diff options
author | M Somerville <matthew-github@dracos.co.uk> | 2020-10-19 16:39:45 +0100 |
---|---|---|
committer | M Somerville <matthew-github@dracos.co.uk> | 2020-11-11 10:36:47 +0000 |
commit | 3f70d1f0b4d543072eda2d1b59092a5b9e6b3253 (patch) | |
tree | e7435af200b8687bfec0a9a8772888e9b2c07abb /t | |
parent | 22b89e27ac4368bcc4e288bd1fe2faf53f13ac9e (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')
-rw-r--r-- | t/cobrand/bromley.t | 13 |
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 & 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 & 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 { |