-
-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! fixup! [FMS] Make dashboard categories multi-select
- Loading branch information
1 parent
e1556a9
commit 82431d6
Showing
4 changed files
with
11 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,10 @@ my $superuser = $mech->create_user_ok('[email protected]', name => 'Super Us | |
|
||
my $oxfordshire = $mech->create_body_ok(2237, 'Oxfordshire County Council'); | ||
my $user3 = $mech->create_user_ok('[email protected]', name => 'Body User', from_body => $oxfordshire); | ||
my $oxfordshirecontact = $mech->create_contact_ok( body_id => $oxfordshire->id, category => 'Potholes', email => '[email protected]' ); | ||
my $oxfordshirecontact = $mech->create_contact_ok( body_id => $oxfordshire->id, category => 'Potholes', email => '[email protected]', extra => { group => 'Road' } ); | ||
$mech->create_contact_ok( body_id => $oxfordshire->id, category => 'Traffic lights', email => '[email protected]' ); | ||
$mech->create_contact_ok( body_id => $oxfordshire->id, category => 'Yellow lines', email => '[email protected]', extra => { group => 'Road' } ); | ||
|
||
|
||
my $oxford = $mech->create_body_ok(2421, 'Oxford City Council'); | ||
$mech->create_contact_ok( body_id => $oxford->id, category => 'Graffiti', email => '[email protected]' ); | ||
|
@@ -58,7 +60,7 @@ my $log_entries = FixMyStreet::DB->resultset('AdminLog')->search( | |
object_type => 'problem', | ||
object_id => $report->id | ||
}, | ||
{ | ||
{ | ||
order_by => { -desc => 'id' }, | ||
} | ||
); | ||
|
@@ -455,7 +457,8 @@ subtest 'change report category' => sub { | |
whensent => \'current_timestamp', | ||
}); | ||
$mech->get_ok("/admin/report_edit/" . $ox_report->id); | ||
|
||
$mech->content_contains('<optgroup label="Road">'); | ||
$mech->content_lacks('<option value="group-Road"'); | ||
$mech->submit_form_ok( { with_fields => { category => 'Traffic lights' } }, 'form_submitted' ); | ||
$ox_report->discard_changes; | ||
is $ox_report->category, 'Traffic lights'; | ||
|
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