Author: dolander
Date: Thu Mar 10 09:28:33 2005
New Revision: 156967

URL: http://svn.apache.org/viewcvs?view=rev&rev=156967
Log:
BVT for Jira 423


Added:
    
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtButtonParam.xml
Modified:
    
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml

Modified: 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml?view=diff&r1=156966&r2=156967
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
 (original)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
 Thu Mar 10 09:28:33 2005
@@ -2073,6 +2073,19 @@
          </features>
       </test>
       <test>
+         <name>CtButtonParam</name>
+         <description>Verify that parameters set on buttons are posted to the 
server</description>
+         <webapp>coreWeb</webapp>
+         <categories>
+            <category>bvt</category>
+            <category>tags</category>
+         </categories>
+         <features>
+            <feature>Button</feature>
+            <feature>Parameter</feature>
+         </features>
+      </test>
+      <test>
          <name>CtCbgHash</name>
          <description>Repeating CheckBoxGroup working on a 
HashMap</description>
          <webapp>coreWeb</webapp>

Added: 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtButtonParam.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtButtonParam.xml?view=auto&rev=156967
==============================================================================
--- 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtButtonParam.xml
 (added)
+++ 
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/CtButtonParam.xml
 Thu Mar 10 09:28:33 2005
@@ -0,0 +1,478 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession 
xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session";>
+   <ses:sessionName>CtButtonParam</ses:sessionName>
+   <ses:tester>Daryl</ses:tester>
+   <ses:startDate>10 Mar 2005, 09:14:21.619 AM MST</ses:startDate>
+   <ses:description>Verify that parameters are posted when they are set on 
buttons and the button is pressed.</ses:description>
+   <ses:tests>
+      <ses:test>
+         <ses:testNumber>1</ses:testNumber>
+         <ses:request>
+            <ses:protocol>HTTP</ses:protocol>
+            <ses:protocolVersion>1.1</ses:protocolVersion>
+            <ses:host>localhost</ses:host>
+            <ses:port>8080</ses:port>
+            <ses:uri>/coreWeb/coretags/button/param/Controller.jpf</ses:uri>
+            <ses:method>GET</ses:method>
+            <ses:parameters/>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>D7BA6C709F9F0D3D0DE82A17DBB899D8</ses:value>
+               </ses:cookie>
+            </ses:cookies>
+            <ses:headers>
+               <ses:header>
+                  <ses:name>accept</ses:name>
+                  
<ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-charset</ses:name>
+                  <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-encoding</ses:name>
+                  <ses:value>gzip,deflate</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-language</ses:name>
+                  <ses:value>en-us,en;q=0.5</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>connection</ses:name>
+                  <ses:value>keep-alive</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>cookie</ses:name>
+                  
<ses:value>JSESSIONID=D7BA6C709F9F0D3D0DE82A17DBB899D8</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>host</ses:name>
+                  <ses:value>localhost:8080</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>keep-alive</ses:name>
+                  <ses:value>300</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>user-agent</ses:name>
+                  <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; 
rv:1.7.5) Gecko/20041107 Firefox/1.0</ses:value>
+               </ses:header>
+            </ses:headers>
+         </ses:request>
+         <ses:response>
+            <ses:statusCode>200</ses:statusCode>
+            <ses:reason/>
+            <ses:responseBody>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN"
+       "http://www.w3.org/TR/html4/loose.dtd";>
+&lt;html lang="en">
+
+    &lt;head>
+        &lt;base 
href="http://localhost:8080/coreWeb/coretags/button/param/index.jsp";>
+    &lt;/head>
+    &lt;body>
+        &lt;h4>Parameters on Buttons and Anchors&lt;/h4>
+        &lt;p style="color:green">This test will verify that setting a location
+       on the form results in the proper navigation to a location within the
+       document.  In this case, submitting the form results in going to the
+       bottom of this page.
+       &lt;/p>
+        &lt;form name="Netui_Form_0" id="Netui_Form_0" 
action="/coreWeb/coretags/button/param/post.do" method="post">
+            &lt;input type="submit" name="actionOverride:post?submit=submit" 
value="submit">&lt;br>
+            &lt;input type="submit" 
name="actionOverride:post?submit=submit+with+action" value="submit with 
action">&lt;br>
+            &lt;a href="/coreWeb/coretags/button/param/post.do?submit=link" 
onclick="anchor_submit_form('Netui_Form_0','/coreWeb/coretags/button/param/post.do?submit=link');return
 false;">Submit the form&lt;/a>
