Commit c6761999 authored by Gabriel Monnerat's avatar Gabriel Monnerat

Add new test and refactor script to remove user created by tests

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44370 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2b935c71
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title tal:content="template/getId"/>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3" tal:content="template/getId"/></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/init" />\n
<tr>\n
<td>openAndWait</td>\n
<td>${ung_url}/WebSite_logout</td>\n
<td></td>\n
</tr>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/create-user" />\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_name"]</td>\n
<td>ung_user</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_password"]</td>\n
<td>1234</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@type="submit"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${ung_url}/ERP5Site_createNewWebDocument?template=web_page_template</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//a[@name="document_title"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//p[@id="more_properties"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@id="reference"]</td>\n
<td>web.Page.UNG.Test</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@id="version"]</td>\n
<td>002</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//div[@class="ui-dialog-buttonset"]/button[1]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//a[@id="share_document"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//a[@name="document_state"]</td>\n
<td>Shared</td>\n
</tr>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities"/>\n
<tr>\n
<td>openAndWait</td>\n
<td>${ung_url}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//table[@class="your_listbox-table-domain-tree"]/tbody/tr[9]/td/a</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextNotPresent</td>\n
<td>No Result</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//a[@class="tree-open"]</td>\n
<td>Shared by me</td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${ung_url}/WebSite_logout</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//td[@id="new-account-form"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="firstname"]</td>\n
<td>Another</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="lastname"]</td>\n
<td>User</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="email"]</td>\n
<td>example2@example.com</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="login_name"]</td>\n
<td>ung_user2</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="password"]</td>\n
<td>1234</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="confirm"]</td>\n
<td>1234</td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//input[@value="Create Account"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>waitForPageToLoad</td>\n
<td>30000</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_name"]</td>\n
<td>ung_user2</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="__ac_password"]</td>\n
<td>1234</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@type="submit"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${ung_url}/?key=web.Page.UNG.Test</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//a[@name="document_title"]</td>\n
<td>Web Page</td>\n
</tr>\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testShareDocumentInUNGDocs</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -124,7 +124,7 @@
<td>verifyText</td>\n
<td>//div[@class=" navigation-right"]/fieldset/div/div/a[2]</td>\n
<td>ung_user</td>\n
</tr> \n
</tr>\n
</tbody>\n
</table>\n
</body>\n
......
......@@ -60,10 +60,12 @@ for pad in pad_list:\n
pad_object = context.restrictedTraverse(pad.getPath())\n
portal.knowledge_pad_module.deleteContent(pad_object.getId())\n
\n
person = portal.portal_catalog.getResultValue(portal_type="Person", reference="ung_user")\n
person_list = portal.portal_catalog(portal_type="Person",\n
reference=["ung_user", "ung_user2"])\n
\n
if person:\n
portal.person_module.deleteContent(person.getId())\n
for person in person_list:\n
person_object = context.restrictedTraverse(person.getPath())\n
portal.person_module.deleteContent(person_object.getId())\n
\n
return True\n
</string> </value>
......
17
\ No newline at end of file
18
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment