Ejemplo n.º 1
0
 def test_that_clicking_on_theme_name_loads_its_detail_page(self, testsetup):
     """test for litmus 15363"""
     amo_home_page = AddonsHomePage(testsetup)
     amo_themes_page = amo_home_page.click_themes()
     addon_name = amo_themes_page.addon_names[0]
     amo_theme_page = amo_themes_page.click_on_first_addon()
     Assert.equal(addon_name, amo_theme_page.addon_title)
Ejemplo n.º 2
0
 def test_that_clicking_on_a_subcategory_loads_expected_page(self, testsetup):
     """test for litmus 15949"""
     amo_home_page = AddonsHomePage(testsetup)
     amo_themes_page = amo_home_page.click_themes()
     selected_category = amo_themes_page.themes_category
     amo_category_page = amo_themes_page.click_on_first_category()
     Assert.equal(selected_category, amo_category_page.title)
Ejemplo n.º 3
0
 def test_themes_subcategory_page_breadcrumb(self, testsetup):
     amo_home_page = AddonsHomePage(testsetup)
     amo_themes_page = amo_home_page.click_themes()
     selected_category = amo_themes_page.themes_category
     amo_category_page = amo_themes_page.click_on_first_category()
     expected_breadcrumb = "Add-ons for Firefox Themes %s" % selected_category
     Assert.equal(expected_breadcrumb, amo_category_page.breadcrumb)
Ejemplo n.º 4
0
 def test_that_themes_can_be_sorted_by_updated_date(self):
     """ test for litmus 11750"""
     amo_home_page = AddonsHomePage(self.selenium)
     amo_themes_page = amo_home_page.click_themes()
     amo_themes_page.click_sort_by("updated")
     addons = amo_themes_page.addon_names
     addons_set = set(addons)
     self.assertEquals(len(addons), len(addons_set),
                       "There are duplicates in the names")
     addon_dates = amo_themes_page.addon_update_dates
     addons_orig = addon_dates
     addon_dates.sort()
     addon_dates.reverse()
     [
         self.assertEqual(addons_orig[i], addon_dates[i])
         for i in xrange(len(addons))
     ]
     amo_themes_page.page_forward()
     addon_dates = amo_themes_page.addon_update_dates
     addons_orig = addon_dates
     addon_dates.sort()
     addon_dates.reverse()
     [
         self.assertEqual(addons_orig[i], addon_dates[i])
         for i in xrange(len(addons))
     ]
Ejemplo n.º 5
0
 def test_that_themes_can_be_sorted_by_name(self):
     """ Test for Litmus 11727, 4839 """
     amo_home_page = AddonsHomePage(self.selenium)
     amo_themes_page = amo_home_page.click_themes()
     amo_themes_page.click_sort_by("name")
     addons = amo_themes_page.addon_names
     addons_set = set(addons)
     self.assertEquals(len(addons), len(addons_set),
                       "There are duplicates in the names")
     addons_orig = addons
     addons.sort()
     [
         self.assertEqual(addons_orig[i], addons[i])
         for i in xrange(len(addons))
     ]
     amo_themes_page.page_forward()
     addons = amo_themes_page.addon_names
     addons_set = set(addons)
     self.assertEquals(len(addons), len(addons_set),
                       "There are duplicates in the names")
     addons_orig = addons
     addons.sort()
     [
         self.assertEqual(addons_orig[i], addons[i])
         for i in xrange(len(addons))
     ]
Ejemplo n.º 6
0
 def test_that_clicking_on_theme_name_loads_its_detail_page(self, mozwebqa):
     """test for litmus 15363"""
     amo_home_page = AddonsHomePage(mozwebqa)
     amo_themes_page = amo_home_page.click_themes()
     addon_name = amo_themes_page.addon_names[0]
     amo_theme_page = amo_themes_page.click_on_first_addon()
     Assert.contains(addon_name, amo_theme_page.addon_title)
Ejemplo n.º 7
0
 def test_that_themes_can_be_sorted_by_created_date(self, testsetup):
     """ test for litmus 11638 """
     amo_home_page = AddonsHomePage(testsetup)
     amo_themes_page = amo_home_page.click_themes()
     amo_themes_page.click_sort_by("created")
     addons = amo_themes_page.addon_names
     addons_set = set(addons)
     Assert.equal(len(addons), len(addons_set), "There are duplicates in the names")
     created_dates = amo_themes_page.addon_created_dates
     Assert.is_sorted_descending(created_dates)
     amo_themes_page.page_forward()
     created_dates.extend(amo_themes_page.addon_created_dates)
     Assert.is_sorted_descending(created_dates)
