Пример #1
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)
Пример #2
0
    def test_search_pagination(self, mozwebqa):
        feedback_pg = FeedbackPage(mozwebqa)
        feedback_pg.go_to_feedback_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.
        feedback_pg.set_date_range('2013-01-01')
        feedback_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(feedback_pg.total_message_count, 50, "Search term didn't kick up enough messages. Please prime the server with more data!")

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

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

        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, self.SEARCH_TERM)

        Assert.true(feedback_pg.is_older_messages_link_visible)
        Assert.true(feedback_pg.is_newer_messages_link_not_visible)
        Assert.equal(feedback_pg.older_messages_link, 'Older Messages')
        Assert.equal(feedback_pg.page_from_url, 1)
Пример #3
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)
Пример #4
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()
        # 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.
        feedback_pg.set_date_range('2013-01-01')
        feedback_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(feedback_pg.total_message_count, 50, "Search term didn't kick up enough messages. Please prime the server with more data!")

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

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

        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, self.SEARCH_TERM)

        Assert.true(feedback_pg.is_older_messages_link_visible)
        Assert.true(feedback_pg.is_newer_messages_link_not_visible)
        Assert.equal(feedback_pg.older_messages_link, 'Older Messages')
        Assert.equal(feedback_pg.page_from_url, 1)
Пример #5
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)
Пример #6
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)