svn commit: r588647 - in /lenya/trunk: ./ src/modules-core/acusecases/test/canoo/ src/modules-core/administration/test/canoo/ src/modules-core/sitemanagement/test/canoo/ src/modules-core/workflow/test/canoo/ src/modules/development/test/canoo/ src/modu...

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: rfrovarp
Date: Fri Oct 26 06:57:39 2007
New Revision: 588647

URL: http://svn.apache.org/viewvc?rev=588647&view=rev
Log:
Rework webtests from bug 43134. Thanks to Markus Angst for the patch.

Modified:
    lenya/trunk/build.properties
    lenya/trunk/src/modules-core/acusecases/test/canoo/test.xml
    lenya/trunk/src/modules-core/administration/test/canoo/test.xml
    lenya/trunk/src/modules-core/sitemanagement/test/canoo/test.xml
    lenya/trunk/src/modules-core/workflow/test/canoo/test.xml
    lenya/trunk/src/modules/development/test/canoo/test.xml
    lenya/trunk/src/modules/export/usecases/importExampleContent.jx
    lenya/trunk/src/modules/notification/test/canoo/test.xml
    lenya/trunk/src/modules/sitetree/test/canoo/test.xml

Modified: lenya/trunk/build.properties
URL: http://svn.apache.org/viewvc/lenya/trunk/build.properties?rev=588647&r1=588646&r2=588647&view=diff
==============================================================================
--- lenya/trunk/build.properties (original)
+++ lenya/trunk/build.properties Fri Oct 26 06:57:39 2007
@@ -134,11 +134,22 @@
 
 
 #------------------------------------------------------------------------------------
-# Anteater and Canoo Webtest home directories
+# Anteater home directory
 
 #anteater.home=/usr/local/anteater
+
+
+#------------------------------------------------------------------------------------
+# Canoo Webtest configuration
+
+# Webtest home directory
 #webtest.home=/usr/local/canoo-webtest-2.1
 
+# Webtest configuration parameters
+webtest.config.host=localhost
+webtest.config.port=8888
+webtest.config.basepath=default/authoring
+
 
 #------------------------------------------------------------------------------------
 # Eclipse Properties for use with the eclipse-project target
@@ -146,11 +157,14 @@
 ide.eclipse.outputdir=build/eclipse/classes
 ide.eclipse.export.libs=false
 
+
 #------------------------------------------------------------------------------------
 # The Java version.
+
 # Change to 1.5 if you need the features of 1.5.
 src.java.version=1.4
 
+
 #------------------------------------------------------------------------------------
 # Xopus context name
 
@@ -160,6 +174,7 @@
 
 #------------------------------------------------------------------------------------
 # JCR repository factory
+
 repository.factory=org.apache.lenya.cms.jcr.jackrabbit.JackrabbitRepositoryFactory
 # NOTE: JeceiraRepositoryFactory has not been implemented yet
 #repository.factory=org.apache.lenya.cms.jcr.jeceira.JeceiraRepositoryFactory

Modified: lenya/trunk/src/modules-core/acusecases/test/canoo/test.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/acusecases/test/canoo/test.xml?rev=588647&r1=588646&r2=588647&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/acusecases/test/canoo/test.xml (original)
+++ lenya/trunk/src/modules-core/acusecases/test/canoo/test.xml Fri Oct 26 06:57:39 2007
@@ -16,17 +16,15 @@
   limitations under the License.
 -->
 
+<!DOCTYPE project SYSTEM "../../../../modules/development/test/canoo/lenya_webtest.dtd">
+
 <project name="AC usecases test" basedir="." default="main">
   
-  <import file="${webtest.home}/lib/taskdef.xml"/>
+  <import file="../../../../modules/development/test/canoo/macros.xml"/>
   
   <target name="main">
-    <webtest name="myTest">
-      <config
-        host="localhost"
-        port="8888"
-        protocol="http"
-        basepath="default/authoring" />
+    <webtest name="acusecases">
+      &doConfig;
       <steps>
         <!-- login page -->
         <invoke url="index.html" />
@@ -59,4 +57,4 @@
       </steps>
     </webtest>
   </target>
-</project>
\ No newline at end of file
+</project>

