示例#1
0
 def test_status_section(self, mozwebqa):
     dnt_page = DoNotTrack(mozwebqa)
     dnt_page.go_to_page()
     Assert.true(dnt_page.is_status_wrapper_visible)
     Assert.true(dnt_page.is_status_text_visible)
     Assert.true(dnt_page.is_enable_dnt_image_visible)
     Assert.true(dnt_page.is_enable_dnt_text_visible)
     bad_links = []
     for link in dnt_page.tracking_protection_links_list:
         url = dnt_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))
     for link in dnt_page.tracking_protection_links_list:
         Assert.true(dnt_page.are_tracking_protection_links_visible(link.get('locator')))
示例#2
0
 def test_status_section(self, mozwebqa):
     dnt_page = DoNotTrack(mozwebqa)
     dnt_page.go_to_page()
     Assert.true(dnt_page.is_status_wrapper_visible)
     Assert.true(dnt_page.is_status_text_visible)
     Assert.true(dnt_page.is_enable_dnt_image_visible)
     Assert.true(dnt_page.is_enable_dnt_text_visible)
     bad_links = []
     for link in dnt_page.tracking_protection_links_list:
         url = dnt_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))
     for link in dnt_page.tracking_protection_links_list:
         Assert.true(
             dnt_page.are_tracking_protection_links_visible(
                 link.get('locator')))