+        &lt;/form>
+        &lt;hr>
+        &lt;p>Value: &lt;/p>
+    &lt;/body>
+&lt;script language="JavaScript" type="text/JavaScript">
+&lt;!--
+
+// **** Start the NetUI Framework Generated JavaScript ****
+
+// submit the form from an Anchor or ImageAnchor
+// Search for the form by actionName,
+// Replace the action with the passed in action
+// Submit the form
+function anchor_submit_form(netuiName, newAction)
+{
+  for (var i=0; i&lt;document.forms.length; i++) {
+     if (document.forms[i].id == netuiName) {
+        document.forms[i].method = "POST";
+        document.forms[i].action = newAction;
+        document.forms[i].submit();
+     }
+   }
+}
+-->
+&lt;/script>
+&lt;/html></ses:responseBody>
+         </ses:response>
+      </ses:test>
+      <ses:test>
+         <ses:testNumber>2</ses:testNumber>
+         <ses:request>
+            <ses:protocol>HTTP</ses:protocol>
+            <ses:protocolVersion>1.1</ses:protocolVersion>
+            <ses:host>localhost</ses:host>
+            <ses:port>8080</ses:port>
+            <ses:uri>/coreWeb/coretags/button/param/post.do</ses:uri>
+            <ses:method>POST</ses:method>
+            <ses:parameters>
+               <ses:parameter>
+                  <ses:name>actionOverride:post?submit=submit</ses:name>
+                  <ses:value>submit</ses:value>
+               </ses:parameter>
+            </ses:parameters>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>D7BA6C709F9F0D3D0DE82A17DBB899D8</ses:value>
+               </ses:cookie>
+            </ses:cookies>
+            <ses:headers>
+               <ses:header>
+                  <ses:name>accept</ses:name>
+                  
<ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-charset</ses:name>
+                  <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-encoding</ses:name>
+                  <ses:value>gzip,deflate</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-language</ses:name>
+                  <ses:value>en-us,en;q=0.5</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>connection</ses:name>
+                  <ses:value>keep-alive</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>content-length</ses:name>
+                  <ses:value>46</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>content-type</ses:name>
+                  <ses:value>application/x-www-form-urlencoded</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>cookie</ses:name>
+                  
<ses:value>JSESSIONID=D7BA6C709F9F0D3D0DE82A17DBB899D8</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>host</ses:name>
+                  <ses:value>localhost:8080</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>keep-alive</ses:name>
+                  <ses:value>300</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>referer</ses:name>
+                  
<ses:value>http://localhost:8080/coreWeb/coretags/button/param/Controller.jpf</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>user-agent</ses:name>
+                  <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; 
rv:1.7.5) Gecko/20041107 Firefox/1.0</ses:value>
+               </ses:header>
+            </ses:headers>
+         </ses:request>
+         <ses:response>
+            <ses:statusCode>200</ses:statusCode>
+            <ses:reason/>
+            <ses:responseBody>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN"
+       "http://www.w3.org/TR/html4/loose.dtd";>
+&lt;html lang="en">
+
+    &lt;head>
+        &lt;base 
href="http://localhost:8080/coreWeb/coretags/button/param/index.jsp";>
+    &lt;/head>
+    &lt;body>
+        &lt;h4>Parameters on Buttons and Anchors&lt;/h4>
+        &lt;p style="color:green">This test will verify that setting a location
+       on the form results in the proper navigation to a location within the
+       document.  In this case, submitting the form results in going to the
+       bottom of this page.
+       &lt;/p>
+        &lt;form name="Netui_Form_0" id="Netui_Form_0" 
action="/coreWeb/coretags/button/param/post.do" method="post">
+            &lt;input type="submit" name="actionOverride:post?submit=submit" 
value="submit">&lt;br>
+            &lt;input type="submit" 
name="actionOverride:post?submit=submit+with+action" value="submit with 
action">&lt;br>
+            &lt;a href="/coreWeb/coretags/button/param/post.do?submit=link" 
onclick="anchor_submit_form('Netui_Form_0','/coreWeb/coretags/button/param/post.do?submit=link');return
 false;">Submit the form&lt;/a>
