ui_tests: add_host() support func in test_service

Add add_host() support func into test_service to
create temp hosts.

https://pagure.io/freeipa/issue/7441

Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
Michal Reznik 2018-03-13 18:09:08 +01:00 committed by Christian Heimes
parent d8cbd5d3ac
commit 62a131aba0

View File

@ -61,6 +61,14 @@ class sevice_tasks(UI_driver):
pkey = '{}/{}@{}'.format(service, host, realm)
return pkey
def add_host(self, hostname, dns_zone, force=False):
self.navigate_to_entity('host')
self.facet_button_click('add')
self.fill_textbox('hostname', hostname)
self.fill_textbox('dnszone', dns_zone)
if force:
self.check_option('force', 'checked')
self.dialog_button_click('add')
@pytest.mark.tier1
class test_service(sevice_tasks):