mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 08:00:02 -06:00
UI tests for "Automember": Extend search cases
https://pagure.io/freeipa/issue/7721 Reviewed-By: Mohammad Rizwan Yusuf <myusuf@redhat.com> Reviewed-By: Petr Cech <pcech@redhat.com> Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
parent
cd795257cc
commit
8949aa64d9
@ -49,6 +49,29 @@ HOST_GROUP_DATA = {
|
||||
],
|
||||
}
|
||||
|
||||
SEARCH_CASES = {
|
||||
'name': 'search-123',
|
||||
'description': 'Short description !@#$%^&*()',
|
||||
'positive': [
|
||||
'search-123',
|
||||
'search',
|
||||
'search ',
|
||||
' search',
|
||||
'SEARCH',
|
||||
'123',
|
||||
'!@#$%^&*()',
|
||||
'hort descr',
|
||||
'description !',
|
||||
],
|
||||
'negative': [
|
||||
'searc-123',
|
||||
'321',
|
||||
'search 123',
|
||||
'search Short',
|
||||
'description!',
|
||||
],
|
||||
}
|
||||
|
||||
# Condition types
|
||||
INCLUSIVE = 'inclusive'
|
||||
EXCLUSIVE = 'exclusive'
|
||||
@ -392,16 +415,21 @@ class TestAutomember(UI_driver):
|
||||
Test searching user group rules using filter
|
||||
"""
|
||||
|
||||
pkey = 'search123'
|
||||
pkey = SEARCH_CASES['name']
|
||||
self.add_user_group(pkey, '')
|
||||
self.add_user_group_rules(pkey)
|
||||
self.navigate_to_record(pkey)
|
||||
self.mod_record(ENTITY, {'mod': [
|
||||
('textarea', 'description', SEARCH_CASES['description']),
|
||||
]}, facet='usergrouprule')
|
||||
self.navigate_to_entity(ENTITY, facet='searchgroup')
|
||||
|
||||
for text in ['search123', 'search', ' search ', 'SEARCH', '123']:
|
||||
for text in SEARCH_CASES['positive']:
|
||||
self.apply_search_filter(text)
|
||||
self.wait_for_request()
|
||||
self.assert_record(pkey)
|
||||
|
||||
for text in ['search1234', '321']:
|
||||
for text in SEARCH_CASES['negative']:
|
||||
self.apply_search_filter(text)
|
||||
self.wait_for_request()
|
||||
self.assert_record(pkey, negative=True)
|
||||
@ -415,16 +443,21 @@ class TestAutomember(UI_driver):
|
||||
Test searching host group rules using filter
|
||||
"""
|
||||
|
||||
pkey = 'search123'
|
||||
pkey = SEARCH_CASES['name']
|
||||
self.add_host_group(pkey, '')
|
||||
self.add_host_group_rules(pkey)
|
||||
self.add_host_group_rules(pkey, navigate=True)
|
||||
self.navigate_to_record(pkey)
|
||||
self.mod_record(ENTITY, {'mod': [
|
||||
('textarea', 'description', SEARCH_CASES['description']),
|
||||
]}, facet='hostgrouprule')
|
||||
self.navigate_to_entity(ENTITY, facet='searchhostgroup')
|
||||
|
||||
for text in ['search123', 'search', ' search ', 'SEARCH', '123']:
|
||||
for text in SEARCH_CASES['positive']:
|
||||
self.apply_search_filter(text)
|
||||
self.wait_for_request()
|
||||
self.assert_record(pkey)
|
||||
|
||||
for text in ['search1234', '321']:
|
||||
for text in SEARCH_CASES['negative']:
|
||||
self.apply_search_filter(text)
|
||||
self.wait_for_request()
|
||||
self.assert_record(pkey, negative=True)
|
||||
|
Loading…
Reference in New Issue
Block a user