def test_that_verifies_categories_section(self, mozwebqa):

        home_page = Home(mozwebqa)
        home_page.go_to_homepage()

        Assert.equal(home_page.categories.title, 'All Categories')

        # Open "All Categories" section
        home_page.expand_all_categories_section()
        Assert.greater(len(home_page.categories.items), 0)
    def test_that_verifies_categories_section(self, mozwebqa):
        """https://www.pivotaltracker.com/story/show/31913855"""

        home_page = Home(mozwebqa)
        home_page.go_to_homepage()

        Assert.equal(home_page.categories.title, 'All Categories')

        # Open "All Categories" section
        home_page.expand_all_categories_section()
        Assert.greater(len(home_page.categories.items), 0)
    def test_opening_every_category_page_from_categories_section(self, mozwebqa):
        """In addition to Pivotal #31913855"""

        home_page = Home(mozwebqa)
        home_page.go_to_homepage()

        for i in range(home_page.category_count):
            home_page.expand_all_categories_section()
            category_name = home_page.categories.items[i].name
            category_page = home_page.categories.items[i].click_category()
            Assert.true(category_name in category_page.title)
            Assert.true(category_page.is_the_current_page)
            home_page.go_to_homepage()