Skip to content

Commit

Permalink
fixup! [Zürich] Carry prefill_* params from front page to /report/new
Browse files Browse the repository at this point in the history
  • Loading branch information
davea committed Nov 5, 2024
1 parent 91c0e84 commit 03feb98
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions t/cobrand/zurich.t
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,14 @@ subtest "Auto select category and input description from front page" => sub {
pc => 'Langstrasse',
}});
is $mech->uri->path, '/around', 'Redirected to around page';

my $tree = HTML::TreeBuilder->new_from_content($mech->content);
my $input = $tree->look_down('id' => 'prefill_category');
is $input->attr('value'), 'Allgemein', 'Prefill category input has right value';
is $input->attr('type'), 'hidden', 'Prefill category input is hidden';
$mech->content_lacks('form_category_fieldset', 'Category fieldset not present');
is $tree->look_down('id' => 'form_detail')->as_text, 'Test 5678', 'Prefill description input has right value';

$mech->follow_link_ok({ text => 'Skip this step' });
is $mech->uri->path, '/report/new';
is_deeply { $mech->uri->query_form }, {
Expand Down

0 comments on commit 03feb98

Please sign in to comment.