-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Highways England][FMS] Add category checkbox for HE litter
Adds a checkbox when creating/editing a category which can be ticked to indicate that the category should be considered a litter category when council are responsible for litter on an HE road. Maintains the status quo with the current default list. This hopefully removes risk of a council having no checked categories and so no litter categories showing up. mysociety/societyworks#3680
- Loading branch information
1 parent
cf6b2cf
commit 97bd53b
Showing
6 changed files
with
75 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ $mech->content_contains("http://www.example.org/around"); | |
subtest 'check contact creation' => sub { | ||
$mech->get_ok('/admin/body/' . $body->id); | ||
|
||
$mech->submit_form_ok( { with_fields => { | ||
$mech->submit_form_ok( { with_fields => { | ||
category => 'test category', | ||
title_hint => 'example in test category', | ||
email => '[email protected]', | ||
|
@@ -54,7 +54,7 @@ subtest 'check contact creation' => sub { | |
$mech->content_contains( '<td>test note' ); | ||
$mech->content_like( qr/<td>\s*unconfirmed\s*<\/td>/ ); # No private | ||
|
||
$mech->submit_form_ok( { with_fields => { | ||
$mech->submit_form_ok( { with_fields => { | ||
category => 'private category', | ||
email => '[email protected]', | ||
note => 'test note', | ||
|
@@ -152,7 +152,7 @@ subtest 'check contact updating' => sub { | |
$mech->content_like(qr{test2\@example.com[^<]*</td>[^<]*<td><strong>confirmed}s); | ||
}; | ||
|
||
$body->update({ send_method => undef }); | ||
$body->update({ send_method => undef }); | ||
|
||
subtest 'check open311 configuring' => sub { | ||
$mech->get_ok('/admin/body/' . $body->id); | ||
|
@@ -337,6 +337,17 @@ subtest 'reopen disabling' => sub { | |
is $contact->get_extra_metadata('reopening_disallowed'), 1, 'Reopening disallowed flag set'; | ||
}; | ||
|
||
subtest 'set HE litter category' => sub { | ||
$mech->get_ok('/admin/body/' . $body->id . '/test%20category'); | ||
$mech->submit_form_ok( { with_fields => { | ||
litter_category_for_he => 1, | ||
note => 'Setting litter category for Highways England filtering', | ||
} } ); | ||
$mech->content_contains('Values updated'); | ||
my $contact = $body->contacts->find({ category => 'test category' }); | ||
is $contact->get_extra_metadata('litter_category_for_he'), 1, 'Litter category set for Highways England filtering'; | ||
}; | ||
|
||
subtest 'allow anonymous reporting' => sub { | ||
$mech->get_ok('/admin/body/' . $body->id . '/test%20category'); | ||
$mech->content_lacks('Allow anonymous reports'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters