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


Python feedback.FeedbackPage类代码示例

本文整理汇总了Python中pages.desktop.feedback.FeedbackPage的典型用法代码示例。如果您正苦于以下问题:Python FeedbackPage类的具体用法?Python FeedbackPage怎么用?Python FeedbackPage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: test_that_empty_search_of_feedback_returns_some_data

    def test_that_empty_search_of_feedback_returns_some_data(self, mozwebqa):
        """Litmus 13847"""
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        feedback_pg.search_for('')
        Assert.greater(len(feedback_pg.messages), 0)
开发者ID:chirarobert,项目名称:input-tests,代码行数:7,代码来源:test_search.py

示例2: test_feedback_can_be_filtered_by_all_products_and_versions

    def test_feedback_can_be_filtered_by_all_products_and_versions(self, mozwebqa):
        """This testcase covers # 13602 & 13603 & 15149 in Litmus.

        1. Verify that at least three firefox versions exist
        2. Verify that filtering by version returns results
        3. Verify that the state of the filters are correct after being applied
        4. Verify product and version values in the URL

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        products = feedback_pg.product_filter.products
        Assert.greater(len(products), 1)
        for product in products:
            if product != '':
                feedback_pg.product_filter.select_product(product)
                versions = feedback_pg.product_filter.versions
                [Assert.not_equal(version, "") for version in versions]
                Assert.greater(len(versions), 2)
                for version in versions:
                    feedback_pg.product_filter.select_version(version)
                    Assert.equal(feedback_pg.product_filter.selected_product, product)
                    Assert.equal(feedback_pg.product_filter.selected_version, version)
                    Assert.equal(feedback_pg.product_from_url, product)
                    Assert.equal(feedback_pg.version_from_url, version)
                    Assert.greater(len(feedback_pg.messages), 0)
                    feedback_pg.product_filter.unselect_version(version)
                feedback_pg.product_filter.unselect_product(product)
开发者ID:chirarobert,项目名称:input-tests,代码行数:29,代码来源:test_product_filter.py

示例3: test_that_we_can_search_feedback_with_unicode

    def test_that_we_can_search_feedback_with_unicode(self, mozwebqa):
        """Litmus 13697"""
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        feedback_pg.search_for(u"p\xe1gina")
        Assert.greater(len(feedback_pg.messages), 0)
开发者ID:glennhoward,项目名称:input-tests,代码行数:7,代码来源:test_search.py

示例4: test_feedback_can_be_filtered_by_locale_from_expanded_list

    def test_feedback_can_be_filtered_by_locale_from_expanded_list(self, mozwebqa):
        """This testcase covers # 15087 & 15120 in Litmus.

        1. Verify the initial locale count is 10
        2. Verify clicking the more locales link shows additional locales
        3. Verify filtering by one of the additional locales
        4. Verify that the number of messages in the locale list matches the number of messages returned
        5. Verify that the locale short code appears in the URL
        6. Verify that the locale for all messages on the first page of results is correct

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        feedback_pg.product_filter.select_product('firefox')
        feedback_pg.product_filter.select_version('--')

        Assert.equal(len(feedback_pg.locale_filter.locales), 10)
        feedback_pg.locale_filter.show_more_locales()
        Assert.greater(len(feedback_pg.locale_filter.locales), 10)

        locale = feedback_pg.locale_filter.locales[10]
        locale_name = locale.name
        locale_message_count = locale.message_count
        locale_code = locale.code
        locale.select()

        Assert.equal(feedback_pg.total_message_count.replace(',', ''), locale_message_count)
        Assert.equal(feedback_pg.locale_from_url, locale_code)
        [Assert.equal(message.locale, locale_name) for message in feedback_pg.messages]
开发者ID:Manchester412,项目名称:input-tests,代码行数:30,代码来源:test_locale_filter.py

