def test_that_breadcrumb_links_in_addons_details_page_work(self, mozwebqa): """ Litmus 11923 https://litmus.mozilla.org/show_test.cgi?searchType=by_id&id=11923 """ amo_home_page = AddonsHomePage(mozwebqa) amo_detail_page = AddonsDetailsPage(mozwebqa, 'firebug') Assert.true(amo_detail_page.is_breadcrumb_menu_visible) Assert.equal(amo_detail_page.breadcrumbs[0].name, 'Add-ons for Firefox') link = amo_detail_page.breadcrumbs[0].link_value amo_detail_page.breadcrumbs[0].click() Assert.true(amo_home_page.is_the_current_page) Assert.true(amo_home_page.get_url_current_page().endswith(link)) amo_home_page.return_to_previous_page() Assert.equal(amo_detail_page.breadcrumbs[1].name, 'Extensions') link = amo_detail_page.breadcrumbs[1].link_value amo_detail_page.breadcrumbs[1].click() amo_extenstions_page = ExtensionsHomePage(mozwebqa) Assert.true(amo_extenstions_page.is_the_current_page) Assert.true(amo_extenstions_page.get_url_current_page().endswith(link)) amo_home_page.return_to_previous_page() Assert.equal(amo_detail_page.breadcrumbs[2].name, 'Firebug')
def test_that_clicking_mozilla_logo_loads_mozilla_dot_org(self, mozwebqa): """ Litmus 22922 https://litmus.mozilla.org/show_test.cgi?id=22922 """ amo_home_page = AddonsHomePage(mozwebqa) Assert.true(amo_home_page.is_mozilla_logo_visible) amo_home_page.click_mozilla_logo() Assert.equal(amo_home_page.get_url_current_page(), "http://www.mozilla.org/")
def test_that_themes_categories_are_listed_on_left_hand_side(self, mozwebqa): """ test for litmus 15342""" amo_home_page = AddonsHomePage(mozwebqa) amo_themes_page = amo_home_page.click_themes() current_page_url = amo_home_page.get_url_current_page() Assert.true(current_page_url.endswith("/themes/")) default_categories = ["Animals", "Compact", "Large", "Miscellaneous", "Modern", "Nature", "OS Integration", "Retro", "Sports"] Assert.equal(amo_themes_page.categories_count, len(default_categories)) count = 0 for category in default_categories: count += 1 current_category = amo_themes_page.get_category(count) Assert.equal(category, current_category)
def test_other_applications_thunderbird(self, mozwebqa): """ Test for litmus 5037 https://litmus.mozilla.org/show_test.cgi?id=5037 """ amo_home_page = AddonsHomePage(mozwebqa) amo_home_page.header.click_other_applications() amo_home_page.header.click_thunderbird() Assert.true("thunderbird" in amo_home_page.get_url_current_page()) amo_home_page.header.click_other_applications() Assert.false(amo_home_page.header.is_thunderbird_visible())