Author: husted
Date: Fri Dec  2 18:48:33 2005
New Revision: 351877

URL: http://svn.apache.org/viewcvs?rev=351877&view=rev
Log:
* WebTests - Add "Maintain" test case and "Add" test. 

Added:
    struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/profile-open.xml
Modified:
    struts/apps/trunk/mailreader/src/webapp/Registration.jsp
    struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.properties.sample
    struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.xml
    struts/apps/trunk/mailreader/src/webapp/subscription.jsp

Modified: struts/apps/trunk/mailreader/src/webapp/Registration.jsp
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/Registration.jsp?rev=351877&r1=351876&r2=351877&view=diff
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/Registration.jsp (original)
+++ struts/apps/trunk/mailreader/src/webapp/Registration.jsp Fri Dec  2 
18:48:33 2005
@@ -21,7 +21,6 @@
 <html:base/>
 </head>
 <body bgcolor="white">
-<p>x</p>
 
 <html:errors/>
 

Added: struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/profile-open.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/profile-open.xml?rev=351877&view=auto
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/profile-open.xml 
(added)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/entities/profile-open.xml 
Fri Dec  2 18:48:33 2005
@@ -0,0 +1,6 @@
+<clickLink
+        description="Click Edit Profile"
+        label="${mainMenu.registration}" />
+<verifyTitle
+    description="Edit registration title"
+    text="${registration.title.edit}" />

Modified: 
struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.properties.sample
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.properties.sample?rev=351877&r1=351876&r2=351877&view=diff
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.properties.sample 
(original)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.properties.sample 
Fri Dec  2 18:48:33 2005
@@ -12,4 +12,6 @@
 host = localhost
 port = 8080
 basepath = struts-mailreader
-resource.home = 
../../java/org/apache/struts/apps/mailreader/resources/ApplicationResources.properties
\ No newline at end of file
+mailreader.home = ../../../
+resource.home = 
${mailreader.home}/src/java/org/apache/struts/apps/mailreader/resources/ApplicationResources.properties
+webapps.home = /Program Files/Apache Software Foundation/Tomcat 5.5/webapps/

Modified: struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.xml
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.xml?rev=351877&r1=351876&r2=351877&view=diff
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.xml (original)
+++ struts/apps/trunk/mailreader/src/webapp/WEB-INF/webtest.xml Fri Dec  2 
18:48:33 2005
@@ -3,9 +3,11 @@
         <!ENTITY taskdef-webtest SYSTEM "entities/taskdef.xml">
         <!ENTITY config SYSTEM "entities/config-debug.xml">
         <!ENTITY logon-fail SYSTEM "file:./entities/logon-fail.xml">
+        <!ENTITY logon-hermes SYSTEM "file:./entities/logon-hermes.xml">
         <!ENTITY logon-open SYSTEM "file:./entities/logon-open.xml">
         <!ENTITY logon-page SYSTEM "file:./entities/logon-page.xml">
         <!ENTITY menu-page SYSTEM "file:./entities/menu-page.xml">
+        <!ENTITY profile-open SYSTEM "file:./entities/profile-open.xml">
         <!ENTITY register-hermes SYSTEM "file:./entities/register-hermes.xml">
         <!ENTITY register-open SYSTEM "file:./entities/register-open.xml">
         <!ENTITY register-page SYSTEM "file:./entities/register-page.xml">
@@ -66,18 +68,20 @@
      or use the "clean-database" target to overwrite the file.
      Only use "clean-database" when the server  is stopped,
      and then start it again before running other targets.
-     
+
      The tests are based on a set of MailReader Use Cases maintained at the
      Struts University site
      
