コード例 #1
0
    def test_that_questions_sorts_correctly_by_filter_equal_to_no_replies(self, mozwebqa):
        """
           Goes to the /questions page,
           Verifies the sort filter=noreplies works
        """
        expected_sorted_text = "No replies"

        questions_page = PageProvider(mozwebqa).questions_page()
        questions_page.click_to_expand_sort_and_filter_box()
        Assert.true(questions_page.is_sort_and_filter_box_expanded)

        questions_page.click_sort_by_no_replies_questions()
        # if there are no questions in the list then skip the test
        if not questions_page.are_questions_present:
            pytest.skip("No questions present for filter=%s" % expected_sorted_text)

        for question in questions_page.questions:
            Assert.equal(0, question.number_of_replies)
コード例 #2
0
    def test_that_questions_sorts_correctly_by_filter_equal_to_solved(self, mozwebqa):
        """
           Goes to the /questions page,
           Verifies the sort filter=solved works
        """
        expected_sorted_text = "SOLVED"

        questions_page = PageProvider(mozwebqa).questions_page()
        questions_page.click_to_expand_sort_and_filter_box()
        Assert.true(questions_page.is_sort_and_filter_box_expanded)

        questions_page.click_sort_by_solved_questions()
        # if there are no questions in the list then skip the test
        if not questions_page.are_questions_present:
            pytest.skip("No questions present for filter=%s" % expected_sorted_text)

        for question in questions_page.questions:
            actual_sorted_text = question.sorted_list_filter_text
            Assert.equal(actual_sorted_text, expected_sorted_text)
コード例 #3
0
    def test_that_questions_sorts_correctly_by_filter_equal_to_no_replies(
            self, mozwebqa):
        """
           Goes to the /questions page,
           Verifies the sort filter=noreplies works
        """
        expected_sorted_text = "No replies"

        questions_page = PageProvider(mozwebqa).questions_page()
        questions_page.click_to_expand_sort_and_filter_box()
        Assert.true(questions_page.is_sort_and_filter_box_expanded)

        questions_page.click_sort_by_no_replies_questions()
        # if there are no questions in the list then skip the test
        if not questions_page.are_questions_present:
            pytest.skip("No questions present for filter=%s" %
                        expected_sorted_text)

        for question in questions_page.questions:
            Assert.equal(0, question.number_of_replies)
コード例 #4
0
    def test_that_questions_sorts_correctly_by_filter_equal_to_solved(
            self, mozwebqa):
        """
           Goes to the /questions page,
           Verifies the sort filter=solved works
        """
        expected_sorted_text = "SOLVED"

        questions_page = PageProvider(mozwebqa).questions_page()
        questions_page.click_to_expand_sort_and_filter_box()
        Assert.true(questions_page.is_sort_and_filter_box_expanded)

        questions_page.click_sort_by_solved_questions()
        # if there are no questions in the list then skip the test
        if not questions_page.are_questions_present:
            pytest.skip("No questions present for filter=%s" %
                        expected_sorted_text)

        for question in questions_page.questions:
            actual_sorted_text = question.sorted_list_filter_text
            Assert.equal(actual_sorted_text, expected_sorted_text)