本文整理汇总了Python中pages.treeherder.TreeherderPage.filter_by方法的典型用法代码示例。如果您正苦于以下问题:Python TreeherderPage.filter_by方法的具体用法?Python TreeherderPage.filter_by怎么用?Python TreeherderPage.filter_by使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pages.treeherder.TreeherderPage
的用法示例。
在下文中一共展示了TreeherderPage.filter_by方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_filter_jobs
# 需要导入模块: from pages.treeherder import TreeherderPage [as 别名]
# 或者: from pages.treeherder.TreeherderPage import filter_by [as 别名]
def test_filter_jobs(base_url, selenium):
"""Open resultset page and filter for platform"""
page = TreeherderPage(selenium, base_url).open()
assert any(r.contains_platform('linux') for r in page.pushes)
assert any(r.contains_platform('windows') for r in page.pushes)
page.filter_by('linux')
assert any(r.contains_platform('linux') for r in page.pushes)
assert not any(r.contains_platform('windows') for r in page.pushes)
示例2: test_enter_quick_filter_shortcut
# 需要导入模块: from pages.treeherder import TreeherderPage [as 别名]
# 或者: from pages.treeherder.TreeherderPage import filter_by [as 别名]
def test_enter_quick_filter_shortcut(base_url, selenium):
"""Open Treeherder, verify shortcut: 'f' moves cursor to filter search box.
Open Treeherder page, verify if search box is empty, enter search box
filter using 'f' shortcut, type 'debug', verify if filter box contains
word 'debug'.
"""
page = TreeherderPage(selenium, base_url).open()
assert page.search_term == ''
page.filter_by('debug', method='keyboard')
assert page.search_term == 'debug'
示例3: test_clear_the_quick_filter_shortcut
# 需要导入模块: from pages.treeherder import TreeherderPage [as 别名]
# 或者: from pages.treeherder.TreeherderPage import filter_by [as 别名]
def test_clear_the_quick_filter_shortcut(base_url, selenium):
"""Open Treeherder, verify shortcut: CTRL + SHIFT + 'f' clears the filter search box.
Open Treeherder page, filter by 'debug', verify if filter box contains the
word 'debug', clear the quick filter using CTRL + SHIFT + f shortcut,
verify if search box is empty.
"""
page = TreeherderPage(selenium, base_url).open()
page.filter_by('debug')
page.clear_filter(method='keyboard')
assert page.search_term == ''
示例4: test_filter_jobs
# 需要导入模块: from pages.treeherder import TreeherderPage [as 别名]
# 或者: from pages.treeherder.TreeherderPage import filter_by [as 别名]
def test_filter_jobs(base_url, selenium):
"""Open resultset page and filter for platform"""
page = TreeherderPage(selenium, base_url).open()
platform = u'Linux'
page.filter_by(platform)
assert platform in page.result_sets[0].builds[0].platform_name
page.clear_filter()
platform2 = u'Windows'
page.filter_by(platform2)
assert platform not in page.result_sets[0].builds[0].platform_name