def test_other_applications_thunderbird(self, base_url, selenium):
     app_under_test = "Thunderbird"
     home_page = Home(base_url, selenium)
     home_page.header.click_other_application(app_under_test)
     assert app_under_test.lower() in home_page.get_url_current_page()
     assert not home_page.header.is_other_application_visible(
         app_under_test)
Exemple #2
0
    def test_that_breadcrumb_links_in_details_page_work(self, mozwebqa):
        """
        Test for Litmus 11923.
        https://litmus.mozilla.org/show_test.cgi?searchType=by_id&id=11923
        """
        home_page = Home(mozwebqa)
        detail_page = Details(mozwebqa, 'firebug')

        Assert.equal(detail_page.breadcrumbs[0].text, 'Add-ons for Firefox')
        link = detail_page.breadcrumbs[0].href_value
        detail_page.breadcrumbs[0].click()

        Assert.true(home_page.is_the_current_page)
        Assert.true(home_page.get_url_current_page().endswith(link))

        home_page.return_to_previous_page()

        Assert.equal(detail_page.breadcrumbs[1].text, 'Extensions')
        link = detail_page.breadcrumbs[1].href_value
        detail_page.breadcrumbs[1].click()

        amo_extenstions_page = ExtensionsHome(mozwebqa)
        Assert.true(amo_extenstions_page.is_the_current_page)
        Assert.true(amo_extenstions_page.get_url_current_page().endswith(link))

        home_page.return_to_previous_page()

        Assert.equal(detail_page.breadcrumbs[2].text, 'Firebug')
Exemple #3
0
 def test_that_clicking_the_amo_logo_loads_home_page(self, base_url, selenium):
     home_page = Home(base_url, selenium)
     assert home_page.is_amo_logo_visible
     home_page = home_page.click_amo_logo()
     assert home_page.is_the_current_page
     assert home_page.is_amo_logo_visible
     assert'%s/en-US/firefox/' % home_page.base_url == home_page.get_url_current_page()
    def test_that_breadcrumb_links_in_details_page_work(self, mozwebqa):
        """
        Test for Litmus 11923.
        https://litmus.mozilla.org/show_test.cgi?searchType=by_id&id=11923
        """
        home_page = Home(mozwebqa)
        detail_page = Details(mozwebqa, 'firebug')

        Assert.equal(detail_page.breadcrumbs[0].text, 'Add-ons for Firefox')
        link = detail_page.breadcrumbs[0].href_value
        detail_page.breadcrumbs[0].click()

        Assert.true(home_page.is_the_current_page)
        Assert.true(home_page.get_url_current_page().endswith(link))

        home_page.return_to_previous_page()

        Assert.equal(detail_page.breadcrumbs[1].text, 'Extensions')
        link = detail_page.breadcrumbs[1].href_value
        detail_page.breadcrumbs[1].click()

        amo_extenstions_page = ExtensionsHome(mozwebqa)
        Assert.true(amo_extenstions_page.is_the_current_page)
        Assert.true(amo_extenstions_page.get_url_current_page().endswith(link))

        home_page.return_to_previous_page()

        Assert.equal(detail_page.breadcrumbs[2].text, 'Firebug')
    def test_other_applications_thunderbird(self, mozwebqa):
        app_under_test = "Thunderbird"
        home_page = Home(mozwebqa)

        home_page.header.click_other_application(app_under_test)
        Assert.contains(app_under_test.lower(), home_page.get_url_current_page())

        Assert.false(home_page.header.is_other_application_visible(app_under_test))
    def test_that_clicking_the_amo_logo_loads_home_page(self, mozwebqa):
        home_page = Home(mozwebqa)

        Assert.true(home_page.is_amo_logo_visible)
        home_page = home_page.click_amo_logo()
        Assert.true(home_page.is_the_current_page)
        Assert.true(home_page.is_amo_logo_visible)
        Assert.equal(home_page.get_url_current_page(), '%s/en-US/firefox/' % home_page.base_url)
