diff --git a/pages/desktop/contact.py b/pages/desktop/contact.py index e05b6722..39b544a9 100644 --- a/pages/desktop/contact.py +++ b/pages/desktop/contact.py @@ -14,6 +14,7 @@ def go_to_page(self): self.open('/contact/') _spaces_tab_locator = (By.CSS_SELECTOR, '.category-tabs > li[data-id=spaces]') + _contact_tab_locator = (By.CSS_SELECTOR, '.category-tabs > li[data-id=contact]') _communities_tab_locator = (By.CSS_SELECTOR, '.category-tabs > li[data-id=communities]') _spaces_tab_link_locator = (By.CSS_SELECTOR, '#page-content > .category-tabs > li[data-id=spaces] > a') @@ -26,6 +27,10 @@ def wait_until_element_visible(self, element): self.selenium.execute_script("window.scrollTo(0, 0)") WebDriverWait(self.selenium, timeout).until(EC.visibility_of(element)) + @property + def contact_tab(self): + return self.selenium.find_element(*self._contact_tab_locator) + @property def spaces_tab(self): return self.selenium.find_element(*self._spaces_tab_locator) diff --git a/tests/test_contact.py b/tests/test_contact.py index 06f82033..69eede72 100644 --- a/tests/test_contact.py +++ b/tests/test_contact.py @@ -26,10 +26,10 @@ def test_spaces_links_are_correct(self, mozwebqa): self.check_bad_links(spaces_page, spaces_page.spaces_nav_links_list) @nondestructive - def test_start_on_spaces(self, mozwebqa): + def test_start_on_contact(self, mozwebqa): contact_page = Contact(mozwebqa) contact_page.go_to_page() - assert 'current' == contact_page.spaces_tab.get_attribute('class'), 'Page does not start on spaces tab.' + assert 'current' == contact_page.contact_tab.get_attribute('class'), 'Page does not start on contact us tab.' @nondestructive def test_switching_tabs_list_display(self, mozwebqa):