+        &lt;/form>
+        &lt;hr>
+        &lt;p>Value: submit&lt;/p>
+    &lt;/body>
+&lt;script language="JavaScript" type="text/JavaScript">
+&lt;!--
+
+// **** Start the NetUI Framework Generated JavaScript ****
+
+// submit the form from an Anchor or ImageAnchor
+// Search for the form by actionName,
+// Replace the action with the passed in action
+// Submit the form
+function anchor_submit_form(netuiName, newAction)
+{
+  for (var i=0; i&lt;document.forms.length; i++) {
+     if (document.forms[i].id == netuiName) {
+        document.forms[i].method = "POST";
+        document.forms[i].action = newAction;
+        document.forms[i].submit();
+     }
+   }
+}
+-->
+&lt;/script>
+&lt;/html></ses:responseBody>
+         </ses:response>
+      </ses:test>
+      <ses:test>
+         <ses:testNumber>3</ses:testNumber>
+         <ses:request>
+            <ses:protocol>HTTP</ses:protocol>
+            <ses:protocolVersion>1.1</ses:protocolVersion>
+            <ses:host>localhost</ses:host>
+            <ses:port>8080</ses:port>
+            <ses:uri>/coreWeb/coretags/button/param/post.do</ses:uri>
+            <ses:method>POST</ses:method>
+            <ses:parameters>
+               <ses:parameter>
+                  
<ses:name>actionOverride:post?submit=submit+with+action</ses:name>
+                  <ses:value>submit with action</ses:value>
+               </ses:parameter>
+            </ses:parameters>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>D7BA6C709F9F0D3D0DE82A17DBB899D8</ses:value>
+               </ses:cookie>
+            </ses:cookies>
+            <ses:headers>
+               <ses:header>
+                  <ses:name>accept</ses:name>
+                  
<ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-charset</ses:name>
+                  <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-encoding</ses:name>
+                  <ses:value>gzip,deflate</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-language</ses:name>
+                  <ses:value>en-us,en;q=0.5</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>connection</ses:name>
+                  <ses:value>keep-alive</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>content-length</ses:name>
+                  <ses:value>74</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>content-type</ses:name>
+                  <ses:value>application/x-www-form-urlencoded</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>cookie</ses:name>
+                  
<ses:value>JSESSIONID=D7BA6C709F9F0D3D0DE82A17DBB899D8</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>host</ses:name>
+                  <ses:value>localhost:8080</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>keep-alive</ses:name>
+                  <ses:value>300</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>referer</ses:name>
+                  
<ses:value>http://localhost:8080/coreWeb/coretags/button/param/post.do</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>user-agent</ses:name>
+                  <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; 
rv:1.7.5) Gecko/20041107 Firefox/1.0</ses:value>
+               </ses:header>
+            </ses:headers>
+         </ses:request>
+         <ses:response>
+            <ses:statusCode>200</ses:statusCode>
+            <ses:reason/>
+            <ses:responseBody>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN"
+       "http://www.w3.org/TR/html4/loose.dtd";>
+&lt;html lang="en">
+
+    &lt;head>
+        &lt;base 
href="http://localhost:8080/coreWeb/coretags/button/param/index.jsp";>
+    &lt;/head>
+    &lt;body>
+        &lt;h4>Parameters on Buttons and Anchors&lt;/h4>
+        &lt;p style="color:green">This test will verify that setting a location
+       on the form results in the proper navigation to a location within the
+       document.  In this case, submitting the form results in going to the
+       bottom of this page.
+       &lt;/p>
+        &lt;form name="Netui_Form_0" id="Netui_Form_0" 
action="/coreWeb/coretags/button/param/post.do" method="post">
+            &lt;input type="submit" name="actionOverride:post?submit=submit" 
value="submit">&lt;br>
+            &lt;input type="submit" 
name="actionOverride:post?submit=submit+with+action" value="submit with 
action">&lt;br>
+            &lt;a href="/coreWeb/coretags/button/param/post.do?submit=link" 
onclick="anchor_submit_form('Netui_Form_0','/coreWeb/coretags/button/param/post.do?submit=link');return
 false;">Submit the form&lt;/a>
