From ccd0a3c904a09267e7065228561a628c0cdf35d2 Mon Sep 17 00:00:00 2001 From: Timur Nurlygayanov Date: Tue, 26 Mar 2013 13:29:50 +0400 Subject: [PATCH] Hot fix for WebUI tests. --- tests/selenium/test.py | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/tests/selenium/test.py b/tests/selenium/test.py index 1af0699..b1c2b60 100644 --- a/tests/selenium/test.py +++ b/tests/selenium/test.py @@ -5,7 +5,21 @@ from login_page import LoginPage from datacenters_page import DataCentersPage from selenium import webdriver -""" + +class SanityTests(unittest2.TestCase): + + @classmethod + def setUpClass(self): + driver = webdriver.Firefox() + self.page = LoginPage(driver) + self.page.login() + self.page.Navigate('Project:Windows Data Centers') + self.page = DataCentersPage(driver) + + @classmethod + def tearDownClass(self): + self.page.driver.close() + def test_01_create_data_center(self): self.page.create_data_center('dc1') assert self.page.Link('dc1').isPresented() @@ -29,22 +43,6 @@ from selenium import webdriver for i in range(2, 9): name = 'datacenter' + str(i) assert self.page.Link(name).isPresented() -""" - - -class SanityTests(unittest2.TestCase): - - @classmethod - def setUpClass(self): - driver = webdriver.Firefox() - self.page = LoginPage(driver) - self.page.login() - self.page.Navigate('Project:Windows Data Centers') - self.page = DataCentersPage(driver) - - @classmethod - def tearDownClass(self): - self.page.driver.close() def test_05_create_service_ad(self): name = 'dc001.local' @@ -59,7 +57,7 @@ class SanityTests(unittest2.TestCase): self.page.create_service('Active Directory', ad_parameters) assert self.page.Link(name).isPresented() -""" + def test_06_create_service_ad_two_instances(self): name = 'dc002.local' self.page.Navigate('Windows Data Centers') @@ -151,7 +149,7 @@ class SanityTests(unittest2.TestCase): status = self.page.get_datacenter_status('test08') assert 'Deploy in progress' in status -""" + if __name__ == '__main__': unittest2.main()