forked from mysociety/fixmystreet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FMS] Add suggest_duplicates feature to FixMyStreet
Showing reports that might be duplicates of the report the user is making is a cobrand feature, and only works on branded sites. This makes it work on cobrand areas on FixMyStreet where the duplication_suggestion is turned on for the cobrand on the selected category. mysociety/societyworks#3646
- Loading branch information
1 parent
0e0758c
commit 8b7edf8
Showing
6 changed files
with
95 additions
and
47 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
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 |
---|---|---|
|
@@ -21,7 +21,7 @@ my $contact1 = $mech->create_contact_ok( | |
category => 'Street lighting', | ||
email => '100', | ||
extra => [ { description => 'Lamppost number', code => 'number', required => 'True' }, | ||
{ description => 'Lamppost type', code => 'type', required => 'False', values => | ||
{ description => 'Lamppost type', code => 'lamptype', required => 'False', values => | ||
{ value => [ { name => ['Gas'], key => ['old'] }, { name => [ 'Yellow' ], key => [ 'modern' ] } ] } | ||
} | ||
], | ||
|
@@ -125,7 +125,7 @@ foreach my $test ( | |
}, | ||
changes => { | ||
number => '', | ||
type => '', | ||
lamptype => '', | ||
}, | ||
errors => [ | ||
'This information is required', | ||
|
@@ -141,7 +141,7 @@ foreach my $test ( | |
username_register => '[email protected]', | ||
category => 'Street lighting', | ||
number => 27, | ||
type => 'old', | ||
lamptype => 'old', | ||
}, | ||
extra => [ | ||
{ | ||
|
@@ -150,7 +150,7 @@ foreach my $test ( | |
description => 'Lamppost number', | ||
}, | ||
{ | ||
name => 'type', | ||
name => 'lamptype', | ||
value => 'old', | ||
description => 'Lamppost type', | ||
} | ||
|
@@ -251,7 +251,7 @@ foreach my $test ( | |
|
||
if ( $test->{fields}->{category} eq 'Street lighting' ) { | ||
my $result = scraper { | ||
process 'select#form_type option', 'option[]' => '@value'; | ||
process 'select#form_lamptype option', 'option[]' => '@value'; | ||
} | ||
->scrape( $mech->response ); | ||
|
||
|
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