Modified: lenya/trunk/src/modules-core/administration/test/canoo/test.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/administration/test/canoo/test.xml?rev=588647&r1=588646&r2=588647&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/administration/test/canoo/test.xml (original)
+++ lenya/trunk/src/modules-core/administration/test/canoo/test.xml Fri Oct 26 06:57:39 2007
@@ -16,25 +16,19 @@
   limitations under the License.
 -->
 
-<project name="Administration test" basedir="." default="main">
-  
-  <import file="${webtest.home}/lib/taskdef.xml"/>
+<!DOCTYPE project SYSTEM "../../../../modules/development/test/canoo/lenya_webtest.dtd">
+
+<project name="administration" basedir="." default="main">
   
-  <target name="main" depends="users"/>
-    
-    
-  <target name="users">
-    <webtest name="myTest">
-      <config host="localhost" port="8888" protocol="http" basepath="default/authoring">
-        <header name="Accept-Language" value="en"/>
-      </config>
+  <import file="../../../../modules/development/test/canoo/macros.xml"/>
+
+  <target name="main" depends="admin.users, groupaffiliation"/>
+
+  <target name="admin.users">
+    <webtest name="admin.users">
+      &doConfig;
       <steps>
-        <!-- login page -->
-        <invoke url="index.html"/>
-        <verifyTitle text="Login to the Default Publication" />
-        <setInputField name="username" value="lenya"/>
-        <setInputField name="password" value="levi"/>
-        <clickButton name="submit"/>
+        <doLogin username="lenya" password="levi"/>
         
         <!-- add user -->
         <invoke url="index.html?lenya.usecase=admin.users"/>
@@ -45,7 +39,7 @@
         <setInputField name="fullName" value="WebTest User"/>
         <setInputField name="description" value="WebTest User description"/>
         <setInputField name="email" value="[email protected]"/>
-        <setInputField name="password" value="webTest123"/>
+        <setInputField name="newPassword" value="webTest123"/>
         <setInputField name="confirmPassword" value="webTest123"/>
         <clickButton name="submit"/>
 
@@ -66,10 +60,81 @@
           <verifyXPath xpath="//a[normalize-space(.) = 'webTestUser']"/>
         </not>
         
-        <!-- logout -->
-        <invoke url="index.html?lenya.usecase=ac.logout"/>
+        <doLogout/>
+      </steps>
+    </webtest>
+  </target>
+
+  <macrodef name="checkGroup"
+           description="check if item 'group' is in listbox 'list-in' and not in 'list-not'">
+    <attribute name="group"/>
+    <attribute name="list-in"/>
+    <attribute name="list-not"/>
+    <sequential>
+      <verifyXPath xpath="//select[@name = '@{list-in}']/option[@value = '@{group}']"/>
+      <not>
+        <verifyXPath xpath="//select[@name = '@{list-not}']/option[@value = '@{group}']"/>
+      </not>
+    </sequential>
+  </macrodef>
+  <macrodef name="checkUserProfile"
+            description="check if user profile looks right">
+    <attribute name="admin"/>
+    <sequential>
+      <verifyText text="User Profile"/>
+      <verifyText text="[email protected]"/>
+      <ifStep test="@{admin}" description="admin affiliation">
+        <verifyText text="groupId=admin"/>
+      </ifStep>
+      <ifStep unless="@{admin}" description="no admin affiliation">
+        <not><verifyText text="groupId=admin"/></not>
+      </ifStep>
+    </sequential>
+  </macrodef>
+
+  <target name="groupaffiliation">
+    <webtest name="groupaffiliation">
+      &doConfig;
+      <steps>
+        <doLogin username="lenya" password="levi"/>
+
+        <!-- request user profile of user alice -->
+        <invoke url="index.html?lenya.usecase=admin.user&amp;userId=alice"/>
+       <checkUserProfile admin="false"/>
+
+        <!-- request group affiliation page -->
+        <clickButton name="input-edit_group_affiliation"/>
+        <verifyElementText type="h1" text="Group Affiliation"/>
+       <checkGroup group="admin" list-in="otherGroup" list-not="userGroup"/>
+
+        <!-- add user alice to group admin -->
+       <clickElement xpath="//select[@name = 'otherGroup']/option[@value = 'admin']"/>
+       <clickButton name="add"/>
+       <verifyElementText type="h1" text="Group Affiliation"/>
+        <checkGroup group="admin" list-in="userGroup" list-not="otherGroup"/>
+
+       <!-- save and back to user profile -->
+       <clickButton name="submit"/>
+        <checkUserProfile admin="true"/>
+
+       <!-- request group affiliation page -->
+        <clickButton name="input-edit_group_affiliation"/>
+        <verifyElementText type="h1" text="Group Affiliation"/>
+        <checkGroup group="admin" list-in="userGroup" list-not="otherGroup"/>
+
+       <!-- remove user alice from group admin -->
+       <clickElement xpath="//select[@name = 'userGroup']/option[@value = 'admin']"/>
+        <clickButton name="remove"/>
+        <verifyElementText type="h1" text="Group Affiliation"/>
+        <checkGroup group="admin" list-in="otherGroup" list-not="userGroup"/>
+
+        <!-- save and back to user profile -->
         <clickButton name="submit"/>
