[Rt-commit] rt branch, 5.0/simplify-ticket-create-form-submit-logic, created. rt-5.0.0alpha1-161-ge7409de03f

? sunnavy sunnavy at bestpractical.com
Wed Apr 29 20:01:04 EDT 2020


The branch, 5.0/simplify-ticket-create-form-submit-logic has been created
        at  e7409de03ff344ae2fbe7785f69c61fc0f5a82e7 (commit)

- Log -----------------------------------------------------------------
commit 69a3b1945164e3d73d9083b57bdc136f4eca5672
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Apr 29 03:52:32 2020 +0800

    Tweak ticket form submit position mainly for consistent margin-top

diff --git a/share/html/Ticket/Create.html b/share/html/Ticket/Create.html
index b188ae7cc3..6f26fe2945 100644
--- a/share/html/Ticket/Create.html
+++ b/share/html/Ticket/Create.html
@@ -235,7 +235,11 @@
         <& /Ticket/Elements/AddAttachments, %ARGS, QueueObj => $QueueObj &>
       </div>
     </&>
-    <& /Elements/Submit, Label => loc("Create"), id => 'SubmitTicket' &>
+    <div class="form-row">
+      <div class="col-12">
+        <& /Elements/Submit, Label => loc("Create"), id => 'SubmitTicket' &>
+      </div>
+    </div>
   </div>
 </div>
 
@@ -326,7 +330,11 @@
 
 </div>
 </div>
-<& /Elements/Submit, Label => loc("Create") &>
+  <div class="form-row">
+    <div class="col-12">
+      <& /Elements/Submit, Label => loc("Create") &>
+    </div>
+  </div>
 </div>
 </form>
 
diff --git a/share/html/Ticket/Forward.html b/share/html/Ticket/Forward.html
index ac244c08bb..bf6c079f0d 100644
--- a/share/html/Ticket/Forward.html
+++ b/share/html/Ticket/Forward.html
@@ -113,8 +113,12 @@
 
 <& /Ticket/Elements/ShowAttachments, Ticket => $TicketObj, Attachments => $attachments, Count => RT->Config->Get('AttachmentListCount') &>
 
-<& /Elements/Submit, Label => loc('Forward Message and Return'), Name => 'ForwardAndReturn' &>
-<& /Elements/Submit, Label => loc('Forward Message'), Name => 'Forward' &>
+  <div class="form-row">
+    <div class="col-12">
+      <& /Elements/Submit, Label => loc('Forward Message and Return'), Name => 'ForwardAndReturn' &>
+      <& /Elements/Submit, Label => loc('Forward Message'), Name => 'Forward' &>
+    </div>
+  </div>
 </form>
 <%INIT>
 my ($status, $msg);
diff --git a/share/html/Ticket/ModifyAll.html b/share/html/Ticket/ModifyAll.html
index b64aa2174c..dbc55b3eb0 100644
--- a/share/html/Ticket/ModifyAll.html
+++ b/share/html/Ticket/ModifyAll.html
@@ -126,10 +126,14 @@
 </&>
   
 
-<& /Elements/Submit, 
-    Name    => 'SubmitTicket',
-    Label   => loc('Save Changes'), 
-    Caption => loc("If you've updated anything above, be sure to"), color => "#333399" &>
+  <div class="form-row">
+    <div class="col-12">
+      <& /Elements/Submit,
+        Name    => 'SubmitTicket',
+        Label   => loc('Save Changes'),
+        Caption => loc("If you've updated anything above, be sure to"), color => "#333399" &>
+    </div>
+  </div>
 </form>
 
 % $m->callback(CallbackName => 'AfterForm', ARGSRef => \%ARGS, Ticket => $Ticket);
diff --git a/share/static/css/elevator-light/ticket-form.css b/share/static/css/elevator-light/ticket-form.css
index dc2523c002..bf1342567b 100644
--- a/share/static/css/elevator-light/ticket-form.css
+++ b/share/static/css/elevator-light/ticket-form.css
@@ -3,10 +3,6 @@
     font-weight: normal;
 }
 
