Finished Task KEERO-111. Added base UI tests.
This commit is contained in:
parent
275d711357
commit
16f247a7ae
@ -1,5 +1,6 @@
|
||||
import re
|
||||
from login_page import LoginPage
|
||||
from services_page import ServicesPage
|
||||
|
||||
|
||||
class DataCentersPage():
|
||||
@ -51,5 +52,5 @@ class DataCentersPage():
|
||||
def select_data_center(self, name):
|
||||
datacenter = self.page.find_data_center(name)
|
||||
datacenter.click()
|
||||
|
||||
self.page = ServicesPage(self.page)
|
||||
return self.page
|
||||
|
@ -28,8 +28,10 @@ class ServicesPage():
|
||||
return page
|
||||
|
||||
def select_type_of_service(self, service_type):
|
||||
tab = find_element_by_link_text(service_type)
|
||||
tab.click()
|
||||
type_field = self.page.find_element_by_name('0-service')
|
||||
type_field.select_by_visible_text(service_type)
|
||||
next_button = self.page.find_element_by_name('wizard_goto_step')
|
||||
next_button.click()
|
||||
return self.page
|
||||
|
||||
def find_service(self, name):
|
||||
|
@ -15,7 +15,7 @@ class SanityTests():
|
||||
assert self.page.find_data_center('dc1') is not None
|
||||
|
||||
def test_02_delete_data_center(self):
|
||||
page.delete_data_center('dc1')
|
||||
self.page.delete_data_center('dc1')
|
||||
assert self.page.find_data_center('dc1') is None
|
||||
|
||||
def test_03_create_data_centers(self):
|
||||
@ -25,11 +25,24 @@ class SanityTests():
|
||||
assert self.page.find_data_center(name) is not None
|
||||
|
||||
def test_04_delete_data_centers(self):
|
||||
page.delete_data_center('datacenter1')
|
||||
page.delete_data_center('datacenter20')
|
||||
self.page.delete_data_center('datacenter1')
|
||||
self.page.delete_data_center('datacenter20')
|
||||
assert self.page.find_data_center('datacenter1') is None
|
||||
assert self.page.find_data_center('datacenter20') is None
|
||||
|
||||
for i in range(2, 19):
|
||||
name = 'datacenter' + str(i)
|
||||
assert self.page.find_data_center(name) is not None
|
||||
|
||||
def test_05_create_service_ad(self):
|
||||
name = 'dc001.local'
|
||||
self.page.create_data_center(name)
|
||||
self.select_data_center(name)
|
||||
|
||||
ad_parameters = {'1-dc_name': name,
|
||||
'1-dc_count': 1,
|
||||
'1-adm_password': 'AkvareL707!',
|
||||
'1-recovery_password': 'AkvareL707!'}
|
||||
self.page.create_service('Active Directory', ad_parameters)
|
||||
|
||||
assert self.page.find_service(name) is not None
|
Loading…
Reference in New Issue
Block a user