示例#1
0
class ProjectsHomeTests(BaseProjectsTests, unittest.TestCase):
    """
	Methods to test projects homepage.
	"""

    def setUp(self):
        """
		Make the driver, get the page.
		"""
        self.driver = webdriver.Firefox()
        self.driver.get(ProjectsHomePage.URL)
        self.page = ProjectsHomePage(self.driver)

    def tearDown(self):
        """
		Close driver.
		"""
        self.driver.close()

    def test_all_projects_displayed(self):
        """
		Make sure that all the projects in the dropdown menu
		are displayed in the projects section.
		"""
        dropdown = self.page.get_projs_from_dropdown()
        displayed = self.page.get_projects_displayed()
        self.assertTrue(len(dropdown) == (len(displayed) + 1))
示例#2
0
	def test_projects_subnav(self):
		"""
		Test that the subnav is present, and that it drops down.
		"""
		pHome = ProjectsHomePage(self.driver)
		if pHome.verify_path(): # No subnav to test on projects home page
			return
		else:
			self.assertTrue(self.page.verify_subnav_visible(time=4))
示例#3
0
    def setUp(self):
        """
		Make the driver, get the page.
		"""
        self.driver = webdriver.Firefox()
        self.driver.get(ProjectsHomePage.URL)
        self.page = ProjectsHomePage(self.driver)