Exemple #7
0
 def test_that_clicking_the_amo_logo_loads_home_page(self, mozwebqa):
     home_page = Home(mozwebqa)
     assert home_page.is_amo_logo_visible
     home_page = home_page.click_amo_logo()
     assert home_page.is_the_current_page
     assert home_page.is_amo_logo_visible
     assert '%s/en-US/firefox/' % home_page.base_url == home_page.get_url_current_page(
     )
 def test_sorting_by_newest(self, mozwebqa):
     """
     Test for Litmus 17343.
     https://litmus.mozilla.org/show_test.cgi?id=17343
     """
     search_page = Home(mozwebqa).search_for('firebug')
     search_page.click_sort_by('Newest')
     Assert.true('sort=created' in search_page.get_url_current_page())
     Assert.is_sorted_descending([i.created_date for i in search_page.results])
 def test_sorting_by_most_recently_updated(self, base_url, selenium):
     search_page = Home(base_url, selenium).search_for('firebug')
     search_page.click_sort_by('Recently Updated')
     assert 'sort=updated' in search_page.get_url_current_page()
     results = [i.updated_date for i in search_page.results]
     assert sorted(results, reverse=True) == results
     search_page.paginator.click_next_page()
     results.extend([i.updated_date for i in search_page.results])
     assert sorted(results, reverse=True) == results
 def test_sorting_by_downloads(self, base_url, selenium):
     search_page = Home(base_url, selenium).search_for('firebug')
     search_page.click_sort_by('Weekly Downloads')
     assert 'sort=downloads' in search_page.get_url_current_page()
     downloads = [i.downloads for i in search_page.results]
     assert sorted(downloads, reverse=True) == downloads
     search_page.paginator.click_next_page()
     downloads.extend([i.downloads for i in search_page.results])
     assert sorted(downloads, reverse=True) == downloads
 def test_sorting_by_most_recently_updated(self, mozwebqa):
     search_page = Home(mozwebqa).search_for('firebug')
     search_page.click_sort_by('Recently Updated')
     assert 'sort=updated' in search_page.get_url_current_page()
     results = [i.updated_date for i in search_page.results]
     assert results.sort(reverse=True)
     search_page.paginator.click_next_page()
     results.extend([i.updated_date for i in search_page.results])
     assert results.sort(reverse=True)
Exemple #12
0
 def test_sorting_by_downloads(self, mozwebqa):
     search_page = Home(mozwebqa).search_for('firebug')
     search_page.click_sort_by('Weekly Downloads')
     assert 'sort=downloads' in search_page.get_url_current_page()
     downloads = [i.downloads for i in search_page.results]
     assert sorted(downloads, reverse=True) == downloads
     search_page.paginator.click_next_page()
     downloads.extend([i.downloads for i in search_page.results])
     assert sorted(downloads, reverse=True) == downloads
Exemple #13
0
 def test_sorting_by_most_recently_updated(self, mozwebqa):
     search_page = Home(mozwebqa).search_for('firebug')
     search_page.click_sort_by('Recently Updated')
     Assert.contains('sort=updated', search_page.get_url_current_page())
     results = [i.updated_date for i in search_page.results]
     Assert.is_sorted_descending(results)
     search_page.paginator.click_next_page()
     results.extend([i.updated_date for i in search_page.results])
     Assert.is_sorted_descending(results)
Exemple #14
0
 def test_sorting_by_downloads(self, mozwebqa):
     search_page = Home(mozwebqa).search_for("firebug")
     search_page.click_sort_by("Weekly Downloads")
     assert "sort=downloads" in search_page.get_url_current_page()
     downloads = [i.downloads for i in search_page.results]
     assert sorted(downloads, reverse=True) == downloads
     search_page.paginator.click_next_page()
     downloads.extend([i.downloads for i in search_page.results])
     assert sorted(downloads, reverse=True) == downloads
Exemple #15
0
 def test_sorting_by_newest(self, mozwebqa):
     """
     Test for Litmus 17343.
     https://litmus.mozilla.org/show_test.cgi?id=17343
     """
     search_page = Home(mozwebqa).header.search_for('firebug')
     search_page.sort_by('Newest')
     Assert.true('sort=created' in search_page.get_url_current_page())
     Assert.is_sorted_descending([i.created_date for i in search_page.results])