-.messagedetails {
-    margin-bottom: 0.5em;
-}
-
 .messagedetails input[type="text"],
 .messagedetails input[type="email"] {
     -webkit-box-sizing: border-box;

commit f34280e9f167e32d9cc597417888e1ac10242617
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Apr 30 04:00:18 2020 +0800

    Simply the ticket create submit logic by checking SubmitTicket
    
    Previously we had a hidden SubmitTicket to make it the default submit
    button instead of the "Go" buttons in old "Include Article", so hitting
    "enter" on text input could submit and create the ticket, though it
    didn't always work(e.g. on Safari).
    
    Now we have a new "Include Article" UI, which generally doesn't have
    "Go" buttons(unless the unpupular queue level topics feature is used),
    so we don't need the hack any more.
    
    By checking SubmitTicket instead, the logic is simpler and also
    consistent with ticket update page.

diff --git a/share/html/Elements/QuickCreate b/share/html/Elements/QuickCreate
index 25e4b59075..af5051a34b 100644
--- a/share/html/Elements/QuickCreate
+++ b/share/html/Elements/QuickCreate
@@ -86,7 +86,7 @@
 
 <div class="form-row">
   <div class="col-md-12">
-    <& /Elements/Submit, Label => loc('Create') &>
+    <& /Elements/Submit, Name => 'SubmitTicket', Label => loc('Create') &>
   </div>
 </div>
 </form>
diff --git a/share/html/SelfService/Create.html b/share/html/SelfService/Create.html
index bc54dfffea..2c35333b81 100644
--- a/share/html/SelfService/Create.html
+++ b/share/html/SelfService/Create.html
@@ -107,7 +107,7 @@
 </div>
 <div class="form-row">
   <div class="col-md-12">
-    <& /Elements/Submit, Label => loc("Create ticket")&>
+    <& /Elements/Submit, Label => loc("Create ticket"), Name => 'SubmitTicket' &>
   </div>
 </div>
 
@@ -144,12 +144,10 @@ my $skip_create = 0;
 
 $m->callback( CallbackName => 'BeforeCreate', ARGSRef => \%ARGS, skip_create => \$skip_create, results => \@results );
 
-if ( !exists $ARGS{'AddMoreAttach'} and defined($ARGS{'id'}) and $ARGS{'id'} eq 'new' ) { # new ticket?
-    if ( !$skip_create ) {
-        $m->comp('Display.html', %ARGS);
-        $RT::Logger->crit("After display call; error is $@");
-        $m->abort();
-    }
+if ( !$skip_create && $ARGS{'SubmitTicket'} ) {
+    $m->comp('Display.html', %ARGS);
+    $RT::Logger->crit("After display call; error is $@");
+    $m->abort();
 }
 
 </%init>
diff --git a/share/html/Ticket/Create.html b/share/html/Ticket/Create.html
index 6f26fe2945..ed5517e6b0 100644
--- a/share/html/Ticket/Create.html
+++ b/share/html/Ticket/Create.html
@@ -53,7 +53,6 @@
 <& /Elements/ListActions, actions => \@results &>
 
 <form action="<% RT->Config->Get('WebPath') %>/Ticket/Create.html" method="post" enctype="multipart/form-data" name="TicketCreate">
-  <input type="submit" name="SubmitTicket" value="Create" style="display:none">
   <input type="hidden" class="hidden" name="id" value="new" />
   <input type="hidden" class="hidden" name="Token" value="<% $ARGS{'Token'} %>" />
   <input type="hidden" name="QueueChanged" value="0" />
@@ -237,7 +236,7 @@
     </&>
     <div class="form-row">
       <div class="col-12">
-        <& /Elements/Submit, Label => loc("Create"), id => 'SubmitTicket' &>
+        <& /Elements/Submit, Label => loc("Create"), Name => 'SubmitTicket', id => 'SubmitTicket' &>
       </div>
     </div>
   </div>
@@ -332,7 +331,7 @@
 </div>
   <div class="form-row">
     <div class="col-12">
-      <& /Elements/Submit, Label => loc("Create") &>
+      <& /Elements/Submit, Label => loc("Create"), Name => 'SubmitTicket' &>
     </div>
   </div>
 </div>
@@ -474,7 +473,7 @@ $m->comp( '/Elements/Crypt/SignEncryptWidget:Process',
 );
 
 
-if ( !exists $ARGS{'AddMoreAttach'} && ($ARGS{'id'}||'') eq 'new' ) {
+if ( $ARGS{SubmitTicket} ) {
     my $status = $m->comp('/Elements/Crypt/SignEncryptWidget:Check',
         self      => $gnupg_widget,
         Operation => 'Create',
@@ -506,12 +505,10 @@ $m->callback( CallbackName => 'BeforeCreate', ARGSRef => \%ARGS, skip_create =>
 $m->comp( '/Articles/Elements/CheckSkipCreate', ARGSRef => \%ARGS, skip_create => \$skip_create,
               checks_failure => $checks_failure, results => \@results );
 
-if ((!exists $ARGS{'AddMoreAttach'}) and (!exists $ARGS{'Go'}) and (defined($ARGS{'id'}) and $ARGS{'id'} eq 'new')) { # new ticket?
-    if ( !$checks_failure && !$skip_create && !$ARGS{'QueueChanged'} ) {
-        $m->comp('Display.html', %ARGS);
-        $RT::Logger->crit("After display call; error is $@");
-        $m->abort();
-    }
+if ( !$checks_failure && !$skip_create && $ARGS{SubmitTicket} ) {
+    $m->comp('Display.html', %ARGS);
+    $RT::Logger->crit("After display call; error is $@");
+    $m->abort();
 }
 PageMenu->child( basics => raw_html =>  q[<a href="#basics" onclick="return switchVisibility('Ticket-Create-basics','Ticket-Create-details');">] . loc('Basics') . q[</a>]);
 PageMenu->child( details => raw_html =>  q[<a href="#details" onclick="return switchVisibility('Ticket-Create-details','Ticket-Create-basics');">] . loc('Details') . q[</a>]);

commit e7409de03ff344ae2fbe7785f69c61fc0f5a82e7
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Apr 30 05:19:25 2020 +0800

    Update tests for the submit logic change of ticket create form

diff --git a/lib/RT/Test/GnuPG.pm b/lib/RT/Test/GnuPG.pm
index d50c2cada1..414097e810 100644
--- a/lib/RT/Test/GnuPG.pm
+++ b/lib/RT/Test/GnuPG.pm
@@ -132,7 +132,7 @@ sub create_a_ticket {
         }
     }
 
-    $m->submit;
+    $m->click('SubmitTicket');
     is $m->status, 200, "request successful";
 
     $m->content_lacks("unable to sign outgoing email messages");
diff --git a/t/articles/queue-specific-class.t b/t/articles/queue-specific-class.t
index 0adb9a65f6..42e6e1e0a4 100644
--- a/t/articles/queue-specific-class.t
+++ b/t/articles/queue-specific-class.t
@@ -65,6 +65,7 @@ diag "create ticket in General" if $ENV{TEST_VERBOSE};
     $m->submit_form(
         form_number => 3,
         fields => { 'Subject' => 'test article', Content => 'test article' },
+        button => 'SubmitTicket',
     );
     ($ticket_id) = ( $m->content =~ /Ticket \d+ created/ );
     ok( $ticket_id, "id of ticket: $ticket_id" );
diff --git a/t/customfields/access_via_queue.t b/t/customfields/access_via_queue.t
index 97a0732d66..c33f4f04c3 100644
--- a/t/customfields/access_via_queue.t
+++ b/t/customfields/access_via_queue.t
@@ -105,6 +105,7 @@ diag "check that we don't have the cf on create";
     $m->submit_form(
         form_name => "TicketCreate",
         fields => { Subject => 'test' },
+        button => 'SubmitTicket',
     );
     my ($tid) = ($m->content =~ /Ticket (\d+) created/i);
     ok $tid, "created a ticket succesfully";
diff --git a/t/customfields/ip.t b/t/customfields/ip.t
index 96da6c3ab0..d35be17de3 100644
--- a/t/customfields/ip.t
+++ b/t/customfields/ip.t
@@ -53,7 +53,8 @@ diag "create a ticket via web and set IP" if $ENV{'TEST_VERBOSE'};
         fields    => {
             Subject   => 'test ip',
             $cf_field => $val,
-        }
+        },
+        button    => 'SubmitTicket',
     );
 
     $agent->content_contains( $val, "IP on the page" );
@@ -73,7 +74,8 @@ diag "create a ticket and edit IP field using Edit page"
     ok $agent->goto_create_ticket($q), "go to create ticket";
     $agent->submit_form(
         form_name => 'TicketCreate',
-        fields    => { Subject => 'test ip', }
+        fields    => { Subject => 'test ip', },
+        button    => 'SubmitTicket',
     );
 
     my ($id) = $agent->content =~ /Ticket (\d+) created/;
@@ -124,7 +126,8 @@ diag "check that we parse correct IPs only" if $ENV{'TEST_VERBOSE'};
             fields    => {
                 Subject   => 'test ip',
                 $cf_field => $valid,
-            }
+            },
+            button    => 'SubmitTicket',
         );
 
         my ($id) = $agent->content =~ /Ticket (\d+) created/;
@@ -163,7 +166,8 @@ diag "search tickets by IP" if $ENV{'TEST_VERBOSE'};
         fields    => {
             Subject   => 'test ip',
             $cf_field => $val,
-        }
+        },
+        button    => 'SubmitTicket',
     );
 
     my ($id) = $agent->content =~ /Ticket (\d+) created/;
@@ -188,7 +192,8 @@ diag "create two tickets with different IPs and check several searches"
         fields    => {
             Subject   => 'test ip',
             $cf_field => '192.168.21.10',
-        }
+        },
+        button    => 'SubmitTicket',
     );
 
     my ($id1) = $agent->content =~ /Ticket (\d+) created/;
@@ -200,7 +205,8 @@ diag "create two tickets with different IPs and check several searches"
         fields    => {
             Subject   => 'test ip',
             $cf_field => '192.168.22.10',
-        }
+        },
+        button    => 'SubmitTicket',
     );
 
     my ($id2) = $agent->content =~ /Ticket (\d+) created/;
@@ -258,7 +264,8 @@ diag "create a ticket with an IP of 10.0.0.1 and search for doesn't match '10.0.
         fields    => {
             Subject   => 'local',
             $cf_field => '10.0.0.1',
-        }
+        },
+        button    => 'SubmitTicket',
     );
 
     my ($id) = $agent->content =~ /Ticket (\d+) created/;
diff --git a/t/customfields/iprange.t b/t/customfields/iprange.t
index 2a323a352a..b117150f07 100644
--- a/t/customfields/iprange.t
+++ b/t/customfields/iprange.t
@@ -48,7 +48,8 @@ diag "create a ticket via web and set IP" if $ENV{'TEST_VERBOSE'};
         fields    => {
             Subject                                       => 'test ip',
             $cf_field => $val,
-        }
+        },
+        button => 'SubmitTicket',
     );
 
     $agent->content_like( qr/\Q$val/, "IP on the page" );
@@ -71,7 +72,8 @@ diag "create a ticket via web with CIDR" if $ENV{'TEST_VERBOSE'};
         fields    => {
             Subject                                       => 'test ip',
             $cf_field => $val,
-        }
+        },
+        button => 'SubmitTicket',
     );
 
     my ($id) = $agent->content =~ /Ticket (\d+) created/;
@@ -89,7 +91,8 @@ diag "create a ticket and edit IP field using Edit page" if $ENV{'TEST_VERBOSE'}
     ok $agent->goto_create_ticket($q), "go to create ticket";
     $agent->submit_form(
         form_name => 'TicketCreate',
-        fields    => { Subject => 'test ip', }
+        fields    => { Subject => 'test ip', },
+        button => 'SubmitTicket',
     );
 
     my ($id) = $agent->content =~ /Ticket (\d+) created/;
@@ -175,7 +178,8 @@ diag "check that we parse correct IPs only" if $ENV{'TEST_VERBOSE'};
             fields    => {
                 Subject   => 'test ip',
                 $cf_field => $valid,
-            }
+            },
+            button => 'SubmitTicket',
         );
 
         my ($id) = $agent->content =~ /Ticket (\d+) created/;
@@ -194,7 +198,8 @@ diag "check that we parse correct IPs only" if $ENV{'TEST_VERBOSE'};
             fields    => {
                 Subject   => 'test ip',
                 $cf_field => $invalid,
-            }
+            },
+            button => 'SubmitTicket',
         );
 
         $agent->content_like( qr/is not a valid IP address range/, 'ticket fails to create' );
