import rt 3.6.6
[freeside.git] / rt / lib / t / regression / 23-web_attachments.t
index d9d1a84..adc38ad 100644 (file)
@@ -22,17 +22,17 @@ $m->content_like(qr/Logout/, 'we did log in');
 
 my $qid;
 {
-    $m->content =~ /<SELECT\s+NAME\s*="Queue">.*?<OPTION\s+VALUE="(\d+)"\s*\d*>\s*\Q$queue_name\E\s*<\/OPTION>/msi;
+    $m->content =~ /<SELECT\s+NAME\s*="Queue"\s*>.*?<OPTION\s+VALUE="(\d+)".*?>\s*\Q$queue_name\E\s*<\/OPTION>/msig;
     ok( $qid = $1, "found id of the '$queue_name' queue");
 }
 
-$m->form_number(1);
+$m->form_name('CreateTicketInQueue');
 $m->field('Queue', $qid);
 $m->submit;
 is($m->status, 200, "request successful");
 $m->content_like(qr/Create a new ticket/, 'ticket create page');
 
-$m->form('TicketCreate');
+$m->form_name('TicketCreate');
 $m->field('Subject', 'Attachments test');
 $m->field('Attach',  LogoFile);
 $m->field('Content', 'Some content');
@@ -44,12 +44,12 @@ $m->content_like(qr/Some content/, 'and content');
 $m->content_like(qr/Download bplogo\.gif/, 'page has file name');
 
 $m->follow_link_ok({text => 'Reply'}, "reply to the ticket");
-$m->form('TicketUpdate');
+$m->form_name('TicketUpdate');
 $m->field('Attach',  LogoFile);
 $m->click('AddMoreAttach');
 is($m->status, 200, "request successful");
 
-$m->form('TicketUpdate');
+$m->form_name('TicketUpdate');
 $m->field('Attach',  FaviconFile);
 $m->field('UpdateContent', 'Message');
 $m->click('SubmitTicket');