[Rt-commit] rtir branch, 5.0/travis-test, updated. 4.0.1rc1-119-gcd6be7fe
Jim Brandt
jbrandt at bestpractical.com
Fri Apr 17 17:36:09 EDT 2020
The branch, 5.0/travis-test has been updated
via cd6be7feff6f2499ee009616cf0e845a39a22be7 (commit)
from 16d210c87b8c1273cc8825df68d6cbd58e890570 (commit)
Summary of changes:
t/report/split.t | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit cd6be7feff6f2499ee009616cf0e845a39a22be7
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Fri Apr 17 17:27:11 2020 -0400
Check individual linked incidents on split page
The previous is_deeply call failed when running on the Debian
test Docker container because it appears to display the second
linked incident twice. This shows up in the dumped HTML and in the
params returned in the test.
Unable to reproduce this manually in a running RTIR, this update converts the
test to an affirmative test for the links. However the test may be
revealing a bug that only happens in certain circumstances, so leaving
a comment for further investigation.
diff --git a/t/report/split.t b/t/report/split.t
index 9e09d3c1..e0dc6959 100644
--- a/t/report/split.t
+++ b/t/report/split.t
@@ -3,7 +3,9 @@ use warnings;
use RT::IR::Test tests => undef;
-RT::Test->started_ok;
+my ($baseurl, $agent) = RT::Test->started_ok;
+diag "Test server running at: $baseurl";
+
my $m = default_agent();
my %viewed = ( '/NoAuth/Logout.html' => 1 ); # in case logout
@@ -24,7 +26,11 @@ my $extra_incident = $m->create_incident({ Subject => "further test Incident" })
$m->follow_link_ok({text => "Split"}, "Followed link");
$m->form_number(3);
- is_deeply([grep $_, $m->current_form->param('Incident')],[$first_incident,$second_incident],"Both Incidents are Checked");
+ # TODO: check the split form to see if the second incident is being displayed twice
+ my @ir_params = $m->current_form->param('Incident');
+ is($ir_params[0], $first_incident, "First incident is checked");
+ is($ir_params[1], $second_incident, "Second incident is checked");
+
$m->click_ok('Create',"Split the Report");
my $new_ir = $m->get_ticket_id;
@@ -40,7 +46,10 @@ my $extra_incident = $m->create_incident({ Subject => "further test Incident" })
$m->follow_link_ok({text => "Split"}, "Followed link");
$m->form_number(3);
- is_deeply([grep $_, $m->current_form->param('Incident')],[$first_incident,$second_incident],"Both Incidents are Checked");
+ my @ir_params = $m->current_form->param('Incident');
+ is($ir_params[0], $first_incident, "First incident is checked");
+ is($ir_params[1], $second_incident, "Second incident is checked");
+
$m->untick('Incident',1);
$m->click_ok('Create',"Split the Report");
@@ -57,7 +66,10 @@ my $extra_incident = $m->create_incident({ Subject => "further test Incident" })
$m->follow_link_ok({text => "Split"}, "Followed link");
$m->form_number(3);
- is_deeply([grep $_, $m->current_form->param('Incident')],[$first_incident,$second_incident],"Both Incidents are Checked");
+ my @ir_params = $m->current_form->param('Incident');
+ is($ir_params[0], $first_incident, "First incident is checked");
+ is($ir_params[1], $second_incident, "Second incident is checked");
+
$m->untick('Incident',1);
$m->untick('Incident',2);
$m->field('Incident',$extra_incident,3);
-----------------------------------------------------------------------
More information about the rt-commit
mailing list