示例5: test_feedback_custom_date_filter

    def test_feedback_custom_date_filter(self, mozwebqa):
        """This testcase covers # 13605, 13606 & 13715 in Litmus.

        1. Verifies the calendar is displayed when filtering on custom dates
        2. Verifies date-start=<date> and end-date=<date> in the url

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        Assert.equal(feedback_pg.date_filter.custom_dates_tooltip, "Custom")

        start_date = date.today() - timedelta(days=3)
        end_date = date.today() - timedelta(days=1)

        feedback_pg.date_filter.filter_by_custom_dates_using_datepicker(start_date, end_date)
        Assert.equal(feedback_pg.date_start_from_url, start_date.strftime('%Y-%m-%d'))
        Assert.equal(feedback_pg.date_end_from_url, end_date.strftime('%Y-%m-%d'))
        # TODO: Check results are within the expected date range, possibly by navigating to the first/last pages and checking the final result is within range. Currently blocked by bug 615844.

        # Check that the relevant days preset link is highlighted when the applied custom date filter matches it
        day_filters = ((1, "1d"), (7, "7d"), (30, "30d"))
        for days in day_filters:
            start_date = date.today() - timedelta(days=days[0])
            feedback_pg.date_filter.filter_by_custom_dates_using_datepicker(start_date, date.today())
            Assert.false(feedback_pg.date_filter.is_custom_date_filter_visible)
            Assert.equal(feedback_pg.date_start_from_url, start_date.strftime('%Y-%m-%d'))
            Assert.equal(feedback_pg.date_end_from_url, date.today().strftime('%Y-%m-%d'))
            Assert.equal(feedback_pg.date_filter.current_days, days[1])
开发者ID:AlexLakatos,项目名称:input-tests,代码行数:29,代码来源:test_date_filter.py

示例6: test_the_left_panel_layout

    def test_the_left_panel_layout(self, mozwebqa):
        """This testcase covers # 13595 & 13600 in Litmus.

        Litmus 13595 - input:Verify the layout of the left hand side section containing various filtering options
        Litmus 13600 - input:Verify the applications drop down in Product

        """
        feedback_pg = FeedbackPage(mozwebqa)
        feedback_pg.go_to_feedback_page()

        Assert.equal(feedback_pg.product_filter.selected_product, 'firefox')
        Assert.equal(feedback_pg.product_filter.selected_version, '7.0')
        Assert.false(feedback_pg.date_filter.is_date_filter_applied)

        Assert.false(feedback_pg.date_filter.is_custom_date_filter_visible)

        feedback_pg.date_filter.click_custom_dates()

        Assert.greater(len(feedback_pg.platform_filter.platforms), 0)
        Assert.equal(feedback_pg.product_filter.products, ['firefox', 'mobile'])
        feedback_pg.product_filter.select_version('--')
        types = [type.name for type in feedback_pg.type_filter.types]
        Assert.equal(types, ['Praise', 'Issues', 'Ideas'])

        platforms = [platform.name for platform in feedback_pg.platform_filter.platforms]
        Assert.equal(platforms, ['Windows 7', 'Windows XP', 'Windows Vista', 'Mac OS X', 'Linux'])

        Assert.greater(len(feedback_pg.locale_filter.locales), 0)

        locales = [locale.name for locale in feedback_pg.locale_filter.locales]
        Assert.true(set(['English (US)', 'German', 'Spanish', 'French']).issubset(set(locales)))
开发者ID:AlexLakatos,项目名称:input-tests,代码行数:31,代码来源:test_feedback_layout.py

示例7: test_datepicker_is_only_shown_when_a_date_field_has_focus

    def test_datepicker_is_only_shown_when_a_date_field_has_focus(self, mozwebqa):
        """This testcase covers # 13726 in Litmus.

        1.Verify that two text fields appear to set the start and end dates
        2.On clicking inside the date text field a calendar should pop up to select the date
        3.Calendar pop up gets closed
        4.Selected date is set in the date field and calendar pop up gets closed

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        Assert.false(feedback_pg.date_filter.is_datepicker_visible)
        feedback_pg.date_filter.click_custom_dates()

        #Check that two text fields appear to set the start and end dates
        Assert.true(feedback_pg.date_filter.is_custom_start_date_visible)
        Assert.true(feedback_pg.date_filter.is_custom_end_date_visible)

        #Check if clicking inside the start/end date text field a calendar pops up
        feedback_pg.date_filter.click_start_date()
        Assert.true(feedback_pg.date_filter.is_datepicker_visible)
        #dismiss the datepicker and assert that it is not visible before clicking in the end date field
        feedback_pg.date_filter.close_datepicker()
        Assert.false(feedback_pg.date_filter.is_datepicker_visible)
        feedback_pg.date_filter.click_end_date()
        Assert.true(feedback_pg.date_filter.is_datepicker_visible)

        #Check if clicking outside of calendar pop up makes it disappear
        feedback_pg.date_filter.close_datepicker()
        Assert.false(feedback_pg.date_filter.is_datepicker_visible)
