Commit 4bd34637 authored by Gabriel Monnerat's avatar Gabriel Monnerat

- improve zelenium asserts

- add code in script to clean up the module before each test

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44481 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2415aa7d
...@@ -119,6 +119,16 @@ ...@@ -119,6 +119,16 @@
<td>//a[@class="clickable-block block-remove"]</td>\n <td>//a[@class="clickable-block block-remove"]</td>\n
<td></td>\n <td></td>\n
</tr>\n </tr>\n
<tr>\n
<td>click</td>\n
<td>//a[@class="clickable-block block-remove"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertConfirmation</td>\n
<td>Are you sure you want to remove this gadget from your personalized page?</td>\n
<td></td>\n
</tr>\n
</tbody>\n </tbody>\n
</table>\n </table>\n
</body>\n </body>\n
......
...@@ -89,16 +89,16 @@ ...@@ -89,16 +89,16 @@
<td>1000</td>\n <td>1000</td>\n
<td></td>\n <td></td>\n
</tr>\n </tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>No Results</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>verifyText</td>\n <td>verifyText</td>\n
<td>//td[@id="resultview"]</td>\n <td>//td[@id="resultview"]</td>\n
<td>Results: 0 to UNG Event</td>\n <td>Results: 0 to UNG Event</td>\n
</tr>\n </tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>No Results</td>\n
<td></td>\n
</tr>\n
<tr>\n <tr>\n
<td>clickAndWait</td>\n <td>clickAndWait</td>\n
<td>//a[@id="back-calendar"]</td>\n <td>//a[@id="back-calendar"]</td>\n
...@@ -109,6 +109,11 @@ ...@@ -109,6 +109,11 @@
<td>//span[@class="addcal"]</td>\n <td>//span[@class="addcal"]</td>\n
<td></td>\n <td></td>\n
</tr>\n </tr>\n
<tr>\n
<td>waitForCondition</td>\n
<td>selenium.isElementPresent("portal_type")</td>\n
<td>10000</td>\n
</tr>\n
<tr>\n <tr>\n
<td>select</td>\n <td>select</td>\n
<td>//select[@name="portal_type"]</td>\n <td>//select[@name="portal_type"]</td>\n
......
...@@ -53,6 +53,14 @@ ...@@ -53,6 +53,14 @@
<value> <string>portal = context.getPortalObject()\n <value> <string>portal = context.getPortalObject()\n
ung_website = portal.web_site_module.ung\n ung_website = portal.web_site_module.ung\n
\n \n
def cleanUpModule(module):\n
object_list = module.searchFolder()\n
\n
for object in object_list:\n
real_object = context.restrictedTraverse(object.getPath())\n
module.deleteContent(real_object.getId())\n
\n
\n
pad_list = portal.portal_catalog(portal_type="Knowledge Pad",\n pad_list = portal.portal_catalog(portal_type="Knowledge Pad",\n
publication_section_uid=ung_website.getUid())\n publication_section_uid=ung_website.getUid())\n
\n \n
...@@ -67,6 +75,9 @@ for person in person_list:\n ...@@ -67,6 +75,9 @@ for person in person_list:\n
person_object = context.restrictedTraverse(person.getPath())\n person_object = context.restrictedTraverse(person.getPath())\n
portal.person_module.deleteContent(person_object.getId())\n portal.person_module.deleteContent(person_object.getId())\n
\n \n
cleanUpModule(portal.web_page_module)\n
cleanUpModule(portal.event_module)\n
\n
return True\n return True\n
</string> </value> </string> </value>
</item> </item>
......
33 34
\ 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