+        <checkUserProfile admin="false"/>
+
+        <doLogout/>
       </steps>
     </webtest>
   </target>
-</project>
\ No newline at end of file
+
+</project>

Modified: lenya/trunk/src/modules-core/sitemanagement/test/canoo/test.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/sitemanagement/test/canoo/test.xml?rev=588647&r1=588646&r2=588647&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/sitemanagement/test/canoo/test.xml (original)
+++ lenya/trunk/src/modules-core/sitemanagement/test/canoo/test.xml Fri Oct 26 06:57:39 2007
@@ -6,9 +6,9 @@
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
-  
+
   http://www.apache.org/licenses/LICENSE-2.0
-  
+
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,34 +16,27 @@
   limitations under the License.
 -->
 
-<project name="Site management test" basedir="." default="main">
-  
-  <import file="${webtest.home}/lib/taskdef.xml"/>
-  
-  <target name="main" depends="delete"/>
-  
-    
-  <target name="delete">
+<!DOCTYPE project SYSTEM "../../../../modules/development/test/canoo/lenya_webtest.dtd">
+
+<project name="sitemanagement" basedir="." default="main">
+
+  <import file="../../../../modules/development/test/canoo/macros.xml"/>
+
+  <target name="main">
+    <antcall target="sitemanagement.delete">
+      <param name="webtest.config.basepath" value="default"/>
+    </antcall>
+  </target>
 
+  <target name="sitemanagement.delete">
     <property name="number" value="1"/>
-    
-    <webtest name="Delete">
-      <config host="localhost" port="8888" protocol="http" basepath="default">
-        <header name="Accept-Language" value="en"/>
-        <option name="JavaScriptEnabled" value="false"/>
-      </config>
+    <webtest name="sitemanagement.delete">
+      &doConfig;
       <steps>
-        <!-- login as lenya -->
-        <invoke url="authoring/index.html" />
-        <setInputField name="username" value="lenya"/>
-        <setInputField name="password" value="levi"/>
-        <clickButton name="submit"/>
-        <verifyElementText type="span" name="workflow-state" text="authoring"/>
-
+        <doLogin username="lenya" password="levi" url="authoring/index.html"/>
         <repeat count="${number}">
-          
           <echo>Delete/Restore/Archive/Restore: Test #{count} of ${number}</echo>
-          
+
           <!-- delete -->
           <invoke url="authoring/tutorial.html?lenya.usecase=sitemanagement.delete"/>
           <verifyElementText type="h1" text="Delete Document"/>
@@ -52,7 +45,7 @@
           <verifyText text="No overview available."/>
           <invoke url="trash/tutorial.html?lenya.usecase=tab.overview"/>
           <verifyElementText type="span" name="workflow-state" text="trash"/>
-          
+
           <!-- restore -->
           <invoke url="trash/tutorial.html?lenya.usecase=sitemanagement.restore"/>
           <verifyElementText type="h1" text="Restore Document"/>
@@ -60,7 +53,7 @@
           <verifyElementText type="h1" text="Overview"/>
           <verifyText text="A short tutorial on using Apache Lenya"/>
           <verifyElementText type="span" name="workflow-state" text="authoring"/>