Exemple #16
0
    def test_that_clicking_the_amo_logo_loads_home_page(self, mozwebqa):
        home_page = Home(mozwebqa)

        Assert.true(home_page.is_amo_logo_visible)
        home_page = home_page.click_amo_logo()
        Assert.true(home_page.is_the_current_page)
        Assert.true(home_page.is_amo_logo_visible)
        Assert.equal(home_page.get_url_current_page(),
                     '%s/en-US/firefox/' % home_page.base_url)
Exemple #17
0
 def test_sorting_by_number_of_most_users(self, mozwebqa):
     """
     Test for Litmus 24867.
     https://litmus.mozilla.org/show_test.cgi?id=24867
     """
     search_page = Home(mozwebqa).header.search_for('firebug')
     search_page.sort_by('Most Users')
     Assert.contains('sort=users', search_page.get_url_current_page())
     Assert.is_sorted_descending([i.users for i in search_page.results])
Exemple #18
0
 def test_sorting_by_most_recently_updated(self, mozwebqa):
     search_page = Home(mozwebqa).search_for('firebug')
     search_page.click_sort_by('Recently Updated')
     assert 'sort=updated' in search_page.get_url_current_page()
     results = [i.updated_date for i in search_page.results]
     assert sorted(results, reverse=True) == results
     search_page.paginator.click_next_page()
     results.extend([i.updated_date for i in search_page.results])
     assert sorted(results, reverse=True) == results
 def test_that_clicking_mozilla_logo_loads_mozilla_dot_org(self, mozwebqa):
     """
     Test for Litmus 22922.
     https://litmus.mozilla.org/show_test.cgi?id=22922
     """
     home_page = Home(mozwebqa)
     Assert.true(home_page.is_mozilla_logo_visible)
     home_page.click_mozilla_logo()
     Assert.equal(home_page.get_url_current_page(), "http://www.mozilla.org/en-US/")
Exemple #20
0
 def test_sorting_by_most_recently_updated(self, mozwebqa):
     search_page = Home(mozwebqa).search_for("firebug")
     search_page.click_sort_by("Recently Updated")
     assert "sort=updated" in search_page.get_url_current_page()
     results = [i.updated_date for i in search_page.results]
     assert sorted(results, reverse=True) == results
     search_page.paginator.click_next_page()
     results.extend([i.updated_date for i in search_page.results])
     assert sorted(results, reverse=True) == results
Exemple #21
0
 def test_sorting_by_number_of_most_users(self, mozwebqa):
     """
     Test for Litmus 24867.
     https://litmus.mozilla.org/show_test.cgi?id=24867
     """
     search_page = Home(mozwebqa).search_for('firebug')
     search_page.click_sort_by('Most Users')
     Assert.contains('sort=users', search_page.get_url_current_page())
     Assert.is_sorted_descending([i.users for i in search_page.results])
Exemple #22
0
 def test_sorting_by_most_recently_updated(self, mozwebqa):
     search_page = Home(mozwebqa).search_for('firebug')
     search_page.click_sort_by('Recently Updated')
     Assert.contains('sort=updated', search_page.get_url_current_page())
     results = [i.updated_date for i in search_page.results]
     Assert.is_sorted_descending(results)
     search_page.paginator.click_next_page()
     results.extend([i.updated_date for i in search_page.results])
     Assert.is_sorted_descending(results)
 def test_sorting_by_newest(self, mozwebqa):
     """
     Test for Litmus 17343.
     https://litmus.mozilla.org/show_test.cgi?id=17343
     """
     search_page = Home(mozwebqa).search_for("firebug")
     search_page.click_sort_by("Newest")
     Assert.true("sort=created" in search_page.get_url_current_page())
     Assert.is_sorted_descending([i.created_date for i in search_page.results])
Exemple #24
0
 def test_that_clicking_mozilla_logo_loads_mozilla_dot_org(self, mozwebqa):
     """
     Test for Litmus 22922.
     https://litmus.mozilla.org/show_test.cgi?id=22922
     """
     home_page = Home(mozwebqa)
     Assert.true(home_page.is_mozilla_logo_visible)
     home_page.click_mozilla_logo()
     Assert.equal(home_page.get_url_current_page(),
                  "http://www.mozilla.org/en-US/")
