本文整理汇总了Python中pages.desktop.page_provider.PageProvider.click_sort_by_solved_questions方法的典型用法代码示例。如果您正苦于以下问题:Python PageProvider.click_sort_by_solved_questions方法的具体用法?Python PageProvider.click_sort_by_solved_questions怎么用?Python PageProvider.click_sort_by_solved_questions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.desktop.page_provider.PageProvider
的用法示例。
在下文中一共展示了PageProvider.click_sort_by_solved_questions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_that_questions_sorts_correctly_by_filter_equal_to_solved
# 需要导入模块: from pages.desktop.page_provider import PageProvider [as 别名]
# 或者: from pages.desktop.page_provider.PageProvider import click_sort_by_solved_questions [as 别名]
def test_that_questions_sorts_correctly_by_filter_equal_to_solved(self, mozwebqa):
"""
Goes to the /questions page,
Verifies the sort filter=solved works
"""
expected_sorted_text = "Solved"
questions_pg = PageProvider(mozwebqa).questions_page()
questions_pg.click_sort_by_solved_questions()
# if there are no questions in the list then skip the test
if not questions_pg.are_questions_present:
pytest.skip("No questions present for filter=%s" % expected_sorted_text)
num_of_questions = questions_pg.questions_count
for counter in range(num_of_questions):
actual_sorted_text = questions_pg.sorted_list_filter_text(counter + 1)
Assert.equal(actual_sorted_text, expected_sorted_text)
示例2: test_that_questions_sorts_correctly_by_filter_equal_to_solved
# 需要导入模块: from pages.desktop.page_provider import PageProvider [as 别名]
# 或者: from pages.desktop.page_provider.PageProvider import click_sort_by_solved_questions [as 别名]
def test_that_questions_sorts_correctly_by_filter_equal_to_solved(self, mozwebqa):
"""
Goes to the /questions page,
Verifies the sort filter=solved works
"""
expected_sorted_text = "SOLVED"
questions_page = PageProvider(mozwebqa).questions_page()
questions_page.click_questions_done_tab()
questions_page.click_sort_by_solved_questions()
# if there are no questions in the list then skip the test
if not questions_page.are_questions_present:
pytest.skip("No questions present for filter=%s" % expected_sorted_text)
for question in questions_page.questions:
# if solved mark is highlighted the question is really solved
Assert.true('highlighted' in question.solved_questions_filter)
示例3: test_that_questions_sorts_correctly_by_filter_equal_to_solved
# 需要导入模块: from pages.desktop.page_provider import PageProvider [as 别名]
# 或者: from pages.desktop.page_provider.PageProvider import click_sort_by_solved_questions [as 别名]
def test_that_questions_sorts_correctly_by_filter_equal_to_solved(self, mozwebqa):
"""
Goes to the /questions page,
Verifies the sort filter=solved works
"""
expected_sorted_text = "SOLVED"
questions_page = PageProvider(mozwebqa).questions_page()
questions_page.click_to_expand_sort_and_filter_box()
Assert.true(questions_page.is_sort_and_filter_box_expanded)
questions_page.click_sort_by_solved_questions()
# if there are no questions in the list then skip the test
if not questions_page.are_questions_present:
pytest.skip("No questions present for filter=%s" % expected_sorted_text)
for question in questions_page.questions:
actual_sorted_text = question.sorted_list_filter_text
Assert.equal(actual_sorted_text, expected_sorted_text)