def test_the_featured_personas_section(self, mozwebqa):
     """ Test for Litmus 15392
         https://litmus.mozilla.org/show_test.cgi?id=15392"""
     home_page = Home(mozwebqa)
     personas_page = home_page.click_personas()
     Assert.true(personas_page.is_the_current_page)
     Assert.equal(6, personas_page.featured_personas_count)
Exemple #2
0
    def test_searching_for_personas_returns_results(self, mozwebqa):
        """Litmus 17349
        https://litmus.mozilla.org/show_test.cgi?id=17349"""
        amo_home_page = Home(mozwebqa)
        amo_personas_page = amo_home_page.click_personas()
        amo_personas_page.header.search_for('fox')

        Assert.true(amo_personas_page.persona_count > 0)
 def test_the_top_rated_section(self, mozwebqa):
     """ Test for Litmus 15395
         https://litmus.mozilla.org/show_test.cgi?id=15395"""
     home_page = Home(mozwebqa)
     personas_page = home_page.click_personas()
     Assert.true(personas_page.is_the_current_page)
     Assert.equal(6, personas_page.top_rated_count)
     ratings = personas_page.top_rated_ratings
     Assert.is_sorted_descending(ratings)
 def test_the_most_popular_section(self, mozwebqa):
     """ Test for Litmus 15394
         https://litmus.mozilla.org/show_test.cgi?id=15394"""
     home_page = Home(mozwebqa)
     personas_page = home_page.click_personas()
     Assert.true(personas_page.is_the_current_page)
     Assert.equal(6, personas_page.most_popular_count)
     downloads = personas_page.most_popular_downloads
     Assert.is_sorted_descending(downloads)
 def test_personas_breadcrumb_format(self, mozwebqa):
     """
     Verify the breadcrumb format in personas page
     https://litmus.mozilla.org/show_test.cgi?id=12034
     """
     home_page = Home(mozwebqa)
     personas_page = home_page.click_personas()
     Assert.equal(personas_page.breadcrumb_text(0), 'Add-ons for Firefox')
     Assert.equal(personas_page.breadcrumb_text(1), 'Personas')
     Assert.equal(personas_page.breadcrumb_text_all, 'Add-ons for Firefox Personas')
 def test_start_exploring_link_in_the_promo_box(self, mozwebqa):
     """ Test for Litmus 12037
         https://litmus.mozilla.org/show_test.cgi?id=12037"""
     home_page = Home(mozwebqa)
     personas_page = home_page.click_personas()
     Assert.true(personas_page.is_the_current_page)
     Assert.true(personas_page.is_featured_addons_present)
     browse_personas_page = personas_page.click_start_exploring()
     Assert.true(browse_personas_page.is_the_current_page)
     Assert.equal("up-and-coming", browse_personas_page.sort_key)
     Assert.equal("Up & Coming", browse_personas_page.sort_by)
    def test_breadcrumb_menu_in_persona_details_page(self, mozwebqa):
        """ Test for Litmus 12046
            https://litmus.mozilla.org/show_test.cgi?id=12046"""

        # Step 1, 2: Access AMO Home, Click on Persona category link.
        home_page = Home(mozwebqa)
        personas_page = home_page.click_personas()
        Assert.true(personas_page.is_the_current_page)

        # Step 3: Click on any persona.
        random_persona_index = random.randint(1, personas_page.persona_count)
        print 'random_persona_index: %s' % str(random_persona_index)
        personas_detail_page = personas_page.click_persona(random_persona_index)
        print 'url_current_page:     %s' % str(personas_detail_page.get_url_current_page())
        Assert.true(personas_detail_page.is_the_current_page)

        # Verify breadcrumb menu format, i.e. Add-ons for Firefox > Personas > {Persona Name}.
        persona_title = personas_detail_page.personas_title
        Assert.equal("Add-ons for Firefox", personas_detail_page.get_breadcrumb_item_text(1))
        Assert.equal("Personas", personas_detail_page.get_breadcrumb_item_text(2))

        persona_breadcrumb_title = len(persona_title) > 40 and '%s...' % persona_title[:40] or persona_title

        Assert.equal(personas_detail_page.get_breadcrumb_item_text(3), persona_breadcrumb_title)

        # Step 4: Click on the links present in the Breadcrumb menu.
        # Verify that the Personas link loads the Personas home page.
        personas_detail_page.click_breadcrumb_item("Personas")
        Assert.true(personas_page.is_the_current_page)

        personas_page.return_to_previous_page()
        Assert.true(personas_detail_page.is_the_current_page)

        # Verify that the Add-ons for Firefox link loads the AMO home page.
        personas_detail_page.click_breadcrumb_item("Add-ons for Firefox")
        Assert.true(home_page.is_the_current_page)
 def test_page_title_for_personas_landing_page(self, mozwebqa):
     """ Test for Litmus 15391
         https://litmus.mozilla.org/show_test.cgi?id=15391"""
     home_page = Home(mozwebqa)
     personas_page = home_page.click_personas()
     Assert.true(personas_page.is_the_current_page)