Commit eb40af42 authored by Jérome Perrin's avatar Jérome Perrin

crm_renderjs_ui_test: port existing tests to erp5_xhtml_style

to ensure no regressions in legacy UI
parent 597f0237
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Zuite" module="Products.Zelenium.zuite"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>crm_action_zuite</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testCRMCreateResponse</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title tal:content="template/title_or_id"></title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3" tal:content="template/title_or_id"></td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/prepare_data" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/view_create_response_dialog" />
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'Re: erp5_crm_renderjs_ui_test_event_title',
'field_your_response_event_portal_type': 'Note',
'field_your_response_event_resource': '',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'send',
'field_my_default_destination': 'person_module/erp5_crm_renderjs_ui_test_agent',
'field_your_response_event_text_content': '<p><br></p><blockquote type=&quot;cite&quot;>Hello, I have an issue</blockquote><p><br></p>'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/check_create_response_dialog_content" />
</tal:block>
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_renderjs_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_renderjs_ui_test_agent',
'field_your_response_event_text_content': '<p>Foo<br>Bar</p>'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/fill_create_response_dialog_content" />
</tal:block>
<tr>
<td>clickAndWait</td>
<td>dialog_submit_button</td>
<td></td>
</tr>
<tr>
<td>assertPortalStatusMessage</td>
<td>Response Created.</td>
<td></td>
</tr>
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_renderjs_ui_test_response_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'simulation_state': 'Draft',
'field_my_source_title': 'erp5_crm_renderjs_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_renderjs_ui_test_customer_title',
'field_my_text_content': '<p>Foo<br>Bar</p>'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/check_response_content" />
</tal:block>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testCRMCreateResponseFromNotificationMessage</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title tal:content="template/title_or_id"></title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3" tal:content="template/title_or_id"></td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/prepare_data" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/view_create_response_dialog" />
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'Re: erp5_crm_renderjs_ui_test_event_title',
'field_your_response_event_portal_type': 'Note',
'field_your_response_event_resource': '',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'send',
'field_my_default_destination': 'person_module/erp5_crm_renderjs_ui_test_agent',
'field_your_response_event_text_content': '<p><br></p><blockquote type=&quot;cite&quot;>Hello, I have an issue</blockquote><p><br></p>'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/check_create_response_dialog_content" />
</tal:block>
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_renderjs_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_notification_message': 'erp5_crm_renderjs_ui_test_notification_reference',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_renderjs_ui_test_agent',
'field_your_response_event_text_content': '<p>Foo<br>Bar</p>'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/fill_create_response_dialog_content" />
</tal:block>
<tr>
<td>clickAndWait</td>
<td>dialog_submit_button</td>
<td></td>
</tr>
<tr>
<td>assertPortalStatusMessage</td>
<td>Response Created.</td>
<td></td>
</tr>
<tal:block tal:define="response_configuration python: {'field_my_title': 'erp5_crm_renderjs_ui_test_response_title',
'field_my_portal_type': 'Letter',
'field_my_resource': '',
'field_my_start_date': '2010-01-01T00:00:00',
'simulation_state': 'Draft',
'field_my_source_title': 'erp5_crm_renderjs_ui_test_agent_title',
'field_my_destination_title': 'erp5_crm_renderjs_ui_test_customer_title',
'field_my_text_content': '<p>No pbl. We will solve your issue.</p>'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/check_response_content" />
</tal:block>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testCRMUpdateCreateResponseDialog</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title tal:content="template/title_or_id"></title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3" tal:content="template/title_or_id"></td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/prepare_data" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/view_create_response_dialog" />
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'Re: erp5_crm_renderjs_ui_test_event_title',
'field_your_response_event_portal_type': 'Note',
'field_your_response_event_resource': '',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'send',
'field_my_default_destination': 'person_module/erp5_crm_renderjs_ui_test_agent',
'field_your_response_event_text_content': '<p><br></p><blockquote type=&quot;cite&quot;>Hello, I have an issue</blockquote><p><br></p>'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/check_create_response_dialog_content" />
</tal:block>
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_renderjs_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_renderjs_ui_test_agent',
'field_your_response_event_text_content': '<p>Foo<br>Bar</p>'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/fill_create_response_dialog_content" />
</tal:block>
<tr>
<td>clickAndWait</td>
<td>dialog_update_button</td>
<td></td>
</tr>
<tr>
<td>assertPortalStatusMessage</td>
<td></td>
<td></td>
</tr>
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_renderjs_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_renderjs_ui_test_agent',
'field_your_response_event_text_content': '<p>Foo<br>Bar</p>'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/check_create_response_dialog_content" />
</tal:block>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testCRMUpdateCreateResponseDialogFromNotificationMessage</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title tal:content="template/title_or_id"></title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3" tal:content="template/title_or_id"></td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/prepare_data" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/view_create_response_dialog" />
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'Re: erp5_crm_renderjs_ui_test_event_title',
'field_your_response_event_portal_type': 'Note',
'field_your_response_event_resource': '',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'send',
'field_my_default_destination': 'person_module/erp5_crm_renderjs_ui_test_agent',
'field_your_response_event_text_content': '<p><br></p><blockquote type=&quot;cite&quot;>Hello, I have an issue</blockquote><p><br></p>'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/check_create_response_dialog_content" />
</tal:block>
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_renderjs_ui_test_response_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_notification_message': 'erp5_crm_renderjs_ui_test_notification_reference',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_renderjs_ui_test_agent',
'field_your_response_event_text_content': '<p>Foo<br>Bar</p>'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/fill_create_response_dialog_content" />
</tal:block>
<tr>
<td>clickAndWait</td>
<td>dialog_update_button</td>
<td></td>
</tr>
<tr>
<td>assertPortalStatusMessage</td>
<td></td>
<td></td>
</tr>
<tal:block tal:define="dialog_content_configuration python: {'field_your_response_event_title': 'erp5_crm_renderjs_ui_test_notification_title',
'field_your_response_event_portal_type': 'Letter',
'field_your_response_event_resource': '',
'field_your_response_event_start_date': '2010-01-01T00:00:00',
'field_your_response_event_notification_message': '',
'field_your_response_workflow_action': 'draft',
'field_my_default_destination': 'person_module/erp5_crm_renderjs_ui_test_agent',
'field_your_response_event_text_content': '<p>No pbl. We will solve your issue.</p>'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMUiTest/macros/check_create_response_dialog_content" />
</tal:block>
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<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_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>description</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>text</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Common Template for PTZuite, it will reuse parts of the Listbox Zuite</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_CommonTemplateForCRMUiTest</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode>Common Template for All erp5_xhtml_style ui Zuite</unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="verify_ckeditor_text_content"><tal:comment tal:replace="nothing"><!--
this macro needs globals: text_content
--></tal:comment>
<tr>
<td colspan="3"><b>Verify CKEditor Text Content</b></td>
</tr>
<!-- Wait for ckeditor to be loaded -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="editor"]//iframe</td>
<td></td>
</tr>
<tr><!-- gadget iframe -->
<td>selectFrame</td>
<td>//div[@data-gadget-scope="editor"]//iframe</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//iframe</td>
<td></td>
</tr>
<tr><!-- CKEditor iframe -->
<td>selectFrame</td>
<td>//iframe</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//body</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>selenium.browserbot.getCurrentWindow().document.body.innerHTML</td>
<td>_macro_verify_ckeditor_text_content_temporary_var</td>
</tr>
<tr>
<td>verifyEval</td>
<td>storedVars['_macro_verify_ckeditor_text_content_temporary_var']</td>
<td tal:content="python: text_content"></td>
</tr>
<tr>
<td>selectFrame</td>
<td>relative=top</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="type_ckeditor_text_content"><tal:comment tal:replace="nothing"><!--
this macro needs globals: text_content
--></tal:comment>
<tr>
<td colspan="3"><b>Type CKEditor Text Content</b></td>
</tr>
<!-- Wait for ckeditor to be loaded -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="editor"]//iframe</td>
<td></td>
</tr>
<tr><!-- gadget iframe -->
<td>selectFrame</td>
<td>//div[@data-gadget-scope="editor"]//iframe</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//iframe</td>
<td></td>
</tr>
<tr><!-- CKEditor iframe -->
<td>selectFrame</td>
<td>//iframe</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//body</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td tal:content="python: 'selenium.browserbot.getCurrentWindow().document.body.innerHTML = \'{}\''.format(text_content.replace('\n', '\\n').replace('\'', '\\\''))"></td>
<td>_macro_type_ckeditor_text_content_temporary_var</td>
</tr>
<tr>
<td>selectFrame</td>
<td>relative=top</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="init">
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/portal_preferences/Zuite_setCRMUiTestPreference</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Set CRM Preference Successfully.</td>
<td></td>
</tr>
<tr>
<td>store</td>
<td>${base_url}/web_site_module/renderjs_runner/#</td>
<td>renderjs_url</td>
</tr>
</tal:block>
<tal:block metal:define-macro="delete_data">
<tr>
<td colspan="3"><b>Delete CRM Test Data</b></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/ERP5Site_deleteCRMUiTestData</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Deleted Successfully.</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="prepare_data">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForCRMRenderjsUi/macros/delete_data" />
<tr>
<td colspan="3"><b>Create CRM Test Data</b></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/ERP5Site_createCRMUiTestEvent</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Event Created.</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="view_create_response_dialog">
<tr>
<td colspan="3"><b>Display the create response dialog</b></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/event_module/erp5_crm_renderjs_ui_test_event</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>select_action</td>
<td>Create Response</td>
<td></td>
</tr>
<tr>
<td>assertText</td>
<td>dialog_submit_button</td>
<td>Create Response</td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="check_create_response_dialog_content">
<tr>
<td colspan="3"><b tal:content="python: 'Check the create response dialog content'"></b></td>
</tr>
<tr>
<td>verifyValue</td>
<td>field_your_response_event_title</td>
<td tal:content="python: dialog_content_configuration['field_your_response_event_title']"></td>
</tr>
<tr>
<td>verifyValue</td>
<td>field_your_response_event_portal_type</td>
<td tal:content="python: dialog_content_configuration['field_your_response_event_portal_type']"></td>
</tr>
<tr>
<td>verifyValue</td>
<td>field_your_response_event_resource</td>
<td tal:content="python: dialog_content_configuration['field_your_response_event_resource']"></td>
</tr>
<tr tal:condition="python: 'field_your_response_event_start_date' in dialog_content_configuration">
<td>verifyValue</td>
<td>subfield_field_your_response_event_start_date_year</td>
<td tal:content="python: modules['DateTime'].DateTime(dialog_content_configuration['field_your_response_event_start_date']).year()"></td>
</tr>
<tr tal:condition="python: 'field_your_response_event_start_date' in dialog_content_configuration">
<td>verifyValue</td>
<td>subfield_field_your_response_event_start_date_month</td>
<td tal:content="python: modules['DateTime'].DateTime(dialog_content_configuration['field_your_response_event_start_date']).mm()"></td>
</tr>
<tr tal:condition="python: 'field_your_response_event_start_date' in dialog_content_configuration">
<td>verifyValue</td>
<td>subfield_field_your_response_event_start_date_day</td>
<td tal:content="python: modules['DateTime'].DateTime(dialog_content_configuration['field_your_response_event_start_date']).dd()"></td>
</tr>
<tr>
<td>verifyValue</td>
<td>field_your_response_event_notification_message</td>
<td tal:content="python: dialog_content_configuration['field_your_response_event_notification_message']"></td>
</tr>
<tr>
<td>verifyValue</td>
<td tal:content="python: '//input[@name=\'field_your_response_workflow_action\' and @type=\'radio\' and @value=\'%s\']' % dialog_content_configuration['field_your_response_workflow_action']"></td>
<td>on</td>
</tr>
<tr>
<td>verifyValue</td>
<td>field_my_default_destination</td>
<td tal:content="python: dialog_content_configuration['field_my_default_destination']"></td>
</tr>
<tal:block tal:define="text_content python: dialog_content_configuration['field_your_response_event_text_content']">
<tal:block metal:use-macro="container/Zuite_CommonTemplateForCRMUiTest/macros/verify_ckeditor_text_content"/>
</tal:block>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="fill_create_response_dialog_content">
<tr>
<td colspan="3"><b tal:content="python: 'Fill the create response dialog content'"></b></td>
</tr>
<tr>
<td>type</td>
<td>field_your_response_event_title</td>
<td tal:content="python: dialog_content_configuration['field_your_response_event_title']"></td>
</tr>
<tr>
<td>type</td>
<td>field_your_response_event_portal_type</td>
<td tal:content="python: dialog_content_configuration['field_your_response_event_portal_type']"></td>
</tr>
<tr>
<td>type</td>
<td>field_your_response_event_resource</td>
<td tal:content="python: dialog_content_configuration['field_your_response_event_resource']"></td>
</tr>
<tr>
<td>type</td>
<td>subfield_field_your_response_event_start_date_year</td>
<td tal:content="python: modules['DateTime'].DateTime(dialog_content_configuration['field_your_response_event_start_date']).year()"></td>
</tr>
<tr>
<td>type</td>
<td>subfield_field_your_response_event_start_date_month</td>
<td tal:content="python: modules['DateTime'].DateTime(dialog_content_configuration['field_your_response_event_start_date']).mm()"></td>
</tr>
<tr>
<td>type</td>
<td>subfield_field_your_response_event_start_date_day</td>
<td tal:content="python: modules['DateTime'].DateTime(dialog_content_configuration['field_your_response_event_start_date']).dd()"></td>
</tr>
<tr>
<td>type</td>
<td>field_your_response_event_notification_message</td>
<td tal:content="python: dialog_content_configuration['field_your_response_event_notification_message']"></td>
</tr>
<tr>
<td>type</td>
<td>field_your_response_workflow_action</td>
<td tal:content="python: dialog_content_configuration['field_your_response_workflow_action']"></td>
</tr>
<tr>
<td>type</td>
<td>field_my_default_destination</td>
<td tal:content="python: dialog_content_configuration['field_my_default_destination']"></td>
</tr>
<tal:block tal:define="text_content python: dialog_content_configuration['field_your_response_event_text_content']">
<tal:block metal:use-macro="container/Zuite_CommonTemplateForCRMUiTest/macros/type_ckeditor_text_content"/>
</tal:block>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="check_response_content">
<tr>
<td colspan="3"><b tal:content="python: 'Check the response content'"></b></td>
</tr>
<tr>
<td>verifyValue</td>
<td>field_my_title</td>
<td tal:content="python: response_configuration['field_my_title']"></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td tal:content="python: response_configuration['field_my_portal_type']"></td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>field_my_resource</td>
<td tal:content="python: response_configuration['field_my_resource']"></td>
</tr>
<tr>
<td>verifyValue</td>
<td>subfield_field_my_start_date_year</td>
<td tal:content="python: modules['DateTime'].DateTime(response_configuration['field_my_start_date']).year()"></td>
</tr>
<tr>
<td>verifyValue</td>
<td>subfield_field_my_start_date_month</td>
<td tal:content="python: modules['DateTime'].DateTime(response_configuration['field_my_start_date']).mm()"></td>
</tr>
<tr>
<td>verifyValue</td>
<td>subfield_field_my_start_date_day</td>
<td tal:content="python: modules['DateTime'].DateTime(response_configuration['field_my_start_date']).dd()"></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td tal:content="python: response_configuration['simulation_state']"></td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>field_my_source_title</td>
<td tal:content="python: response_configuration['field_my_source_title']"></td>
</tr>
<tr>
<td>verifyValue</td>
<td>field_my_destination_title_list</td>
<td tal:content="python: response_configuration['field_my_destination_title']"></td>
</tr>
<tal:block tal:define="text_content python: response_configuration['field_my_text_content']">
<tal:block metal:use-macro="container/Zuite_CommonTemplateForRenderjsUi/macros/verify_ckeditor_text_content"/>
</tal:block>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
</tal:block>
\ No newline at end of file
portal_tests/crm_action_zuite
portal_tests/crm_action_zuite/**
portal_tests/renderjs_ui_crm_action_zuite
portal_tests/renderjs_ui_crm_action_zuite/**
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment