Exemplo n.º 1
0
    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'))
Exemplo n.º 2
0
    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)
    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]
    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)
    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]
Exemplo n.º 6
0
    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)))
    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)
    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')

        platform_name = "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
        message_count_difference = total_message_count - 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
        ]
Exemplo n.º 9
0
    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])
Exemplo n.º 10
0
    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, locale_message_count)
        Assert.equal(feedback_pg.locale_from_url, locale_code)
        [
            Assert.equal(message.locale, locale_name)
            for message in feedback_pg.messages
        ]
Exemplo n.º 11
0
    def test_feedback_custom_date_filter_with_end_date_lower_than_start_date(
            self, mozwebqa):
        """This testcase covers # 13613, 13724 in Litmus.

        1. Verifies start_date > end_date get switched automatically and the results are shown from end date to start date

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()

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

        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.

        feedback_pg.date_filter.click_custom_dates()
        Assert.equal(feedback_pg.date_filter.custom_start_date,
                     start_date.strftime('%Y-%m-%d'))
        Assert.equal(feedback_pg.date_filter.custom_end_date,
                     end_date.strftime('%Y-%m-%d'))
Exemplo n.º 12
0
    def test_feedback_can_be_filtered_by_locale(self, mozwebqa):
        """This testcase covers # 15120 in Litmus.

        1. Verify that the number of messages in the locale list matches the number of messages returned
        2. Verify that the locale short code appears in the URL
        3. 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('--')

        locale_name = "Russian"
        locale = feedback_pg.locale_filter.locale(locale_name)
        locale_message_count = locale.message_count
        locale_code = locale.code
        locale.select()

        Assert.equal(feedback_pg.total_message_count, locale_message_count)
        Assert.equal(feedback_pg.locale_from_url, locale_code)
        [
            Assert.equal(message.locale, locale_name)
            for message in feedback_pg.messages
        ]
Exemplo n.º 13
0
    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)
Exemplo n.º 14
0
    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)
Exemplo n.º 15
0
    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)
Exemplo n.º 16
0
    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)
Exemplo n.º 17
0
    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]))
Exemplo n.º 18
0
    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")
Exemplo n.º 19
0
    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")
Exemplo n.º 20
0
    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, locale.message_percentage)
Exemplo n.º 21
0
    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.')
Exemplo n.º 22
0
    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)
Exemplo n.º 23
0
    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)
        )
Exemplo n.º 24
0
    def test_the_middle_section_page(self, mozwebqa):
        """This testcase covers # 13599 & 13721 in Litmus.

        Litmus 13596 - input:Verify the layout of Latest Feedback section
        Litmus 13721 - input:Verify the layout of Feedback page (feedback tab)

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

        Assert.equal(feedback_pg.search_box_placeholder, "Search by keyword")
        Assert.greater(len(feedback_pg.messages), 0)

        Assert.true(feedback_pg.is_chart_visible)

        Assert.true(feedback_pg.is_older_messages_link_enabled)
        Assert.false(feedback_pg.is_newer_messages_link_enabled)

        feedback_pg.click_older_messages()
        Assert.true(feedback_pg.is_older_messages_link_enabled)
        Assert.true(feedback_pg.is_newer_messages_link_enabled)

        feedback_pg.click_newer_messages()
        Assert.true(feedback_pg.is_older_messages_link_enabled)
        Assert.false(feedback_pg.is_newer_messages_link_enabled)
Exemplo n.º 25
0
    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.')
Exemplo n.º 26
0
    def test_datepicker_next_month_button_disabled(self, mozwebqa):
        """This testcase covers # 13844 in Litmus.

        1. The forward button of the calendar pop up is disabled if the user
        is in current month thus unable to select some future date.

        """
        feedback_pg = FeedbackPage(mozwebqa)
        feedback_pg.go_to_feedback_page()
        feedback_pg.date_filter.click_custom_dates()
        feedback_pg.date_filter.click_start_date()
        Assert.true(feedback_pg.date_filter.is_datepicker_next_month_button_disabled)

        feedback_pg.date_filter.click_end_date()
        Assert.true(feedback_pg.date_filter.is_datepicker_next_month_button_disabled)
Exemplo n.º 27
0
    def test_feedback_can_be_filtered_by_all_products_and_versions(self, mozwebqa):
        """Tests product filtering in dashboard

        1. Verify that at least one product exists
        2. Verify that filtering by product returns results
        3. Verify that versions show up when you choose a product
        4. Verify that the state of the filters are correct after being applied
        5. Verify product and version values in the URL

        NB: We don't cycle through all product/version
        combinations--only the first two of each.

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()

        total_messages = feedback_pg.total_message_count

        products = feedback_pg.product_filter.products
        Assert.greater(len(products), 0)

        for product in products[:2]:
            if not product:
                # If it's the "unknown" product, just skip it.
                continue

            feedback_pg.product_filter.select_product(product)
            Assert.greater(total_messages, feedback_pg.total_message_count)
            versions = feedback_pg.product_filter.versions
            Assert.greater(len(versions), 0)

            for version in versions[:2]:
                if not version:
                    # If it's the "unknown" version, just skip it.
                    continue

                feedback_pg.product_filter.select_version(version)

                Assert.greater(total_messages, feedback_pg.total_message_count)
                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)
Exemplo n.º 28
0
    def test_the_area_layout(self, mozwebqa):
        """This testcase covers # 13598 in Litmus.

        Litmus 13598 - input:Verify the layout of footer area.

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

        Assert.equal(feedback_pg.footer.privacy_policy, "Privacy Policy")
        Assert.equal(feedback_pg.footer.legal_notices, "Legal Notices")
        Assert.equal(feedback_pg.footer.report_trademark_abuse, "Report Trademark Abuse")
        Assert.equal(feedback_pg.footer.unless_otherwise_noted, "noted")
        Assert.equal(feedback_pg.footer.creative_commons, "Creative Commons Attribution Share-Alike License v3.0")
        Assert.equal(feedback_pg.footer.about_input, "About Firefox Input")
        Assert.true(feedback_pg.footer.is_language_dropdown_visible)
Exemplo n.º 29
0
    def test_datepicker_next_month_button_disabled(self, mozwebqa):
        """This testcase covers # 13844 in Litmus.

        1. The forward button of the calendar pop up is disabled if the user
        is in current month thus unable to select some future date.

        """
        feedback_pg = FeedbackPage(mozwebqa)
        feedback_pg.go_to_feedback_page()
        feedback_pg.date_filter.click_custom_dates()
        feedback_pg.date_filter.click_start_date()
        Assert.true(
            feedback_pg.date_filter.is_datepicker_next_month_button_disabled)

        feedback_pg.date_filter.click_end_date()
        Assert.true(
            feedback_pg.date_filter.is_datepicker_next_month_button_disabled)
Exemplo n.º 30
0
    def test_the_right_panel_layout(self, mozwebqa):
        """This testcase covers # 13597 & 13716 in Litmus.

        Litmus 13597 - input:Verify the layout of right hand section containing statistics data
        Litmus 13716 - input:Verify while visiting section

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

        Assert.equal(feedback_pg.total_message_count_heading, "MESSAGES")
        Assert.greater(feedback_pg.total_message_count, 0)

        Assert.equal(feedback_pg.common_words_filter.common_words_header, "Often Mentioned")
        Assert.greater(feedback_pg.common_words_filter.common_words_count, 0)

        Assert.equal(feedback_pg.sites_filter.header, "While Visiting")
        Assert.greater(len(feedback_pg.sites_filter.sites), 0)
Exemplo n.º 31
0
    def test_feedback_can_be_displayed_for_all_mobile_versions(self, mozwebqa):
        """This testcase covers # 15377 in Litmus.

        1. Verify that filtering by all versions returns results
        2. Verify that the state of the filters are correct after being applied
        3. Verify product and version values in the URL

        """
        feedback_pg = FeedbackPage(mozwebqa)

        product = "mobile"
        version = "--"
        feedback_pg.go_to_feedback_page()
        feedback_pg.product_filter.select_product(product)
        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)
Exemplo n.º 32
0
    def test_selecting_date_from_datepicker_populates_text_field(self, mozwebqa):
        """This testcase covers # 13844 in Litmus.

        1. On clicking inside the date text field a calendar should pop up to
        select the date. Verify that selected date appears in the date field.

        """
        feedback_pg = FeedbackPage(mozwebqa)

        today_date = date.today()

        feedback_pg.go_to_feedback_page()
        feedback_pg.date_filter.click_custom_dates()
        feedback_pg.date_filter.click_start_date()
        feedback_pg.date_filter.click_day(today_date.day)
        Assert.equal(feedback_pg.date_filter.custom_start_date, today_date.strftime('%Y-%m-%d'))
        feedback_pg.date_filter.click_end_date()
        feedback_pg.date_filter.click_day(today_date.day)
        Assert.equal(feedback_pg.date_filter.custom_end_date, today_date.strftime('%Y-%m-%d'))
