diff --git a/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_createTestUserList.py b/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_createTestUserList.py new file mode 100644 index 0000000000000000000000000000000000000000..d9e27349b2103c7324cd30e7e536c1ee5db27b06 --- /dev/null +++ b/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_createTestUserList.py @@ -0,0 +1,15 @@ +context.WebSection_newCredentialRequest( + reference="demo_functional_user", + default_email_text="demo@nexedi.com", + first_name="Demo User", + last_name="Functional", + password="demo_functional_user", + default_telephone_text="12345678", + corporate_name="Nexedi", + default_address_city="Campos", + default_address_street_address="Av Pelinca", + default_address_zip_code="28480", + batch_mode=1 +) + +return "Done." diff --git a/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_createTestUserList.xml b/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_createTestUserList.xml new file mode 100644 index 0000000000000000000000000000000000000000..1c8e17a42c168aaaebdcebe68075675f38ebb1d2 --- /dev/null +++ b/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_createTestUserList.xml @@ -0,0 +1,70 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>_proxy_roles</string> </key> + <value> + <tuple> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>ERP5Site_createTestUserList</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_removeTestUserList.py b/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_removeTestUserList.py new file mode 100644 index 0000000000000000000000000000000000000000..fce1609da3c6b17132c57c12fad4c3124601cf4b --- /dev/null +++ b/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_removeTestUserList.py @@ -0,0 +1,12 @@ +portal = context.getPortalObject() + +for cr in portal.portal_catalog(reference=["testSlapOSJSSubscribeUser", "demo_functional_user"], + portal_type="Credential Request"): + related_person = cr.getDestinationDecisionValue() + portal.person_module.manage_delObjects(ids=[related_person.getId()]) + event_list = cr.getFollowUpRelatedValueList() + if len(event_list): + portal.event_module.manage_delObjects(ids=[e.getId() for e in event_list]) + portal.credential_request_module.manage_delObjects(ids=[cr.getId()]) + +return "Done." diff --git a/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_removeTestUserList.xml b/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_removeTestUserList.xml new file mode 100644 index 0000000000000000000000000000000000000000..284cf51428c9fc4604e6f7f5ca5e4ecb805d80ab --- /dev/null +++ b/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_removeTestUserList.xml @@ -0,0 +1,70 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>_proxy_roles</string> </key> + <value> + <tuple> + <string>Manager</string> + </tuple> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>ERP5Site_removeTestUserList</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData>