[Rt-commit] rt branch, 4.4/queue-in-orderby, repushed
Brian Duggan
brian at bestpractical.com
Mon Feb 5 16:18:42 EST 2018
The branch 4.4/queue-in-orderby was deleted and repushed:
was 0fb0b1bb1c469d01a35dd765daf430dc25f14699
now c6a7c6ed8309648e98f231655c942d836113d912
1: 97fd82ba9 ! 1: c050e5bca Add test for 'Order by' dropdown content
@@ -13,7 +13,7 @@
use HTTP::Cookies;
use LWP;
-use RT::Test tests => 70;
-+use RT::Test test => undef;
++use RT::Test tests => undef;
my $cookie_jar = HTTP::Cookies->new;
my ($baseurl, $agent) = RT::Test->started_ok;
@@ -32,7 +32,7 @@
+
+diag "make sure the list of columns available in the 'Order by' dropdowns are complete";
+{
-+ $agent->get_ok($url.'Search/Build.html');
++ $agent->get_ok($url . 'Search/Build.html');
+
+ my @orderby = qw(
+ AdminCc.EmailAddress
@@ -67,14 +67,13 @@
+
+ my @scraped_orderbys = $agent->scrape_text_by_attr('name', 'OrderBy');
+
-+ for my $idx (0.. at scraped_orderbys-1) {
-+ if ($idx == 0) {
-+ is ($scraped_orderbys[$idx], $orderby);
-+ } else {
-+ is ($scraped_orderbys[$idx], '[none] '.$orderby);
-+ }
++ my $first_orderby = shift @scraped_orderbys;
++ is ($first_orderby, $orderby);
++
++ foreach my $scraped_orderby ( @scraped_orderbys ) {
++ is ($scraped_orderby, '[none] '.$orderby);
+ }
-+
++
+ my $cf = RT::Test->load_or_create_custom_field(
+ Name => 'Location',
+ Queue => 'General',
@@ -82,9 +81,7 @@
+ isa_ok( $cf, 'RT::CustomField' );
+
+ ok($agent->form_name('BuildQuery'), "found the form");
-+ $agent->field("SavedSearchId" => "new");
+ $agent->field("ValueOfQueue", "General");
-+ $agent->field("AddClause", "Add these termes");
+ $agent->submit;
+
+ push @orderby, 'CustomField.{Location}';
@@ -93,14 +90,15 @@
+
+ @scraped_orderbys = $agent->scrape_text_by_attr('name', 'OrderBy');
+
-+ for my $idx (0.. at scraped_orderbys-1) {
-+ if ($idx == 0) {
-+ is ($scraped_orderbys[$idx], $orderby);
-+ } else {
-+ is ($scraped_orderbys[$idx], '[none] '.$orderby);
-+ }
++ $first_orderby = shift @scraped_orderbys;
++ is ($first_orderby, $orderby);
++
++ foreach my $scraped_orderby ( @scraped_orderbys ) {
++ is ($scraped_orderby, '[none] '.$orderby);
+ }
+
+ $cf->SetDisabled(1);
+}
++
++done_testing;
2: 0fb0b1bb1 = 2: c6a7c6ed8 Re-add Queue to 'Order by' dropdown in Search Builder
More information about the rt-commit
mailing list