-        
+
           <!-- archive -->
           <invoke url="authoring/tutorial.html?lenya.usecase=sitemanagement.archive"/>
           <verifyElementText type="h1" text="Archive Document"/>
@@ -69,7 +62,7 @@
           <verifyText text="No overview available."/>
           <invoke url="archive/tutorial.html?lenya.usecase=tab.overview"/>
           <verifyElementText type="span" name="workflow-state" text="archive"/>
-          
+
           <!-- restore -->
           <invoke url="archive/tutorial.html?lenya.usecase=sitemanagement.restore"/>
           <verifyElementText type="h1" text="Restore Document"/>
@@ -77,15 +70,10 @@
           <verifyElementText type="h1" text="Overview"/>
           <verifyText text="A short tutorial on using Apache Lenya"/>
           <verifyElementText type="span" name="workflow-state" text="authoring"/>
-          
+
         </repeat>
-        
-        <!-- logout -->
-        <invoke url="index.html?lenya.usecase=ac.logout"/>
-        <clickButton name="submit"/>
-        
+        <doLogout/>
       </steps>
     </webtest>
   </target>
-  
-</project>
\ No newline at end of file
+</project>

Modified: lenya/trunk/src/modules-core/workflow/test/canoo/test.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/workflow/test/canoo/test.xml?rev=588647&r1=588646&r2=588647&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/workflow/test/canoo/test.xml (original)
+++ lenya/trunk/src/modules-core/workflow/test/canoo/test.xml Fri Oct 26 06:57:39 2007
@@ -16,22 +16,21 @@
   limitations under the License.
 -->
 
-<project name="Workflow test" basedir="." default="main">
+<!DOCTYPE project SYSTEM "../../../../modules/development/test/canoo/lenya_webtest.dtd">
+
+<project name="workflow" basedir="." default="main">
   
-  <import file="${webtest.home}/lib/taskdef.xml"/>
+  <import file="../../../../modules/development/test/canoo/macros.xml"/>
   
   <target name="main" depends="sequence, published-footer, overview"/>
-  
     
   <target name="sequence">
-    <webtest name="Workflow sequence">
-      <config host="localhost" port="8888" protocol="http" basepath="default/authoring" />
+    <webtest name="workflow-sequence">
+      &doConfig;
       <steps>
+
         <!-- login as lenya -->
-        <invoke url="index.html" />
-        <setInputField name="username" value="lenya"/>
-        <setInputField name="password" value="levi"/>
-        <clickButton name="submit"/>
+        <doLogin username="lenya" password="levi"/>
         <verifyElementText type="span" name="workflow-state" text="authoring"/>
 
         <!-- publish not allowed -->
@@ -47,15 +46,10 @@
         <verifyElementText type="span" name="workflow-state" text="review"/>
         
         <!-- logout -->
-        <invoke url="index.html?lenya.usecase=ac.logout"/>
-        <clickButton name="submit"/>
-        
+        <doLogout/>
         
         <!-- login as alice -->
-        <invoke url="index.html" />
-        <setInputField name="username" value="alice"/>
-        <setInputField name="password" value="levi"/>
-        <clickButton name="submit"/>
+        <doLogin username="alice" password="levi"/>
         <verifyElementText type="span" name="workflow-state" text="review"/>
         
         <!-- reject -->
@@ -65,15 +59,11 @@
         <verifyElementText type="span" name="workflow-state" text="authoring"/>
         
         <!-- logout -->
-        <invoke url="index.html?lenya.usecase=ac.logout"/>
-        <clickButton name="submit"/>
+        <doLogout/>
         
         <!-- login as lenya -->
-        <invoke url="index.html" />
-        <setInputField name="username" value="lenya"/>
-        <setInputField name="password" value="levi"/>
-        <clickButton name="submit"/>
-        <verifyElementText type="span" name="workflow-state" text="authoring"/>
+        <doLogin username="lenya" password="levi"/>
+       <verifyElementText type="span" name="workflow-state" text="authoring"/>
         
         <!-- submit -->
         <invoke url="index.html?lenya.usecase=workflow.submit"/>