Exemple #25
0
    def test_sorting_by_downloads(self, mozwebqa):
        search_page = Home(mozwebqa).search_for('firebug')
        search_page.click_sort_by('Weekly Downloads')
        Assert.true('sort=downloads' in search_page.get_url_current_page())
        downloads = [i.downloads for i in search_page.results]
        Assert.is_sorted_descending(downloads)
        search_page.paginator.click_next_page()

        downloads.extend([i.downloads for i in search_page.results])
        Assert.is_sorted_descending(downloads)
Exemple #26
0
    def test_sorting_by_downloads(self, mozwebqa):
        search_page = Home(mozwebqa).search_for('firebug')
        search_page.click_sort_by('Weekly Downloads')
        Assert.true('sort=downloads' in search_page.get_url_current_page())
        downloads = [i.downloads for i in search_page.results]
        Assert.is_sorted_descending(downloads)
        search_page.paginator.click_next_page()

        downloads.extend([i.downloads for i in search_page.results])
        Assert.is_sorted_descending(downloads)
Exemple #27
0
    def test_other_applications_thunderbird(self, mozwebqa):
        app_under_test = "Thunderbird"
        home_page = Home(mozwebqa)

        home_page.header.click_other_application(app_under_test)
        Assert.contains(app_under_test.lower(),
                        home_page.get_url_current_page())

        Assert.false(
            home_page.header.is_other_application_visible(app_under_test))
    def test_sorting_by_downloads(self, mozwebqa):
        search_page = Home(mozwebqa).search_for('firebug')
        search_page.click_sort_by('Weekly Downloads')
        assert 'sort=downloads' in search_page.get_url_current_page()
        downloads = [i.downloads for i in search_page.results]
        assert downloads.sort(reverse=True)
        search_page.paginator.click_next_page()

        downloads.extend([i.downloads for i in search_page.results])
        assert downloads.sort(reverse=True)
 def test_that_complete_themes_categories_are_listed_on_left_hand_side(self, mozwebqa):
     home_page = Home(mozwebqa)
     complete_themes_page = home_page.header.click_complete_themes()
     current_page_url = home_page.get_url_current_page()
     assert current_page_url.endswith('/complete-themes/')
     default_categories = ["Animals", "Compact", "Large", "Miscellaneous", "Modern", "Nature", "OS Integration", "Retro", "Sports"]
     assert len(default_categories) == complete_themes_page.categories_count
     count = 0
     for category in default_categories:
         count += 1
         current_category = complete_themes_page.get_category(count)
         assert category == current_category
 def test_that_complete_themes_categories_are_listed_on_left_hand_side(self, mozwebqa):
     home_page = Home(mozwebqa)
     complete_themes_page = home_page.header.click_complete_themes()
     current_page_url = home_page.get_url_current_page()
     Assert.true(current_page_url.endswith("/complete-themes/"))
     default_categories = ["Animals", "Compact", "Large", "Miscellaneous", "Modern", "Nature", "OS Integration", "Retro", "Sports"]
     Assert.equal(complete_themes_page.categories_count, len(default_categories))
     count = 0
     for category in default_categories:
         count += 1
         current_category = complete_themes_page.get_category(count)
         Assert.equal(category, current_category)
Exemple #31
0
    def test_that_clicking_the_amo_logo_loads_home_page(self, mozwebqa):
        """
        Test for Litmus 25743.
        https://litmus.mozilla.org/show_test.cgi?id=25743
        """
        home_page = Home(mozwebqa)

        Assert.true(home_page.is_amo_logo_visible)
        home_page = home_page.click_amo_logo()
        Assert.true(home_page.is_the_current_page)
        Assert.true(home_page.is_amo_logo_visible)
        Assert.equal(home_page.get_url_current_page(), '%s/en-US/firefox/' % home_page.base_url)
