本文整理汇总了Python中pages.home.Home.click_themes方法的典型用法代码示例。如果您正苦于以下问题:Python Home.click_themes方法的具体用法?Python Home.click_themes怎么用?Python Home.click_themes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.home.Home
的用法示例。
在下文中一共展示了Home.click_themes方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_themes_subcategory_page_breadcrumb
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_themes [as 别名]
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: test_that_clicking_on_a_subcategory_loads_expected_page
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_themes [as 别名]
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: test_that_clicking_on_theme_name_loads_its_detail_page
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_themes [as 别名]
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: test_that_themes_can_be_sorted_by_popularity
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_themes [as 别名]
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: test_that_themes_can_be_sorted_by_created_date
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_themes [as 别名]
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: test_that_themes_categories_are_listed_on_left_hand_side
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_themes [as 别名]
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: test_that_themes_can_be_sorted_by_name
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_themes [as 别名]
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: test_themes_page_breadcrumb
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_themes [as 别名]
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: test_that_themes_page_has_correct_title
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_themes [as 别名]
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: test_that_themes_loads_themes_landing_page
# 需要导入模块: from pages.home import Home [as 别名]
# 或者: from pages.home.Home import click_themes [as 别名]
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/"))