@@ -82,19 +72,13 @@
         <verifyElementText type="span" name="workflow-state" text="review"/>
         
         <!-- logout -->
-        <invoke url="index.html?lenya.usecase=ac.logout"/>
-        <clickButton name="submit"/>
-        
-        
+        <doLogout/>
+
         <!-- login as alice -->
-        <invoke url="index.html" />
-        <setInputField name="username" value="alice"/>
-        <setInputField name="password" value="levi"/>
-        <clickButton name="submit"/>
-        <verifyElementText type="span" name="workflow-state" text="review"/>
+       <doLogin username="alice" password="levi"/>
+       <verifyElementText type="span" name="workflow-state" text="review"/>
         
         <!-- publish -->
-        
         <invoke url="index.html?lenya.usecase=workflow.publish"/>
         <clickButton name="submit"/>
         <verifyElementText type="span" name="workflow-state" text="live"/>
@@ -105,25 +89,23 @@
         <verifyElementText type="span" name="workflow-state" text="authoring"/>
         
         <!-- logout -->
-        <invoke url="index.html?lenya.usecase=ac.logout"/>
-        <clickButton name="submit"/>
+        <doLogout/>
         
       </steps>
     </webtest>
   </target>
-  
-  
+
+
   <target name="published-footer">
     <webtest name="Workflow sequence">
-      <config host="localhost" port="8888" protocol="http" basepath="default">
+      <config host="${webtest.config.host}" port="${webtest.config.port}"
+             protocol="http" basepath="default">
         <option name="ThrowExceptionOnFailingStatusCode" value="false"/>
       </config>
       <steps>
+
         <!-- login as alice -->
-        <invoke url="authoring/tutorial.html" />
-        <setInputField name="username" value="alice"/>
-        <setInputField name="password" value="levi"/>
-        <clickButton name="submit"/>
+       <doLogin username="alice" password="levi" url="authoring/tutorial.html"/>
         <verifyElementText type="span" name="workflow-state" text="authoring"/>
         
         <!-- submit -->
@@ -149,31 +131,31 @@
         <verifyText text="This page was last published at"/>
         
         <!-- logout -->
-        <invoke url="authoring/tutorial.html?lenya.usecase=ac.logout"/>
-        <clickButton name="submit"/>
+        <doLogout url="authoring/tutorial.html"/>
         
       </steps>
     </webtest>
   </target>
-  
-  
+
+
   <target name="overview">
-    <webtest name="myTest">
-      <config host="localhost" port="8888" protocol="http" basepath="default/authoring">
-        <header name="Accept-Language" value="en"/>
-      </config>
+    <webtest name="workflow.multiWorkflow">
+      &doConfig;
       <steps>
+
         <!-- login as lenya -->
-        <invoke url="index.html" />
-        <setInputField name="username" value="lenya"/>
-        <setInputField name="password" value="levi"/>
-        <clickButton name="submit"/>
+        <doLogin username="lenya" password="levi"/>
         <verifyElementText type="span" name="workflow-state" text="authoring"/>
-        
+
+       <!-- request workflow overview -->
         <invoke url="index.html?lenya.usecase=workflow.multiWorkflow"/>
         <verifyElementText type="h1" text="Workflow Overview"/>
+
+       <!-- logout -->
+        <doLogout/>
+
       </steps>
     </webtest>
   </target>
   
-</project>
\ No newline at end of file
+</project>

Modified: lenya/trunk/src/modules/development/test/canoo/test.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/development/test/canoo/test.xml?rev=588647&r1=588646&r2=588647&view=diff
==============================================================================
--- lenya/trunk/src/modules/development/test/canoo/test.xml (original)
+++ lenya/trunk/src/modules/development/test/canoo/test.xml Fri Oct 26 06:57:39 2007
@@ -6,9 +6,9 @@
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
-  
+
   http://www.apache.org/licenses/LICENSE-2.0
-  
+
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,27 +16,19 @@
   limitations under the License.
 -->
 
-<project name="Stress test" basedir="." default="main">
-  
-  <import file="${webtest.home}/lib/taskdef.xml"/>
-  
+<!DOCTYPE project SYSTEM "../../../../modules/development/test/canoo/lenya_webtest.dtd">
+
+<project name="stresstest" basedir="." default="main">
+
+  <import file="../../../../modules/development/test/canoo/macros.xml"/>
+
   <target name="main">
