def test_logo_link_destination_is_correct(self):
     home = Home(self.driver)
     home.open()
     home._validate_page(self.driver)
     link = Home.Header._logo_url
     url = home.link_destination(link.get('locator'))
     self.assertTrue(url.endswith(link.get('suffix')), '%s does not ends with %s' %(url, link.get('suffix')))
 def test_sign_up_link_destination_is_correct(self):
     home = Home(self.driver)
     home.open()
     home._validate_page(self.driver)
     link = Home.Header.sign_up
     url = home.link_destination(link.get('locator'))
     self.assertTrue(url.endswith(link.get('suffix')), '%s is bad'%(url))
 def test_sign_up_link_destination_is_correct(self):
     home = Home(self.driver)
     home.open()
     home._validate_page(self.driver)
     link = Home.Header.sign_up
     url = home.link_destination(link.get('locator'))
     self.assertTrue(url.endswith(link.get('suffix')), '%s is bad' % (url))
 def test_logo_link_destination_is_correct(self):
     home = Home(self.driver)
     home.open()
     home._validate_page(self.driver)
     link = Home.Header._logo_url
     url = home.link_destination(link.get('locator'))
     self.assertTrue(url.endswith(link.get('suffix')),
                     '%s does not ends with %s' % (url, link.get('suffix')))
 def test_nav_links_destinations_are_correct(self):
     home = Home(self.driver)
     home.open()
     home._validate_page(self.driver)
     bad_links = []
     for link in Home.Header.nav_links_list:
         url = home.link_destination(link.get('locator'))
         if not url.endswith(link.get('suffix')):
             bad_links.append((url))
     self.assertEqual(0, len(bad_links), 'there are %s bad links: '%(len(bad_links))+', '.join(bad_links))
 def test_nav_links_destinations_are_correct(self):
     home = Home(self.driver)
     home.open()
     home._validate_page(self.driver)
     bad_links = []
     for link in Home.Header.nav_links_list:
         url = home.link_destination(link.get('locator'))
         if not url.endswith(link.get('suffix')):
             bad_links.append((url))
     self.assertEqual(
         0, len(bad_links), 'there are %s bad links: ' % (len(bad_links)) +
         ', '.join(bad_links))