@@ -212,7 +217,8 @@ diag "search tickets by IP" if $ENV{'TEST_VERBOSE'};
         fields    => {
             Subject   => 'test ip',
             $cf_field => $val,
-        }
+        },
+        button => 'SubmitTicket',
     );
 
     my ($id) = $agent->content =~ /Ticket (\d+) created/;
@@ -240,7 +246,8 @@ diag "search tickets by IP range" if $ENV{'TEST_VERBOSE'};
         fields    => {
             Subject   => 'test ip',
             $cf_field => $val,
-        }
+        },
+        button => 'SubmitTicket',
     );
 
     my ($id) = $agent->content =~ /Ticket (\d+) created/;
@@ -267,7 +274,8 @@ diag "create two tickets with different IPs and check several searches" if $ENV{
         fields    => {
             Subject   => 'test ip',
             $cf_field => '192.168.21.10',
-        }
+        },
+        button => 'SubmitTicket',
     );
 
     my ($id1) = $agent->content =~ /Ticket (\d+) created/;
@@ -279,7 +287,8 @@ diag "create two tickets with different IPs and check several searches" if $ENV{
         fields    => {
             Subject   => 'test ip',
             $cf_field => '192.168.22.10',
-        }
+        },
+        button => 'SubmitTicket',
     );
 
     my ($id2) = $agent->content =~ /Ticket (\d+) created/;
@@ -365,7 +374,8 @@ diag "create two tickets with different IP ranges and check several searches" if
         fields    => {
             Subject   => 'test ip',
             $cf_field => '192.168.21.0-192.168.21.127',
-        }
+        },
+        button => 'SubmitTicket'
     );
 
     my ($id1) = $agent->content =~ /Ticket (\d+) created/;
@@ -377,7 +387,8 @@ diag "create two tickets with different IP ranges and check several searches" if
         fields    => {
             Subject   => 'test ip',
             $cf_field => '192.168.21.128-192.168.21.255',
-        }
+        },
+        button => 'SubmitTicket'
     );
 
     my ($id2) = $agent->content =~ /Ticket (\d+) created/;
diff --git a/t/customfields/iprangev6.t b/t/customfields/iprangev6.t
index 896be528ee..345b24a70f 100644
--- a/t/customfields/iprangev6.t
+++ b/t/customfields/iprangev6.t
@@ -59,7 +59,8 @@ diag "create a ticket via web and set IP" if $ENV{'TEST_VERBOSE'};
             fields    => {
                 Subject   => 'test ip',
                 $cf_field => $ip,
-            }
+            },
+            button => 'SubmitTicket',
         );
 
         $agent->content_like( qr/$valid{$ip}/, "IP on the page" );
@@ -84,7 +85,8 @@ diag "create a ticket via web with CIDR" if $ENV{'TEST_VERBOSE'};
         fields    => {
             Subject                                       => 'test ip',
             $cf_field => $val,
-        }
+        },
+        button    => 'SubmitTicket'
     );
 
     my ($id) = $agent->content =~ /Ticket (\d+) created/;
@@ -106,7 +108,8 @@ diag "create a ticket and edit IP field using Edit page" if $ENV{'TEST_VERBOSE'}
     ok $agent->goto_create_ticket($q), "go to create ticket";
     $agent->submit_form(
         form_name => 'TicketCreate',
-        fields    => { Subject => 'test ip', }
+        fields    => { Subject => 'test ip', },
+        button => 'SubmitTicket'
     );
 
     my ($id) = $agent->content =~ /Ticket (\d+) created/;
@@ -190,7 +193,8 @@ diag "check that we parse correct IPs only" if $ENV{'TEST_VERBOSE'};
             fields    => {
                 Subject   => 'test ip',
                 $cf_field => $invalid,
-            }
+            },
+            button    => 'SubmitTicket'
         );
 
         $agent->content_like( qr/is not a valid IP address range/,
@@ -209,7 +213,8 @@ diag "search tickets by IP" if $ENV{'TEST_VERBOSE'};
         fields    => {
             Subject   => 'test ip',
             $cf_field => $val,
-        }
+        },
+        button    => 'SubmitTicket'
     );
 
     my ($id) = $agent->content =~ /Ticket (\d+) created/;
@@ -239,7 +244,8 @@ diag "search tickets by IP range" if $ENV{'TEST_VERBOSE'};
         fields    => {
             Subject   => 'test ip',
             $cf_field => $val,
-        }
+        },
+        button    => 'SubmitTicket'
     );
 
     my ($id) = $agent->content =~ /Ticket (\d+) created/;
@@ -272,7 +278,8 @@ diag "create two tickets with different IPs and check several searches" if $ENV{
         fields    => {
             Subject   => 'test ip',
             $cf_field => $first_ip,
-        }
+        },
+        button    => 'SubmitTicket'
     );
 
     my ($id1) = $agent->content =~ /Ticket (\d+) created/;
@@ -284,7 +291,8 @@ diag "create two tickets with different IPs and check several searches" if $ENV{
         fields    => {
             Subject   => 'test ip',
             $cf_field => $second_ip,
-        }
+        },
+        button => 'SubmitTicket'
     );
 
     my ($id2) = $agent->content =~ /Ticket (\d+) created/;
@@ -374,7 +382,8 @@ diag "create two tickets with different IP ranges and check several searches" if
         fields    => {
             Subject   => 'test ip',
             $cf_field => 'ddcd::/16',
-        }
+        },
+        button    => 'SubmitTicket'
     );
 
     my ($id1) = $agent->content =~ /Ticket (\d+) created/;
@@ -386,7 +395,8 @@ diag "create two tickets with different IP ranges and check several searches" if
         fields    => {
             Subject   => 'test ip',
             $cf_field => 'edcd::/16',
-        }
+        },
+        button    => 'SubmitTicket'
     );
 
     my ($id2) = $agent->content =~ /Ticket (\d+) created/;
diff --git a/t/customfields/ipv6.t b/t/customfields/ipv6.t
index fdfd49cadc..04127a2835 100644
--- a/t/customfields/ipv6.t
+++ b/t/customfields/ipv6.t
@@ -65,7 +65,8 @@ diag "create a ticket via web and set IP" if $ENV{'TEST_VERBOSE'};
             fields    => {
                 Subject   => 'test ip',
                 $cf_field => $ip,
-            }
+            },
+            button    => 'SubmitTicket',
         );
 
         $agent->content_contains( $valid{$ip}, "IP on the page" );
@@ -93,7 +94,8 @@ diag "create a ticket and edit IP field using Edit page"
     ok $agent->goto_create_ticket($q), "go to create ticket";
     $agent->submit_form(
         form_name => 'TicketCreate',
-        fields    => { Subject => 'test ip', }
+        fields    => { Subject => 'test ip', },
+        button    => 'SubmitTicket',
     );
 
     my ($id) = $agent->content =~ /Ticket (\d+) created/;
@@ -147,7 +149,8 @@ diag "check that we parse correct IPs only" if $ENV{'TEST_VERBOSE'};
             fields    => {
                 Subject   => 'test ip',
                 $cf_field => $invalid,
-            }
+            },
+            button    => 'SubmitTicket',
         );
 
         $agent->content_contains( 'is not a valid IP address',
@@ -165,7 +168,8 @@ diag "create two tickets with different IPs and check several searches"
         fields    => {
             Subject   => 'test ip',
             $cf_field => 'abcd::',
-        }
+        },
+        button    => 'SubmitTicket',
     );
 
     my ($id1) = $agent->content =~ /Ticket (\d+) created/;
@@ -177,7 +181,8 @@ diag "create two tickets with different IPs and check several searches"
         fields    => {
             Subject   => 'test ip',
             $cf_field => 'bbcd::',
-        }
+        },
+        button    => 'SubmitTicket',
     );
 
     my ($id2) = $agent->content =~ /Ticket (\d+) created/;
@@ -231,7 +236,8 @@ diag "create a ticket with an IP of abcd:23:: and search for doesn't match 'abcd
         fields    => {
             Subject   => 'local',
             $cf_field => 'abcd:23::',
-        }
+        },
+        button    => 'SubmitTicket',
     );
 
     my ($id) = $agent->content =~ /Ticket (\d+) created/;
