aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2015-09-22 15:27:27 +0100
committerDave Arter <davea@mysociety.org>2015-10-06 09:09:25 +0100
commit134757068a47f788524937d65b635bfcd7242c45 (patch)
tree87ba379b3e0827cdcf2383c86669fd87ec374bd6 /t/cobrand
parent7480ba512f4e88dcc08f50ec890c36141d0f44aa (diff)
[Zurich] Override MAP_TYPE in tests where appropriate
Diffstat (limited to 't/cobrand')
-rw-r--r--t/cobrand/zurich.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index a8a1d973e..775ccaf59 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -120,6 +120,7 @@ my $report = $reports[0];
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
$mech->get_ok( '/report/' . $report->id );
};
@@ -174,6 +175,7 @@ subtest "changing of categories" => sub {
# change the category via the web interface
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
$mech->get_ok( '/admin/report_edit/' . $report->id );
$mech->submit_form_ok( { with_fields => { category => 'Cat2' } } );
@@ -219,6 +221,7 @@ subtest "report_edit" => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
reset_report_state($report);
@@ -315,6 +318,7 @@ subtest "report_edit" => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
# Photo publishing
$mech->get_ok( '/admin/report_edit/' . $report->id );
@@ -375,6 +379,7 @@ subtest 'SDM' => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
$mech->get_ok( '/admin/report_edit/' . $report->id );
$mech->content_contains( 'Initial internal note' );
@@ -403,6 +408,7 @@ subtest 'SDM' => sub {
subtest 'send_back' => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
$report->update({ bodies_str => $subdivision->id, state => 'in progress' });
$mech->get_ok( '/admin/report_edit/' . $report->id );
@@ -416,6 +422,7 @@ subtest 'SDM' => sub {
subtest 'not contactable' => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
$report->update({ bodies_str => $subdivision->id, state => 'in progress' });
$mech->get_ok( '/admin/report_edit/' . $report->id );
@@ -449,6 +456,7 @@ $report->update;
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
$mech->get_ok( '/admin/report_edit/' . $report->id );
$mech->content_lacks( 'Unbest&auml;tigt' ); # Confirmed email
@@ -479,6 +487,7 @@ $report = $reports[0];
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
$mech->get_ok( '/admin/report_edit/' . $report->id );
$mech->submit_form_ok( { with_fields => { state => 'confirmed' } } );
@@ -491,6 +500,7 @@ $mech->content_contains('Second Test');
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
$mech->get_ok( '/admin/report_edit/' . $report->id );
$mech->content_contains( 'Unbest&auml;tigt' );
@@ -520,6 +530,7 @@ subtest "external report triggers email" => sub {
my $EXTERNAL_MESSAGE = 'Look Ma, no hands!';
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
# required to see body_external field
@@ -557,6 +568,7 @@ subtest "external report triggers email" => sub {
subtest "Test third_personal boolean setting" => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
$mech->get_ok( '/admin' );
# required to see body_external field
@@ -592,6 +604,7 @@ subtest "external report triggers email" => sub {
subtest "Test external wish sending" => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
# set as wish
$report->discard_changes;
@@ -676,6 +689,7 @@ subtest "phone number is mandatory" => sub {
ALLOWED_COBRANDS => [ 'zurich' ],
MAPIT_ID_WHITELIST => [ 274456 ],
MAPIT_GENERATION => 2,
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
$user = $mech->log_in_ok( 'dm1@example.org' );
$mech->get_ok( '/report/new?lat=47.381817&lon=8.529156' );
@@ -692,6 +706,7 @@ subtest "phone number is not mandatory for reports from mobile apps" => sub {
ALLOWED_COBRANDS => [ 'zurich' ],
MAPIT_ID_WHITELIST => [ 423017 ],
MAPIT_GENERATION => 4,
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
$mech->post_ok( '/report/new/mobile?lat=47.381817&lon=8.529156' , {
service => 'iPhone',
@@ -722,6 +737,7 @@ subtest "problems can't be assigned to deleted bodies" => sub {
MAPIT_URL => 'http://global.mapit.mysociety.org/',
MAPIT_TYPES => [ 'O08' ],
MAPIT_ID_WHITELIST => [ 423017 ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
$mech->get_ok( '/admin/body/' . $external_body->id );
$mech->submit_form_ok( { with_fields => { deleted => 1 } } );
@@ -756,6 +772,7 @@ subtest "photo must be supplied for categories that require it" => sub {
ALLOWED_COBRANDS => [ 'zurich' ],
MAPIT_ID_WHITELIST => [ 274456 ],
MAPIT_GENERATION => 2,
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
$mech->post_ok( '/report/new', {
detail => 'Problem-Bericht',
@@ -811,6 +828,7 @@ subtest "test admin_log" => sub {
subtest 'email images to external partners' => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
reset_report_state($report);
@@ -857,6 +875,7 @@ subtest 'email images to external partners' => sub {
subtest 'Status update shown as appropriate' => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
# ALL closed states must hide the public_response edit, and public ones
# must show the answer in blue.
@@ -893,6 +912,7 @@ sub contains_or_lacks {
subtest 'time_spent' => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'zurich' ],
+ MAP_TYPE => 'Zurich,OSM',
}, sub {
my $report = $reports[0];