Skip to content

Commit

Permalink
[Merton] Not currently using address change form.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Jul 18, 2024
1 parent d4f924a commit 1138880
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 28 deletions.
56 changes: 28 additions & 28 deletions t/app/controller/waste_merton_garden.t
Original file line number Diff line number Diff line change
Expand Up @@ -1143,34 +1143,34 @@ FixMyStreet::override_config {
};
$echo->mock('GetServiceUnitsForObject', \&garden_waste_one_bin);

subtest 'staff change address for sub' => sub {
set_fixed_time('2021-03-09T17:00:00Z'); # After sample data collection
$mech->get_ok('/waste/12345/');
$mech->content_contains('Report an address change', "contains link to address change form");
$mech->follow_link_ok({ text => 'Report an address change' });
$mech->content_contains('Only fill this in if they confirm they have moved to the new property.', 'contains notice');
$mech->submit_form_ok({ with_fields => {
extra_new_address => 'New Address',
extra_old_address => 'Old Address',
} });
$mech->submit_form_ok({ with_fields => {
email => '[email protected]',
name => 'Arthur Address-Change',
} });
$mech->submit_form_ok({ with_fields => { process => 'summary' } });
$mech->content_contains('Your enquiry has been submitted');

my $new_report = FixMyStreet::DB->resultset('Problem')->search(
{ },
{ order_by => { -desc => 'id' } },
)->first;

is $new_report->category, 'Garden Subscription Address Change', 'correct category on report';
is $new_report->get_extra_field_value('new_address'), 'New Address', 'correct new address on report';
is $new_report->get_extra_field_value('old_address'), 'Old Address', 'correct old address on report';
is $new_report->get_extra_metadata('no_echo'), 1, 'metadata set to indicate not sent to echo';
is $new_report->send_state, 'sent', 'report marked as sent';
};
# subtest 'staff change address for sub' => sub {
# set_fixed_time('2021-03-09T17:00:00Z'); # After sample data collection
# $mech->get_ok('/waste/12345/');
# $mech->content_contains('Report an address change', "contains link to address change form");
# $mech->follow_link_ok({ text => 'Report an address change' });
# $mech->content_contains('Only fill this in if they confirm they have moved to the new property.', 'contains notice');
# $mech->submit_form_ok({ with_fields => {
# extra_new_address => 'New Address',
# extra_old_address => 'Old Address',
# } });
# $mech->submit_form_ok({ with_fields => {
# email => '[email protected]',
# name => 'Arthur Address-Change',
# } });
# $mech->submit_form_ok({ with_fields => { process => 'summary' } });
# $mech->content_contains('Your enquiry has been submitted');

# my $new_report = FixMyStreet::DB->resultset('Problem')->search(
# { },
# { order_by => { -desc => 'id' } },
# )->first;

# is $new_report->category, 'Garden Subscription Address Change', 'correct category on report';
# is $new_report->get_extra_field_value('new_address'), 'New Address', 'correct new address on report';
# is $new_report->get_extra_field_value('old_address'), 'Old Address', 'correct old address on report';
# is $new_report->get_extra_metadata('no_echo'), 1, 'metadata set to indicate not sent to echo';
# is $new_report->send_state, 'sent', 'report marked as sent';
# };

subtest 'cancel staff sub' => sub {
set_fixed_time('2021-03-09T17:00:00Z'); # After sample data collection
Expand Down
2 changes: 2 additions & 0 deletions templates/web/base/waste/services.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@
[% END %]

[% IF c.cobrand.moniker == 'merton' AND is_staff %]
<!--
<a href="[% c.uri_for_action('waste/enquiry', [ property.id ]) %]?category=Garden+Subscription+Address+Change&amp;service_id=[% unit.service_id %]" class="waste-service-link waste-service-descriptor">Report an address change</a>
-->
[% END %]


Expand Down

0 comments on commit 1138880

Please sign in to comment.