-    
     <property name="number" value="1"/>
-    
-    <webtest name="Stress test">
-      <config host="localhost" port="8888" protocol="http" basepath="default/authoring">
-        <header name="Accept-Language" value="en"/>
-        <option name="JavaScriptEnabled" value="false"/>
-      </config>
+    <webtest name="stresstest">
+      &doConfig;
       <steps>
-        <!-- login page -->
-        <invoke url="index.html" />
-        <verifyTitle text="Login to the Default Publication" />
-        <setInputField name="username" value="lenya"/>
-        <setInputField name="password" value="levi"/>
-        <clickButton name="submit"/>
-        
+        <doLogin username="lenya" password="levi"/>
+
         <!-- create -->
         <repeat count="${number}">
           <echo>Creating document #{count} of ${number}</echo>
@@ -48,20 +40,18 @@
           <clickButton name="submit"/>
           <verifyText text="Welcome"/>
         </repeat>
-        
+
         <!-- delete -->
         <repeat count="${number}">
           <echo>Deleting document #{count} of ${number}</echo>
           <invoke url="index/stresstest#{count}.html?lenya.usecase=sitemanagement.delete"/>
           <verifyElementText type="h1" text="Delete Document"/>
           <clickButton name="submit"/>
-          <verifyText text="Welcome"/>
+          <verifyElementText type="h1" text="Overview"/>
         </repeat>
-        
-        <!-- logout -->
-        <invoke url="index.html?lenya.usecase=ac.logout"/>
-        <clickButton name="submit"/>
+
+        <doLogout/>
       </steps>
     </webtest>
   </target>
-</project>
\ No newline at end of file
+</project>

Modified: lenya/trunk/src/modules/export/usecases/importExampleContent.jx
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/export/usecases/importExampleContent.jx?rev=588647&r1=588646&r2=588647&view=diff
==============================================================================
--- lenya/trunk/src/modules/export/usecases/importExampleContent.jx (original)
+++ lenya/trunk/src/modules/export/usecases/importExampleContent.jx Fri Oct 26 06:57:39 2007
@@ -6,16 +6,18 @@
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
-  
+
   http://www.apache.org/licenses/LICENSE-2.0
-  
+
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+
 <!-- $Id: forms.jx 416646 2006-06-23 09:02:03Z andreas $ -->
+
 <page:page
   xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
   xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
@@ -23,16 +25,16 @@
   xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
   xmlns:ci="http://apache.org/cocoon/include/1.0"
   >
-  
+
   <page:title><i18n:text>getting-started</i18n:text></page:title>
   <page:body>
-    
+
     <jx:import uri="fallback://lenya/modules/usecase/templates/messages.jx"/>
-    
+
     <jx:choose>
       <jx:when test="${! usecase.hasErrors()}">
         <p><i18n:text>thanks</i18n:text></p>
-        <form method="post">
+        <form name="import" method="post">
           <p>
             <input type="hidden" name="lenya.continuation" value="${continuation.id}"/>
             <input type="hidden" name="lenya.usecase" value="${usecase.getName()}"/>
@@ -40,7 +42,7 @@
             <i18n:text>may-take-a-while</i18n:text>
           </p>
         </form>
-        <form method="get">
+        <form name="create" method="get">
           <p>
             <input type="hidden" name="lenya.usecase" value="sitemanagement.create"/>
             <input type="hidden" name="path" value="/index"/>
@@ -58,6 +60,6 @@
         </p>
       </jx:otherwise>
     </jx:choose>
-    
+
   </page:body>
-</page:page>
\ No newline at end of file
+</page:page>

Modified: lenya/trunk/src/modules/notification/test/canoo/test.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/notification/test/canoo/test.xml?rev=588647&r1=588646&r2=588647&view=diff
==============================================================================
--- lenya/trunk/src/modules/notification/test/canoo/test.xml (original)
+++ lenya/trunk/src/modules/notification/test/canoo/test.xml Fri Oct 26 06:57:39 2007
@@ -16,22 +16,17 @@
   limitations under the License.
 -->
 