Exemplo n.º 33
0
    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.product_filter.select_version("--")
        feedback_pg.search_for("facebook")

        Assert.true(feedback_pg.is_older_messages_link_visible)
        Assert.true(feedback_pg.is_newer_messages_link_visible)
        Assert.false(feedback_pg.is_newer_messages_link_enabled)

        Assert.equal(feedback_pg.older_messages_link, u"\xab Older Messages")
        Assert.equal(feedback_pg.newer_messages_link, u"Newer Messages \xbb")

        feedback_pg.click_older_messages()
        Assert.equal(feedback_pg.product_from_url, "firefox")
        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.true(feedback_pg.is_older_messages_link_enabled)
        Assert.true(feedback_pg.is_newer_messages_link_enabled)

        Assert.equal(feedback_pg.older_messages_link, u"\xab Older Messages")
        Assert.equal(feedback_pg.newer_messages_link, u"Newer Messages \xbb")

        Assert.equal(feedback_pg.page_from_url, 2)

        feedback_pg.click_newer_messages()
        Assert.equal(feedback_pg.product_from_url, "firefox")
        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.true(feedback_pg.is_older_messages_link_enabled)
        Assert.false(feedback_pg.is_newer_messages_link_enabled)

        Assert.equal(feedback_pg.older_messages_link, u"\xab Older Messages")
        Assert.equal(feedback_pg.newer_messages_link, u"Newer Messages \xbb")

        Assert.equal(feedback_pg.page_from_url, 1)
Exemplo n.º 34
0
    def test_feedback_can_be_displayed_for_all_mobile_versions(self, mozwebqa):
        """This testcase covers # 15377 in Litmus.

        1. Verify that filtering by all versions returns results
        2. Verify that the state of the filters are correct after being applied
        3. Verify product and version values in the URL

        """
        feedback_pg = FeedbackPage(mozwebqa)

        product = "mobile"
        version = "--"
        feedback_pg.go_to_feedback_page()
        feedback_pg.product_filter.select_product(product)
        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)
Exemplo n.º 35
0
    def test_feedback_custom_date_filter_with_end_date_lower_than_start_date(self, mozwebqa):
        """This testcase covers # 13613, 13724 in Litmus.

        1. Verifies start_date > end_date get switched automatically and the results are shown from end date to start date

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()

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

        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.

        feedback_pg.date_filter.click_custom_dates()
        Assert.equal(feedback_pg.date_filter.custom_start_date, start_date.strftime('%Y-%m-%d'))
        Assert.equal(feedback_pg.date_filter.custom_end_date, end_date.strftime('%Y-%m-%d'))
Exemplo n.º 36
0
    def test_feedback_custom_date_filter_with_random_alphabet(self, mozwebqa):
        """This testcase covers # 13607 in Litmus.

        1.Verifies custom date fields do not accept alphabet

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()

        letters = 'abcdefghijklmnopqrstuvwxyz'
        start_date = ''.join(random.sample(letters, 8))
        end_date = ''.join(random.sample(letters, 8))

        feedback_pg.date_filter.filter_by_custom_dates_using_keyboard(start_date, end_date)
        Assert.equal(feedback_pg.date_start_from_url, '')
        Assert.equal(feedback_pg.date_end_from_url, '')

        feedback_pg.date_filter.click_custom_dates()
        Assert.equal(feedback_pg.date_filter.custom_start_date, '')
        Assert.equal(feedback_pg.date_filter.custom_end_date, '')
Exemplo n.º 37
0
    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)
Exemplo n.º 38
0
    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)
Exemplo n.º 39
0
    def test_selecting_date_from_datepicker_populates_text_field(
            self, mozwebqa):
        """This testcase covers # 13844 in Litmus.

        1. On clicking inside the date text field a calendar should pop up to
        select the date. Verify that selected date appears in the date field.

        """
        feedback_pg = FeedbackPage(mozwebqa)

        today_date = date.today()

        feedback_pg.go_to_feedback_page()
        feedback_pg.date_filter.click_custom_dates()
        feedback_pg.date_filter.click_start_date()
        feedback_pg.date_filter.click_day(today_date.day)
        Assert.equal(feedback_pg.date_filter.custom_start_date,
                     today_date.strftime('%Y-%m-%d'))
        feedback_pg.date_filter.click_end_date()
        feedback_pg.date_filter.click_day(today_date.day)
        Assert.equal(feedback_pg.date_filter.custom_end_date,
                     today_date.strftime('%Y-%m-%d'))
