示例#1
0
 def test_themes_subcategory_page_breadcrumb(self, mozwebqa):
     home_page = Home(mozwebqa)
     themes_page = home_page.click_themes()
     selected_category = themes_page.themes_category
     amo_category_page = themes_page.click_on_first_category()
     expected_breadcrumb = "Add-ons for Firefox Themes %s" % selected_category
     Assert.equal(expected_breadcrumb, amo_category_page.breadcrumb)
示例#2
0
 def test_that_clicking_on_a_subcategory_loads_expected_page(self, mozwebqa):
     """test for litmus 15949"""
     home_page = Home(mozwebqa)
     themes_page = home_page.click_themes()
     selected_category = themes_page.themes_category
     amo_category_page = themes_page.click_on_first_category()
     Assert.equal(selected_category, amo_category_page.title)
示例#3
0
 def test_that_clicking_on_theme_name_loads_its_detail_page(self, mozwebqa):
     """test for litmus 15363"""
     home_page = Home(mozwebqa)
     themes_page = home_page.click_themes()
     theme_name = themes_page.addon_name(1)
     theme_page = themes_page.click_on_first_addon()
     Assert.contains(theme_name, theme_page.addon_title)
示例#4
0
 def test_that_themes_can_be_sorted_by_popularity(self, mozwebqa):
     """ test for litmus 11638 """
     home_page = Home(mozwebqa)
     themes_page = home_page.click_themes()
     themes_page.click_sort_by("popular")
     addons = themes_page.addon_names
     addons_set = set(addons)
     Assert.equal(len(addons), len(addons_set), "There are duplicates in the names")
     downloads = themes_page.addon_download_number
     Assert.is_sorted_descending(downloads)
     themes_page.page_forward()
     downloads.extend(themes_page.addon_download_number)
     Assert.is_sorted_descending(downloads)
示例#5
0
 def test_that_themes_can_be_sorted_by_created_date(self, mozwebqa):
     """ test for litmus 11638 """
     home_page = Home(mozwebqa)
     themes_page = home_page.click_themes()
     themes_page.click_sort_by("created")
     addons = themes_page.addon_names
     addons_set = set(addons)
     Assert.equal(len(addons), len(addons_set), "There are duplicates in the names")
     created_dates = themes_page.addon_created_dates
     Assert.is_sorted_descending(created_dates)
     themes_page.page_forward()
     created_dates.extend(themes_page.addon_created_dates)
     Assert.is_sorted_descending(created_dates)
示例#6
0
 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.click_themes()
     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)
示例#7
0
 def test_that_themes_can_be_sorted_by_name(self, mozwebqa):
     """ Test for Litmus 11727, 4839 """
     home_page = Home(mozwebqa)
     themes_page = home_page.click_themes()
     themes_page.click_sort_by("name")
     addons = themes_page.addon_names
     addons_set = set(addons)
     Assert.equal(len(addons), len(addons_set), "There are duplicates in the names")
     addons_orig = addons
     addons.sort()
     [Assert.equal(addons_orig[i], addons[i]) for i in xrange(len(addons))]
     themes_page.page_forward()
     addons = themes_page.addon_names
     addons_set = set(addons)
     Assert.equal(len(addons), len(addons_set), "There are duplicates in the names")
     addons_orig = addons
     addons.sort()
     [Assert.equal(addons_orig[i], addons[i]) for i in xrange(len(addons))]
示例#8
0
 def test_themes_page_breadcrumb(self, mozwebqa):
     """test for litmus 15344"""
     home_page = Home(mozwebqa)
     themes_page = home_page.click_themes()
     expected_breadcrumb = "Themes"
     Assert.equal(expected_breadcrumb, themes_page.breadcrumb_name)
示例#9
0
 def test_that_themes_page_has_correct_title(self, mozwebqa):
     """test for litmus 15340"""
     home_page = Home(mozwebqa)
     themes_page = home_page.click_themes()
     expected_title = "Most Popular Themes :: Add-ons for Firefox"
     Assert.equal(expected_title, themes_page.page_title)
示例#10
0
 def test_that_themes_loads_themes_landing_page(self, mozwebqa):
     """test for litmus 15339"""
     home_page = Home(mozwebqa)
     themes_page = home_page.click_themes()
     url_current_page = themes_page.get_url_current_page()
     Assert.true(url_current_page.endswith("/themes/"))