You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/02/09 21:14:26 UTC

svn commit: r505477 - in /lenya/trunk/src/modules-core/administration/test: ./ canoo/ canoo/test.xml

Author: andreas
Date: Fri Feb  9 12:14:25 2007
New Revision: 505477

URL: http://svn.apache.org/viewvc?view=rev&rev=505477
Log:
Added 'add user' web test

Added:
    lenya/trunk/src/modules-core/administration/test/
    lenya/trunk/src/modules-core/administration/test/canoo/
    lenya/trunk/src/modules-core/administration/test/canoo/test.xml

Added: 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?view=auto&rev=505477
==============================================================================
--- lenya/trunk/src/modules-core/administration/test/canoo/test.xml (added)
+++ lenya/trunk/src/modules-core/administration/test/canoo/test.xml Fri Feb  9 12:14:25 2007
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  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.
+-->
+
+<project name="Administration test" basedir="." default="main">
+  
+  <import file="${webtest.home}/lib/taskdef.xml"/>
+  
+  <target name="main" depends="users"/>
+    
+    
+  <target name="users">
+    <echo>Using WebTest home: ${webtest.home}</echo>
+    <webtest name="myTest">
+      <config host="localhost" port="8888" protocol="http" basepath="default/authoring">
+        <header name="Accept-Language" value="en"/>
+      </config>
+      <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"/>
+        
+        <!-- add user -->
+        <invoke url="index.html?lenya.usecase=admin.users"/>
+        <verifyText text="Add User:"/>
+        <clickButton name="input-add_user"/>
+        <verifyElementText type="h1" text="Add Local User"/>
+        <setInputField name="userId" value="webTestUser"/>
+        <setInputField name="fullName" value="WebTest User"/>
+        <setInputField name="description" value="WebTest User description"/>
+        <setInputField name="email" value="webTestUser@apache.org"/>
+        <setInputField name="password" value="webTest123"/>
+        <setInputField name="confirmPassword" value="webTest123"/>
+        <clickButton name="submit"/>
+
+        <verifyText text="User Profile"/>
+        <verifyText text="webTestUser@apache.org"/>
+        
+        <!-- back to users list -->
+        <invoke url="index.html?lenya.usecase=admin.users"/>
+        <verifyXPath xpath="//a[normalize-space(.) = 'webTestUser']"/>
+        
+        <!-- delete user -->
+        <clickButton xpath="//form[input[@value = 'webTestUser']]/input[@type = 'submit']"/>
+        <verifyText text="Delete User"/>
+        <verifyText text="webTestUser"/>
+        <clickButton name="submit"/>
+        <verifyText text="Add User:"/>
+        <not>
+          <verifyXPath xpath="//a[normalize-space(.) = 'webTestUser']"/>
+        </not>
+        
+      </steps>
+    </webtest>
+  </target>
+</project>
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org