开发者ID:AlexLakatos,项目名称:input-tests,代码行数:31,代码来源:test_datepicker.py

示例8: test_feedback_preset_date_filters

    def test_feedback_preset_date_filters(self, mozwebqa):
        """This testcase covers # 13605 & 13606 in Litmus.

        1. Verifies the preset date filters of 1, 7, and 30 days

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        Assert.equal(feedback_pg.date_filter.current_days, u"\u221e")

        # Last day filter
        Assert.equal(feedback_pg.date_filter.last_day_tooltip, 'Last day')
        feedback_pg.date_filter.click_last_day()
        Assert.equal(feedback_pg.date_filter.current_days, '1d')
        start_date = date.today() - timedelta(days=1)
        Assert.equal(feedback_pg.date_start_from_url, start_date.strftime('%Y-%m-%d'))
        # TODO: Check results are within the expected date range, possibly by navigating to the last page and checking the final result is within range. Currently blocked by bug 615844.

        # Last seven days filter
        Assert.equal(feedback_pg.date_filter.last_seven_days_tooltip, 'Last 7 days')
        feedback_pg.date_filter.click_last_seven_days()
        Assert.equal(feedback_pg.date_filter.current_days, '7d')
        start_date = date.today() - timedelta(days=7)
        Assert.equal(feedback_pg.date_start_from_url, start_date.strftime('%Y-%m-%d'))
        # TODO: Check results are within the expected date range, possibly by navigating to the last page and checking the final result is within range. Currently blocked by bug 615844.

        # Last thirty days filter
        Assert.equal(feedback_pg.date_filter.last_thirty_days_tooltip, 'Last 30 days')
        feedback_pg.date_filter.click_last_thirty_days()
        Assert.equal(feedback_pg.date_filter.current_days, '30d')
        start_date = date.today() - timedelta(days=30)
        Assert.equal(feedback_pg.date_start_from_url, start_date.strftime('%Y-%m-%d'))
开发者ID:AlexLakatos,项目名称:input-tests,代码行数:33,代码来源:test_date_filter.py

示例9: test_feedback_can_be_filtered_by_platform

    def test_feedback_can_be_filtered_by_platform(self, mozwebqa):
        """This testcase covers # 15215 in Litmus.

        1. Verify that the selected platform is the only one to appear in the list and is selected
        2. Verify that the number of messages in the platform list is plus or minus 15 for the number of messages returned
        3. Verify that the platform appears in the URL
        4. Verify that the platform for all messages on the first page of results is correct

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        feedback_pg.product_filter.select_product('firefox')
        feedback_pg.product_filter.select_version('--')

        platform_name = "Mac OS X"
        platform = feedback_pg.platform_filter.platform(platform_name)
        platform_message_count = platform.message_count
        platform_code = platform.code
        platform.click()

        total_message_count = feedback_pg.total_message_count.replace(',', '')
        message_count_difference = int(total_message_count) - int(platform_message_count)

        Assert.equal(len(feedback_pg.platform_filter.platforms), 1)
        Assert.true(feedback_pg.platform_filter.platform(platform_name).is_selected)
        # TODO refactor if unittest-zero receives an Assert.within_range method
        Assert.less_equal(message_count_difference, 15)
        Assert.greater_equal(message_count_difference, -15)
        Assert.equal(feedback_pg.platform_from_url, platform_code)
        [Assert.equal(message.platform, platform_name) for message in feedback_pg.messages]
