aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.cypress/cypress/integration/buckinghamshire.js12
-rw-r--r--perllib/FixMyStreet/Cobrand/Buckinghamshire.pm2
-rw-r--r--perllib/FixMyStreet/Cobrand/Hounslow.pm6
-rw-r--r--t/cobrand/bucks.t6
-rw-r--r--web/cobrands/fixmystreet/assets.js2
-rw-r--r--web/cobrands/hounslow/assets.js70
6 files changed, 59 insertions, 39 deletions
diff --git a/.cypress/cypress/integration/buckinghamshire.js b/.cypress/cypress/integration/buckinghamshire.js
index 92426e0d4..1f4641952 100644
--- a/.cypress/cypress/integration/buckinghamshire.js
+++ b/.cypress/cypress/integration/buckinghamshire.js
@@ -28,6 +28,18 @@ describe('flytipping', function() {
cy.wait('@report-ajax');
cy.get('select:eq(4)').select('Flytipping');
cy.contains('sent to Chiltern District Council and also');
+
+ cy.get('[name=title]').type('Title');
+ cy.get('[name=detail]').type('Detail');
+ cy.get('.js-new-report-user-show').click();
+ cy.get('.js-new-report-show-sign-in').should('be.visible').click();
+ cy.get('#form_username_sign_in').type('user@example.org');
+ cy.get('[name=password_sign_in]').type('password');
+ cy.get('[name=password_sign_in]').parents('form').submit();
+ cy.get('#map_sidebar').should('contain', 'check and confirm your details');
+ cy.wait('@report-ajax');
+ cy.get('#map_sidebar').parents('form').submit();
+ cy.get('body').should('contain', 'Thank you for your report');
});
});
diff --git a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
index f1dd85176..e210e7d09 100644
--- a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
@@ -156,7 +156,7 @@ sub flytipping_body_fix {
# If the report is only being sent to the district, we do
# not care about the road question, if it is missing
if (!$report->to_body_named('Buckinghamshire')) {
- delete $errors->{'road-placement'};
+ delete $errors->{'xroad-placement'};
}
}
}
diff --git a/perllib/FixMyStreet/Cobrand/Hounslow.pm b/perllib/FixMyStreet/Cobrand/Hounslow.pm
index 93512f2b9..2987c0ae3 100644
--- a/perllib/FixMyStreet/Cobrand/Hounslow.pm
+++ b/perllib/FixMyStreet/Cobrand/Hounslow.pm
@@ -45,6 +45,12 @@ sub get_geocoder {
sub on_map_default_status { 'open' }
+sub pin_colour {
+ my ( $self, $p, $context ) = @_;
+ return 'green' if $p->is_fixed || $p->is_closed;
+ return 'yellow';
+}
+
sub send_questionnaires { 0 }
sub categories_restriction {
diff --git a/t/cobrand/bucks.t b/t/cobrand/bucks.t
index a3ae3a196..49900114c 100644
--- a/t/cobrand/bucks.t
+++ b/t/cobrand/bucks.t
@@ -115,16 +115,16 @@ subtest 'blocked drain sent to extra email' => sub {
$cobrand = FixMyStreet::Cobrand::Buckinghamshire->new();
subtest 'Flytipping extra question used if necessary' => sub {
- my $errors = { 'road-placement' => 'This field is required' };
+ my $errors = { 'xroad-placement' => 'This field is required' };
$report->update({ bodies_str => $body->id });
$cobrand->flytipping_body_fix($report, 'road', $errors);
- is $errors->{'road-placement'}, 'This field is required', 'Error stays if sent to county';
+ is $errors->{'xroad-placement'}, 'This field is required', 'Error stays if sent to county';
$report->update({ bodies_str => $district->id });
$report->discard_changes; # As e.g. ->bodies has been remembered.
$cobrand->flytipping_body_fix($report, 'road', $errors);
- is $errors->{'road-placement'}, undef, 'Error removed if sent to district';
+ is $errors->{'xroad-placement'}, undef, 'Error removed if sent to district';
$report->update({ bodies_str => $body->id . ',' . $district->id });
$report->discard_changes; # As e.g. ->bodies has been remembered.
diff --git a/web/cobrands/fixmystreet/assets.js b/web/cobrands/fixmystreet/assets.js
index 096a5824e..a00adb055 100644
--- a/web/cobrands/fixmystreet/assets.js
+++ b/web/cobrands/fixmystreet/assets.js
@@ -993,7 +993,7 @@ $(fixmystreet).on('body_overrides:change', function() {
}
if (do_not_send) {
- do_not_send = fixmystreet.utils.csv_to_array(do_not_send);
+ do_not_send = fixmystreet.utils.csv_to_array(do_not_send)[0];
var lookup = {};
$.map(do_not_send, function(val) {
lookup[val] = 1;
diff --git a/web/cobrands/hounslow/assets.js b/web/cobrands/hounslow/assets.js
index 918123141..ab9adc370 100644
--- a/web/cobrands/hounslow/assets.js
+++ b/web/cobrands/hounslow/assets.js
@@ -42,40 +42,42 @@ fixmystreet.assets.add($.extend(true, {}, defaults, {
asset_item: 'bin'
}));
-fixmystreet.assets.add($.extend(true, {}, defaults, {
- http_options: {
- params: {
- TYPENAME: "trees"
- }
- },
- asset_id_field: 'central_asset_id',
- attributes: {
- central_asset_id: 'central_asset_id',
- asset_details: 'asset_Id'
- },
- asset_category: [
- "Tree Danger/Obstruction",
- "Branches overhanging",
- "Damage By Tree",
- "Dead/Dying/Diseased",
- "Dying or dangerous tree",
- "Empty tree Pit",
- "Fallen or leaning tree",
- "General Maintenance and pruning",
- "Illuminated Traffic signal obstructed by vegetation",
- "Traffic signal obstructed by vegetation",
- "Pest: Tree/Shrub",
- "Pests in trees and shrubs",
- "Tree Branches Overhanging",
- "Tree Maintenance",
- "Tree causing damage to property",
- "Tree obstructing street light",
- "Trees or shrubs blocking visibility",
- "Trees or shrubs causing obstruction of highway",
- "Trees"
- ],
- asset_item: 'tree'
-}));
+// Disabled for now as the data is quite out of date and causing problems
+// sending reports.
+// fixmystreet.assets.add($.extend(true, {}, defaults, {
+// http_options: {
+// params: {
+// TYPENAME: "trees"
+// }
+// },
+// asset_id_field: 'central_asset_id',
+// attributes: {
+// central_asset_id: 'central_asset_id',
+// asset_details: 'asset_Id'
+// },
+// asset_category: [
+// "Tree Danger/Obstruction",
+// "Branches overhanging",
+// "Damage By Tree",
+// "Dead/Dying/Diseased",
+// "Dying or dangerous tree",
+// "Empty tree Pit",
+// "Fallen or leaning tree",
+// "General Maintenance and pruning",
+// "Illuminated Traffic signal obstructed by vegetation",
+// "Traffic signal obstructed by vegetation",
+// "Pest: Tree/Shrub",
+// "Pests in trees and shrubs",
+// "Tree Branches Overhanging",
+// "Tree Maintenance",
+// "Tree causing damage to property",
+// "Tree obstructing street light",
+// "Trees or shrubs blocking visibility",
+// "Trees or shrubs causing obstruction of highway",
+// "Trees"
+// ],
+// asset_item: 'tree'
+// }));
fixmystreet.assets.add($.extend(true, {}, defaults, {
http_options: {