4 use RT::Test tests => 'no_declare';
6 my (undef, $m) = RT::Test->started_ok;
8 $m->follow_link( id => 'admin-custom-fields-create' );
10 form_name => "ModifyCustomField",
13 TypeComposite => 'Image-1',
14 LookupType => 'RT::Queue-RT::Ticket',
17 $m->content_contains("Object created");
18 my $cfid = $m->form_name('ModifyCustomField')->value('id');
19 ok $cfid, "Created CF correctly";
21 $m->follow_link_ok( {id => "page-applies-to"} );
22 $m->form_with_fields( "AddCustomField-1" );
23 $m->tick( "AddCustomField-1", 0 );
24 $m->click_ok( "UpdateObjs" );
25 $m->content_contains("Object created");
29 form_name => "CreateTicketInQueue",
30 fields => { Queue => 'General' },
32 $m->content_contains("Upload one image");
34 form_name => "TicketCreate",
36 Subject => 'Test ticket',
40 $m->content_like( qr/Ticket \d+ created/,
41 "a ticket is created succesfully" );
43 $m->follow_link_ok( {id => "page-basics"} );
44 $m->content_contains("Upload one image");
46 form_name => "TicketModify",
48 "Object-RT::Ticket-1-CustomField-1-Upload" =>
49 RT::Test::get_relocatable_file('bpslogo.png', '..', 'data'),
52 $m->content_contains("bpslogo.png added");
53 $m->content_contains("/Download/CustomFieldValue/1/bpslogo.png");
55 $m->form_name("TicketModify");
56 $m->tick("Object-RT::Ticket-1-CustomField-1-DeleteValueIds", 1);
57 $m->click_ok("SubmitTicket");
58 $m->content_lacks("/Download/CustomFieldValue/1/bpslogo.png");