mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 08:00:02 -06:00
UI tests for "Automount": check creating automount key without some fields
https://pagure.io/freeipa/issue/7735 Reviewed-By: Petr Cech <pcech@redhat.com>
This commit is contained in:
parent
de06bf2778
commit
b7a149feb2
@ -420,6 +420,38 @@ class TestAutomount(UI_driver):
|
|||||||
self.navigate_to_entity(LOC_ENTITY)
|
self.navigate_to_entity(LOC_ENTITY)
|
||||||
self.delete_record(LOC_PKEY)
|
self.delete_record(LOC_PKEY)
|
||||||
|
|
||||||
|
def test_add_key_with_missing_fields(self):
|
||||||
|
"""
|
||||||
|
Test creating automount key without key name and mount information
|
||||||
|
"""
|
||||||
|
|
||||||
|
keys = {
|
||||||
|
'automountkey': {
|
||||||
|
'pkey': 'key1',
|
||||||
|
'add': [('textbox', 'automountinformation', '/itest/key')],
|
||||||
|
},
|
||||||
|
'automountinformation': {
|
||||||
|
'pkey': 'key2',
|
||||||
|
'add': [('textbox', 'automountkey', 'key2')],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
self.add_record(LOC_ENTITY, LOC_DATA)
|
||||||
|
self.navigate_to_record(LOC_PKEY)
|
||||||
|
|
||||||
|
self.add_record(LOC_ENTITY, MAP_DATA, facet='maps', navigate=False)
|
||||||
|
self.navigate_to_record(MAP_PKEY)
|
||||||
|
|
||||||
|
for missing_field, key in keys.items():
|
||||||
|
self.add_record(MAP_ENTITY, key, negative=True,
|
||||||
|
facet='keys', navigate=False)
|
||||||
|
assert self.has_form_error(missing_field)
|
||||||
|
self.dialog_button_click('cancel')
|
||||||
|
self.assert_record(key['pkey'], negative=True)
|
||||||
|
|
||||||
|
self.navigate_to_entity(LOC_ENTITY)
|
||||||
|
self.delete_record(LOC_PKEY)
|
||||||
|
|
||||||
def test_modify_key(self):
|
def test_modify_key(self):
|
||||||
"""
|
"""
|
||||||
Test automount key 'Settings'
|
Test automount key 'Settings'
|
||||||
|
Loading…
Reference in New Issue
Block a user