X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Ft%2Fweb%2Fcf_select_one.t;fp=rt%2Ft%2Fweb%2Fcf_select_one.t;h=4f81e2a1a22ce6cff52d370cf982fb748d28573a;hb=1c538bfabc2cd31f27067505f0c3d1a46cba6ef0;hp=92fcf53f371b8b7d5b53f172ef0f3e926fe9bbf7;hpb=4f5619288413a185e9933088d9dd8c5afbc55dfa;p=freeside.git diff --git a/rt/t/web/cf_select_one.t b/rt/t/web/cf_select_one.t index 92fcf53f3..4f81e2a1a 100644 --- a/rt/t/web/cf_select_one.t +++ b/rt/t/web/cf_select_one.t @@ -2,7 +2,7 @@ use strict; use warnings; -use RT::Test tests => 45; +use RT::Test tests => undef; my ($baseurl, $m) = RT::Test->started_ok; ok $m->login, 'logged in as root'; @@ -12,7 +12,7 @@ my $cf_name = 'test select one value'; my $cfid; diag "Create a CF"; { - $m->follow_link( id => 'tools-config-custom-fields-create'); + $m->follow_link( id => 'admin-custom-fields-create'); $m->submit_form( form_name => "ModifyCustomField", fields => { @@ -49,10 +49,10 @@ ok $queue && $queue->id, 'loaded or created queue'; diag "apply the CF to General queue"; { - $m->follow_link( id => 'tools-config-queues'); + $m->follow_link( id => 'admin-queues'); $m->follow_link( text => 'General' ); $m->title_is(q/Configuration for queue General/, 'admin-queue: general'); - $m->follow_link( id => 'page-ticket-custom-fields'); + $m->follow_link( id => 'page-custom-fields-tickets'); $m->title_is(q/Custom Fields for queue General/, 'admin-queue: general cfid'); $m->form_name('EditCustomFields'); @@ -151,3 +151,32 @@ diag "check that we can set empty value when the current is 0"; undef, 'API returns correct value'; } +diag 'retain selected cf values when adding attachments'; +{ + my ( $ticket, $id ); + $m->submit_form( + form_name => "CreateTicketInQueue", + fields => { Queue => 'General' }, + ); + $m->content_contains($cf_name, 'Found cf field' ); + + $m->submit_form_ok( + { form_name => "TicketCreate", + fields => { + Subject => 'test defaults', + Content => 'test', + "Object-RT::Ticket--CustomField-$cfid-Values" => 'qwe', + }, + button => 'AddMoreAttach', + }, + 'Add an attachment on create' + ); + + $m->form_name("TicketCreate"); + is($m->value("Object-RT::Ticket--CustomField-$cfid-Values"), + "qwe", + "Selected value still on form" ); +} + +undef $m; +done_testing;