diff --git a/t/customfields/sort_order.t b/t/customfields/sort_order.t
index 0db4beae4a..18a4f47bc8 100644
--- a/t/customfields/sort_order.t
+++ b/t/customfields/sort_order.t
@@ -72,6 +72,7 @@ diag "check ticket create, display and edit pages";
     $m->submit_form(
         form_name => "TicketCreate",
         fields => { Subject => 'test' },
+        button => 'SubmitTicket',
     );
     my ($tid) = ($m->content =~ /Ticket (\d+) created/i);
     ok $tid, "created a ticket succesfully";
diff --git a/t/security/CVE-2011-2084-attach-tickets.t b/t/security/CVE-2011-2084-attach-tickets.t
index 6b1366a5f5..58eebd9d7d 100644
--- a/t/security/CVE-2011-2084-attach-tickets.t
+++ b/t/security/CVE-2011-2084-attach-tickets.t
@@ -55,6 +55,7 @@ $m->submit_form_ok({
         Subject         => 'ticket C',
         AttachTickets   => $ticket_b->id,
     },
+    button => 'SubmitTicket'
 }, 'create a ticket');
 
 my @mail = RT::Test->fetch_caught_mails;
diff --git a/t/security/CVE-2012-4735-sign-any-key.t b/t/security/CVE-2012-4735-sign-any-key.t
index 248df9c55e..1ea7dba407 100644
--- a/t/security/CVE-2012-4735-sign-any-key.t
+++ b/t/security/CVE-2012-4735-sign-any-key.t
@@ -50,7 +50,7 @@ sub create_signed {
     $m->field( Content    => 'Some content' );
     $m->tick( Sign => 1 );
     $m->field( SignUsing  => $key );
-    $m->submit;
+    $m->click('SubmitTicket');
 }
 
 create_signed( '' );
diff --git a/t/sla/web.t b/t/sla/web.t
index 2a9f27fd82..0eb0be8e8f 100644
--- a/t/sla/web.t
+++ b/t/sla/web.t
@@ -51,7 +51,7 @@ ok $m->login( 'user', 'password' ), 'logged in as user';
     my $form = $m->form_name( 'TicketCreate' );
     my $sla  = $form->find_input( 'SLA' );
     is_deeply( [$sla->possible_values], [ 2, 4 ], 'possible sla' );
-    $m->submit_form( fields => { Subject => 'ticket foo with default sla' } );
+    $m->submit_form( fields => { Subject => 'ticket foo with default sla' }, button => 'SubmitTicket' );
 
     my $ticket = RT::Test->last_ticket;
     ok( $ticket->id, 'ticket is created' );
@@ -64,7 +64,7 @@ ok $m->login( 'user', 'password' ), 'logged in as user';
 {
     $m->goto_create_ticket( $queue->id );
     my $form = $m->form_name( 'TicketCreate' );
-    $m->submit_form( fields => { Subject => 'ticket foo with default sla', SLA => 4 } );
+    $m->submit_form( fields => { Subject => 'ticket foo with default sla', SLA => 4 }, button => 'SubmitTicket' );
 
     my $ticket = RT::Test->last_ticket;
     ok( $ticket->id, 'ticket is created' );
@@ -95,7 +95,7 @@ ok $m->login( 'user', 'password' ), 'logged in as user';
     $m->goto_create_ticket( $queue->id );
     my $form = $m->form_name( 'TicketCreate' );
     ok( !$form->find_input( 'SLA' ), 'no SLA input' );
-    $m->submit_form( fields => { Subject => 'ticket foo without sla' } );
+    $m->submit_form( fields => { Subject => 'ticket foo without sla' }, button => 'SubmitTicket' );
 
     my $ticket = RT::Test->last_ticket;
     ok( $ticket->id,               'ticket is created' );
diff --git a/t/ticket/scrips_batch.t b/t/ticket/scrips_batch.t
index 0a996ce453..88385541f7 100644
--- a/t/ticket/scrips_batch.t
+++ b/t/ticket/scrips_batch.t
@@ -66,7 +66,7 @@ END
 
     $m->goto_create_ticket( $queue );
     $m->form_name('TicketCreate');
-    $m->submit;
+    $m->click('SubmitTicket');
 
     is_deeply parse_handle($tmp_fh), ['Create'], 'Create';
 
diff --git a/t/web/action-results.t b/t/web/action-results.t
index 2826e2f999..d523d08c19 100644
--- a/t/web/action-results.t
+++ b/t/web/action-results.t
@@ -18,6 +18,7 @@ for my $quick (1, 0) {
             Subject => "The Plants",
             Content => "Please water them.",
         },
+        button => 'SubmitTicket',
     }, "Submitted new ticket");
 
     my $id = RT::Test->last_ticket->id;
diff --git a/t/web/attach-from-txn.t b/t/web/attach-from-txn.t
index 8d587b105e..a19e0e250e 100644
--- a/t/web/attach-from-txn.t
+++ b/t/web/attach-from-txn.t
@@ -33,7 +33,7 @@ $m->content_contains("Create a new ticket", 'ticket create page');
 $m->form_name('TicketCreate');
 $m->field('Subject', 'Attachments test');
 $m->field('Content', 'Some content');
-$m->submit;
+$m->click('SubmitTicket');
 is($m->status, 200, "request successful");
 
 $m->content_contains('Attachments test', 'we have subject on the page');
diff --git a/t/web/attachment-with-name-0.t b/t/web/attachment-with-name-0.t
index f128c0abba..3219fc48a8 100644
--- a/t/web/attachment-with-name-0.t
+++ b/t/web/attachment-with-name-0.t
@@ -17,6 +17,7 @@ $m->get_ok( '/Ticket/Create.html?Queue=1' );
 $m->submit_form(
     form_number => 3,
     fields => { Subject => 'test att 0', Content => 'test', Attach => $file },
+    button => 'SubmitTicket',
 );
 $m->content_like( qr/Ticket \d+ created/i, 'created the ticket' );
 $m->follow_link_ok( { url_regex => qr/Attachment\/\d+\/\d+\/0/ } );
diff --git a/t/web/attachment_dropping.t b/t/web/attachment_dropping.t
index 7c7a1e77bc..3f7e19c037 100644
--- a/t/web/attachment_dropping.t
+++ b/t/web/attachment_dropping.t
@@ -40,7 +40,7 @@ $m->field( 'Attach',  $path );
 $m->field( 'Content', 'Some content' );
 my $cf_content = 'cf' . 'a' x 998 . 'cfb';
 $m->field( "Object-RT::Ticket--CustomField-$cfid-Value", $cf_content );
-$m->submit;
+$m->click('SubmitTicket');
 is( $m->status, 200, "request successful" );
 
 $m->content_contains( "File '$name' dropped because its size (1010 bytes) exceeded configured maximum size setting (1000 bytes).", 'dropped message' );
diff --git a/t/web/attachment_encoding.t b/t/web/attachment_encoding.t
index ecfbe50b08..5935e8c955 100644
--- a/t/web/attachment_encoding.t
+++ b/t/web/attachment_encoding.t
@@ -21,6 +21,7 @@ diag 'test without attachments' if $ENV{TEST_VERBOSE};
     $m->submit_form(
         form_number => 3,
         fields      => { Subject => $subject, Content => $content },
+        button      => 'SubmitTicket',
     );
     $m->content_like( qr/Ticket \d+ created/i, 'created the ticket' );
     $m->follow_link_ok( { url_regex => qr/Attachment\/WithHeaders\/\d+/ },
@@ -57,6 +58,7 @@ diag 'test with attachemnts' if $ENV{TEST_VERBOSE};
     $m->submit_form(
         form_number => 3,
         fields => { Subject => $subject, Content => $content, Attach => $file },
+        button => 'SubmitTicket',
     );
     $m->content_like( qr/Ticket \d+ created/i, 'created the ticket' );
     $m->content_contains( $filename, 'attached filename' );
diff --git a/t/web/attachment_truncation.t b/t/web/attachment_truncation.t
index 0725d444f2..0926e51f35 100644
--- a/t/web/attachment_truncation.t
+++ b/t/web/attachment_truncation.t
@@ -39,7 +39,7 @@ $m->field( 'Attach',  $path );
 $m->field( 'Content', 'Some content' );
 my $cf_content = 'cf' . 'a' x 998 . 'cfb';
 $m->field( "Object-RT::Ticket--CustomField-$cfid-Value", $cf_content );
-$m->submit;
+$m->click('SubmitTicket');
 is( $m->status, 200, "request successful" );
 
 $m->content_contains( "File '$name' truncated because its size (1010 bytes) exceeded configured maximum size setting (1000 bytes).", 'truncated message' );
diff --git a/t/web/attachments.t b/t/web/attachments.t
index de7591f94b..4224e42b02 100644
--- a/t/web/attachments.t
+++ b/t/web/attachments.t
@@ -21,7 +21,7 @@ diag "w/o attachments";
 
     $m->form_name('TicketCreate');
     $m->content_contains("Create a new ticket", 'ticket create page');
-    $m->submit;
+    $m->click('SubmitTicket');
     is($m->status, 200, "request successful");
 }
 
