diff options
Diffstat (limited to 't/cobrand')
-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 { |