开发者ID:Manchester412,项目名称:input-tests,代码行数:31,代码来源:test_platform_filter.py

示例10: test_percentage

    def test_percentage(self, mozwebqa):
        """Litmus 13719 - input:Verify the Percentage # for Platform and Locale"""
        feedback_pg = FeedbackPage(mozwebqa)
        feedback_pg.go_to_feedback_page()

        feedback_pg.locale_filter.show_more_locales()
        for locale in feedback_pg.locale_filter.locales:
            expected_percentage = round((float(locale.message_count) / float(feedback_pg.locale_filter.total_message_count)) * 100)
            Assert.equal(expected_percentage, int(locale.message_percentage.split("%")[0]))
开发者ID:Manchester412,项目名称:input-tests,代码行数:9,代码来源:test_locale_filter.py

示例11: test_search_pagination

    def test_search_pagination(self, mozwebqa):
        """Litmus 13636 - Input: Verify Search results have pagination."""
        feedback_pg = FeedbackPage(mozwebqa)
        feedback_pg.go_to_feedback_page()
        feedback_pg.search_for("facebook")

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

        feedback_pg.click_older_messages()
        Assert.equal(feedback_pg.search_term_from_url, "facebook")

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

        feedback_pg.click_newer_messages()
        Assert.equal(feedback_pg.search_term_from_url, "facebook")

        Assert.true(feedback_pg.is_older_messages_link_visible)
        Assert.false(feedback_pg.is_newer_messages_link_visible)
        Assert.equal(feedback_pg.older_messages_link, 'Older Messages')
        Assert.equal(feedback_pg.page_from_url, 1)
开发者ID:glennhoward,项目名称:input-tests,代码行数:26,代码来源:test_pagination.py

示例12: test_search_box_placeholder

    def test_search_box_placeholder(self, mozwebqa):
        """Litmus 13845.

        1. Verify that there is a search field appearing in Latest Feedback
        section it shows by default "Search by keyword"

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        Assert.equal(feedback_pg.search_box_placeholder, "Search by keyword")
开发者ID:AlexLakatos,项目名称:input-tests,代码行数:11,代码来源:test_search.py

示例13: test_dashboard_should_have_recent_feedback

    def test_dashboard_should_have_recent_feedback(self, mozwebqa):
        """This testcase covers https://bugzilla.mozilla.org/show_bug.cgi?id=816213

        1. Verifies that there are results for the 1 day date range

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        feedback_pg.date_filter.click_last_day()
        Assert.equal(feedback_pg.date_filter.current_days, '1d')
        Assert.true(len(feedback_pg.messages) > 0, 'There is no feedback for the past day on the dashboard.')
开发者ID:AlinT,项目名称:input-tests,代码行数:12,代码来源:test_date_filter.py

示例14: test_that_we_can_search_feedback_with_unicode

    def test_that_we_can_search_feedback_with_unicode(self, mozwebqa):
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        feedback_pg.search_for(u"p\xe1gina")
        # There's no way to guarantee that the search we did finds
        # responses on the page. So we check for one of two possible
        # scenarios: existences of responses or a message count of 0.
        Assert.true(
            feedback_pg.no_messages
            or (len(feedback_pg.messages) > 0)
        )
开发者ID:B-Rich,项目名称:fjord,代码行数:12,代码来源:test_search.py

示例15: test_that_we_can_search_feedback_with_unicode

    def test_that_we_can_search_feedback_with_unicode(self, mozwebqa):
        """Litmus 13697"""
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()
        # Select the Firefox version that is 1 less than the newest to ensure the unicode
        # search returns at least 1 result.
        feedback_pg.product_filter.select_product('firefox')
        feedback_pg.product_filter.select_version('--')

        feedback_pg.search_for(u"rapidit\xe9")
        Assert.greater(len(feedback_pg.messages), 0)
开发者ID:AlexLakatos,项目名称:input-tests,代码行数:12,代码来源:test_search.py


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