Exemple #32
0
    def test_other_applications_thunderbird(self, mozwebqa):
        """
        Test for Litmus 5037.
        https://litmus.mozilla.org/show_test.cgi?id=5037
        """
        app_under_test = "Thunderbird"
        home_page = Home(mozwebqa)

        home_page.header.click_other_application(app_under_test)
        Assert.contains(app_under_test.lower(), home_page.get_url_current_page())

        Assert.false(home_page.header.is_other_application_visible(app_under_test))
    def test_that_clicking_the_amo_logo_loads_home_page(self, mozwebqa):
        """
        Test for Litmus 25743.
        https://litmus.mozilla.org/show_test.cgi?id=25743
        """
        home_page = Home(mozwebqa)

        Assert.true(home_page.is_amo_logo_visible)
        home_page = home_page.click_amo_logo()
        Assert.true(home_page.is_the_current_page)
        Assert.true(home_page.is_amo_logo_visible)
        Assert.equal(home_page.get_url_current_page(), "%s/en-US/firefox/" % home_page.base_url)
    def test_other_applications_thunderbird(self, mozwebqa):
        """
        Test for Litmus 5037.
        https://litmus.mozilla.org/show_test.cgi?id=5037
        """
        app_under_test = "Thunderbird"
        home_page = Home(mozwebqa)

        home_page.header.click_other_application(app_under_test)
        Assert.contains(app_under_test.lower(), home_page.get_url_current_page())

        Assert.false(home_page.header.is_other_application_visible(app_under_test))
 def test_that_complete_themes_categories_are_listed_on_left_hand_side(self, base_url, selenium):
     home_page = Home(base_url, selenium)
     complete_themes_page = home_page.header.click_complete_themes()
     current_page_url = home_page.get_url_current_page()
     assert current_page_url.endswith('/complete-themes/')
     default_categories = ["Animals", "Compact", "Large", "Miscellaneous", "Modern", "Nature", "OS Integration", "Retro", "Sports"]
     assert len(default_categories) == complete_themes_page.categories_count
     count = 0
     for category in default_categories:
         count += 1
         current_category = complete_themes_page.get_category(count)
         assert category == current_category
Exemple #36
0
 def test_sorting_by_most_recently_updated(self, mozwebqa):
     """
     Test for Litmus 17345.
     https://litmus.mozilla.org/show_test.cgi?id=17345
     """
     search_page = Home(mozwebqa).search_for('firebug')
     search_page.click_sort_by('Recently Updated')
     Assert.contains('sort=updated', search_page.get_url_current_page())
     results = [i.updated_date for i in search_page.results]
     Assert.is_sorted_descending(results)
     search_page.paginator.click_next_page()
     results.extend([i.updated_date for i in search_page.results])
     Assert.is_sorted_descending(results)
 def test_that_themes_categories_are_listed_on_left_hand_side(self, mozwebqa):
     """Test for Litmus 15342."""
     home_page = Home(mozwebqa)
     themes_page = home_page.header.site_navigation_menu("Themes").click()
     current_page_url = home_page.get_url_current_page()
     Assert.true(current_page_url.endswith("/themes/"))
     default_categories = ["Animals", "Compact", "Large", "Miscellaneous", "Modern", "Nature", "OS Integration", "Retro", "Sports"]
     Assert.equal(themes_page.categories_count, len(default_categories))
     count = 0
     for category in default_categories:
         count += 1
         current_category = themes_page.get_category(count)
         Assert.equal(category, current_category)
Exemple #38
0
 def test_that_complete_themes_categories_are_listed_on_left_hand_side(self, mozwebqa):
     """Test for Litmus 15342."""
     home_page = Home(mozwebqa)
     complete_themes_page = home_page.header.click_complete_themes()
     current_page_url = home_page.get_url_current_page()
     Assert.true(current_page_url.endswith("/complete-themes/"))
     default_categories = ["Animals", "Compact", "Large", "Miscellaneous", "Modern", "Nature", "OS Integration", "Retro", "Sports"]
     Assert.equal(complete_themes_page.categories_count, len(default_categories))
     count = 0
     for category in default_categories:
         count += 1
         current_category = complete_themes_page.get_category(count)
         Assert.equal(category, current_category)
