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() 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) for link in Partners.Footer.footer_links_list: Assert.contains(link.get('href'), partners_page.footer.footer_link_destination(link.get('text')))
def test_partner_images_pager_one(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() bad_images = [] Assert.true(partners_page.is_partner_with_us_button_visible) for image in partners_page.partner_images_pager_list_one: if not partners_page.is_element_visible(*image.get('locator')): bad_images.append('The image at %s is not visible' % image.get('locator')[1:]) Assert.equal(0, len(bad_images), '%s bad images found: ' % len(bad_images) + ', '.join(bad_images))
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_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))
def test_os_section(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() partners_page.click_os_menu() partners_page.click_operators_button() bad_images = [] for image in partners_page._operators_image_list: if not partners_page.is_element_visible(*image.get('locator')): bad_images.append('The image at %s is not visible' % image.get('locator')[1:]) Assert.equal( 0, len(bad_images), '%s bad images found: ' % len(bad_images) + ', '.join(bad_images))
def test_os_section(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() partners_page.click_os_menu() partners_page.click_operators_button() bad_images = [] for image in partners_page._operators_image_list: if not partners_page.is_element_visible(*image.get('locator')): bad_images.append('The image at %s is not visible' % image.get('locator')[1:]) Assert.equal(0, len(bad_images), '%s bad images found: ' % len(bad_images) + ', '.join(bad_images))
def test_partner_images_pager_two(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() bad_images = [] Assert.true(partners_page.is_partner_with_us_button_visible) for image in partners_page.partner_images_pager_list_two: partners_page.click_partner_pager_button() partners_page.click_partner_pager_button() partners_page.click_partner_pager_button() partners_page.click_partner_pager_button() # click the button a couple of times to override auto pager if not partners_page.is_element_visible(*image.get('locator')): bad_images.append('The image at %s is not visible' % image.get('locator')[1:]) Assert.equal(0, len(bad_images), '%s bad images found: ' % len(bad_images) + ', '.join(bad_images))
def test_partner_images_pager_one(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() bad_images = [] Assert.true(partners_page.is_partner_with_us_button_visible) partners_page.click_partner_page_one_button() for image in partners_page.partner_images_pager_list_one: if not partners_page.is_element_visible(*image.get('locator')): bad_images.append('The image at %s is not visible' % image.get('locator')[1:]) Assert.equal( 0, len(bad_images), '%s bad images found: ' % len(bad_images) + ', '.join(bad_images))
def test_partner_images_pager_one(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() bad_images = [] Assert.true(partners_page.is_partner_with_us_button_visible) partners_page.click_partner_page_one_button() for image in partners_page.partner_images_pager_list_one: if not partners_page.is_element_visible(*image.get("locator")): bad_images.append("The image at %s is not visible" % image.get("locator")[1:]) Assert.equal(0, len(bad_images), "%s bad images found: " % len(bad_images) + ", ".join(bad_images))
def test_submit_app_button_url(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() # changing url due to https://bugzilla.mozilla.org/show_bug.cgi?id=751903 Assert.equal(partners_page.check_submit_apps_button_url, 'https://marketplace.mozilla.org/ecosystem/')
def test_partner_billboard_links(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() Assert.true(partners_page.are_billboards_visible) Assert.true(partners_page.is_opening_soon_image_visible)
def test_header_section(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() Assert.true(partners_page.header.are_tabzilla_links_visible)
def test_footer_section(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() Assert.true(partners_page.footer.are_footer_links_visible)
def test_os_section(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() partners_page.click_os_menu() partners_page.selenium.maximize_window() partners_page.click_os_menu() partners_page.click_operators_button() partners_page.click_operators_button() partners_page.click_operators_button() partners_page.click_operators_button() bad_images = [] for image in partners_page._operators_image_list: if not partners_page.is_element_visible(*image.get("locator")): bad_images.append("The image at %s is not visible" % image.get("locator")[1:]) Assert.equal(0, len(bad_images), "%s bad images found: " % len(bad_images) + ", ".join(bad_images))
def test_overview_section_image(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.selenium.maximize_window() partners_page.go_to_page() Assert.true(partners_page.is_phone_overlay_visible)
def test_os_section(self, base_url, selenium): page = Partners(base_url, selenium).open() page.click_os_menu() page.click_operators_button()
def test_overview_section_image(self, base_url, selenium): page = Partners(base_url, selenium).open() assert page.is_phone_overlay_visible
def test_os_section(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() partners_page.click_os_menu() partners_page.click_operators_button()
def test_partner_images_pager_two(self, mozwebqa): partners_page = Partners(mozwebqa) partners_page.go_to_page() bad_images = [] Assert.true(partners_page.is_partner_with_us_button_visible) for image in partners_page.partner_images_pager_list_two: partners_page.click_partner_pager_button() partners_page.click_partner_pager_button() partners_page.click_partner_pager_button() partners_page.click_partner_pager_button( ) # click the button a couple of times to override auto pager if not partners_page.is_element_visible(*image.get('locator')): bad_images.append('The image at %s is not visible' % image.get('locator')[1:]) Assert.equal( 0, len(bad_images), '%s bad images found: ' % len(bad_images) + ', '.join(bad_images))