Remove sleep in test_skill_deletion (#324)
* Remove time.sleep in test_skill_deletion * update
This commit is contained in:
Родитель
771443fa17
Коммит
94b8fdf757
|
@ -83,7 +83,7 @@ class Base(Page):
|
|||
|
||||
_search_box_locator = (By.CSS_SELECTOR, '.search-query')
|
||||
_search_box_loggedin_locator = (By.CSS_SELECTOR, '.search-right > form > .search-query')
|
||||
_profile_menu_locator = (By.CSS_SELECTOR, '#nav-main > a.dropdown-toggle')
|
||||
_profile_menu_locator = (By.CSS_SELECTOR, '#nav-main > a.dropdown-toggle i')
|
||||
|
||||
# menu items
|
||||
_dropdown_menu_locator = (By.CSS_SELECTOR, 'ul.dropdown-menu')
|
||||
|
@ -108,6 +108,7 @@ class Base(Page):
|
|||
return Search(self.base_url, self.selenium)
|
||||
|
||||
def click_options(self):
|
||||
self.wait_for_element_present(*self._profile_menu_locator)
|
||||
self.selenium.find_element(*self._profile_menu_locator).click()
|
||||
WebDriverWait(self.selenium, self.timeout).until(lambda s: self.selenium.find_element(*self._dropdown_menu_locator))
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ class Settings(Base):
|
|||
|
||||
@property
|
||||
def profile(self):
|
||||
self.wait_for_element_present(*self._profile_button_locator)
|
||||
self.selenium.find_element(*self._profile_button_locator).click()
|
||||
return self.ProfileTab(self.base_url, self.selenium,
|
||||
self.selenium.find_element(*self._profile_tab_locator))
|
||||
|
@ -157,8 +158,7 @@ class Settings(Base):
|
|||
|
||||
def click_update(self):
|
||||
self._root_element.find_element(*self._update_locator).click()
|
||||
self.wait_for_element_not_present(*self._update_locator)
|
||||
self.wait_for_element_present(*self._update_locator)
|
||||
self.wait_for_page_loaded()
|
||||
|
||||
class YouAndMozilla(PageRegion):
|
||||
|
||||
|
|
|
@ -86,8 +86,6 @@ class TestProfile:
|
|||
skills_form.click_update()
|
||||
|
||||
settings = home_page.header.click_settings_menu_item()
|
||||
# TODO: Try to remove the sleep after https://bugzilla.mozilla.org/show_bug.cgi?id=1291320 is fixed.
|
||||
time.sleep(2)
|
||||
skills_form = settings.profile.skills
|
||||
skills_form.delete_skill("hello world")
|
||||
skills_form.click_update()
|
||||
|
|
Загрузка…
Ссылка в новой задаче