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


Python DashboardPage.click_newer_messages方法代码示例

本文整理汇总了Python中pages.dashboard.DashboardPage.click_newer_messages方法的典型用法代码示例。如果您正苦于以下问题:Python DashboardPage.click_newer_messages方法的具体用法?Python DashboardPage.click_newer_messages怎么用?Python DashboardPage.click_newer_messages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pages.dashboard.DashboardPage的用法示例。


在下文中一共展示了DashboardPage.click_newer_messages方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_search_pagination

# 需要导入模块: from pages.dashboard import DashboardPage [as 别名]
# 或者: from pages.dashboard.DashboardPage import click_newer_messages [as 别名]
    def test_search_pagination(self, mozwebqa):
        dashboard_pg = DashboardPage(mozwebqa)
        dashboard_pg.go_to_dashboard_page()
        # Set the date range to 2013-01-01 -> today so that we're more
        # likely to have so many messages in the results that it
        # paginates. Otherwise it might not paginate on stage or local
        # environments.
        dashboard_pg.set_date_range('2013-01-01')
        dashboard_pg.search_for(self.SEARCH_TERM)

        # Check the total message count. If it's less than 50 (two
        # pages worth), then we will fail with a helpful message.
        assert dashboard_pg.total_message_count >= 50, 'Not enough data to test. Add more data.'

        assert dashboard_pg.is_older_messages_link_visible is True
        assert dashboard_pg.is_newer_messages_link_visible is False
        assert dashboard_pg.older_messages_link == 'Older Messages'

        dashboard_pg.click_older_messages()
        assert dashboard_pg.search_term_from_url == self.SEARCH_TERM

        assert dashboard_pg.is_older_messages_link_visible is True
        assert dashboard_pg.is_newer_messages_link_visible is True
        assert dashboard_pg.older_messages_link == 'Older Messages'
        assert dashboard_pg.newer_messages_link == 'Newer Messages'
        assert dashboard_pg.page_from_url == 2

        dashboard_pg.click_newer_messages()
        assert dashboard_pg.search_term_from_url == self.SEARCH_TERM

        assert dashboard_pg.is_older_messages_link_visible is True
        assert dashboard_pg.is_newer_messages_link_visible is False
        assert dashboard_pg.older_messages_link == 'Older Messages'
        assert dashboard_pg.page_from_url == 1
开发者ID:Givemore,项目名称:fjord,代码行数:36,代码来源:test_pagination.py

示例2: test_search_pagination

# 需要导入模块: from pages.dashboard import DashboardPage [as 别名]
# 或者: from pages.dashboard.DashboardPage import click_newer_messages [as 别名]
    def test_search_pagination(self, mozwebqa):
        dashboard_pg = DashboardPage(mozwebqa)
        dashboard_pg.go_to_dashboard_page()
        # Set the date range to 2013-01-01 -> today so that we're more
        # likely to have so many messages in the results that it
        # paginates. Otherwise it might not paginate on stage or local
        # environments.
        dashboard_pg.set_date_range('2013-01-01')
        dashboard_pg.search_for(self.SEARCH_TERM)

        # Check the total message count. If it's less than 50 (two
        # pages worth), then we will fail with a helpful message.
        Assert.greater(dashboard_pg.total_message_count, 50, "Search term didn't kick up enough messages. Please prime the server with more data!")

        Assert.true(dashboard_pg.is_older_messages_link_visible)
        Assert.false(dashboard_pg.is_newer_messages_link_visible)
        Assert.equal(dashboard_pg.older_messages_link, 'Older Messages')

        dashboard_pg.click_older_messages()
        Assert.equal(dashboard_pg.search_term_from_url, self.SEARCH_TERM)

        Assert.true(dashboard_pg.is_older_messages_link_visible)
        Assert.true(dashboard_pg.is_newer_messages_link_visible)
        Assert.equal(dashboard_pg.older_messages_link, 'Older Messages')
        Assert.equal(dashboard_pg.newer_messages_link, 'Newer Messages')
        Assert.equal(dashboard_pg.page_from_url, 2)

        dashboard_pg.click_newer_messages()
        Assert.equal(dashboard_pg.search_term_from_url, self.SEARCH_TERM)

        Assert.true(dashboard_pg.is_older_messages_link_visible)
        Assert.false(dashboard_pg.is_newer_messages_link_visible)
        Assert.equal(dashboard_pg.older_messages_link, 'Older Messages')
        Assert.equal(dashboard_pg.page_from_url, 1)
开发者ID:ANKIT-KS,项目名称:fjord,代码行数:36,代码来源:test_pagination.py


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