Exemple #39
0
 def test_sorting_by_most_recently_updated(self, mozwebqa):
     """
     Test for Litmus 17345.
     https://litmus.mozilla.org/show_test.cgi?id=17345
     """
     search_page = Home(mozwebqa).header.search_for('firebug')
     search_page.sort_by('Recently Updated')
     Assert.contains('sort=updated', search_page.get_url_current_page())
     results = [i.updated_date for i in search_page.results]
     Assert.is_sorted_descending(results)
     search_page.paginator.click_next_page()
     results.extend([i.updated_date for i in search_page.results])
     Assert.is_sorted_descending(results)
Exemple #40
0
    def test_that_checks_other_applications_menu(self, mozwebqa):
        home_page = Home(mozwebqa)

        # Thunderbird
        assert home_page.header.is_other_application_visible('Thunderbird')
        home_page.header.click_other_application('Thunderbird')
        current_page_url = home_page.get_url_current_page()
        assert current_page_url.endswith('/thunderbird/')
        assert 'Thunderbird Add-ons' in home_page.amo_logo_title

        # Android
        assert home_page.header.is_other_application_visible('Android')
        home_page.header.click_other_application('Android')
        current_page_url = home_page.get_url_current_page()
        assert current_page_url.endswith('/android/')
        assert 'Android Add-ons' in home_page.amo_logo_title

        # Seamonkey
        assert home_page.header.is_other_application_visible('Seamonkey')
        home_page.header.click_other_application('Seamonkey')
        current_page_url = home_page.get_url_current_page()
        assert current_page_url.endswith('/seamonkey/')
        assert 'SeaMonkey Add-ons' in home_page.amo_logo_title
Exemple #41
0
    def test_that_checks_other_applications_menu(self, mozwebqa):
        home_page = Home(mozwebqa)

        # Thunderbird
        Assert.true(home_page.header.is_other_application_visible("Thunderbird"))
        home_page.header.click_other_application("Thunderbird")
        current_page_url = home_page.get_url_current_page()
        Assert.true(current_page_url.endswith("/thunderbird/"))
        Assert.contains('Thunderbird Add-ons', home_page.amo_logo_title)

        # Android
        Assert.true(home_page.header.is_other_application_visible("Android"))
        home_page.header.click_other_application("Android")
        current_page_url = home_page.get_url_current_page()
        Assert.true(current_page_url.endswith("/android/"))
        Assert.contains('Android Add-ons', home_page.amo_logo_title)

        # Seamonkey
        Assert.true(home_page.header.is_other_application_visible("Seamonkey"))
        home_page.header.click_other_application("Seamonkey")
        current_page_url = home_page.get_url_current_page()
        Assert.true(current_page_url.endswith("/seamonkey/"))
        Assert.contains('SeaMonkey Add-ons', home_page.amo_logo_title)
Exemple #42
0
    def test_sorting_by_downloads(self, mozwebqa):
        """
        Test for Litmus 17342.
        https://litmus.mozilla.org/show_test.cgi?id=17342
        """
        search_page = Home(mozwebqa).search_for('firebug')
        search_page.click_sort_by('Weekly Downloads')
        Assert.true('sort=downloads' in search_page.get_url_current_page())
        downloads = [i.downloads for i in search_page.results]
        Assert.is_sorted_descending(downloads)
        search_page.paginator.click_next_page()

        downloads.extend([i.downloads for i in search_page.results])
        Assert.is_sorted_descending(downloads)