+        &lt;/form>
+        &lt;hr>
+        &lt;p>Value: submit with action&lt;/p>
+    &lt;/body>
+&lt;script language="JavaScript" type="text/JavaScript">
+&lt;!--
+
+// **** Start the NetUI Framework Generated JavaScript ****
+
+// submit the form from an Anchor or ImageAnchor
+// Search for the form by actionName,
+// Replace the action with the passed in action
+// Submit the form
+function anchor_submit_form(netuiName, newAction)
+{
+  for (var i=0; i&lt;document.forms.length; i++) {
+     if (document.forms[i].id == netuiName) {
+        document.forms[i].method = "POST";
+        document.forms[i].action = newAction;
+        document.forms[i].submit();
+     }
+   }
+}
+-->
+&lt;/script>
+&lt;/html></ses:responseBody>
+         </ses:response>
+      </ses:test>
+      <ses:test>
+         <ses:testNumber>4</ses:testNumber>
+         <ses:request>
+            <ses:protocol>HTTP</ses:protocol>
+            <ses:protocolVersion>1.1</ses:protocolVersion>
+            <ses:host>localhost</ses:host>
+            <ses:port>8080</ses:port>
+            <ses:uri>/coreWeb/coretags/button/param/post.do</ses:uri>
+            <ses:method>POST</ses:method>
+            <ses:parameters>
+               <ses:parameter>
+                  <ses:name>submit</ses:name>
+                  <ses:value>link</ses:value>
+               </ses:parameter>
+            </ses:parameters>
+            <ses:cookies>
+               <ses:cookie>
+                  <ses:name>JSESSIONID</ses:name>
+                  <ses:value>D7BA6C709F9F0D3D0DE82A17DBB899D8</ses:value>
+               </ses:cookie>
+            </ses:cookies>
+            <ses:headers>
+               <ses:header>
+                  <ses:name>accept</ses:name>
+                  
<ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-charset</ses:name>
+                  <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-encoding</ses:name>
+                  <ses:value>gzip,deflate</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>accept-language</ses:name>
+                  <ses:value>en-us,en;q=0.5</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>connection</ses:name>
+                  <ses:value>keep-alive</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>content-length</ses:name>
+                  <ses:value>0</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>content-type</ses:name>
+                  <ses:value>application/x-www-form-urlencoded</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>cookie</ses:name>
+                  
<ses:value>JSESSIONID=D7BA6C709F9F0D3D0DE82A17DBB899D8</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>host</ses:name>
+                  <ses:value>localhost:8080</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>keep-alive</ses:name>
+                  <ses:value>300</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>referer</ses:name>
+                  
<ses:value>http://localhost:8080/coreWeb/coretags/button/param/post.do</ses:value>
+               </ses:header>
+               <ses:header>
+                  <ses:name>user-agent</ses:name>
+                  <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; 
rv:1.7.5) Gecko/20041107 Firefox/1.0</ses:value>
+               </ses:header>
+            </ses:headers>
+         </ses:request>
+         <ses:response>
+            <ses:statusCode>200</ses:statusCode>
+            <ses:reason/>
+            <ses:responseBody>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN"
+       "http://www.w3.org/TR/html4/loose.dtd";>
+&lt;html lang="en">
+
+    &lt;head>
+        &lt;base 
href="http://localhost:8080/coreWeb/coretags/button/param/index.jsp";>
+    &lt;/head>
+    &lt;body>
+        &lt;h4>Parameters on Buttons and Anchors&lt;/h4>
+        &lt;p style="color:green">This test will verify that setting a location
+       on the form results in the proper navigation to a location within the
+       document.  In this case, submitting the form results in going to the
+       bottom of this page.
+       &lt;/p>
+        &lt;form name="Netui_Form_0" id="Netui_Form_0" 
action="/coreWeb/coretags/button/param/post.do" method="post">
+            &lt;input type="submit" name="actionOverride:post?submit=submit" 
value="submit">&lt;br>
+            &lt;input type="submit" 
name="actionOverride:post?submit=submit+with+action" value="submit with 
action">&lt;br>
+            &lt;a href="/coreWeb/coretags/button/param/post.do?submit=link" 
onclick="anchor_submit_form('Netui_Form_0','/coreWeb/coretags/button/param/post.do?submit=link');return
 false;">Submit the form&lt;/a>
+        &lt;/form>
+        &lt;hr>
+        &lt;p>Value: link&lt;/p>
+    &lt;/body>
+&lt;script language="JavaScript" type="text/JavaScript">
+&lt;!--
+
+// **** Start the NetUI Framework Generated JavaScript ****
+
+// submit the form from an Anchor or ImageAnchor
+// Search for the form by actionName,
+// Replace the action with the passed in action
+// Submit the form
+function anchor_submit_form(netuiName, newAction)
+{
+  for (var i=0; i&lt;document.forms.length; i++) {
+     if (document.forms[i].id == netuiName) {
+        document.forms[i].method = "POST";
+        document.forms[i].action = newAction;
+        document.forms[i].submit();
+     }
+   }
+}
+-->
+&lt;/script>
+&lt;/html></ses:responseBody>
+         </ses:response>
+      </ses:test>
+   </ses:tests>
+   <ses:endDate>10 Mar 2005, 09:14:32.955 AM MST</ses:endDate>
+   <ses:testCount>4</ses:testCount>
+</ses:recorderSession>
\ No newline at end of file


Reply via email to