示例#1
0
 def test_addon_type_fails_when_addon_is_not_in_results(self, testsetup):
     addons_xml = AddOnsAPI(testsetup)
     try:
         Assert.raises(AttributeError,
                       addons_xml.get_addon_type_id("Firepug"))
     except AssertionError:
         pass
    def test_that_description_text_is_correct(self, mozwebqa):
        """litmus 15321"""
        #browser
        firebug_page = AddonsDetailsPage(mozwebqa, self.firebug)
        browser_description = firebug_page.description

        #api
        addons_xml = AddOnsAPI(mozwebqa)
        xml_description = addons_xml.get_addon_description(self.firebug)

        Assert.equal(browser_description, xml_description)
    def test_that_rating_in_api_equals_rating_in_details_page(self, mozwebqa):
        """litmus 15325"""

        #browser
        firebug_page = AddonsDetailsPage(mozwebqa, self.firebug)
        browser_rating = firebug_page.rating

        #api
        addons_xml = AddOnsAPI(mozwebqa)
        xml_rating = addons_xml.get_rating("firebug")

        Assert.equal(browser_rating, xml_rating)
    def test_that_icon_is_correct(self, testsetup):
        """litmus 15322"""

        #browser
        firebug_page = AddonsDetailsPage(testsetup, self.firebug)
        browser_icon = firebug_page.icon_url

        #xml
        addons_xml = AddOnsAPI(testsetup)
        xml_icon = addons_xml.get_icon_url(self.firebug)

        Assert.equal(browser_icon, xml_icon)
    def test_that_firebug_summary_is_correct(self, mozwebqa):
        """litmus 15320"""

        #browser
        firebug_page = AddonsDetailsPage(mozwebqa, self.firebug)
        browser_summary = firebug_page.summary

        #api
        addons_xml = AddOnsAPI(mozwebqa)
        xml_summary = addons_xml.get_addon_summary(self.firebug)

        Assert.equal(xml_summary, browser_summary)
    def test_that_support_url_is_correct(self, mozwebqa):
        """litmus 15337"""

        #browser
        firebug_page = AddonsDetailsPage(mozwebqa, self.firebug)
        browser_support_url = firebug_page.support_url

        #api
        addons_xml = AddOnsAPI(mozwebqa)
        xml_support_url = addons_xml.get_support_url("firebug")

        Assert.equal(browser_support_url, xml_support_url)
    def test_that_icon_is_correct(self, mozwebqa):
        """litmus 15322"""

        #browser
        firebug_page = AddonsDetailsPage(mozwebqa, self.firebug)
        browser_icon = firebug_page.icon_url

        #api
        addons_xml = AddOnsAPI(mozwebqa)

        xml_icon = addons_xml.get_icon_url(self.firebug)

        Assert.equal(browser_icon, xml_icon)
    def test_that_firebug_authors_is_correct(self, mozwebqa):
        """litmus 15319"""

        #get authors from browser
        firebug_page = AddonsDetailsPage(mozwebqa, self.firebug)
        browser_authors = firebug_page.authors

        #get authors from xml
        addons_xml = AddOnsAPI(mozwebqa)
        xml_authors = addons_xml.get_list_of_addon_author_names(self.firebug)

        #check that both lists have the same number of authors
        Assert.equal(len(browser_authors), len(xml_authors))

        #cross check both lists with each other
        for i in range(len(xml_authors)):
            Assert.equal(xml_authors[i], browser_authors[i])
示例#9
0
 def test_get_version_number(self, testsetup):
     addons_xml = AddOnsAPI(testsetup)
     Assert.equal(
         "1.1.6",
         addons_xml.get_addon_version_number(
             "Illuminations for Developers for Firebug"))
示例#10
0
 def test_get_addon_type_name(self, testsetup):
     addons_xml = AddOnsAPI(testsetup)
     Assert.equal("Extension", addons_xml.get_addon_type_name(
         "Firebug"))  #("Firefox 3 theme for Firefox 4"))