Exemple #43
0
    def test_that_checks_other_applications_menu(self, mozwebqa):
        home_page = Home(mozwebqa)

        # Thunderbird
        assert home_page.header.is_other_application_visible('Thunderbird')
        home_page.header.click_other_application('Thunderbird')
        current_page_url = home_page.get_url_current_page()
        assert current_page_url.endswith('/thunderbird/')
        assert 'Thunderbird Add-ons' in home_page.amo_logo_title

        # Android
        assert home_page.header.is_other_application_visible('Android')
        home_page.header.click_other_application('Android')
        current_page_url = home_page.get_url_current_page()
        assert current_page_url.endswith('/android/')
        assert 'Android Add-ons' in home_page.amo_logo_title

        # Seamonkey
        assert home_page.header.is_other_application_visible('Seamonkey')
        home_page.header.click_other_application('Seamonkey')
        current_page_url = home_page.get_url_current_page()
        assert current_page_url.endswith('/seamonkey/')
        assert 'SeaMonkey Add-ons' in home_page.amo_logo_title
    def test_that_checks_other_applications_menu(self, mozwebqa):
        home_page = Home(mozwebqa)

        # Thunderbird
        Assert.true(home_page.header.is_other_application_visible("Thunderbird"))
        home_page.header.click_other_application("Thunderbird")
        current_page_url = home_page.get_url_current_page()
        Assert.true(current_page_url.endswith("/thunderbird/"))
        Assert.contains('Thunderbird Add-ons', home_page.amo_logo_title)

        # Android
        Assert.true(home_page.header.is_other_application_visible("Android"))
        home_page.header.click_other_application("Android")
        current_page_url = home_page.get_url_current_page()
        Assert.true(current_page_url.endswith("/android/"))
        Assert.contains('Android Add-ons', home_page.amo_logo_title)

        # Seamonkey
        Assert.true(home_page.header.is_other_application_visible("Seamonkey"))
        home_page.header.click_other_application("Seamonkey")
        current_page_url = home_page.get_url_current_page()
        Assert.true(current_page_url.endswith("/seamonkey/"))
        Assert.contains('SeaMonkey Add-ons', home_page.amo_logo_title)
Exemple #45
0
    def test_sorting_by_downloads(self, mozwebqa):
        """
        Test for Litmus 17342.
        https://litmus.mozilla.org/show_test.cgi?id=17342
        """
        search_page = Home(mozwebqa).header.search_for('firebug')
        search_page.sort_by('Weekly Downloads')
        Assert.true('sort=downloads' in search_page.get_url_current_page())
        downloads = [i.downloads for i in search_page.results]
        Assert.is_sorted_descending(downloads)
        search_page.paginator.click_next_page()

        downloads.extend([i.downloads for i in search_page.results])
        Assert.is_sorted_descending(downloads)
    def test_that_breadcrumb_links_in_details_page_work(self, base_url, selenium):
        home_page = Home(base_url, selenium)
        detail_page = Details(base_url, selenium, 'firebug')

        assert 'Add-ons for Firefox' == detail_page.breadcrumbs[0].text
        link = detail_page.breadcrumbs[0].href_value
        detail_page.breadcrumbs[0].click()

        assert home_page.is_the_current_page
        assert home_page.get_url_current_page().endswith(link)

        home_page.return_to_previous_page()

        assert 'Extensions' == detail_page.breadcrumbs[1].text
        link = detail_page.breadcrumbs[1].href_value
        detail_page.breadcrumbs[1].click()

        amo_extensions_page = ExtensionsHome(base_url, selenium)
        assert amo_extensions_page.is_the_current_page
        assert amo_extensions_page.get_url_current_page().endswith(link)

        home_page.return_to_previous_page()
        assert 'Firebug' == detail_page.breadcrumbs[2].text
Exemple #47
0
    def test_that_breadcrumb_links_in_details_page_work(self, base_url, selenium):
        home_page = Home(base_url, selenium)
        detail_page = Details(base_url, selenium, 'firebug')

        assert 'Add-ons for Firefox' == detail_page.breadcrumbs[0].text
        link = detail_page.breadcrumbs[0].href_value
        detail_page.breadcrumbs[0].click()

        assert home_page.is_the_current_page
        assert home_page.get_url_current_page().endswith(link)

        home_page.return_to_previous_page()

        assert 'Extensions' == detail_page.breadcrumbs[1].text
        link = detail_page.breadcrumbs[1].href_value
        detail_page.breadcrumbs[1].click()

        amo_extensions_page = ExtensionsHome(base_url, selenium)
        assert amo_extensions_page.is_the_current_page
        assert amo_extensions_page.get_url_current_page().endswith(link)

        home_page.return_to_previous_page()
        assert 'Firebug' == detail_page.breadcrumbs[2].text
