def test_that_description_text_is_correct(self, mozwebqa): """litmus 15321""" #browser firebug_page = Details(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.replace('\n', ''), xml_description.replace('\n', ''))
def test_that_firebug_summary_is_correct(self, mozwebqa): """litmus 15320""" #browser firebug_page = Details(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_rating_in_api_equals_rating_in_details_page(self, mozwebqa): """litmus 15325""" #browser firebug_page = Details(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_support_url_is_correct(self, mozwebqa): """litmus 15337""" #browser firebug_page = Details(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 = Details(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 = Details(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])