Пример #1
0
 def test_that_searching_for_cool_returns_cooliris(self, testsetup):
     """
     Litmus 17353
     https://litmus.mozilla.org/show_test.cgi?id=17353
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("Cool")
     Assert.equal(amo_search_page.result(0).name, 'Cooliris')
Пример #2
0
 def test_that_searching_for_fire_returns_firebug(self, testsetup):
     """
     Litmus 15314
     https://litmus.mozilla.org/show_test.cgi?id=15314
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("fire")
     Assert.equal(amo_search_page.result(0).name, 'Firebug')
Пример #3
0
 def test_that_searching_for_twitter_returns_yoono(self, testsetup):
     """
     Litmus 17354
     https://litmus.mozilla.org/show_test.cgi?id=17354
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("twitter")
     Assert.equal(amo_search_page.result(0).name, 'Yoono: Twitter Facebook LinkedIn YouTube GTalk AIM')
Пример #4
0
 def test_that_entering_a_long_string_returns_no_results(self):
     """ Litmus 4856
         https://litmus.mozilla.org/show_test.cgi?id=4856 """
     amo_home_page = AddonsHomePage(self.selenium)
     amo_search_page = amo_home_page.search_for("a" * 255)
     self.assertTrue(amo_search_page.is_text_present("No results found."))
     results_count = amo_search_page.results_count
     self.assertTrue("0 - 0 of 0" in results_count)
Пример #5
0
 def test_that_page_with_search_results_has_correct_title(self, testsetup):
     """ Litmus 17338
         https://litmus.mozilla.org/show_test.cgi?id=17338 """
     amo_home_page = AddonsHomePage(testsetup)
     search_keyword = 'Search term'
     amo_search_page = amo_home_page.search_for(search_keyword)
     expected_title = 'Add-on Search Results for %s :: Add-ons for Firefox' % search_keyword
     Assert.equal(expected_title, amo_search_page.page_title)
Пример #6
0
 def test_that_entering_a_long_string_returns_no_results(self, testsetup):
     """ Litmus 4856
         https://litmus.mozilla.org/show_test.cgi?id=4856 """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("a" * 255)
     Assert.true(amo_search_page.is_text_present("No results found."))
     results_summary = amo_search_page.results_summary
     Assert.true("0 - 0 of 0" in results_summary)
Пример #7
0
 def test_that_entering_a_long_string_returns_no_results(self):
     """ Litmus 4856
         https://litmus.mozilla.org/show_test.cgi?id=4856 """
     amo_home_page = AddonsHomePage(self.selenium)
     amo_search_page = amo_home_page.search_for("a" * 255)
     self.assertTrue(amo_search_page.is_text_present("No results found."))
     results_count = amo_search_page.results_count
     self.assertTrue("0 - 0 of 0" in results_count)
Пример #8
0
 def test_that_verify_the_breadcrumb_on_search_results_page(self, testsetup):
     """
     Litmus 17341
     https://litmus.mozilla.org/show_test.cgi?id=17341
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("text")
     Assert.equal(amo_search_page.breadcrumbs_value, 'Add-ons for Firefox Search')
Пример #9
0
 def test_that_character_escaping_doesnt_go_into_the_test(self, testsetup):
     """ Test for Litmus 4857
         https://litmus.mozilla.org/show_test.cgi?id=4857"""
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("personas%20plus")
     Assert.true(amo_search_page.is_text_present("No results found."))
     results_summary = amo_search_page.results_summary
     Assert.true("0 - 0 of 0" in results_summary)
Пример #10
0
 def test_that_searching_with_numerals_returns_results(self, testsetup):
     """
     Litmus 17347
     https://litmus.mozilla.org/show_test.cgi?id=17347
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("1")
     Assert.true(amo_search_page.result_count > 0)
Пример #11
0
 def test_that_character_escaping_doesnt_go_into_the_test(self):
     """ Test for Litmus 4857
         https://litmus.mozilla.org/show_test.cgi?id=4857"""
     amo_home_page = AddonsHomePage(self.selenium)
     amo_search_page = amo_home_page.search_for("personas%20plus")
     self.assertTrue(amo_search_page.is_text_present("No results found."))
     results_count = amo_search_page.results_count
     self.assertTrue("0 - 0 of 0" in results_count)
Пример #12
0
 def test_that_searching_with_unicode_characters_returns_results(self, testsetup):
     """ Litmus 9575
         https://litmus.mozilla.org/show_test.cgi?id=9575 """
     amo_home_page = AddonsHomePage(testsetup)
     search_str = u'\u0421\u043b\u043e\u0432\u0430\u0440\u0438 \u042f\u043d\u0434\u0435\u043a\u0441'
     amo_search_page = amo_home_page.search_for(search_str)
     Assert.true(amo_search_page.is_text_present(search_str))
     results_summary = amo_search_page.results_summary
     Assert.false("0 - 0 of 0" in results_summary)
Пример #13
0
    def test_that_search_returns_top_1000_results(self, testsetup):

        amo_home_page = AddonsHomePage(testsetup)
        amo_search_page = amo_home_page.search_for("a")

        results = amo_search_page.results_summary
        total_results = results.split(' ')[5]

        Assert.equal(total_results, '1000')
