def test_footer_section(self, base_url, selenium): page = Partners(base_url, selenium).open() bad_links = [] for link in Partners.Footer.footer_links_list: url = page.link_destination(link.get('locator')) if not url.endswith(link.get('url_suffix')): bad_links.append('%s does not end with %s' % (url, link.get('url_suffix'))) assert [] == bad_links
def test_footer_section(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() bad_links = [] for link in Partners.Footer.footer_links_list: url = partners_page.link_destination(link.get('locator')) if not url.endswith(link.get('url_suffix')): bad_links.append('%s does not end with %s' % (url, link.get('url_suffix'))) assert [] == bad_links
def test_footer_section(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() bad_links = [] for link in Partners.Footer.footer_links_list: url = partners_page.link_destination(link.get('locator')) if not url.endswith(link.get('url_suffix')): bad_links.append('%s does not end with %s' % (url, link.get('url_suffix'))) Assert.equal(0, len(bad_links), '%s bad links found: ' % len(bad_links) + ', '.join(bad_links))
def test_footer_section(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() bad_links = [] for link in Partners.Footer.footer_links_list: url = partners_page.link_destination(link.get('locator')) if not url.endswith(link.get('url_suffix')): bad_links.append('%s does not end with %s' % (url, link.get('url_suffix'))) assert [] == bad_links
def test_tabzilla_links_are_correct(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() Assert.true(partners_page.header.is_tabzilla_panel_visible) partners_page.header.toggle_tabzilla_dropdown() bad_links = [] for link in Partners.Header.tabzilla_links_list: url = partners_page.link_destination(link.get('locator')) if url.find(link.get('url_suffix')) < 1: bad_links.append('%s does not end with %s' % (url, link.get('url_suffix'))) Assert.equal(0, len(bad_links), '%s bad links found: ' % len(bad_links) + ', '.join(bad_links))
def test_tabzilla_links_are_correct(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() Assert.true(partners_page.header.is_tabzilla_panel_visible) partners_page.header.toggle_tabzilla_dropdown() bad_links = [] for link in Partners.Header.tabzilla_links_list: url = partners_page.link_destination(link.get("locator")) if not url.endswith(link.get("url_suffix")): bad_links.append("%s does not end with %s" % (url, link.get("url_suffix"))) Assert.equal(0, len(bad_links), "%s bad links found: " % len(bad_links) + ", ".join(bad_links))
def test_footer_section(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() bad_links = [] for link in Partners.Footer.footer_links_list: url = partners_page.link_destination(link.get('locator')) if not url.endswith(link.get('url_suffix')): bad_links.append('%s does not end with %s' % (url, link.get('url_suffix'))) Assert.equal( 0, len(bad_links), '%s bad links found: ' % len(bad_links) + ', '.join(bad_links))
def test_footer_section(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() Assert.contains( partners_page.footer.expected_footer_logo_destination, partners_page.footer.footer_logo_destination ) Assert.contains(partners_page.footer.expected_footer_logo_img, partners_page.footer.footer_logo_img) bad_links = [] for link in Partners.Footer.footer_links_list: url = partners_page.link_destination(link.get("locator")) if not url.endswith(link.get("url_suffix")): bad_links.append("%s does not end with %s" % (url, link.get("url_suffix"))) Assert.equal(0, len(bad_links), "%s bad links found: " % len(bad_links) + ", ".join(bad_links))
def test_tabzilla_links_are_correct(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() Assert.true(partners_page.header.is_tabzilla_panel_visible) partners_page.header.toggle_tabzilla_dropdown() bad_links = [] for link in Partners.Header.tabzilla_links_list: url = partners_page.link_destination(link.get('locator')) if url.find(link.get('url_suffix')) < 1: bad_links.append('%s does not end with %s' % (url, link.get('url_suffix'))) Assert.equal( 0, len(bad_links), '%s bad links found: ' % len(bad_links) + ', '.join(bad_links))