+<!DOCTYPE project SYSTEM "../../../../modules/development/test/canoo/lenya_webtest.dtd">
+
 <project name="Notification test" basedir="." default="main">
   
-  <import file="${webtest.home}/lib/taskdef.xml"/>
+  <import file="../../../../modules/development/test/canoo/macros.xml"/>
   
   <target name="main">
-    <webtest name="myTest">
-      <config host="localhost" port="8888" protocol="http" basepath="default/authoring">
-        <header name="Accept-Language" value="en"/>
-      </config>
+    <webtest name="notification">
+      &doConfig;
       <steps>
-        <!-- login page -->
-        <invoke url="index.html" />
-        <verifyTitle text="Login to the Default Publication" />
-        <setInputField name="username" value="lenya"/>
-        <setInputField name="password" value="levi"/>
-        <clickButton name="submit"/>
+        <doLogin username="lenya" password="levi"/>
         
         <!-- inbox usecase -->
         <invoke url="index.html?lenya.usecase=notification.inbox"/>
@@ -44,7 +39,6 @@
         <setInputField name="subject" value="NotificationTestSubject"/>
         <setInputField name="body" value="NotificationTestBody"/>
         <clickButton name="submit"/>
-        
         <verifyElementText type="h1" text="Inbox of User lenya"/>
         <verifyText text="NotificationTestSubject"/>
         
@@ -59,11 +53,9 @@
         <not>
           <verifyText text="NotificationTestSubject"/>
         </not>
-        
-        <!-- logout -->
-        <invoke url="index.html?lenya.usecase=ac.logout"/>
-        <clickButton name="submit"/>
+
+       <doLogout/>
       </steps>
     </webtest>
   </target>
-</project>
\ No newline at end of file
+</project>

Modified: lenya/trunk/src/modules/sitetree/test/canoo/test.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sitetree/test/canoo/test.xml?rev=588647&r1=588646&r2=588647&view=diff
==============================================================================
--- lenya/trunk/src/modules/sitetree/test/canoo/test.xml (original)
+++ lenya/trunk/src/modules/sitetree/test/canoo/test.xml Fri Oct 26 06:57:39 2007
@@ -16,25 +16,17 @@
   limitations under the License.
 -->
 
-<project name="Administration test" basedir="." default="main">
-  
-  <import file="${webtest.home}/lib/taskdef.xml"/>
+<!DOCTYPE project SYSTEM "../../../../modules/development/test/canoo/lenya_webtest.dtd">
+
+<project name="sitetree" basedir="." default="main">
   
-  <target name="main" depends="nudge"/>
+  <import file="../../../../modules/development/test/canoo/macros.xml"/>
     
-    
-  <target name="nudge">
-    <webtest name="NudgeTest">
-      <config host="localhost" port="8888" protocol="http" basepath="default/authoring">
-        <header name="Accept-Language" value="en"/>
-      </config>
+  <target name="main">
+    <webtest name="sitetree.nudge">
+      &doConfig;
       <steps>
-        <!-- login page -->
-        <invoke url="index.html"/>
-        <verifyTitle text="Login to the Default Publication" />
-        <setInputField name="username" value="lenya"/>
-        <setInputField name="password" value="levi"/>
-        <clickButton name="submit"/>
+        <doLogin username="lenya" password="levi"/>
         
         <verifyXPath xpath="//div[@class = 'menublock-1' and ./div/a[@href='/default/authoring/links.html'] and following-sibling::div[@class='menublock-1' and ./div/a[@href='/default/authoring/features.html']]]"/>
         
@@ -46,10 +38,8 @@
         <invoke url="index.html"/>
         <verifyXPath xpath="//div[@class = 'menublock-1' and ./div/a[@href='/default/authoring/links.html'] and following-sibling::div[@class='menublock-1' and ./div/a[@href='/default/authoring/features.html']]]"/>
         
-        <!-- logout -->
-        <invoke url="index.html?lenya.usecase=ac.logout"/>
-        <clickButton name="submit"/>
+        <doLogout/>
       </steps>
     </webtest>
   </target>
-</project>
\ No newline at end of file
+</project>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.