@@ -34,7 +34,7 @@ diag "with one attachment";
     $m->field('Attach',  LogoFile);
     $m->field('Content', 'Some content');
 
-    $m->submit;
+    $m->click('SubmitTicket');
     is($m->status, 200, "request successful");
 
     $m->content_contains('Attachments test', 'we have subject on the page');
@@ -56,7 +56,7 @@ diag "with two attachments";
     $m->field('Subject', 'Attachments test');
     $m->field('Content', 'Some content');
 
-    $m->submit;
+    $m->click('SubmitTicket');
     is($m->status, 200, "request successful");
 
     $m->content_contains('Attachments test', 'we have subject on the page');
@@ -83,7 +83,7 @@ diag "with one attachment, but delete one along the way";
     $m->field('Subject', 'Attachments test');
     $m->field('Content', 'Some content');
 
-    $m->submit;
+    $m->click('SubmitTicket');
     is($m->status, 200, "request successful");
 
     $m->content_contains('Attachments test', 'we have subject on the page');
@@ -115,7 +115,7 @@ diag "with one attachment, but delete one along the way";
     $m->field('Subject', 'Attachments test');
     $m->field('Content', 'Some content');
 
-    $m->submit;
+    $m->click('SubmitTicket');
     is($m->status, 200, "request successful");
 
     $m->content_contains('Attachments test', 'we have subject on the page');
@@ -386,7 +386,7 @@ diag "create with attachment";
     $m->field('Subject', 'Subject');
     $m->field('Content', 'Message');
     ok($m->current_form->find_input('AddMoreAttach'), "more than one attachment");
-    $m->submit;
+    $m->click('SubmitTicket');
     is($m->status, 200, "request successful");
 
     $m->content_contains('Download favicon.png', 'page has file name');
@@ -458,7 +458,7 @@ diag "check content type and content";
     $m->field('Subject', 'Attachments test');
     $m->field('Content', 'Some content');
 
-    $m->submit;
+    $m->click('SubmitTicket');
     is($m->status, 200, "request successful");
 
     $m->content_contains('Attachments test', 'we have subject on the page');
@@ -506,7 +506,7 @@ diag "update and create";
     $m->field('Attach',  FaviconFile);
     $m->field('Subject', 'Attachments test');
     $m->field('Content', 'Some content');
-    $m->submit;
+    $m->click('SubmitTicket');
     is($m->status, 200, "request successful");
 
     $m->content_lacks('Download bpslogo.png', 'page has file name');
diff --git a/t/web/basic.t b/t/web/basic.t
index 4e3dbe749b..061ba4b757 100644
--- a/t/web/basic.t
+++ b/t/web/basic.t
@@ -29,7 +29,7 @@ my $url = $agent->rt_base_url;
     my $string = Encode::decode("UTF-8","I18N Web Testing æøå");
     $agent->field('Subject' => "Ticket with utf8 body");
     $agent->field('Content' => $string);
-    ok($agent->submit, "Created new ticket with $string as Content");
+    ok($agent->click('SubmitTicket'), "Created new ticket with $string as Content");
     $agent->content_contains($string, "Found the content");
     ok($agent->{redirected_uri}, "Did redirection");
 
@@ -51,7 +51,7 @@ my $url = $agent->rt_base_url;
     my $string = Encode::decode( "UTF-8","I18N Web Testing æøå");
     $agent->field('Subject' => $string);
     $agent->field('Content' => "Ticket with utf8 subject");
-    ok($agent->submit, "Created new ticket with $string as Content");
+    ok($agent->click('SubmitTicket'), "Created new ticket with $string as Content");
     $agent->content_contains($string, "Found the content");
     ok($agent->{redirected_uri}, "Did redirection");
 
diff --git a/t/web/cf_access.t b/t/web/cf_access.t
index c55a50bdd0..8f9b762835 100644
--- a/t/web/cf_access.t
+++ b/t/web/cf_access.t
@@ -136,6 +136,7 @@ diag "check that we have no the CF on the create"
     $m->submit_form(
         form_name => "TicketCreate",
         fields => { Subject => 'test' },
+        button => 'SubmitTicket',
     );
     $m->content_like(qr/Ticket \d+ created/, "a ticket is created succesfully");
 
@@ -163,6 +164,7 @@ diag "check that we have no the CF on the create"
     $m->submit_form(
         form_name => "TicketCreate",
         fields => { Subject => 'test' },
+        button => 'SubmitTicket',
     );
     $tid = $1 if $m->content =~ /Ticket (\d+) created/i;
     ok $tid, "a ticket is created succesfully";
@@ -195,6 +197,7 @@ diag "create a ticket with an image";
             $upload_field => ImageFile,
             Subject => 'testing img cf creation',
         },
+        button => 'SubmitTicket',
     );
 
     $m->content_like(qr/Ticket \d+ created/, "a ticket is created succesfully");
diff --git a/t/web/cf_date.t b/t/web/cf_date.t
index c31f280f9c..452248ef3d 100644
--- a/t/web/cf_date.t
+++ b/t/web/cf_date.t
@@ -64,6 +64,7 @@ diag 'check valid inputs with various timezones in ticket create page';
             Content                                       => 'test',
             "Object-RT::Ticket--CustomField-$cfid-Values" => '2010-05-04',
         },
+        button => 'SubmitTicket',
     );
     ok( ($id) = $m->content =~ /Ticket (\d+) created/, "created ticket $id" );
 
@@ -172,6 +173,7 @@ diag 'check invalid inputs';
             Content                                       => 'test',
             "Object-RT::Ticket--CustomField-$cfid-Values" => 'foodate',
         },
+        button => 'SubmitTicket',
     );
     $m->content_like( qr/Ticket \d+ created/,
         "a ticket is created succesfully" );
@@ -229,7 +231,7 @@ diag 'retain values when adding attachments';
     is( $m->value( "Object-RT::Transaction--CustomField-$txn_cfid-Values" ),
         "2015-08-15", "txn cf date date value still on form" );
 
-    $m->submit_form();
+    $m->submit_form( button => 'SubmitTicket' );
     ok( ($id) = $m->content =~ /Ticket (\d+) created/, "created ticket $id" );
 
     $m->follow_link_ok( {text => 'Reply'} );
diff --git a/t/web/cf_datetime.t b/t/web/cf_datetime.t
index c6a1bd340e..6f5058d64a 100644
--- a/t/web/cf_datetime.t
+++ b/t/web/cf_datetime.t
@@ -72,6 +72,7 @@ diag 'check valid inputs with various timezones in ticket create page';
             Content                                       => 'test',
             "Object-RT::Ticket--CustomField-$cfid-Values" => '2010-05-04 13:00:01',
         },
+        button => 'SubmitTicket',
     );
     ok( ($id) = $m->content =~ /Ticket (\d+) created/,
         "created ticket $id" );
@@ -108,6 +109,7 @@ diag 'check valid inputs with various timezones in ticket create page';
             Content                                       => 'test',
             "Object-RT::Ticket--CustomField-$cfid-Values" => '2010-05-06 07:00:01',
         },
+        button => 'SubmitTicket',
     );
     ok( ($id) = $m->content =~ /Ticket (\d+) created/,
         "created ticket $id" );
@@ -196,6 +198,7 @@ diag 'check invalid inputs';
             Content                                       => 'test',
             "Object-RT::Ticket--CustomField-$cfid-Values" => 'foodate',
         },
+        button => 'SubmitTicket',
     );
     $m->content_like(qr/Ticket \d+ created/, "a ticket is created succesfully");
 
@@ -254,7 +257,7 @@ diag 'retain values when adding attachments';
         "2015-08-15 12:30:30", "txn cf date date value still on form" );
     $m->content_contains( "Aug 15 12:30:30 2015", 'date in parens' );
 
-    $m->submit_form();
+    $m->submit_form( button => 'SubmitTicket' );
     ok( ($id) = $m->content =~ /Ticket (\d+) created/, "Created ticket $id" );
 
     $m->follow_link_ok( {text => 'Reply'} );