示例#11
0
 def test_get_addon_type_name(self, testsetup):
     addons_xml = AddOnsAPI(testsetup)
     Assert.equal("Extension", addons_xml.get_addon_type_name("Firebug"))  # ("Firefox 3 theme for Firefox 4"))
示例#12
0
 def test_addon_version_number_fails_when_addon_is_not_in_results(self, testsetup):
     addons_xml = AddOnsAPI(testsetup)
     Assert.raises(AttributeError, addons_xml.get_addon_version_number("Firepug"))
示例#13
0
 def test_addon_type_fails_when_addon_is_not_in_results(self, testsetup):
     addons_xml = AddOnsAPI(testsetup)
     try:
         Assert.raises(AttributeError, addons_xml.get_addon_type_id("Firepug"))
     except AssertionError:
         pass
示例#14
0
 def test_that_firebug_is_listed_first_in_addons_search_for_firebug(self, testsetup):
     """TestCase for Litmus 15316"""
     addons_xml = AddOnsAPI(testsetup)
     Assert.equal("Firebug", addons_xml.get_name_of_first_addon())
示例#15
0
 def test_firebug_version_number(self, mozwebqa):
     """Testcase for Litmus 15317"""
     addon_xml = AddOnsAPI(mozwebqa)
     Assert.equal("1.8.2", addon_xml.get_addon_version_number("Firebug"))
示例#16
0
 def test_firebug_version_number(self, testsetup):
     """Testcase for Litmus 15317"""
     addon_xml = AddOnsAPI(testsetup)
     Assert.equal("1.8.0", addon_xml.get_addon_version_number("Firebug"))
示例#17
0
 def test_that_firebug_addon_type_id_is_1(self, testsetup):
     """Testcase for Litmus 15316"""
     addon_xml = AddOnsAPI(testsetup)
     Assert.equal("1", addon_xml.get_addon_type_id("Firebug"))
示例#18
0
 def test_that_firebug_addon_type_name_is_extension(self, testsetup):
     """Testcase for Litmus 15316"""
     addons_xml = AddOnsAPI(testsetup)
     Assert.equal("Extension", addons_xml.get_addon_type_name("Firebug"))
示例#19
0
 def test_addon_is_not_in_search_results(self, testsetup):
     addons_xml = AddOnsAPI(testsetup)
     Assert.raises(AttributeError,
                   addons_xml.get_xml_for_single_addon("Firepug"))
示例#20
0
 def test_get_version_number(self, testsetup):
     addons_xml = AddOnsAPI(testsetup)
     Assert.equal("1.1.6", addons_xml.get_addon_version_number("Illuminations for Developers for Firebug"))
示例#21
0
 def test_first_addon_fails_when_addon_is_not_in_results(self, testsetup):
     addons_xml = AddOnsAPI(testsetup)
     bad_xml = AddOnsAPI("Firepug")
     #try:
     Assert.raises(AttributeError,
                   addons_xml)  #self.bad_xml.get_name_of_first_addon())
示例#22
0
 def test_addon_is_not_in_search_results(self, testsetup):
     addons_xml = AddOnsAPI(testsetup)
     Assert.raises(AttributeError, addons_xml.get_xml_for_single_addon("Firepug"))
示例#23
0
 def test_addon_version_number_fails_when_addon_is_not_in_results(
         self, testsetup):
     addons_xml = AddOnsAPI(testsetup)
     Assert.raises(AttributeError,
                   addons_xml.get_addon_version_number("Firepug"))
示例#24
0
 def test_that_firebug_is_listed_first_in_addons_search_for_fire(self, mozwebqa):
     """TestCase for Litmus 15314"""
     addons_xml = AddOnsAPI(mozwebqa, "fire")
     Assert.equal("Firebug", addons_xml.get_name_of_first_addon())