Commit d3dd9342 authored by Gabriel L. Oliveira's avatar Gabriel L. Oliveira

Add method to remove all gadgets from given user

parent b10fe101
...@@ -76,6 +76,23 @@ class UNGTestMixin(unittest.TestCase): ...@@ -76,6 +76,23 @@ class UNGTestMixin(unittest.TestCase):
waiting_time) waiting_time)
def clear_user_gadgets(self, user=None, password=None): def clear_user_gadgets(self, user=None, password=None):
"""remove all gadgets from given user
if no user is given, then just remove all gadgets"""
if user:
self.selenium.open("WebSite_logout")
self.selenium.wait_for_page_to_load("30000")
self.selenium.type("__ac_name", user)
self.selenium.type("__ac_password", password)
self.selenium.click("//input[@value='Login']")
self.selenium.wait_for_page_to_load("30000")
self.wait_ung_listbox_to_load()
while self.selenium.is_element_present("//a[@class='clickable-block"
" block-remove']"):
self.selenium.click("//a[@class=\"clickable-block block-remove\"]")
self.selenium.get_confirmation()
self.open_ung_default_page('ung')
def clear_cache(self): def clear_cache(self):
"""call method 'Base_clearCache' of bt5 erp5_ui_test, that orders """call method 'Base_clearCache' of bt5 erp5_ui_test, that orders
portal_catalog to clear all allocated cache""" portal_catalog to clear all allocated cache"""
......
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