diff --git a/t/web/cf_groupings.t b/t/web/cf_groupings.t
index a872617c49..6a06efac2b 100644
--- a/t/web/cf_groupings.t
+++ b/t/web/cf_groupings.t
@@ -52,7 +52,7 @@ my %location = (
         ok $dom->at(qq{$location{$grouping} input[name="$input_name"]}), "CF is in the right place";
         $m->field( $input_name, "Test" . $grouping . "Value" );
     }
-    $m->submit;
+    $m->click('SubmitTicket');
 }
 
 my $id = $m->get_ticket_id;
@@ -168,7 +168,7 @@ my $id = $m->get_ticket_id;
         ok $dom->at(qq{$location{$grouping} input[name="$input_name"]}), "CF is in the right place";
         $m->field( $input_name, "TestMoreValue" );
     }
-    $m->submit;
+    $m->click('SubmitTicket');
     $m->no_warnings_ok( "Submitting CF with two (identical) values had no warnings" );
 }
 
diff --git a/t/web/cf_image.t b/t/web/cf_image.t
index ef46b25c43..405a1e6706 100644
--- a/t/web/cf_image.t
+++ b/t/web/cf_image.t
@@ -34,6 +34,7 @@ $m->submit_form_ok({
         Subject => 'Test ticket',
         Content => 'test',
     },
+    button => 'SubmitTicket',
 });
 $m->content_like( qr/Ticket \d+ created/,
                   "a ticket is created succesfully" );
diff --git a/t/web/cf_pattern.t b/t/web/cf_pattern.t
index 95fae50b3c..8e18baba3e 100644
--- a/t/web/cf_pattern.t
+++ b/t/web/cf_pattern.t
@@ -47,6 +47,7 @@ for my $page ("/Ticket/Create.html?Queue=1", "/Ticket/Modify.html?id=".$ticket->
             $cfinput            => "42",
             "${cfinput}-Magic" => "1",
         },
+        button => 'SubmitTicket',
     });
 
     if ($page =~ /Create/) {
diff --git a/t/web/cf_set_initial.t b/t/web/cf_set_initial.t
index 00ec53af59..ebf8a9f5ff 100644
--- a/t/web/cf_set_initial.t
+++ b/t/web/cf_set_initial.t
@@ -44,6 +44,7 @@ diag "check that we have no CFs on the create"
     $m->submit_form(
         form_name => "TicketCreate",
         fields => { Subject => 'test' },
+        button => 'SubmitTicket',
     );
     $m->content_like(qr/Ticket \d+ created/, "a ticket is created succesfully");
 
@@ -80,6 +81,7 @@ diag "check that we have the CF on the create"
             $multi_field => 'hiro',
             Subject => 'test 2',
         },
