Anonymous avatar Anonymous committed 0805ed8

WW-1470
- Create Selenium test cases for features in showcase example
- added more selenium test cases

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@2944 573baa09-0c28-0410-bef9-dab3c582ae83

Comments (0)

Files changed (4)

webapps/showcase/src/webapp/selenium/tests/TestSuite.html

                 <a href="./../tests/IfTagJspTest.jsp">IfTagJspTest</a>
             </td>
         </tr>
+        <tr>
+            <td>
+                <a href="./../tests/UiTagsTest.jsp">UiTagsTest</a>
+            </td>
+        </tr>
         </tbody>
     </table>
 

webapps/showcase/src/webapp/selenium/tests/UiTagsTest.jsp

+<%--
+  @author tmjee
+  @version $Date$ $Id$
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@taglib prefix="ww" uri="/webwork" %>
+<html>
+  <head>
+      <title>UiTagsTest</title>
+      <meta content="plain" name="decorator" />
+  </head>
+  <body>
+    <table>
+        <tr>
+            <td colspan="3">UiTagTest</td>
+        </tr>
+        <tr>
+            <td>open</td>
+            <td><ww:url namespace="/tags/ui" action="example" method="input" includeContext="true" includeParams="none"/> </td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>Name</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>Birthday</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>Biography</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>Favourite Color</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>Favourite Language</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>Friends</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>State</td>
+            <td></td>
+        </tr>
+        <tr>
+           <td>verifyTextPresent</td>
+           <td>Favourite Vehical</td>
+           <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>Picture</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>Favourite Cartoons Characters</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>Your Thoughts</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>type</td>
+            <td>exampleSubmit_name</td>
+            <td>Toby</td>
+        </tr>
+        <tr>
+            <td>type</td>
+            <td>exampleSubmit_birthday</td>
+            <td>08/11/2007</td>
+        </tr>
+        <tr>
+            <td>type</td>
+            <td>exampleSubmit_bio</td>
+            <td>I am a Java Programmer</td>
+        </tr>
+        <tr>
+            <td>select</td>
+            <td>exampleSubmit_favoriteColor</td>
+            <td>value=Blue</td>
+        </tr>
+        <tr>
+            <td>select</td>
+            <td>exampleSubmit_favouriteLanguage</td>
+            <td>value=FrenchKey</td>
+        </tr>
+        <tr>
+            <td>click</td>
+            <td>friends-2</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>click</td>
+            <td>friends-3</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>click</td>
+            <td>exampleSubmit_legalAge</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>select</td>
+            <td>exampleSubmit_region</td>
+            <td>value=North</td>
+        </tr>
+        <tr>
+            <td>select</td>
+            <td>exampleSubmit_state</td>
+            <td>value=Washington</td>
+        </tr>
+        <tr>
+            <td>select</td>
+            <td>exampleSubmit_favouriteVehicalType</td>
+            <td>value=CarKey</td>
+        </tr>
+        <tr>
+            <td>select</td>
+            <td>exampleSubmit_favouriteVehicalSpecific</td>
+            <td>value=FordKey</td>
+        </tr>
+        <tr>
+            <td>clickAndWait</td>
+            <td>exampleSubmit_0</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>storeAlert</td>
+            <td>alertVar</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyExpression</td>
+            <td>${alertVar}</td>
+            <td>You are submiting this form.</td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>Toby</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>8/11/07</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>I am a Java Programmer</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>[Jason, Jay]</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>true</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>North</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>Washington</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>FrenchKey</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>CarKey</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>FordKey</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>1.Popeye<td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>2.He-Man</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>3.Spiderman</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>1.Superman</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>2.Mickey Mouse</td>
+            <td></td>
+        </tr>
+        <tr>
+            <td>verifyTextPresent</td>
+            <td>3.Donald Duck </td>
+            <td></td>
+        </tr>
+    </table>
+  </body>
+</html>

webapps/showcase/src/webapp/tags/non-ui/debug.jsp

     <p/>
     <b>Sample URL:</b> <ww:property value="console" />
     <p/>
-    <a href="<ww:property value="console" />">ValueStack in Debug Console</a>
+    <a id="showConsoleButton" href="<ww:property value="console" />">ValueStack in Debug Console</a>
     <p/>
     <b>Usage:</b> Just enter OGNL expressions into the console window and press Return. <br>
     The OGNL expression will be submitted against the current action and the result will be shown within the console output.<br>
     <p/>
     <b>Sample URL:</b> <ww:property value="xml" />
     <p/>
-    <a href="<ww:property value="xml" />">ValueStack Debug as XML</a>
+    <a id="showXmlButton" href="<ww:property value="xml" />">ValueStack Debug as XML</a>
     <p/>
 
 	<h1>Debug Tag Usage</h1>

webapps/showcase/src/webapp/tags/ui/example.jsp

     		name="picture" />
     		
     <ww:optiontransferselect
-    		tooltip="Select Your Favourite Cartoon Characters"
+            id="favCartoonCharacters"
+            tooltip="Select Your Favourite Cartoon Characters"
     		label="Favourite Cartoons Characters"
 			name="leftSideCartoonCharacters" 
 			leftTitle="Left Title"
 			doubleMultiple="true" />
     
     <ww:richtexteditor
-    		width="700"
-    		label="Your Thougths"
+            id="thoughts"
+            width="700"
+    		label="Your Thoughts"
      		name="thoughts" 
      		tooltip="Enter your thoughts here" />
      		
-    <ww:submit onclick="alert('aaaa');" />
-    <ww:reset onclick="alert('bbbb');" />
+    <ww:submit onclick="alert('You are submiting this form.');" />
+    <ww:reset onclick="alert('You are resetting this form');" />
 </ww:form>
     
 </body>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.