Example #1
0
    def test_nav_blog_link(self):
        """
		Click the blog link and make sure it leads to blog page.
		"""
        self.page.click_blog_link()
        self.page = BlogHomePage(self.driver)
        self.assertTrue(self.page.verify_path())
Example #2
0
    def test_nav_home_link(self):
        """
		Click the home link and make sure it leads to home page.
		"""
        self.page.click_home_link()
        self.page = HomePage(self.driver)
        self.assertTrue(self.page.verify_path())
Example #3
0
	def setUp(self):
		"""
		Make the driver, get the page.
		"""
		self.driver = webdriver.Firefox()
		self.driver.get(BlogHomePage.URL)
		self.page = BlogHomePage(self.driver)
Example #4
0
    def test_nav_projects_home_link(self):
        """
		Toggle projects dropdown, then click proj home link.
		"""
        self.page.toggle_projects_dropdown()
        self.page.click_proj_home_link()
        self.page = ProjectsHomePage(self.driver)
        self.assertTrue(self.page.verify_path())
Example #5
0
class BaseHomeTests(BlogBaseTests, unittest.TestCase):
	"""
	Methods to test the blog home page.
	"""
	def setUp(self):
		"""
		Make the driver, get the page.
		"""
		self.driver = webdriver.Firefox()
		self.driver.get(BlogHomePage.URL)
		self.page = BlogHomePage(self.driver)
	
	def tearDown(self):
		"""
		Close driver.
		"""
		self.driver.close()
	
	def test_entries_present(self):
		"""
		Make sure at least one entry is displayed.
		"""
		self.assertTrue(self.page.get_entries())
Example #6
0
class BaseTests:
    """
	Methods to test the navbar, present in all other pages.
	"""

    def test_nav_thumb_link(self):
        """
		Click the thumb link and make sure it leads to home page.
		"""
        self.page.click_nav_thumb()
        self.page = HomePage(self.driver)
        self.assertTrue(self.page.verify_path())

    def test_nav_home_link(self):
        """
		Click the home link and make sure it leads to home page.
		"""
        self.page.click_home_link()
        self.page = HomePage(self.driver)
        self.assertTrue(self.page.verify_path())

    def test_nav_projects_home_link(self):
        """
		Toggle projects dropdown, then click proj home link.
		"""
        self.page.toggle_projects_dropdown()
        self.page.click_proj_home_link()
        self.page = ProjectsHomePage(self.driver)
        self.assertTrue(self.page.verify_path())

    def test_nav_blog_link(self):
        """
		Click the blog link and make sure it leads to blog page.
		"""
        self.page.click_blog_link()
        self.page = BlogHomePage(self.driver)
        self.assertTrue(self.page.verify_path())

    def test_nav_linkedin_link(self):
        """
		Click the linkedin link, verify it leads to linkedin page.
		"""
        self.page.click_linkedin_logo()
        self.assertTrue(self.page.verify_linkedin_url())

    def test_nav_github_link(self):
        """
		Click the github link, verify it leads to github page.
		"""
        self.page.click_github_logo()
        self.assertTrue(self.page.verify_github_url())