webui-ci: decorate all webui tests with screenshot decorator

Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
This commit is contained in:
Petr Vobornik 2014-04-29 09:16:24 +02:00
parent 6a61378586
commit 6d618853a4
23 changed files with 79 additions and 0 deletions

View File

@ -22,6 +22,7 @@ Automember tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
import ipatests.test_webui.data_hostgroup as hostgroup
from ipatests.test_webui.test_host import host_tasks
@ -51,6 +52,7 @@ HOST_GROUP_DATA = {
class test_automember(UI_driver):
@screenshot
def test_crud(self):
"""
Basic CRUD: automember
@ -83,6 +85,7 @@ class test_automember(UI_driver):
# cleanup
self.delete(hostgroup.ENTITY, [hostgroup.DATA])
@screenshot
def test_rebuild_membership_hosts(self):
"""
Test automember rebuild membership feature for hosts
@ -169,6 +172,7 @@ class test_automember(UI_driver):
self.delete('automember', [{'pkey': 'webservers'}],
facet='searchhostgroup')
@screenshot
def test_rebuild_membership_users(self):
"""
Test automember rebuild membership feature for users

View File

@ -22,6 +22,7 @@ Automount tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
LOC_ENTITY = 'automountlocation'
MAP_ENTITY = 'automountmap'
@ -62,6 +63,7 @@ KEY_DATA = {
class test_automount(UI_driver):
@screenshot
def test_crud(self):
"""
Basic CRUD: automount

View File

@ -22,6 +22,7 @@ Cert tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
ENTITY = 'cert'
@ -34,6 +35,7 @@ class test_cert(UI_driver):
if not self.has_ca():
self.skip('CA not configured')
@screenshot
def test_read(self):
"""
Basic read: cert

View File

@ -22,6 +22,7 @@ Config tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
ENTITY = 'config'
@ -42,6 +43,7 @@ DATA2 = {
class test_config(UI_driver):
@screenshot
def test_mod(self):
"""
Config mod tests

View File

@ -22,6 +22,7 @@ Delegation tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
ENTITY = 'delegation'
PKEY = 'itest-delegation-rule'
@ -43,6 +44,7 @@ DATA = {
class test_delegation(UI_driver):
@screenshot
def test_crud(self):
"""
Basic CRUD: delegation

View File

@ -22,6 +22,7 @@ DNS tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
ZONE_ENTITY = 'dnszone'
RECORD_ENTITY = 'dnsrecord'
@ -76,6 +77,7 @@ class test_dns(UI_driver):
if not self.has_dns():
self.skip('DNS not configured')
@screenshot
def test_zone_record_crud(self):
"""
Basic CRUD: dns
@ -99,6 +101,7 @@ class test_dns(UI_driver):
self.navigate_by_breadcrumb("DNS Zones")
self.delete_record(ZONE_PKEY)
@screenshot
def test_last_entry_deletion(self):
"""
Test last entry deletion
@ -117,6 +120,7 @@ class test_dns(UI_driver):
self.navigate_by_breadcrumb("DNS Zones")
self.delete_record(ZONE_PKEY)
@screenshot
def test_config_crud(self):
"""
Basic CRUD: dnsconfig

View File

@ -22,6 +22,7 @@ Group tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
import ipatests.test_webui.data_group as group
import ipatests.test_webui.data_user as user
import ipatests.test_webui.data_netgroup as netgroup
@ -32,6 +33,7 @@ import ipatests.test_webui.data_sudo as sudo
class test_group(UI_driver):
@screenshot
def test_crud(self):
"""
Basic CRUD: group
@ -40,6 +42,7 @@ class test_group(UI_driver):
self.basic_crud(group.ENTITY, group.DATA,
default_facet=group.DEFAULT_FACET)
@screenshot
def test_actions(self):
"""
Test group actions
@ -79,6 +82,7 @@ class test_group(UI_driver):
self.assert_facet(entity, 'search')
self.assert_record(pkey, negative=True)
@screenshot
def test_associations(self):
"""
Test group associations
@ -122,6 +126,7 @@ class test_group(UI_driver):
self.delete(hbac.RULE_ENTITY, [hbac.RULE_DATA])
self.delete(sudo.RULE_ENTITY, [sudo.RULE_DATA])
@screenshot
def test_indirect_associations(self):
"""
Group indirect associations

View File

@ -22,12 +22,14 @@ HBAC tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
import ipatests.test_webui.data_hbac as hbac
import ipatests.test_webui.data_hostgroup as hostgroup
class test_hbac(UI_driver):
@screenshot
def test_crud(self):
"""
Basic CRUD: hbac
@ -38,6 +40,7 @@ class test_hbac(UI_driver):
self.basic_crud(hbac.SVCGROUP_ENTITY, hbac.SVCGROUP_DATA,
default_facet=hbac.SVCGROUP_DEF_FACET)
@screenshot
def test_mod(self):
"""
Mod: hbac
@ -72,6 +75,7 @@ class test_hbac(UI_driver):
self.delete(hbac.RULE_ENTITY, [hbac.RULE_DATA])
self.delete(hostgroup.ENTITY, [hostgroup.DATA])
@screenshot
def test_actions(self):
"""
Test hbac rule actions
@ -85,6 +89,7 @@ class test_hbac(UI_driver):
self.enable_action()
self.delete_action(hbac.RULE_ENTITY, hbac.RULE_PKEY)
@screenshot
def test_hbac_test(self):
"""
Test HBAC test UI

View File

@ -22,6 +22,7 @@ Host tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
import ipatests.test_webui.data_hostgroup as hostgroup
import ipatests.test_webui.data_netgroup as netgroup
import ipatests.test_webui.data_hbac as hbac
@ -104,6 +105,7 @@ class host_tasks(UI_driver):
class test_host(host_tasks):
@screenshot
def test_crud(self):
"""
Basic CRUD: host
@ -111,6 +113,7 @@ class test_host(host_tasks):
self.init_app()
self.basic_crud(ENTITY, self.data)
@screenshot
def test_certificates(self):
"""
Test host certificate actions
@ -175,6 +178,7 @@ class test_host(host_tasks):
self.navigate_to_entity(ENTITY, 'search')
self.delete_record(self.pkey, self.data.get('del'))
@screenshot
def test_ca_less(self):
"""
Test host certificate actions in CA-less install
@ -198,6 +202,7 @@ class test_host(host_tasks):
self.navigate_by_breadcrumb('Hosts')
self.delete_record(self.pkey, self.data.get('del'))
@screenshot
def test_kerberos_flags(self):
"""
Test Kerberos flags
@ -220,6 +225,7 @@ class test_host(host_tasks):
self.validate_fields([('checkbox', name, [])])
self.delete_record(self.pkey, self.data.get('del'))
@screenshot
def test_associations(self):
"""
Host direct associations
@ -258,6 +264,7 @@ class test_host(host_tasks):
self.delete(hbac.RULE_ENTITY, [hbac.RULE_DATA])
self.delete(sudo.RULE_ENTITY, [sudo.RULE_DATA])
@screenshot
def test_indirect_associations(self):
"""
Host indirect associations

View File

@ -22,6 +22,7 @@ Hostgroup tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
import ipatests.test_webui.data_hostgroup as hostgroup
from ipatests.test_webui.test_host import host_tasks, ENTITY as HOST_ENTITY
import ipatests.test_webui.data_netgroup as netgroup
@ -32,6 +33,7 @@ import ipatests.test_webui.data_sudo as sudo
class test_hostgroup(UI_driver):
@screenshot
def test_crud(self):
"""
Basic CRUD: hostgroup
@ -40,6 +42,7 @@ class test_hostgroup(UI_driver):
self.basic_crud(hostgroup.ENTITY, hostgroup.DATA,
default_facet=hostgroup.DEFAULT_FACET)
@screenshot
def test_associations(self):
"""
Hostgroup associations
@ -80,6 +83,7 @@ class test_hostgroup(UI_driver):
self.delete(hbac.RULE_ENTITY, [hbac.RULE_DATA])
self.delete(sudo.RULE_ENTITY, [sudo.RULE_DATA])
@screenshot
def test_indirect_associations(self):
"""
Hostgroup indirect associations

View File

@ -22,6 +22,7 @@ Kerberos policy tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
ENTITY = 'krbtpolicy'
@ -42,6 +43,7 @@ DATA2 = {
class test_krbtpolicy(UI_driver):
@screenshot
def test_mod(self):
"""
Kerberos policy mod test

View File

@ -22,6 +22,7 @@ Basic ui tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
ENTITIES = [
@ -63,6 +64,7 @@ ENTITIES = [
class test_navigation(UI_driver):
@screenshot
def test_url_navigation(self):
"""
Navigation test: direct url change
@ -88,6 +90,7 @@ class test_navigation(UI_driver):
url = self.get_url(e)
self.assert_e_url(url, e)
@screenshot
def test_menu_navigation(self):
"""
Navigation test: menu items

View File

@ -22,6 +22,7 @@ Netgroup tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
import ipatests.test_webui.data_netgroup as netgroup
import ipatests.test_webui.data_user as user
import ipatests.test_webui.data_group as group
@ -31,6 +32,7 @@ from ipatests.test_webui.test_host import host_tasks, ENTITY as HOST_ENTITY
class test_netgroup(UI_driver):
@screenshot
def test_crud(self):
"""
Basic CRUD: netgroup
@ -38,6 +40,7 @@ class test_netgroup(UI_driver):
self.init_app()
self.basic_crud(netgroup.ENTITY, netgroup.DATA)
@screenshot
def test_mod(self):
"""
Mod: netgroup

View File

@ -22,6 +22,7 @@ Password policy tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
ENTITY = 'pwpolicy'
DATA = {
@ -45,6 +46,7 @@ DATA = {
class test_pwpolicy(UI_driver):
@screenshot
def test_crud(self):
"""
Basic CRUD: pwpolicy

View File

@ -22,6 +22,7 @@ Range tests
"""
import ipatests.test_webui.test_trust as trust_mod
from ipatests.test_webui.ui_driver import screenshot
from ipatests.test_webui.task_range import range_tasks
ENTITY = 'idrange'
@ -30,6 +31,7 @@ PKEY = 'itest-range'
class test_range(range_tasks):
@screenshot
def test_crud(self):
"""
Basic CRUD: range
@ -38,6 +40,7 @@ class test_range(range_tasks):
self.get_shifts()
self.basic_crud(ENTITY, self.get_data(PKEY))
@screenshot
def test_types(self):
"""
Test range types

View File

@ -22,6 +22,7 @@ RBAC tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
ROLE_ENTITY = 'role'
ROLE_DEF_FACET = 'member_user'
@ -71,6 +72,7 @@ PERMISSION_DATA = {
class test_rbac(UI_driver):
@screenshot
def test_crud(self):
"""
Basic CRUD: RBAC

View File

@ -22,12 +22,14 @@ Realm domains tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
ENTITY = 'realmdomains'
class test_realmdomains(UI_driver):
@screenshot
def test_read(self):
"""
Realm domains mod tests

View File

@ -22,6 +22,7 @@ Selfservice tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
ENTITY = 'selfservice'
PKEY = 'itest-selfservice-rule'
@ -40,6 +41,7 @@ DATA = {
class test_selfservice(UI_driver):
@screenshot
def test_crud(self):
"""
Basic CRUD: selfservice entity

View File

@ -22,6 +22,7 @@ SELinux user map tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
import ipatests.test_webui.data_user as user
import ipatests.test_webui.data_group as group
import ipatests.test_webui.data_hostgroup as hostgroup
@ -43,6 +44,7 @@ DATA = {
class test_selinuxusermap(UI_driver):
@screenshot
def test_crud(self):
"""
Basic CRUD: selinuxusermap
@ -50,6 +52,7 @@ class test_selinuxusermap(UI_driver):
self.init_app()
self.basic_crud(ENTITY, DATA)
@screenshot
def test_mod(self):
"""
Mod: selinuxusermap
@ -91,6 +94,7 @@ class test_selinuxusermap(UI_driver):
self.delete(HOST_ENTITY, [host.data, host.data2])
self.delete(hostgroup.ENTITY, [hostgroup.DATA, hostgroup.DATA2])
@screenshot
def test_actions(self):
"""
Test SELinux user map actions

View File

@ -22,6 +22,7 @@ Service tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
ENTITY = 'service'
@ -60,6 +61,7 @@ class sevice_tasks(UI_driver):
class test_service(sevice_tasks):
@screenshot
def test_crud(self):
"""
Basic CRUD: service
@ -68,6 +70,7 @@ class test_service(sevice_tasks):
data = self.prep_data()
self.basic_crud(ENTITY, data)
@screenshot
def test_certificates(self):
"""
Test service certificate actions
@ -135,6 +138,7 @@ class test_service(sevice_tasks):
self.navigate_to_entity(ENTITY, 'search')
self.delete_record(pkey, data.get('del'))
@screenshot
def test_ca_less(self):
"""
Test service certificate actions in CA-less install
@ -170,6 +174,7 @@ class test_service(sevice_tasks):
self.assert_action_panel_action(panel, 'view_cert')
self.assert_action_panel_action(panel, 'get_cert')
@screenshot
def test_kerberos_flags(self):
"""
Test Kerberos flags

View File

@ -22,6 +22,7 @@ Sudo tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
import ipatests.test_webui.data_sudo as sudo
import ipatests.test_webui.data_netgroup as netgroup
import ipatests.test_webui.data_user as user
@ -32,6 +33,7 @@ from ipatests.test_webui.test_host import host_tasks, ENTITY as HOST_ENTITY
class test_sudo(UI_driver):
@screenshot
def test_crud(self):
"""
Basic CRUD: sudo
@ -42,6 +44,7 @@ class test_sudo(UI_driver):
self.basic_crud(sudo.CMDGROUP_ENTITY, sudo.CMDGROUP_DATA,
default_facet=sudo.CMDGROUP_DEF_FACET)
@screenshot
def test_mod(self):
"""
Mod: sudo
@ -109,6 +112,7 @@ class test_sudo(UI_driver):
self.delete(HOST_ENTITY, [host.data, host.data2])
self.delete(hostgroup.ENTITY, [hostgroup.DATA, hostgroup.DATA2])
@screenshot
def test_actions(self):
"""
Test sudo rule actions

View File

@ -22,6 +22,7 @@ Trust tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
from ipatests.test_webui.task_range import range_tasks
ENTITY = 'trust'
@ -100,6 +101,7 @@ class test_trust(trust_tasks):
if not self.has_trusts():
self.skip('Trusts not configured')
@screenshot
def test_crud(self):
"""
Basic basic CRUD: trust
@ -114,6 +116,7 @@ class test_trust(trust_tasks):
self.navigate_to_entity('idrange')
self.delete_record(self.get_range_name())
@screenshot
def test_range_types(self):
self.init_app()
@ -144,6 +147,7 @@ class test_trust(trust_tasks):
self.assert_record_value('Active Directory trust range with POSIX attributes', range_pkey, column)
self.delete_record(range_pkey)
@screenshot
def test_config_mod(self):
self.init_app()

View File

@ -22,6 +22,7 @@ User tests
"""
from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
import ipatests.test_webui.data_user as user
import ipatests.test_webui.data_group as group
import ipatests.test_webui.data_netgroup as netgroup
@ -37,6 +38,7 @@ except ImportError:
class test_user(UI_driver):
@screenshot
def test_crud(self):
"""
Basic CRUD: user
@ -44,6 +46,7 @@ class test_user(UI_driver):
self.init_app()
self.basic_crud(user.ENTITY, user.DATA)
@screenshot
def test_associations(self):
"""
User direct associations
@ -80,6 +83,7 @@ class test_user(UI_driver):
self.delete(hbac.RULE_ENTITY, [hbac.RULE_DATA])
self.delete(sudo.RULE_ENTITY, [sudo.RULE_DATA])
@screenshot
def test_indirect_associations(self):
"""
User indirect associations
@ -134,6 +138,7 @@ class test_user(UI_driver):
self.delete(hbac.RULE_ENTITY, [hbac.RULE_DATA])
self.delete(sudo.RULE_ENTITY, [sudo.RULE_DATA])
@screenshot
def test_actions(self):
"""
Test user actions
@ -154,6 +159,7 @@ class test_user(UI_driver):
# delete
self.delete_action(user.ENTITY, user.PKEY)
@screenshot
def test_password_expiration_notification(self):
"""
Test password expiration notification