silverstripe-cms/tests/test_windmill/test_admin/test_CreateGroup.py

26 lines
1.1 KiB
Python
Raw Normal View History

# Generated by the windmill services transformer
from windmill.authoring import WindmillTestClient
def test():
client = WindmillTestClient(__name__)
client.click(link=u'Security')
client.waits.forPageLoad(timeout=u'20000')
client.click(xpath=u"/html/body/div[@id='left']/div[@id='treepanes']/ul[@id='TreeActions']/li[@id='addgroup']/button")
client.waits.sleep(milliseconds=u'5000')
client.asserts.assertText(validator=u'New Group', id=u'record-2')
client.asserts.assertValue(validator=u'New Group', id=u'Form_EditForm_Title')
client.click(id=u'Form_EditForm_Title')
client.type(text=u'Test Group', id=u'Form_EditForm_Title')
client.click(id=u'Form_EditForm_action_save')
client.waits.sleep(milliseconds=u'5000')
client.asserts.assertText(validator=u'Test Group', id=u'record-2')
client.click(id=u'Form_AddRecordForm_FirstName')
client.type(text=u'Test', id=u'Form_AddRecordForm_FirstName')
client.type(text=u'Person', id=u'Form_AddRecordForm_Surname')
client.type(text=u'test@example.com', id=u'Form_AddRecordForm_Email')
client.click(id=u'Form_AddRecordForm_action_addtogroup')