Commit f4741ec9 authored by Gabriel Monnerat's avatar Gabriel Monnerat

- Add test to validate the button save.

- Add test to validate the state deleted
- refactor script to add user using the interface

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45599 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 92933fee
...@@ -474,36 +474,107 @@ ...@@ -474,36 +474,107 @@
<td>//select[@name="portal_type"]</td>\n <td>//select[@name="portal_type"]</td>\n
<td>Web Page</td>\n <td>Web Page</td>\n
</tr>\n </tr>\n
<tr>\n <tr>\n
<td>type</td>\n <td>type</td>\n
<td>//input[@id="upload-file"]</td>\n <td>//input[@id="upload-file"]</td>\n
<td tal:content="python: here.Zuite_getFilenameLocation(\'tiolive-ERP5.Freedom.TioLive.Spreadsheet-001-en.ods\')"></td>\n <td tal:content="python: here.Zuite_getFilenameLocation(\'tiolive-ERP5.Freedom.TioLive.Spreadsheet-001-en.ods\')"></td>\n
</tr>\n </tr>\n
<tr>\n <tr>\n
<td>clickAndWait</td>\n <td>clickAndWait</td>\n
<td>//input[@id="submit_document"]</td>\n <td>//input[@id="submit_document"]</td>\n
<td></td>\n <td></td>\n
</tr>\n </tr>\n
<tr>\n <tr>\n
<td>waitForCondition</td>\n <td>waitForCondition</td>\n
<td>selenium.isTextPresent("Opening")</td>\n <td>selenium.isTextPresent("Opening")</td>\n
<td>30000</td>\n <td>30000</td>\n
</tr>\n </tr>\n
<tr>\n <tr>\n
<td>waitForPageToLoad</td>\n <td>waitForPageToLoad</td>\n
<td>30000</td>\n <td>30000</td>\n
<td></td>\n <td></td>\n
</tr>\n </tr>\n
<tr>\n <tr>\n
<td>waitForCondition</td>\n <td>waitForCondition</td>\n
<td>selenium.isElementPresent("//a[@name=\'document_title\']")</td>\n <td>selenium.isElementPresent("//a[@name=\'document_title\']")</td>\n
<td>30000</td>\n <td>30000</td>\n
</tr>\n </tr>\n
<tr>\n <tr>\n
<td>verifyTextPresent</td>\n <td>verifyTextPresent</td>\n
<td>TioLive Spreadsheet</td>\n <td>TioLive Spreadsheet</td>\n
<td></td>\n <td></td>\n
</tr>\n </tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//a[@class="ung_docs"]</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>type</td>\n
<td>//input[@id="name"]</td>\n
<td>Cancelled Document</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//div[@class="ui-dialog-buttonset"]/button[1]/span</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//div[@class="action_menu"]/li/ul/li[1]/a</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//a[@class="ung_docs"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//table[@class="listbox your_listbox your_listbox-table"]/tbody/tr[1]/td[1]/input</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@class="delete"]</td>\n
<td></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[11]/td/a</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//table/tbody/tr[1]/td[3]</td>\n
<td>Cancelled Document</td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//table[@class="listbox your_listbox your_listbox-table"]/tbody/tr[1]/td[1]/input</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@class="delete"]</td>\n
<td></td>\n
</tr>\n
</tbody>\n </tbody>\n
</table>\n </table>\n
</body>\n </body>\n
......
...@@ -54,17 +54,7 @@ ...@@ -54,17 +54,7 @@
\n \n
user = portal.portal_catalog.getResultValue(portal_type="Person", reference="test_user")\n user = portal.portal_catalog.getResultValue(portal_type="Person", reference="test_user")\n
\n \n
if not user:\n return user is not None\n
person = portal.person_module.newContent(portal_type="Person")\n
person.edit(first_name="UNG User",\n
password="test_user",\n
reference="test_user")\n
\n
assignment = person.newContent(portal_type=\'Assignment\')\n
assignment.setFunction("function/ung_user")\n
assignment.open()\n
\n
return True\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -81,7 +71,7 @@ return True\n ...@@ -81,7 +71,7 @@ return True\n
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>ERP5Site_createUNGUser</string> </value> <value> <string>ERP5Site_hasUNGUser</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -45,11 +45,6 @@ ...@@ -45,11 +45,6 @@
<td>${base_url}/web_site_module/ung</td>\n <td>${base_url}/web_site_module/ung</td>\n
<td>ung_url</td>\n <td>ung_url</td>\n
</tr>\n </tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/ERP5Site_createUNGUser</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>openAndWait</td>\n <td>openAndWait</td>\n
<td>${base_url}/ERP5Site_cleanUpUNGTestEnvironment</td>\n <td>${base_url}/ERP5Site_cleanUpUNGTestEnvironment</td>\n
...@@ -61,6 +56,59 @@ ...@@ -61,6 +56,59 @@
<td>${ung_url}/WebSite_logout</td>\n <td>${ung_url}/WebSite_logout</td>\n
<td></td>\n <td></td>\n
</tr>\n </tr>\n
<tal:block tal:condition="python: not here.ERP5Site_hasUNGUser()">\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>UNG</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>example@example.com</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="login_name"]</td>\n
<td>test_user</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="password"]</td>\n
<td>test_user</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>//input[@name="confirm"]</td>\n
<td>test_user</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
<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
</tal:block>\n
</tal:block>\n </tal:block>\n
<tal:block metal:define-macro="login">\n <tal:block metal:define-macro="login">\n
<tr>\n <tr>\n
......
52 53
\ No newline at end of file \ 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