Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
Fix test_group_invitations and test_group_description_edit
Browse files Browse the repository at this point in the history
  • Loading branch information
viorelaioia committed May 2, 2017
1 parent 132e6ae commit b6f6bf8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions pages/edit_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def access(self):

@property
def invitations(self):
self.wait_for_element_visible(*self._invitations_button_locator)
self.selenium.find_element(*self._invitations_button_locator).click()
return self.InvitationsTab(self.base_url, self.selenium,
self.selenium.find_element(*self._invitations_tab_locator))
Expand Down Expand Up @@ -152,3 +153,4 @@ def invite_new_member(self, mozillian):

def click_invite(self):
self._root_element.find_element(*self._invite_locator).click()
self.wait_for_page_loaded()
8 changes: 2 additions & 6 deletions pages/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class Search(Base):

_result_locator = (By.CSS_SELECTOR, '#content-wrapper > #main > div.row > div.result')
_search_button_locator = (By.CSS_SELECTOR, '.btn.primary:nth-of-type(1)')
_search_button_locator = (By.CSS_SELECTOR, 'button[type = "submit"]')
_advanced_options_button_locator = (By.CSS_SELECTOR, '.btn.primary:nth-of-type(2)')
_advanced_options_locator = (By.CSS_SELECTOR, '.search-options')
_non_vouched_only_checkbox_locator = (By.ID, 'id_nonvouched_only')
Expand Down Expand Up @@ -44,11 +44,6 @@ def no_results_message_body(self):
def advanced_options_shown(self):
return self.is_element_visible(*self._advanced_options_locator)

def search_for(self, search_term):
element = self.selenium.find_element(*self._search_box_locator)
element.send_keys(search_term)
self.selenium.find_element(*self._search_button_locator).click()

def toggle_advanced_options(self):
self.selenium.find_element(*self._advanced_options_button_locator).click()

Expand All @@ -64,6 +59,7 @@ def search_results(self):
self.selenium.find_elements(*self._result_locator)]

def open_group(self, name):
self.wait_for_element_visible(*self._search_button_locator)
self.selenium.find_element_by_link_text(name).click()
from pages.group_info_page import GroupInfoPage
group_info_page = GroupInfoPage(self.base_url, self.selenium)
Expand Down

0 comments on commit b6f6bf8

Please sign in to comment.