Esempio n. 1
0
    def test_that_clicking_top_rated_shows_addons_sorted_by_rating(
            self, mozwebqa):
        home_page = Home(mozwebqa)
        extensions_page = home_page.click_to_explore('top_rated')

        Assert.contains('sort=rating', extensions_page.get_url_current_page())
        Assert.equal('Top Rated', extensions_page.sorter.sorted_by)
Esempio n. 2
0
    def test_that_clicking_most_popular_shows_addons_sorted_by_users(
            self, mozwebqa):
        home_page = Home(mozwebqa)
        extensions_page = home_page.click_to_explore('popular')

        Assert.contains('sort=users', extensions_page.get_url_current_page())
        Assert.equal('Most Users', extensions_page.sorter.sorted_by)
Esempio n. 3
0
    def test_that_one_star_rating_increments(self, mozwebqa):
        """
        Test for Litmus 22916.
        https://litmus.mozilla.org/show_test.cgi?id=22916
        """
        # Step 1 - Login into AMO
        home_page = Home(mozwebqa)
        home_page.login("browserID")
        Assert.true(home_page.header.is_user_logged_in)

        # Step 2 - Go to add-ons listing page sorted by rating
        extensions_home_page = home_page.click_to_explore('Top Rated')

        # Step 3 - Pick an addon with no reviews
        extensions_home_page.paginator.click_last_page()
        addon = extensions_home_page.extensions[-1]  # the last one is without rating
        details_page = addon.click()

        # Step 4 - Click on the "Write review" button
        write_review_block = details_page.click_to_write_review()

        # Step 5 - Add review with 1-star rating
        body = 'Automatic addon review by Selenium tests'
        write_review_block.enter_review_with_text(body)
        write_review_block.set_review_rating(1)
        view_reviews = write_review_block.click_to_save_review()

        # Step 6 - Ensure rating increased by one
        view_reviews.breadcrumbs[2].click()
        details_page = Details(mozwebqa)
        new_rating_counter = details_page.get_rating_counter(1)
        Assert.equal(new_rating_counter, 1)
Esempio n. 4
0
    def test_that_clicking_featured_shows_addons_sorted_by_featured(
            self, mozwebqa):
        home_page = Home(mozwebqa)
        extensions_page = home_page.click_to_explore('featured')

        Assert.contains('sort=featured',
                        extensions_page.get_url_current_page())
        Assert.equal('Featured', extensions_page.sorter.sorted_by)
Esempio n. 5
0
    def test_that_clicking_featured_shows_addons_sorted_by_featured(self, mozwebqa):
        """
        Test for Litmus 25790.
        https://litmus.mozilla.org/show_test.cgi?searchType=by_id&id=25790
        """
        home_page = Home(mozwebqa)
        extensions_page = home_page.click_to_explore('featured')

        Assert.contains('sort=featured', extensions_page.get_url_current_page())
        Assert.equal('Featured', extensions_page.default_selected_tab)
Esempio n. 6
0
    def test_that_clicking_featured_shows_addons_sorted_by_featured(self, mozwebqa):
        """
        Test for Litmus 25790.
        https://litmus.mozilla.org/show_test.cgi?searchType=by_id&id=25790
        """
        home_page = Home(mozwebqa)
        extensions_page = home_page.click_to_explore('featured')

        Assert.contains('sort=featured', extensions_page.get_url_current_page())
        Assert.equal('Featured', extensions_page.sorter.sorted_by)
Esempio n. 7
0
    def test_that_clicking_most_popular_shows_addons_sorted_by_users(self, mozwebqa):
        """
        Test for Litmus 25790.
        https://litmus.mozilla.org/show_test.cgi?searchType=by_id&id=25790
        """
        home_page = Home(mozwebqa)
        extensions_page = home_page.click_to_explore("popular")

        Assert.contains("sort=users", extensions_page.get_url_current_page())
        Assert.equal("Most Users", extensions_page.sorter.sorted_by)
Esempio n. 8
0
    def test_that_clicking_top_rated_shows_addons_sorted_by_rating(self, mozwebqa):
        """
        Test for Litmus 25791.
        https://litmus.mozilla.org/show_test.cgi?searchType=by_id&id=25791
        """
        home_page = Home(mozwebqa)
        extensions_page = home_page.click_to_explore("top_rated")

        Assert.contains("sort=rating", extensions_page.get_url_current_page())
        Assert.equal("Top Rated", extensions_page.sorter.sorted_by)
