[Rt-commit] rtfm branch, master, updated. 7e338a4f5c3a642b2a8883120e499904cf292ac1

? sunnavy sunnavy at bestpractical.com
Thu Jul 15 22:58:12 EDT 2010


The branch, master has been updated
       via  7e338a4f5c3a642b2a8883120e499904cf292ac1 (commit)
      from  b99f13cbd601d30c49b41ea65fcaeffb6aa7a9c5 (commit)

Summary of changes:
 t/3upload-customfields.t |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)

- Log -----------------------------------------------------------------
commit 7e338a4f5c3a642b2a8883120e499904cf292ac1
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Jul 16 10:59:26 2010 +0800

    we changed form in page /Admin/CustomFields/Objects.html in rt

diff --git a/t/3upload-customfields.t b/t/3upload-customfields.t
index 37b3c05..f8d4cbb 100644
--- a/t/3upload-customfields.t
+++ b/t/3upload-customfields.t
@@ -46,17 +46,10 @@ $m->title_is(qq/Created CustomField img$$/, 'admin-cf created');
 $m->follow_link( text => 'Applies to' );
 $m->title_is(qq/Modify associated objects for img$$/, 'pick cf screenadmin screen');
 $m->form_number(3);
-# Sort by numeric IDs in names
-my @names = map  { $_->[1] }
-            sort { $a->[0] <=> $b->[0] }
-            map  { /Object-1-CF-(\d+)/ ? [ $1 => $_ ] : () }
-            grep { $_ }
-            map  $_->name, $m->current_form->inputs;
-my $tcf = pop(@names);
-$m->field( $tcf => 1 );         # Associate the new CF with this queue
-$m->field( $_ => undef ) for @names;    # ...and not any other. ;-)
-$m->submit;
 
+my $tcf = (grep { /AddCustomField-/ } map { $_->name } $m->current_form->inputs )[0];
+$m->tick( $tcf, 0 );         # Associate the new CF with this queue
+$m->click('UpdateObjs');
 $m->content_like( qr/Object created/, 'TCF added to the queue' );
 $m->follow_link( text => 'RTFM');
 $m->follow_link( text => 'Articles');

-----------------------------------------------------------------------


More information about the Rt-commit mailing list