[http://opensource2.atlassian.com/confluence/oss/display/STRUTS/MailReader].
-     
+
      @version $Revision: 1.2 $ $Date$
      */
     -->
     
     <!-- Load local preferences, if any -->
     <property file="webtest.properties"/>
-  
+
+    <!-- These properties can be customized using via webtest.properties -->
+    <!-- See webtest.properties.sample for a starter file -->
     <property name="webtest.home"
         location="/opt/Canoo/webtest-1.7" />
 
@@ -90,8 +94,11 @@
     <property name="basepath"
         value="struts-mailreader" />
 
+    <property name="mailreader.home"
+        location="../../../" />
+
     <property name="resource.home"
-        
location="../../java/org/apache/struts/apps/mailreader/resources/ApplicationResources.properties"
 />
+        
location="${mailreader.home}/src/java/org/apache/struts/apps/mailreader/resources/ApplicationResources.properties"
 />
 
     <property name="webapps.home"
         location="/Program Files/Apache Software Foundation/Tomcat 
5.5/webapps/" />
@@ -111,7 +118,9 @@
     <target name="clean" depends="Browse,Register,Logon" />
 
     <target name="clean-database" description="Sets database.xml to default. 
Stop server, run target, and Start server.">
-         <copy file="database.xml" 
tofile="${webapps.home}/${basepath}/WEB-INF/database.xml"/>
+         <copy file="${mailreader.home}/src/webapp/WEB-INF/database.xml"
+               tofile="${webapps.home}/${basepath}/WEB-INF/database.xml"
+               overwrite="true" />
     </target>
 
     <target name="Browse"
@@ -193,19 +202,7 @@
         <webtest name="Open logon action">
         &config;
            <steps>
-               &logon-open;
-               <setInputField
-                 description="Registered username"
-                 name="username"
-                 value="hermes" />
-              <setInputField
-                description="Correct password"
-                name="password"
-                value="m3dus4" />
-               <clickButton
-                   description="Submit"
-                   name="Submit"/>
-               &menu-page;
+               &logon-hermes;
             </steps>
         </webtest>
 
@@ -241,6 +238,44 @@
             </steps>
         </webtest>
 
+    </target>
+
+    <target name="Maintain"
+            description="Subscribers can maintain a set of email subscriptions 
for an account.">
+        <webtest name="Add subscription">
+            &config;
+            <steps>
+                &logon-hermes;
+                &profile-open;
+                <clickLink
+                    description="Click Add"
+                    label="${registration.addSubscription}" />
+                <verifyTitle
+                    description="Add Subscription title"
+                    text="${subscription.title.create}" />
+                <setInputField
+                    description="Mail Server"
+                    name="host"
+                    value="mail.agoraware.com" />
+                <setInputField
+                    description="Mail Username"
+                    name="username"
+                    value="hermes" />
+                <setInputField
+                    description="Mail Password"
+                    name="password"
+                    value="Ar14Dn3" />
+                <setSelectField
+                    description="Server Type"
+                    name="type"
+                    value="imap" />
+                <setCheckbox
+                    description="Auto connect"
+                    name="autoConnect"
+                    checked="true" />
+                &save-click;
+            </steps>
+        </webtest>
     </target>
 
 </project>

Modified: struts/apps/trunk/mailreader/src/webapp/subscription.jsp
URL: 
http://svn.apache.org/viewcvs/struts/apps/trunk/mailreader/src/webapp/subscription.jsp?rev=351877&r1=351876&r2=351877&view=diff
==============================================================================
--- struts/apps/trunk/mailreader/src/webapp/subscription.jsp (original)
+++ struts/apps/trunk/mailreader/src/webapp/subscription.jsp Fri Dec  2 
18:48:33 2005
@@ -97,19 +97,19 @@
     <td align="right">
       <logic:equal name="SubscriptionForm" property="action"
                   scope="request" value="Create">
-        <html:submit>
+       <html:submit property="DO_SUBMIT">
           <bean:message key="button.save"/>
         </html:submit>
       </logic:equal>
       <logic:equal name="SubscriptionForm" property="action"
                   scope="request" value="Delete">
-        <html:submit>
+       <html:submit property="DO_SUBMIT">
           <bean:message key="button.confirm"/>
         </html:submit>
       </logic:equal>
       <logic:equal name="SubscriptionForm" property="action"
                   scope="request" value="Edit">
-        <html:submit>
+        <html:submit property="DO_SUBMIT">
           <bean:message key="button.save"/>
         </html:submit>
       </logic:equal>
@@ -117,7 +117,7 @@
     <td align="left">
       <logic:notEqual name="SubscriptionForm" property="action"
                      scope="request" value="Delete">
-        <html:reset>
+        <html:reset property="DO_RESET">
           <bean:message key="button.reset"/>
         </html:reset>
       </logic:notEqual>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to