Esempio n. 9
0
    def test_that_clicking_top_rated_shows_addons_sorted_by_rating(
            self, mozwebqa):
        """
        Test for Litmus 25791.
        https://litmus.mozilla.org/show_test.cgi?searchType=by_id&id=25791
        """
        home_page = Home(mozwebqa)
        extensions_page = home_page.click_to_explore('top_rated')

        Assert.contains('sort=rating', extensions_page.get_url_current_page())
        Assert.equal('Top Rated', extensions_page.sorter.sorted_by)
Esempio n. 10
0
    def test_that_clicking_most_popular_shows_addons_sorted_by_users(
            self, mozwebqa):
        """
        Test for Litmus 25790.
        https://litmus.mozilla.org/show_test.cgi?searchType=by_id&id=25790
        """
        home_page = Home(mozwebqa)
        extensions_page = home_page.click_to_explore('popular')

        Assert.contains('sort=users', extensions_page.get_url_current_page())
        Assert.equal('Most Users', extensions_page.sorter.sorted_by)
Esempio n. 11
0
 def test_that_clicking_top_rated_shows_addons_sorted_by_rating(self, mozwebqa):
     home_page = Home(mozwebqa)
     extensions_page = home_page.click_to_explore('top_rated')
     assert 'sort=rating' in extensions_page.get_url_current_page()
     assert 'Top Rated' == extensions_page.sorter.sorted_by
Esempio n. 12
0
 def test_that_clicking_featured_shows_addons_sorted_by_featured(
         self, mozwebqa):
     home_page = Home(mozwebqa)
     extensions_page = home_page.click_to_explore('featured')
     assert 'sort=featured' in extensions_page.get_url_current_page()
     assert 'Featured' == extensions_page.sorter.sorted_by
Esempio n. 13
0
 def test_that_clicking_most_popular_shows_addons_sorted_by_users(
         self, mozwebqa):
     home_page = Home(mozwebqa)
     extensions_page = home_page.click_to_explore('popular')
     assert 'sort=users' in extensions_page.get_url_current_page()
     assert 'Most Users' == extensions_page.sorter.sorted_by
Esempio n. 14
0
 def test_that_clicking_top_rated_shows_addons_sorted_by_rating(
         self, mozwebqa):
     home_page = Home(mozwebqa)
     extensions_page = home_page.click_to_explore('top_rated')
     assert 'sort=rating' in extensions_page.get_url_current_page()
     assert 'Top Rated' == extensions_page.sorter.sorted_by
Esempio n. 15
0
    def test_that_clicking_featured_shows_addons_sorted_by_featured(self, mozwebqa):
        home_page = Home(mozwebqa)
        extensions_page = home_page.click_to_explore('featured')

        Assert.contains('sort=featured', extensions_page.get_url_current_page())
        Assert.equal('Featured', extensions_page.sorter.sorted_by)
Esempio n. 16
0
    def test_that_clicking_most_popular_shows_addons_sorted_by_users(self, mozwebqa):
        home_page = Home(mozwebqa)
        extensions_page = home_page.click_to_explore('popular')

        Assert.contains('sort=users', extensions_page.get_url_current_page())
        Assert.equal('Most Users', extensions_page.sorter.sorted_by)
Esempio n. 17
0
    def test_that_clicking_top_rated_shows_addons_sorted_by_rating(self, mozwebqa):
        home_page = Home(mozwebqa)
        extensions_page = home_page.click_to_explore('top_rated')

        Assert.contains('sort=rating', extensions_page.get_url_current_page())
        Assert.equal('Top Rated', extensions_page.sorter.sorted_by)
Esempio n. 18
0
 def test_that_clicking_featured_shows_addons_sorted_by_featured(self, mozwebqa):
     home_page = Home(mozwebqa)
     extensions_page = home_page.click_to_explore('featured')
     assert 'sort=featured' in extensions_page.get_url_current_page()
     assert 'Featured' == extensions_page.sorter.sorted_by
Esempio n. 19
0
 def test_that_clicking_most_popular_shows_addons_sorted_by_users(self, mozwebqa):
     home_page = Home(mozwebqa)
     extensions_page = home_page.click_to_explore('popular')
     assert 'sort=users' in extensions_page.get_url_current_page()
     assert 'Most Users' == extensions_page.sorter.sorted_by