Exemple #48
0
    def test_that_breadcrumb_links_in_details_page_work(self, mozwebqa):
        home_page = Home(mozwebqa)
        detail_page = Details(mozwebqa, 'firebug')

        Assert.equal(detail_page.breadcrumbs[0].text, 'Add-ons for Firefox')
        link = detail_page.breadcrumbs[0].href_value
        detail_page.breadcrumbs[0].click()

        Assert.true(home_page.is_the_current_page)
        Assert.true(home_page.get_url_current_page().endswith(link))

        home_page.return_to_previous_page()

        Assert.equal(detail_page.breadcrumbs[1].text, 'Extensions')
        link = detail_page.breadcrumbs[1].href_value
        detail_page.breadcrumbs[1].click()

        amo_extensions_page = ExtensionsHome(mozwebqa)
        Assert.true(amo_extensions_page.is_the_current_page)
        Assert.true(amo_extensions_page.get_url_current_page().endswith(link))

        home_page.return_to_previous_page()

        Assert.equal(detail_page.breadcrumbs[2].text, 'Firebug')
    def test_that_breadcrumb_links_in_details_page_work(self, mozwebqa):
        home_page = Home(mozwebqa)
        detail_page = Details(mozwebqa, 'firebug')

        Assert.equal(detail_page.breadcrumbs[0].text, 'Add-ons for Firefox')
        link = detail_page.breadcrumbs[0].href_value
        detail_page.breadcrumbs[0].click()

        Assert.true(home_page.is_the_current_page)
        Assert.true(home_page.get_url_current_page().endswith(link))

        home_page.return_to_previous_page()

        Assert.equal(detail_page.breadcrumbs[1].text, 'Extensions')
        link = detail_page.breadcrumbs[1].href_value
        detail_page.breadcrumbs[1].click()

        amo_extensions_page = ExtensionsHome(mozwebqa)
        Assert.true(amo_extensions_page.is_the_current_page)
        Assert.true(amo_extensions_page.get_url_current_page().endswith(link))

        home_page.return_to_previous_page()

        Assert.equal(detail_page.breadcrumbs[2].text, 'Firebug')
Exemple #50
0
 def test_sorting_by_number_of_most_users(self, mozwebqa):
     search_page = Home(mozwebqa).search_for('firebug')
     search_page.click_sort_by('Most Users')
     assert 'sort=users' in search_page.get_url_current_page()
     results = [i.users for i in search_page.results]
     assert sorted(results, reverse=True) == results
Exemple #51
0
 def test_sorting_by_newest(self, mozwebqa):
     search_page = Home(mozwebqa).search_for('firebug')
     search_page.click_sort_by('Newest')
     assert 'sort=created' in search_page.get_url_current_page()
     results = [i.created_date for i in search_page.results]
     assert sorted(results, reverse=True) == results
Exemple #52
0
 def test_other_applications_thunderbird(self, base_url, selenium):
     app_under_test = "Thunderbird"
     home_page = Home(base_url, selenium)
     home_page.header.click_other_application(app_under_test)
     assert app_under_test.lower() in home_page.get_url_current_page()
     assert not home_page.header.is_other_application_visible(app_under_test)
Exemple #53
0
 def test_sorting_by_newest(self, mozwebqa):
     search_page = Home(mozwebqa).search_for('firebug')
     search_page.click_sort_by('Newest')
     Assert.true('sort=created' in search_page.get_url_current_page())
     Assert.is_sorted_descending([i.created_date for i in search_page.results])
Exemple #54
0
 def test_sorting_by_number_of_most_users(self, mozwebqa):
     search_page = Home(mozwebqa).search_for('firebug')
     search_page.click_sort_by('Most Users')
     Assert.contains('sort=users', search_page.get_url_current_page())
     Assert.is_sorted_descending([i.users for i in search_page.results])
Exemple #55
0
 def test_sorting_by_newest(self, mozwebqa):
     search_page = Home(mozwebqa).search_for('firebug')
     search_page.click_sort_by('Newest')
     Assert.true('sort=created' in search_page.get_url_current_page())
     Assert.is_sorted_descending(
         [i.created_date for i in search_page.results])
Exemple #56
0
 def test_sorting_by_number_of_most_users(self, mozwebqa):
     search_page = Home(mozwebqa).search_for('firebug')
     search_page.click_sort_by('Most Users')
     Assert.contains('sort=users', search_page.get_url_current_page())
     Assert.is_sorted_descending([i.users for i in search_page.results])