Пример #14
0
 def test_that_blank_search_returns_results(self, testsetup):
     """ Litmus 11759
         https://litmus.mozilla.org/show_test.cgi?id=11759 """               
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("")     
     Assert.false(amo_search_page.is_text_present("Search is currently unavailable"))
     Assert.false(amo_search_page.is_text_present("No results found."))
     results_count = amo_search_page.results_count
     Assert.false("0 - 0 of 0" in results_count)
Пример #15
0
 def test_that_searching_with_unicode_characters_returns_results(self):
     """ Litmus 9575
         https://litmus.mozilla.org/show_test.cgi?id=9575 """
     amo_home_page = AddonsHomePage(self.selenium)
     search_str = u'\u0421\u043b\u043e\u0432\u0430\u0440\u0438 \u042f\u043d\u0434\u0435\u043a\u0441'
     amo_search_page = amo_home_page.search_for(search_str)
     self.assertTrue(amo_search_page.is_text_present(search_str))
     results_count = amo_search_page.results_count
     self.assertFalse("0 - 0 of 0" in results_count)
Пример #16
0
 def test_that_searching_with_substrings_returns_results(self):
     """ Litmus 9561
         https://litmus.mozilla.org/show_test.cgi?id=9561 """
     amo_home_page = AddonsHomePage(self.selenium)
     amo_search_page = amo_home_page.search_for("fox")
     self.assertFalse(amo_search_page.is_text_present("No results found."))
     results_count = amo_search_page.results_count
     self.assertFalse("0 - 0 of 0" in results_count)
     matches = re.search(self._total_count_regex, results_count)
     self.assertTrue(int(matches.group(1)) > 1)
Пример #17
0
 def test_that_searching_with_substrings_returns_results(self, testsetup):
     """ Litmus 9561
         https://litmus.mozilla.org/show_test.cgi?id=9561 """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("fox")
     Assert.false(amo_search_page.is_text_present("No results found."))
     results_summary = amo_search_page.results_summary
     Assert.false("0 - 0 of 0" in results_summary)
     matches = re.search(self._total_count_regex, results_summary)
     Assert.true(int(matches.group(1)) > 1)
Пример #18
0
 def test_that_searching_for_a_tag_returns_results(self, testsetup):
     """
     Litmus 7848
     https://litmus.mozilla.org/show_test.cgi?id=7848
     """
     amo_home_page = AddonsHomePage(testsetup)
     amo_search_page = amo_home_page.search_for("development")
     Assert.true(amo_search_page.result_count > 0)
     Assert.equal(amo_search_page.refine_results.tag("development").name, "development")
     Assert.true(amo_search_page.refine_results.tag_count > 1)
Пример #19
0
    def test_that_search_all_add_ons_results_have_pagination_that_moves_through_results(
            self):
        """ Test for litmus 4839 
            https://litmus.mozilla.org/show_test.cgi?id=4839
        """
        amo_home_page = AddonsHomePage(self.selenium)
        amo_search_page = amo_home_page.search_for("addon")
        first_expected = 1
        second_expected = 20

        # Go Forward 10 times
        for i in range(10):
            amo_search_page.page_forward()
            results_count = amo_search_page.results_count

            matches = re.search(self._count_regex, results_count)
            first_count = matches.group(1)
            second_count = matches.group(2)

            first_expected += 20
            second_expected += 20
            self.assertEqual(str(first_expected), first_count)
            self.assertEqual(str(second_expected), second_count)

        # Go Back 10 Times
        for i in range(10):
            amo_search_page.page_back()
            results_count = amo_search_page.results_count

            matches = re.search(self._count_regex, results_count)
            first_count = matches.group(1)
            second_count = matches.group(2)

            first_expected -= 20
            second_expected -= 20
            self.assertEqual(str(first_expected), first_count)
            self.assertEqual(str(second_expected), second_count)
Пример #20
0
    def test_that_search_all_add_ons_results_have_pagination_that_moves_through_results(self, testsetup):
        """ Test for litmus 4839
            https://litmus.mozilla.org/show_test.cgi?id=4839
        """
        amo_home_page = AddonsHomePage(testsetup)
        amo_search_page = amo_home_page.search_for("addon")
        first_expected = 1
        second_expected = 20

        # Go Forward 10 times
        for i in range(10):
            amo_search_page.page_forward()
            results_summary = amo_search_page.results_summary

            matches = re.search(self._count_regex, results_summary)
            first_count = matches.group(1)
            second_count = matches.group(2)

            first_expected += 20
            second_expected += 20
            Assert.equal(str(first_expected), first_count)
            Assert.equal(str(second_expected), second_count)

        # Go Back 10 Times
        for i in range(10):
            amo_search_page.page_back()
            results_summary = amo_search_page.results_summary

            matches = re.search(self._count_regex, results_summary)
            first_count = matches.group(1)
            second_count = matches.group(2)

            first_expected -= 20
            second_expected -= 20
            Assert.equal(str(first_expected), first_count)
            Assert.equal(str(second_expected), second_count)
 def test_navigate_to_detail_page_from_addon_search_page(self, testsetup):
     home_page = AddonsHomePage(testsetup)
     search_page = home_page.search_for("Firebug")
     detail_page = search_page.click_addon("Firebug")
     Assert.equal("Firebug :: Add-ons for Firefox", detail_page.page_title)
 def test_navigate_to_detail_page_from_addon_search_page(self, testsetup):
     home_page = AddonsHomePage(testsetup)
     search_page = home_page.search_for("Firebug")
     detail_page = search_page.click_addon("Firebug")
     Assert.equal("Firebug :: Add-ons for Firefox", detail_page.page_title)