Exemplo n.º 40
0
    def test_feedback_custom_date_filter_with_random_numbers(self, mozwebqa):
        """This testcase covers # 13608 in Litmus.

        1.Verifies random numbers show all recent feedback

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()

        start_date = random.randint(10000000, 50000000)
        end_date = random.randint(50000001, 99999999)

        feedback_pg.date_filter.filter_by_custom_dates_using_keyboard(start_date, end_date)
        Assert.equal(feedback_pg.date_start_from_url, str(start_date))
        Assert.equal(feedback_pg.date_end_from_url, str(end_date))

        Assert.equal(len(feedback_pg.messages), 20)

        feedback_pg.date_filter.click_custom_dates()
        Assert.equal(feedback_pg.date_filter.custom_start_date, str(start_date))
        Assert.equal(feedback_pg.date_filter.custom_end_date, str(end_date))
Exemplo n.º 41
0
    def test_feedback_custom_date_filter_with_invalid_dates(self, mozwebqa):
        """This testcase covers # 13609 & 13725 in Litmus.

        1.Verifies invalid dates show all recent feedback

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()

        start_date = "0000-00-00"
        end_date = "0000-00-00"

        feedback_pg.date_filter.filter_by_custom_dates_using_keyboard(start_date, end_date)
        Assert.equal(feedback_pg.date_start_from_url, start_date)
        Assert.equal(feedback_pg.date_end_from_url, end_date)

        Assert.equal(len(feedback_pg.messages), 20)

        feedback_pg.date_filter.click_custom_dates()
        Assert.equal(feedback_pg.date_filter.custom_start_date, start_date)
        Assert.equal(feedback_pg.date_filter.custom_end_date, end_date)
Exemplo n.º 42
0
    def test_feedback_custom_date_filter_with_future_dates(self, mozwebqa):
        """This testcase covers # 13612 in Litmus.

        1.Verifies future dates generate an error

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()

        start_date = "2021-01-01"
        end_date = "2031-01-01"

        feedback_pg.date_filter.filter_by_custom_dates_using_keyboard(start_date, end_date)
        Assert.equal(feedback_pg.date_start_from_url, start_date)
        Assert.equal(feedback_pg.date_end_from_url, end_date)

        Assert.equal(feedback_pg.warning_heading, 'NO SEARCH RESULTS FOUND.')

        feedback_pg.date_filter.click_custom_dates()
        Assert.equal(feedback_pg.date_filter.custom_start_date, start_date)
        Assert.equal(feedback_pg.date_filter.custom_end_date, end_date)
Exemplo n.º 43
0
    def test_feedback_custom_date_filter_with_future_start_date(self, mozwebqa):
        """This testcase covers # 13610 in Litmus.

        1.Verifies future start date are ignored as erroneous input and results for a 30 day period are returned

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()

        start_date = "2900-01-01"
        end_date = ""

        feedback_pg.date_filter.filter_by_custom_dates_using_keyboard(start_date, end_date)
        Assert.equal(feedback_pg.date_start_from_url, start_date)
        Assert.equal(feedback_pg.date_end_from_url, end_date)

        Assert.equal(len(feedback_pg.messages), 20)

        feedback_pg.date_filter.click_custom_dates()
        Assert.equal(feedback_pg.date_filter.custom_start_date, start_date)
        Assert.equal(feedback_pg.date_filter.custom_end_date, end_date)
Exemplo n.º 44
0
    def test_feedback_custom_date_filter_with_mdy_format(self, mozwebqa):
        """This testcase covers # 13614 in Litmus.

        1.Verifies custom date fields show all recent feedback

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()

        start_date = '04-22-2011'
        end_date = ''

        feedback_pg.date_filter.filter_by_custom_dates_using_keyboard(start_date, end_date)
        Assert.equal(feedback_pg.date_start_from_url, start_date)
        Assert.equal(feedback_pg.date_end_from_url, '')

        Assert.equal(len(feedback_pg.messages), 20)

        feedback_pg.date_filter.click_custom_dates()
        Assert.equal(feedback_pg.date_filter.custom_start_date, start_date)
        Assert.equal(feedback_pg.date_filter.custom_end_date, '')
Exemplo n.º 45
0
    def test_feedback_custom_date_filter_with_future_end_date(self, mozwebqa):
        """This testcase covers # 13611 in Litmus.

        1. Verifies future end date filter data until current day

        """
        feedback_pg = FeedbackPage(mozwebqa)

        feedback_pg.go_to_feedback_page()

        start_date = ""
        end_date = "2900-01-01"

        feedback_pg.date_filter.filter_by_custom_dates_using_keyboard(start_date, end_date)
        Assert.equal(feedback_pg.date_start_from_url, start_date)
        Assert.equal(feedback_pg.date_end_from_url, end_date)

        Assert.equal(feedback_pg.message_column_heading, 'SEARCH RESULTS')

        feedback_pg.date_filter.click_custom_dates()
        Assert.equal(feedback_pg.date_filter.custom_start_date, start_date)
        Assert.equal(feedback_pg.date_filter.custom_end_date, end_date)
Exemplo n.º 46
0
    def test_feedback_can_be_filtered_by_mobile_versions(self, mozwebqa):
        """This testcase covers # 13602 & 13604 in Litmus.

        1. Verify that at least three mobile 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)

        product = "mobile"
        feedback_pg.go_to_feedback_page()
        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), 3)
        for version in [versions[2], versions[-1]]:
            print "Checking %s version '%s'." % (product, version)
            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)