From c065800254bd0e4ab8a67d212b59c287bc7b9ac6 Mon Sep 17 00:00:00 2001 From: Gabriel Monnerat <gabriel@tiolive.com> Date: Tue, 15 Mar 2011 20:51:39 +0000 Subject: [PATCH] rename file and update tests git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44323 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../ung_zuite/testGadgetInUNGDocs.xml | 5 -- .../ung_zuite/testUNGCalendar.xml | 5 ++ .../portal_tests/ung_zuite/testUNGLogin.xml | 70 +++++++++++++++++++ ...=> ERP5Site_cleanUpUNGTestEnvironment.xml} | 16 ++++- .../Zuite_CommonTemplateForUNG.xml | 5 ++ bt5/erp5_web_ung_ui_test/bt/revision | 2 +- 6 files changed, 96 insertions(+), 7 deletions(-) rename bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/{ERP5Site_cleanUpUNGKnowledgePadList.xml => ERP5Site_cleanUpUNGTestEnvironment.xml} (84%) diff --git a/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testGadgetInUNGDocs.xml b/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testGadgetInUNGDocs.xml index 2262ed9783..b673808ad5 100644 --- a/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testGadgetInUNGDocs.xml +++ b/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testGadgetInUNGDocs.xml @@ -48,11 +48,6 @@ <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>${base_url}/ERP5Site_cleanUpUNGKnowledgePadList</td>\n - <td></td>\n - </tr>\n <tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/login" />\n <tr>\n <td>verifyTextPresent</td>\n diff --git a/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGCalendar.xml b/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGCalendar.xml index 6d25b7d229..0a92bc2e71 100644 --- a/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGCalendar.xml +++ b/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGCalendar.xml @@ -104,6 +104,11 @@ <td>//a[@id="back-calendar"]</td>\n <td></td>\n </tr>\n + <tr>\n + <td>click</td>\n + <td>//span[@class="addcal"]</td>\n + <td></td>\n + </tr>\n </tbody>\n </table>\n </body>\n diff --git a/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGLogin.xml b/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGLogin.xml index 1465d18b67..a8eb8a506c 100644 --- a/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGLogin.xml +++ b/bt5/erp5_web_ung_ui_test/PathTemplateItem/portal_tests/ung_zuite/testUNGLogin.xml @@ -94,6 +94,76 @@ <td>Create an account now</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>click</td>\n + <td>//td[@id="back-login"]</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>Gabriel</td>\n + </tr>\n + <tr>\n + <td>type</td>\n + <td>//input[@name="lastname"]</td>\n + <td>Monnerat</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>ung_user</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_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 </tbody>\n </table>\n </body>\n diff --git a/bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/ERP5Site_cleanUpUNGKnowledgePadList.xml b/bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/ERP5Site_cleanUpUNGTestEnvironment.xml similarity index 84% rename from bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/ERP5Site_cleanUpUNGKnowledgePadList.xml rename to bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/ERP5Site_cleanUpUNGTestEnvironment.xml index 4bd2322ec2..fb9270deb5 100644 --- a/bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/ERP5Site_cleanUpUNGKnowledgePadList.xml +++ b/bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/ERP5Site_cleanUpUNGTestEnvironment.xml @@ -60,6 +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 +\n +context.log(person)\n +if person:\n + portal.person_module.deleteContent(person.getId())\n +\n return True\n </string> </value> </item> @@ -67,9 +73,17 @@ return True\n <key> <string>_params</string> </key> <value> <string></string> </value> </item> + <item> + <key> <string>_proxy_roles</string> </key> + <value> + <tuple> + <string>Manager</string> + </tuple> + </value> + </item> <item> <key> <string>id</string> </key> - <value> <string>ERP5Site_cleanUpUNGKnowledgePadList</string> </value> + <value> <string>ERP5Site_cleanUpUNGTestEnvironment</string> </value> </item> </dictionary> </pickle> diff --git a/bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/Zuite_CommonTemplateForUNG.xml b/bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/Zuite_CommonTemplateForUNG.xml index ed7d6ac299..cecaccd19e 100644 --- a/bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/Zuite_CommonTemplateForUNG.xml +++ b/bt5/erp5_web_ung_ui_test/SkinTemplateItem/portal_skins/erp5_web_ung_ui_test/Zuite_CommonTemplateForUNG.xml @@ -45,6 +45,11 @@ <td>${base_url}/web_site_module/ung</td>\n <td>ung_url</td>\n </tr>\n + <tr>\n + <td>openAndWait</td>\n + <td>${base_url}/ERP5Site_cleanUpUNGTestEnvironment</td>\n + <td></td>\n + </tr>\n </tal:block>\n <tal:block metal:define-macro="login">\n <tr>\n diff --git a/bt5/erp5_web_ung_ui_test/bt/revision b/bt5/erp5_web_ung_ui_test/bt/revision index 9a037142aa..9d607966b7 100644 --- a/bt5/erp5_web_ung_ui_test/bt/revision +++ b/bt5/erp5_web_ung_ui_test/bt/revision @@ -1 +1 @@ -10 \ No newline at end of file +11 \ No newline at end of file -- 2.30.9