Example #1
0
 def test_that_search_returns_results_for_irc_nickname(
         self, base_url, selenium, vouched_user):
     home_page = Home(base_url, selenium)
     home_page.login(vouched_user['email'], vouched_user['password'])
     home_page.header.search_for(u'mbrandt', loggedin=True)
     profile = Profile(base_url, selenium)
     assert u'Matt Brandt' == profile.name
Example #2
0
 def click_create_profile_button(self, leavepage=True):
     self.find_element(*self._create_profile_button_locator).click()
     if not leavepage:
         return self
     else:
         from pages.profile import Profile
         return Profile(self.selenium, self.base_url)
Example #3
0
 def go_to_my_profile(self):
     self.wait.until(expected.visibility_of_element_located(self._user_menu_locator))
     self.find_element(*self._user_menu_locator).click()
     self.wait.until(expected.visibility_of_element_located(self._my_profile_menu_locator))
     self.find_element(*self._my_profile_menu_locator).click()
     from pages.profile import Profile
     return Profile(self.selenium, self.base_url)
Example #4
0
    def openOwnProfile(self):

        viewProfileButton = WebDriverWait(self.driver, self.longWait).until(
            EC.visibility_of_element_located((self._VIEW_PROFILE_BUTTON))
        )

        viewProfileButton.click()

        return Profile()
Example #5
0
    def openProfile(self):

        time.sleep(1)
        userLink = self.driver.find_element_by_class_name(
            'search-result__result-link')
        userLink.click()
        time.sleep(2)
        # return self._returnInstance()
        return Profile()
Example #6
0
 def _returnInstance(self):
     if "/feed/" in self.driver.current_url:
         print("URL: ", self.driver.current_url)
         print("Returning home instance")
         return Home()
     elif "/in/" in self.driver.current_url:
         print("URL: ", self.driver.current_url)
         print("Returning profile instance")
         return Profile()
     elif "/mynetwork/" or "/mynetwork/invite-sent/" or  "/search/results/" in self.driver.current_url:
         print("URL: ", self.driver.current_url)
         print("Returning network instance")
         return Network()
     elif "/search/results/" in self.driver.current_url:
         print("URL: ", self.driver.current_url)
         print("Returning result instance")
         return Result()
Example #7
0
 def open_profile_page(self):
     self._root_element.find_element(
         *self._profile_page_link_locator).click()
     from pages.profile import Profile
     return Profile(self.base_url, self.selenium)
 def click_update_button(self):
     self.find_element(*self._update_button_locator).click()
     return Profile(self.selenium, self.base_url)
Example #9
0
 def open_profile_page(self):
     self.find_element(*self._profile_page_link_locator).click()
     from pages.profile import Profile
     return Profile(self.page.selenium,
                    self.page.base_url).wait_for_page_to_load()
 def test_private_groups_field_when_not_logged_in(self, base_url, selenium,
                                                  private_user):
     page = Profile(selenium, base_url,
                    username=private_user['name']).open()
     assert not page.is_groups_present
Example #11
0
 def click_create_profile_button(self):
     self.selenium.find_element(
         *self._create_profile_button_locator).click()
     from pages.profile import Profile
     return Profile(self.testsetup)
Example #12
0
 def click_update_button(self):
     self.selenium.find_element(*self._update_button_locator).click()
     return Profile(self.testsetup)
Example #13
0
 def click_view_profile_menu_item(self):
     self.click_options()
     self.find_element(*self._view_profile_menu_item_locator).click()
     from pages.profile import Profile
     return Profile(self.selenium,
                    self.base_url).wait_for_page_to_load()
Example #14
0
 def open_user_profile(self, username):
     self.get_relative_path(u'/u/%s' % username)
     from pages.profile import Profile
     return Profile(self.base_url, self.selenium)
Example #15
0
 def open_user_profile(self, username):
     self.get_relative_path(u'/u/%s' % username)
     from pages.profile import Profile
     return Profile(self.testsetup)
Example #16
0
 def click_view_profile_menu_item(self):
     self.click_options()
     self.selenium.find_element(
         *self._view_profile_menu_item_locator).click()
     from pages.profile import Profile
     return Profile(self.testsetup)
Example #17
0
 def open_profile_page(self):
     self._root_element.find_element(
         *self._profile_page_link_locator).click()
     from pages.profile import Profile
     return Profile(self.testsetup)
Example #18
0
 def test_that_search_returns_results_for_irc_nickname(self, mozwebqa, vouched_user):
     home_page = Home(mozwebqa)
     home_page.login(vouched_user['email'], vouched_user['password'])
     home_page.header.search_for(u'mbrandt')
     profile = Profile(mozwebqa)
     Assert.equal(u'Matt Brandt', profile.name)
Example #19
0
 def click_to_open_profile(self):
     self.selenium.find_element(*self._open_profile_locator).click()
     from pages.profile import Profile
     return Profile(self.testsetup)
Example #20
0
 def test_that_search_returns_results_for_irc_nickname(self, mozwebqa):
     home_page = Home(mozwebqa)
     home_page.login()
     home_page.header.search_for(u'stephend')
     profile = Profile(mozwebqa)
     Assert.equal(u'Stephen Donner', profile.name)