当前位置: 首页>>代码示例>>Python>>正文


Python TreeherderPage.filter_by方法代码示例

本文整理汇总了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)
开发者ID:rwood-moz,项目名称:treeherder,代码行数:11,代码来源:test_filter_jobs.py

示例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'
开发者ID:kmoir,项目名称:treeherder,代码行数:13,代码来源:test_keyboard_shortcuts.py

示例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 == ''
开发者ID:kmoir,项目名称:treeherder,代码行数:14,代码来源:test_keyboard_shortcuts.py

示例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
开发者ID:davehunt,项目名称:treeherder-tests,代码行数:14,代码来源:test_filter_jobs.py


注:本文中的pages.treeherder.TreeherderPage.filter_by方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。