Ejemplo n.º 1
0
 def test_searching_for_collections(self, base_url, selenium):
     page = Collections(base_url, selenium).open()
     results_page = page.search_for('web')
     assert len(results_page.results) > 0
     # click through to each result and verify navigation breadcrumbs
     for i in range(len(results_page.results)):
         addon = results_page.result(i).click_result()
         assert 'Collections' in addon.breadcrumb
         selenium.back()
Ejemplo n.º 2
0
    def click_see_all(self):
        see_all_url = self.see_all_link
        self._root.find_element(*self._see_all_locator).click()

        if 'extensions' in see_all_url:
            from pages.desktop.extensions import ExtensionsHome
            return ExtensionsHome(self.testsetup)
        elif 'personas' in see_all_url:
            from pages.desktop.personas import Personas
            return Personas(self.testsetup)
        elif 'collections' in see_all_url:
            from pages.desktop.collections import Collections
            return Collections(self.testsetup)
Ejemplo n.º 3
0
        def click(self):
            menu_name = self._menu.name
            self._menu.hover()
            ActionChains(self.selenium).\
                move_to_element(self._root_element).\
                click().\
                perform()

            if "EXTENSIONS" in menu_name:
                from pages.desktop.extensions import ExtensionsHome
                return ExtensionsHome(self.testsetup)
            elif "THEMES" in menu_name:
                from pages.desktop.themes import Themes
                return Themes(self.testsetup)
            elif "COLLECTIONS" in menu_name:
                from pages.desktop.collections import Collections
                return Collections(self.testsetup)
Ejemplo n.º 4
0
    def click(self):
        name = self.name
        self._root_element.find_element(*self._name_locator).click()
        """This is done because sometimes the header menu drop down remains open so we move the focus to footer to close the menu
        We go to footer because all the menus open a window under them so moving the mouse from down to up will not leave any menu
        open over the desired element"""
        footer_element = self.selenium.find_element(*self._footer_locator)
        ActionChains(self.selenium).move_to_element(footer_element).perform()

        if "EXTENSIONS" in name:
            from pages.desktop.extensions import ExtensionsHome
            return ExtensionsHome(self.base_url, self.selenium)
        elif "THEMES" in name:
            from pages.desktop.themes import Themes
            return Themes(self.base_url, self.selenium)
        elif "COLLECTIONS" in name:
            from pages.desktop.collections import Collections
            return Collections(self.base_url, self.selenium)
Ejemplo n.º 5
0
 def click_collection(self):
     self._root_element.find_element(*self._name_locator).click()
     from pages.desktop.collections import Collections
     return Collections(self.base_url, self.selenium)
Ejemplo n.º 6
0
 def click_featured_collections_see_all_link(self):
     self.selenium.find_element(
         *self._featured_collections_locator).find_element(
             By.CSS_SELECTOR, " a").click()
     from pages.desktop.collections import Collections
     return Collections(self.testsetup)
Ejemplo n.º 7
0
 def test_searching_for_collections(self, base_url, selenium):
     page = Collections(base_url, selenium).open()
     results_page = page.search_for('web')
     assert len(results_page.results) > 0
Ejemplo n.º 8
0
 def test_searching_for_collections(self, base_url, selenium):
     page = Collections(base_url, selenium).open()
     results_page = page.search_for('web')
     assert len(results_page.results) > 0