From c7c13965e3604ea3f51684875ba252cc2d8bfbf1 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Thu, 19 Jun 2014 16:26:23 +0200 Subject: webui-ci: dns forward zone tests Selenium CI sanity tests for DNS Forward Zones https://fedorahosted.org/freeipa/ticket/4357 Reviewed-By: Endi Sukma Dewata --- ipatests/test_webui/test_dns.py | 41 ++++++++++++++++++++++++++++++++++ ipatests/test_webui/test_navigation.py | 2 ++ 2 files changed, 43 insertions(+) (limited to 'ipatests/test_webui') diff --git a/ipatests/test_webui/test_dns.py b/ipatests/test_webui/test_dns.py index 62f6040a7..ffbd0ab2b 100644 --- a/ipatests/test_webui/test_dns.py +++ b/ipatests/test_webui/test_dns.py @@ -25,6 +25,7 @@ from ipatests.test_webui.ui_driver import UI_driver from ipatests.test_webui.ui_driver import screenshot ZONE_ENTITY = 'dnszone' +FORWARD_ZONE_ENTITY = 'dnsforwardzone' RECORD_ENTITY = 'dnsrecord' CONFIG_ENTITY = 'dnsconfig' @@ -45,6 +46,24 @@ ZONE_DATA = { ], } +FORWARD_ZONE_PKEY = 'forward.itest.' + +FORWARD_ZONE_DATA = { + 'pkey': FORWARD_ZONE_PKEY, + 'add': [ + ('textbox', 'idnsname', FORWARD_ZONE_PKEY), + ('multivalued', 'idnsforwarders', [ + ('add', '192.168.2.1'), + ]), + ('radio', 'idnsforwardpolicy', 'only'), + ], + 'mod': [ + ('multivalued', 'idnsforwarders', [ + ('add', '192.168.3.1'), + ]), + ('checkbox', 'idnsforwardpolicy', 'first'), + ], +} RECORD_PKEY = 'itest' A_IP = '192.168.1.10' @@ -101,6 +120,28 @@ class test_dns(UI_driver): self.navigate_by_breadcrumb("DNS Zones") self.delete_record(ZONE_PKEY) + @screenshot + def test_forward_zone(self): + """ + Forward DNS zones + """ + self.init_app() + + # add and mod zone + self.basic_crud(FORWARD_ZONE_ENTITY, FORWARD_ZONE_DATA, delete=False) + + # enable/disable + self.navigate_to_record(FORWARD_ZONE_PKEY) + + self.disable_action() + self.enable_action() + self.action_list_action('add_permission') + self.action_list_action('remove_permission') + + # del zone + self.navigate_by_breadcrumb("DNS Forward Zones") + self.delete_record(FORWARD_ZONE_PKEY) + @screenshot def test_last_entry_deletion(self): """ diff --git a/ipatests/test_webui/test_navigation.py b/ipatests/test_webui/test_navigation.py index bf2461a53..caf291a90 100644 --- a/ipatests/test_webui/test_navigation.py +++ b/ipatests/test_webui/test_navigation.py @@ -33,6 +33,7 @@ ENTITIES = [ 'netgroup', 'service', 'dnszone', + 'dnsforwardzone', # TODO: dnsrecord 'dnsconfig', 'cert', @@ -109,6 +110,7 @@ class test_navigation(UI_driver): self.navigate_by_menu('identity/dns/dnsconfig', True) self.navigate_by_menu('identity/dns', False) self.navigate_by_menu('identity/dns/dnszone', False) + self.navigate_by_menu('identity/dns/dnsforwardzone') else: self.assert_menu_item('identity/dns', False) if self.has_ca(): -- cgit