Ejemplo n.º 8
0
 def test_that_themes_can_be_sorted_by_popularity(self, testsetup):
     """ test for litmus 11638 """
     amo_home_page = AddonsHomePage(testsetup)
     amo_themes_page = amo_home_page.click_themes()
     amo_themes_page.click_sort_by("popular")
     addons = amo_themes_page.addon_names
     addons_set = set(addons)
     Assert.equal(len(addons), len(addons_set), "There are duplicates in the names")
     downloads = amo_themes_page.addon_download_number
     Assert.is_sorted_descending(downloads)
     amo_themes_page.page_forward()
     downloads.extend(amo_themes_page.addon_download_number)
     Assert.is_sorted_descending(downloads)
Ejemplo n.º 9
0
 def test_that_themes_categories_are_listed_on_left_hand_side(self, mozwebqa):
     """ test for litmus 15342"""
     amo_home_page = AddonsHomePage(mozwebqa)
     amo_themes_page = amo_home_page.click_themes()
     current_page_url = amo_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(amo_themes_page.categories_count, len(default_categories))
     count = 0
     for category in default_categories:
         count += 1
         current_category = amo_themes_page.get_category(count)
         Assert.equal(category, current_category)
Ejemplo n.º 10
0
 def test_that_themes_can_be_sorted_by_name(self, testsetup):
     """ Test for Litmus 11727, 4839 """
     amo_home_page = AddonsHomePage(testsetup)
     amo_themes_page = amo_home_page.click_themes()
     amo_themes_page.click_sort_by("name")
     addons = amo_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))]
     amo_themes_page.page_forward()
     addons = amo_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))]
Ejemplo n.º 11
0
 def test_that_themes_can_be_sorted_by_created_date(self, testsetup):
     """ test for litmus 11638"""
     amo_home_page = AddonsHomePage(testsetup)
     amo_themes_page = amo_home_page.click_themes()
     amo_themes_page.click_sort_by("created")
     addons = amo_themes_page.addon_names
     addons_set = set(addons)
     Assert.equal(len(addons), len(addons_set), "There are duplicates in the names")
     addon_dates = amo_themes_page.addon_update_dates
     addons_orig = addon_dates
     addon_dates.sort()
     addon_dates.reverse()
     [Assert.equal(addons_orig[i], addon_dates[i]) for i in xrange(len(addons))]
     amo_themes_page.page_forward()
     addon_dates = amo_themes_page.addon_update_dates
     addons_orig = addon_dates
     addon_dates.sort()
     addon_dates.reverse()
     [Assert.equal(addons_orig[i], addon_dates[i]) for i in xrange(len(addons))]
Ejemplo n.º 12
0
 def test_that_themes_can_be_sorted_by_updated_date(self):
     """ test for litmus 11750"""
     amo_home_page = AddonsHomePage(self.selenium)
     amo_themes_page = amo_home_page.click_themes()
     amo_themes_page.click_sort_by("updated")
     addons = amo_themes_page.addon_names
     addons_set = set(addons)
     self.assertEquals(len(addons), len(addons_set), "There are duplicates in the names")
     addon_dates = amo_themes_page.addon_update_dates
     addons_orig = addon_dates
     addon_dates.sort()
     addon_dates.reverse()
     [self.assertEqual(addons_orig[i], addon_dates[i]) for i in xrange(len(addons))]
     amo_themes_page.page_forward()
     addon_dates = amo_themes_page.addon_update_dates
     addons_orig = addon_dates
     addon_dates.sort()
     addon_dates.reverse()
     [self.assertEqual(addons_orig[i], addon_dates[i]) for i in xrange(len(addons))]
Ejemplo n.º 13
0
 def test_themes_page_breadcrumb(self, testsetup):
     """test for litmus 15344"""
     amo_home_page = AddonsHomePage(testsetup)
     amo_themes_page = amo_home_page.click_themes()
     expected_breadcrumb = "Add-ons for Firefox Themes"
     Assert.equal(expected_breadcrumb, amo_themes_page.themes_breadcrumb)
Ejemplo n.º 14
0
 def test_that_themes_page_has_correct_title(self, testsetup):
     """test for litmus 15340"""
     amo_home_page = AddonsHomePage(testsetup)
     amo_themes_page = amo_home_page.click_themes()
     expected_title = "Most Popular :: Themes :: Add-ons for Firefox"
     Assert.equal(expected_title, amo_themes_page.page_title)
Ejemplo n.º 15
0
 def test_that_themes_loads_themes_landing_page(self, testsetup):
     """test for litmus 15339"""
     amo_home_page = AddonsHomePage(testsetup)
     amo_themes_page = amo_home_page.click_themes()
     url_current_page = amo_themes_page.get_url_current_page()
     Assert.true(url_current_page.endswith("/themes/"))
Ejemplo n.º 16
0
 def test_that_counters_show_the_same_number_of_themes(self, testsetup):
     """test for litmus 15345"""
     amo_home_page = AddonsHomePage(testsetup)
     amo_themes_page = amo_home_page.click_themes()
     Assert.equal(amo_themes_page.top_counter, amo_themes_page.bottom_counter)