+        button => 'SubmitTicket',
     );
     $m->content_like(qr/Ticket \d+ created/, "a ticket is created succesfully");
     if (my ($id) = $m->content =~ /Ticket (\d+) created/) {
diff --git a/t/web/crypt-gnupg.t b/t/web/crypt-gnupg.t
index 790225c883..fed621ce46 100644
--- a/t/web/crypt-gnupg.t
+++ b/t/web/crypt-gnupg.t
@@ -59,7 +59,7 @@ $m->field('Subject', 'Encryption test');
 $m->field('Content', 'Some content');
 ok($m->value('Encrypt', 2), "encrypt tick box is checked");
 ok(!$m->value('Sign', 2), "sign tick box is unchecked");
-$m->submit;
+$m->click('SubmitTicket');
 is($m->status, 200, "request successful");
 
 $m->get($baseurl); # ensure that the mail has been processed
@@ -128,7 +128,7 @@ $m->field('Subject', 'Signing test');
 $m->field('Content', 'Some other content');
 ok(!$m->value('Encrypt', 2), "encrypt tick box is unchecked");
 ok($m->value('Sign', 2), "sign tick box is checked");
-$m->submit;
+$m->click('SubmitTicket');
 is($m->status, 200, "request successful");
 
 $m->get($baseurl); # ensure that the mail has been processed
@@ -201,7 +201,7 @@ $m->field('Subject', 'Crypt+Sign test');
 $m->field('Content', 'Some final? content');
 ok($m->value('Encrypt', 2), "encrypt tick box is checked");
 ok($m->value('Sign', 2), "sign tick box is checked");
-$m->submit;
+$m->click('SubmitTicket');
 is($m->status, 200, "request successful");
 
 $m->get($baseurl); # ensure that the mail has been processed
@@ -267,7 +267,7 @@ $m->field('Content', 'Thought you had me figured out didya');
 $m->field(Encrypt => undef, 2); # turn off encryption
 ok(!$m->value('Encrypt', 2), "encrypt tick box is now unchecked");
 ok($m->value('Sign', 2), "sign tick box is still checked");
-$m->submit;
+$m->click('SubmitTicket');
 is($m->status, 200, "request successful");
 
 $m->get($baseurl); # ensure that the mail has been processed
diff --git a/t/web/csrf.t b/t/web/csrf.t
index bf8dc973a0..42a22b6436 100644
--- a/t/web/csrf.t
+++ b/t/web/csrf.t
@@ -189,7 +189,7 @@ $m->field('Attach',  $logofile);
 
 # Lose the referer before the POST
 $m->add_header(Referer => undef);
-$m->submit;
+$m->click('SubmitTicket');
 $m->content_contains("Possible cross-site request forgery");
 $m->content_contains("If you really intended to visit <tt>$baseurl/Ticket/Create.html</tt>");
 $m->follow_link(text_regex => qr{resume your request});
diff --git a/t/web/css.t b/t/web/css.t
index f2c1124832..9e297c5f36 100644
--- a/t/web/css.t
+++ b/t/web/css.t
@@ -14,7 +14,7 @@ use RT::Test tests => undef;
     ok ( $m->goto_create_ticket( $queue ) );
     $m->form_name( 'TicketCreate' );
     $m->field( Subject => 'Test Ticket' );
-    $m->submit;
+    $m->click('SubmitTicket');
 
     $m->follow_link_ok( { id => 'admin-custom-fields' } );
     $m->follow_link_ok( { id => 'page-create' } );
diff --git a/t/web/customrole_visibility.t b/t/web/customrole_visibility.t
index a9fcec5cc7..b97949c12f 100644
--- a/t/web/customrole_visibility.t
+++ b/t/web/customrole_visibility.t
@@ -47,6 +47,7 @@ $m->submit_form(
     fields => {
         Subject => 'test ticket',
     },
+    button => 'SubmitTicket',
 );
 $m->content_contains( 'Ticket 1 created in queue', 'Created ticket' );
 
@@ -86,6 +87,7 @@ $m->submit_form(
     fields => {
         Subject => 'test ticket 2',
     },
+    button => 'SubmitTicket',
 );
 $m->content_contains( 'Ticket 2 created in queue', 'Created ticket' );
 
diff --git a/t/web/gnupg-headers.t b/t/web/gnupg-headers.t
index 95f342233c..2997e924f2 100644
--- a/t/web/gnupg-headers.t
+++ b/t/web/gnupg-headers.t
@@ -31,7 +31,7 @@ $m->goto_create_ticket($queue);
 $m->form_name('TicketCreate');
 $m->field( 'Subject', 'Signing test' );
 $m->field( 'Content', 'Some other content' );
-$m->submit;
+$m->click('SubmitTicket');
 $m->content_like( qr/Ticket \d+ created/i, 'created the ticket' );
 $m->follow_link_ok( { url_regex => qr/Attachment\/WithHeaders\/\d+/ } );
 $m->content_contains('X-RT-Encrypt: 0');
@@ -45,7 +45,7 @@ $m->field( 'Subject', 'Signing test' );
 $m->field( 'Content', 'Some other content' );
 $m->tick( 'Encrypt', 1 );
 $m->tick( 'Sign',    1 );
-$m->submit;
+$m->click('SubmitTicket');
 $m->content_like( qr/Ticket \d+ created/i, 'created the ticket' );
 $m->follow_link_ok( { url_regex => qr/Attachment\/WithHeaders\/\d+/ } );
 $m->content_contains('X-RT-Encrypt: 1');
diff --git a/t/web/gnupg-select-keys-on-create.t b/t/web/gnupg-select-keys-on-create.t
index 2b9a680833..64d6c6e46d 100644
--- a/t/web/gnupg-select-keys-on-create.t
+++ b/t/web/gnupg-select-keys-on-create.t
@@ -23,7 +23,7 @@ diag "check that signing doesn't work if there is no key";
     $m->tick( Sign => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
-    $m->submit;
+    $m->click('SubmitTicket');
     $m->content_contains(
         'unable to sign outgoing email messages',
         'problems with passphrase'
@@ -50,7 +50,7 @@ diag "check that things don't work if there is no key";
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
-    $m->submit;
+    $m->click('SubmitTicket');
     $m->content_contains(
         'You are going to encrypt outgoing email messages',
         'problems with keys'
@@ -88,7 +88,7 @@ diag "check that things still doesn't work if key is not trusted";
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
-    $m->submit;
+    $m->click('SubmitTicket');
     $m->content_contains(
         'You are going to encrypt outgoing email messages',
         'problems with keys'
@@ -103,7 +103,7 @@ diag "check that things still doesn't work if key is not trusted";
     is scalar $input->possible_values, 1, 'one option';
 
     $m->select( 'UseKey-rt-test at example.com' => $fpr1 );
-    $m->submit;
+    $m->click('SubmitTicket');
     $m->content_contains(
         'You are going to encrypt outgoing email messages',
         'problems with keys'
@@ -137,7 +137,7 @@ diag "check that things still doesn't work if two keys are not trusted";
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
-    $m->submit;
+    $m->click('SubmitTicket');
     $m->content_contains(
         'You are going to encrypt outgoing email messages',
         'problems with keys'
@@ -152,7 +152,7 @@ diag "check that things still doesn't work if two keys are not trusted";
     is scalar $input->possible_values, 2, 'two options';
 
     $m->select( 'UseKey-rt-test at example.com' => $fpr1 );
-    $m->submit;
+    $m->click('SubmitTicket');
     $m->content_contains(
         'You are going to encrypt outgoing email messages',
         'problems with keys'
@@ -184,7 +184,7 @@ diag "check that we see key selector even if only one key is trusted but there a
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
-    $m->submit;
+    $m->click('SubmitTicket');
     $m->content_contains(
         'You are going to encrypt outgoing email messages',
         'problems with keys'
@@ -213,7 +213,7 @@ diag "check that key selector works and we can select trusted key";
     $m->tick( Encrypt => 1 );
     $m->field( Requestors => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
-    $m->submit;
+    $m->click('SubmitTicket');
     $m->content_contains(
         'You are going to encrypt outgoing email messages',
         'problems with keys'
@@ -228,7 +228,7 @@ diag "check that key selector works and we can select trusted key";
     is scalar $input->possible_values, 2, 'two options';
 
     $m->select( 'UseKey-rt-test at example.com' => $fpr1 );
-    $m->submit;
+    $m->click('SubmitTicket');
     $m->content_like( qr/Ticket \d+ created in queue/i, 'ticket created' );
 
     my @mail = RT::Test->fetch_caught_mails;
@@ -249,7 +249,7 @@ for my $encrypt (0, 1) {
     $m->field( Cc => 'rt-test at example.com' );
     $m->field( Content => 'Some content' );
     $m->field( Attach => $0 );
-    $m->submit;
+    $m->click('SubmitTicket');
 
     if ($encrypt) {
         $m->content_contains(
@@ -266,7 +266,7 @@ for my $encrypt (0, 1) {
         is scalar $input->possible_values, 2, 'two options';
 
         $m->select( 'UseKey-rt-test at example.com' => $fpr1 );
-        $m->submit;
+        $m->click('SubmitTicket');
     }
 
     $m->content_like( qr/Ticket \d+ created in queue/i, 'ticket created' );
diff --git a/t/web/group_summary.t b/t/web/group_summary.t
index 22977b667c..9c5abf08f9 100644
--- a/t/web/group_summary.t
+++ b/t/web/group_summary.t
@@ -38,6 +38,7 @@ diag( 'Group Summary access and ticket creation' );
         fields => {
             Subject => $subject,
         },
+        button => 'SubmitTicket'
     }, 'Submitted form to create ticket with group cc');
     like( $m->uri, qr{/Ticket/Display\.html\?id}, "now on /Ticket/Display\.html" );
 
diff --git a/t/web/html_template.t b/t/web/html_template.t
index 89a490d911..d6d68e8a27 100644
--- a/t/web/html_template.t
+++ b/t/web/html_template.t
@@ -44,6 +44,7 @@ diag('create a ticket to see the autoreply mail') if $ENV{TEST_VERBOSE};
         form_name => 'TicketCreate',
         fields      => { Subject => $subject, Content => "<h1>$content</h1>",
         ContentType => 'text/html' },
+        button => 'SubmitTicket',
     );
     $m->content_like( qr/Ticket \d+ created/i, 'created the ticket' );
     $m->follow_link( url_regex => qr/ShowEmailRecord/ );
diff --git a/t/web/priority.t b/t/web/priority.t
index 5989e09efe..717aa92734 100644
--- a/t/web/priority.t
+++ b/t/web/priority.t
@@ -20,7 +20,7 @@ for my $field (qw/InitialPriority FinalPriority/) {
     is( $form->value($field), '', "$field default value" );
 }
 
-$m->submit_form_ok( { fields => { Subject => 'Test PriorityAsString', InitialPriority => 50 } }, 'Create ticket' );
+$m->submit_form_ok( { fields => { Subject => 'Test PriorityAsString', InitialPriority => 50 }, button => 'SubmitTicket' }, 'Create ticket' );
 $m->text_like( qr{Priority:\s*Medium/Low}, 'Priority/FinalPriority on display' );
 
 $m->follow_link_ok( { text => 'Basics' } );
diff --git a/t/web/smime/outgoing.t b/t/web/smime/outgoing.t
index 2f80c7ec35..ea3bc7ebed 100644
--- a/t/web/smime/outgoing.t
+++ b/t/web/smime/outgoing.t
@@ -256,7 +256,7 @@ sub create_a_ticket {
         }
     }
 
-    $m->submit;
+    $m->click('SubmitTicket');
     is $m->status, 200, "request successful";
 
     unlike($m->content, qr/unable to sign outgoing email messages/);
diff --git a/t/web/ticket-create-utf8.t b/t/web/ticket-create-utf8.t
index 76a7360b79..217c8288ad 100644
--- a/t/web/ticket-create-utf8.t
+++ b/t/web/ticket-create-utf8.t
@@ -29,7 +29,7 @@ foreach my $test_str ( $ru_test, $l1_test ) {
     ok $m->goto_create_ticket( $q ), "go to create ticket";
     $m->form_name('TicketCreate');
     $m->field( Subject => $test_str );
-    $m->submit;
+    $m->click('SubmitTicket');
 
     $m->content_like( 
         qr{<td\s+class="message-header-value\s*"[^>]*>\s*\Q$test_str\E\s*</td>}i,
@@ -47,7 +47,7 @@ foreach my $test_str ( $ru_test, $l1_test ) {
         $m->form_name('TicketCreate');
         $m->field( Subject => $test_str );
         $m->field( Content => $support_str );
-        $m->submit;
+        $m->click('SubmitTicket');
 
         $m->content_like( 
             qr{<td\s+class="message-header-value\s*"[^>]*>\s*\Q$test_str\E\s*</td>}i,
@@ -70,7 +70,7 @@ foreach my $test_str ( $ru_test, $l1_test ) {
         $m->form_name('TicketCreate');
         $m->field( Subject => $test_str );
         $m->field( Content => $support_str );
-        $m->submit;
+        $m->click('SubmitTicket');
 
         $m->content_like( 
             qr{<td\s+class="message-header-value\s*"[^>]*>\s*\Q$test_str\E\s*</td>}i,
diff --git a/t/web/ticket_create.t b/t/web/ticket_create.t
index d579c8a377..c58afe8955 100644
--- a/t/web/ticket_create.t
+++ b/t/web/ticket_create.t
@@ -69,7 +69,7 @@ is_deeply(
 );
 
 note('submit populated form');
-$m->submit_form( fields => { Subject => 'ticket foo', 'Queue' => $queue1->id, $cf_form_id => $cf_test_value } );
+$m->submit_form( fields => { Subject => 'ticket foo', 'Queue' => $queue1->id, $cf_form_id => $cf_test_value }, button => 'SubmitTicket' );
 $m->text_contains( 'test_cf',      'custom field populated in display' );
 $m->text_contains( $cf_test_value, 'custom field populated in display' );
 
diff --git a/t/web/ticket_display.t b/t/web/ticket_display.t
index 7183b5ea7a..7cb11cd065 100644
--- a/t/web/ticket_display.t
+++ b/t/web/ticket_display.t
@@ -31,7 +31,7 @@ diag "test ShowTicket right";
     $m->get_ok( '/Ticket/Create.html?Queue=' . $queue->id,
         'go to ticket create page' );
     my $form = $m->form_name('TicketCreate');
-    $m->submit_form( fields => { Subject => 'ticket foo', $cf_form_id => $cf_test_value } );
+    $m->submit_form( fields => { Subject => 'ticket foo', $cf_form_id => $cf_test_value }, button => 'SubmitTicket' );
 
     my $ticket = RT::Test->last_ticket;
     ok( $ticket->id, 'ticket is created' );
diff --git a/t/web/ticket_forward.t b/t/web/ticket_forward.t
index 93eb85279f..23c7838053 100644
--- a/t/web/ticket_forward.t
+++ b/t/web/ticket_forward.t
@@ -22,6 +22,7 @@ $m->submit_form(
         Content => 'this is content',
         Attach  => $att_file,
     },
+    button => 'SubmitTicket'
 );
 $m->content_like( qr/Ticket \d+ created/i, 'created the ticket' );
 RT::Test->clean_caught_mails;
@@ -122,7 +123,7 @@ diag "Forward Transaction with attachments but empty content" if $ENV{TEST_VERBO
     $m->set_fields(
         Attach  => RT::Test::get_relocatable_file('bpslogo.png', '..', 'data'), # an image!
     );
-    $m->submit;
+    $m->click('SubmitTicket');
     $m->content_like( qr/Ticket \d+ created/i,  'created the ticket' );
     $m->content_like( qr/awesome.p\%C3\%A1tch/, 'uploaded patch file' );
     $m->content_like( qr/text\/x-diff/,     'uploaded patch file content type' );
diff --git a/t/web/ticket_links.t b/t/web/ticket_links.t
index 3f7f384b5d..71e4c8b171 100644
--- a/t/web/ticket_links.t
+++ b/t/web/ticket_links.t
@@ -80,7 +80,7 @@ for my $type ( "DependsOn", "MemberOf", "RefersTo" ) {
                 $m->field( "$type-new", "$deleted_id $active_id $inactive_id" );
             }
 
-            $m->submit;
+            $m->click('SubmitTicket');
             $m->content_like(qr/Ticket \d+ created/, 'created ticket');
             $m->content_contains("Linking to a deleted ticket is not allowed");
             $id = RT::Test->last_ticket->id;
diff --git a/t/web/ticket_owner.t b/t/web/ticket_owner.t
index 080c7d1c90..e7b7f1a806 100644
--- a/t/web/ticket_owner.t
+++ b/t/web/ticket_owner.t
@@ -40,7 +40,7 @@ diag "current user has no right to own, nobody selected as owner on create";
     is $form->value('Owner'), RT->Nobody->id, 'correct owner selected';
     ok !grep($_ == $user_a->id, $form->find_input('Owner')->possible_values),
         'user A can not own tickets';
-    $agent_a->submit;
+    $agent_a->click('SubmitTicket');
 
     $agent_a->content_like(qr/Ticket \d+ created in queue/i, 'created ticket');
     my ($id) = ($agent_a->content =~ /Ticket (\d+) created in queue/);
@@ -62,7 +62,7 @@ diag "user can chose owner of a new ticket";
     ok grep($_ == $user_b->id,  $form->find_input('Owner')->possible_values),
         'user B is listed as potential owner';
     $agent_a->select('Owner', $user_b->id);
-    $agent_a->submit;
+    $agent_a->click('SubmitTicket');
 
     $agent_a->content_like(qr/Ticket \d+ created in queue/i, 'created ticket');
     my ($id) = ($agent_a->content =~ /Ticket (\d+) created in queue/);
diff --git a/t/web/ticket_owner_autocomplete.t b/t/web/ticket_owner_autocomplete.t
index 72628394b6..9b9651f016 100644
--- a/t/web/ticket_owner_autocomplete.t
+++ b/t/web/ticket_owner_autocomplete.t
@@ -35,7 +35,7 @@ diag "current user has no right to own, nobody selected as owner on create";
     my $form = $agent_a->form_name('TicketCreate');
     is $form->value('Owner'), RT->Nobody->Name, 'correct owner selected';
     autocomplete_lacks( 'RT::Queue-'.$queue->id, 'user_a' );
-    $agent_a->submit;
+    $agent_a->click('SubmitTicket');
 
     $agent_a->content_like(qr/Ticket \d+ created in queue/i, 'created ticket');
     my ($id) = ($agent_a->content =~ /Ticket (\d+) created in queue/);
@@ -56,7 +56,7 @@ diag "user can chose owner of a new ticket";
 
     autocomplete_contains( 'RT::Queue-'.$queue->id, 'user_b' );
     $form->value('Owner', $user_b->Name);
-    $agent_a->submit;
+    $agent_a->click('SubmitTicket');
 
     $agent_a->content_like(qr/Ticket \d+ created in queue/i, 'created ticket');
     my ($id) = ($agent_a->content =~ /Ticket (\d+) created in queue/);
diff --git a/t/web/ticket_owner_issues_16656.t b/t/web/ticket_owner_issues_16656.t
index 3248f19a84..b7bd0bf4ef 100644
--- a/t/web/ticket_owner_issues_16656.t
+++ b/t/web/ticket_owner_issues_16656.t
@@ -33,7 +33,7 @@ diag "user_a doesn't show up in create form";
     is $input->value, RT->Nobody->Id, 'correct owner selected';
     ok((not scalar grep { $_ == $user_a->Id } $input->possible_values), 'no user_a value in dropdown');
     $form->value('Requestors', 'user_a at example.com');
-    $agent_root->submit;
+    $agent_root->click('SubmitTicket');
 
     $agent_root->content_like(qr/Ticket \d+ created in queue/i, 'created ticket');
     my ($id) = ($agent_root->content =~ /Ticket (\d+) created in queue/);
diff --git a/t/web/ticket_txn_cf.t b/t/web/ticket_txn_cf.t
index 8595156b66..b029e08733 100644
--- a/t/web/ticket_txn_cf.t
+++ b/t/web/ticket_txn_cf.t
@@ -62,6 +62,7 @@ diag 'submit value on ticket create page';
             Content                                            => 'test',
             "Object-RT::Transaction--CustomField-$cfid-Values" => 'hello from create',
         },
+        button => 'SubmitTicket'
     );
     ok( ($id) = $m->content =~ /Ticket (\d+) created/, "created ticket $id" );
 
diff --git a/t/web/ticket_txn_content.t b/t/web/ticket_txn_content.t
index 282b8d9451..e4f70a2635 100644
--- a/t/web/ticket_txn_content.t
+++ b/t/web/ticket_txn_content.t
@@ -49,7 +49,7 @@ for my $type ( 'text/plain', 'text/html' ) {
     $m->field( 'Attach',  $plain_file );
     $m->field( 'Content', 'this is main content' );
     $m->field( 'ContentType', $type ) unless $type eq 'text/plain';
-    $m->submit;
+    $m->click('SubmitTicket');
     is( $m->status, 200, "request successful" );
     $m->content_contains('with plain attachment',
         'we have subject on the page' );
diff --git a/t/web/ticket_txn_subject.t b/t/web/ticket_txn_subject.t
index 67129d5a78..c4540ce418 100644
--- a/t/web/ticket_txn_subject.t
+++ b/t/web/ticket_txn_subject.t
@@ -27,6 +27,7 @@ diag "create a ticket via the web";
         with_fields => {
             Subject => Encode::decode("UTF-8",'bad subject #2‽'),
         },
+        button => 'SubmitTicket'
     }, 'create ticket');
     $m->content_contains(Encode::decode("UTF-8",'bad subject #2‽'), 'correct subject');
     push @tickets, 2;
@@ -39,6 +40,7 @@ diag "create a ticket via the web without a unicode subject";
         with_fields => {
             Subject => 'a fine subject #3',
         },
+        button => 'SubmitTicket'
     }, 'create ticket');
     $m->content_contains('a fine subject #3', 'correct subject');
     push @tickets, 3;

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


More information about the rt-commit mailing list