Commit 1cb3bd31 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_corporate_identity&test: enable export in renderjs ui

parent 3005eb49
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>action_type/object_exchange</string> <string>action_type/object_jio_exchange</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>category</string> </key> <key> <string>category</string> </key>
<value> <string>object_exchange</string> </value> <value> <string>object_jio_exchange</string> </value>
</item> </item>
<item> <item>
<key> <string>condition</string> </key> <key> <string>condition</string> </key>
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>action_type/object_exchange</string> <string>action_type/object_jio_exchange</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>category</string> </key> <key> <string>category</string> </key>
<value> <string>object_exchange</string> </value> <value> <string>object_jio_exchange</string> </value>
</item> </item>
<item> <item>
<key> <string>condition</string> </key> <key> <string>condition</string> </key>
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>action_type/object_exchange</string> <string>action_type/object_jio_exchange</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>category</string> </key> <key> <string>category</string> </key>
<value> <string>object_exchange</string> </value> <value> <string>object_jio_exchange</string> </value>
</item> </item>
<item> <item>
<key> <string>condition</string> </key> <key> <string>condition</string> </key>
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>action_type/object_exchange</string> <string>action_type/object_jio_exchange</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>category</string> </key> <key> <string>category</string> </key>
<value> <string>object_exchange</string> </value> <value> <string>object_jio_exchange</string> </value>
</item> </item>
<item> <item>
<key> <string>condition</string> </key> <key> <string>condition</string> </key>
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>action_type/object_exchange</string> <string>action_type/object_jio_exchange</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>category</string> </key> <key> <string>category</string> </key>
<value> <string>object_exchange</string> </value> <value> <string>object_jio_exchange</string> </value>
</item> </item>
<item> <item>
<key> <string>condition</string> </key> <key> <string>condition</string> </key>
......
...@@ -16,13 +16,13 @@ ...@@ -16,13 +16,13 @@
<key> <string>categories</string> </key> <key> <string>categories</string> </key>
<value> <value>
<tuple> <tuple>
<string>action_type/object_exchange</string> <string>action_type/object_jio_exchange</string>
</tuple> </tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>category</string> </key> <key> <string>category</string> </key>
<value> <string>object_exchange</string> </value> <value> <string>object_jio_exchange</string> </value>
</item> </item>
<item> <item>
<key> <string>condition</string> </key> <key> <string>condition</string> </key>
......
...@@ -39,6 +39,8 @@ if doc_save: ...@@ -39,6 +39,8 @@ if doc_save:
'portal_type': context.getTranslatedPortalType() 'portal_type': context.getTranslatedPortalType()
} }
) )
if context.getWebSiteValue():
context.getPortalObject().portal_skins.changeSkin('HalRestricted')
return web_page.Base_redirect( return web_page.Base_redirect(
keep_items=dict(portal_status_message=message) keep_items=dict(portal_status_message=message)
) )
......
...@@ -39,7 +39,7 @@ Update a book report dialog with parameters manually entered ...@@ -39,7 +39,7 @@ Update a book report dialog with parameters manually entered
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
if dialog_id is not None: if dialog_id is not None:
return context.Base_redirect( return context.Base_renderForm(
dialog_id, dialog_id,
keep_items = dict( keep_items = dict(
portal_status_message=translateString('Preview updated.'), portal_status_message=translateString('Preview updated.'),
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
Create HTML table of content (to be used on web pages instead of xsl for pdf) Create HTML table of content (to be used on web pages instead of xsl for pdf)
================================================================================ ================================================================================
""" """
# ERP5 web uses type= argument, which is also a python builtin
# pylint: disable=redefined-builtin
# parameters # parameters
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# doc_content text content of document being rendered # doc_content text content of document being rendered
......
# ERP5 web uses format= argument, which is also a python builtin
# pylint: disable=redefined-builtin
return context.WebPage_viewAsContract( return context.WebPage_viewAsContract(
document_save=document_save, document_save=document_save,
display_svg=display_svg, display_svg=display_svg,
......
...@@ -53,9 +53,10 @@ if doc_save: ...@@ -53,9 +53,10 @@ if doc_save:
'portal_type': document.getTranslatedPortalType() 'portal_type': document.getTranslatedPortalType()
} }
) )
# XXX redirect = true? # XXX redirect = true?
return document.Base_redirect( if context.getWebSiteValue():
context.getPortalObject().portal_skins.changeSkin('HalRestricted')
return document.Base_redirect(form_id='view',
keep_items=dict(portal_status_message=message) keep_items=dict(portal_status_message=message)
) )
#XXX else: #XXX else:
......
...@@ -38,31 +38,27 @@ Update a book dialog with parameters manually entered ...@@ -38,31 +38,27 @@ Update a book dialog with parameters manually entered
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
if dialog_id is not None: if dialog_id is not None:
return context.Base_redirect( request = container.REQUEST
dialog_id, request.form['portal_status_message'] = translateString('Preview updated.')
keep_items = dict( request.form['cancel_url'] = cancel_url
portal_status_message=translateString('Preview updated.'), request.form['portal_skin'] = portal_skin
cancel_url=cancel_url, request.form['format'] = format
portal_skin=portal_skin, request.form['display_svg'] = display_svg
format=format, request.form['document_save'] = document_save
display_svg=display_svg, request.form['document_download'] = document_download
document_save=document_save, request.form['override_document_description'] = override_document_description
document_download=document_download, request.form['override_document_short_title'] = override_document_short_title
override_document_description=override_document_description, request.form['override_document_title'] = override_document_title
override_document_short_title=override_document_short_title, request.form['override_document_version'] = override_document_version
override_document_title=override_document_title, request.form['override_logo_reference'] = override_logo_reference
override_document_version=override_document_version, request.form['override_source_person_title'] = override_source_person_title
override_logo_reference=override_logo_reference, request.form['override_document_reference'] = override_document_reference
override_source_person_title=override_source_person_title, request.form['override_source_organisation_title'] = override_source_organisation_title
override_document_reference=override_document_reference, request.form['transformation'] = transformation
override_source_organisation_title=override_source_organisation_title, request.form['include_content_table'] = include_content_table
transformation=transformation, request.form['include_history_table'] = include_history_table
include_content_table=include_content_table, request.form['include_reference_table'] = include_reference_table
include_history_table=include_history_table, request.form['include_linked_content'] = include_linked_content
include_reference_table=include_reference_table, request.form['include_report_content'] = include_report_content
include_linked_content=include_linked_content, request.form['margin15mm'] = margin15mm
include_report_content=include_report_content, return context.Base_renderForm(dialog_id)
margin15mm = margin15mm,
#**kw
)
)
# ERP5 web uses format= argument, which is also a python builtin
# pylint: disable=redefined-builtin
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
if dialog_id is not None: if dialog_id is not None:
return context.Base_redirect( request = container.REQUEST
dialog_id, request.form['portal_status_message'] = translateString('Preview updated.')
keep_items = dict( request.form['cancel_url'] = cancel_url
portal_status_message=translateString('Preview updated.'), request.form['portal_skin'] = portal_skin
cancel_url=cancel_url, request.form['format'] = format
portal_skin=portal_skin, request.form['display_svg'] = display_svg
format=format, request.form['document_save'] = document_save
display_svg=display_svg, request.form['include_content_table'] = include_content_table
document_save=document_save, request.form['include_history_table'] = include_history_table
include_content_table=include_content_table, request.form['include_reference_table'] = include_reference_table
include_history_table=include_history_table, request.form['include_linked_content'] = include_linked_content
include_reference_table=include_reference_table, request.form['include_report_content'] = include_report_content
include_linked_content=include_linked_content, return context.Base_renderForm(dialog_id)
include_report_content=include_report_content,
#**kw
)
)
...@@ -24,20 +24,17 @@ Update a leaflet dialog with parameters manually entered ...@@ -24,20 +24,17 @@ Update a leaflet dialog with parameters manually entered
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
if dialog_id is not None: if dialog_id is not None:
return context.Base_redirect( request = container.REQUEST
dialog_id, request.form['portal_status_message'] = translateString('Preview updated.')
keep_items = dict( request.form['cancel_url'] = cancel_url
portal_status_message=translateString('Preview updated.'), request.form['portal_skin'] = portal_skin
cancel_url=cancel_url, request.form['override_source_organisation_title'] = override_source_organisation_title
portal_skin=portal_skin, request.form['override_source_person_title'] = override_source_person_title
override_source_organisation_title=override_source_organisation_title, request.form['override_leaflet_header_title'] = override_leaflet_header_title
override_source_person_title=override_source_person_title, request.form['format'] = format
override_leaflet_header_title=override_leaflet_header_title, request.form['display_svg'] = display_svg
format=format, request.form['display_side'] = display_side
display_svg=display_svg, request.form['document_save'] = document_save
display_side=display_side, request.form['document_download'] = document_download
document_save=document_save,
document_download=document_download, return context.Base_renderForm(dialog_id)
**kw
)
)
...@@ -28,26 +28,23 @@ Update the letter dialog with parameters manually entered ...@@ -28,26 +28,23 @@ Update the letter dialog with parameters manually entered
# override_date to use instead of current date # override_date to use instead of current date
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
if dialog_id is not None: if dialog_id is not None:
return context.Base_redirect( request = container.REQUEST
dialog_id, request.form['portal_status_message'] = translateString('Preview updated.')
keep_items = dict( request.form['cancel_url'] = cancel_url
portal_status_message=translateString('Preview updated.'), request.form['portal_skin'] = portal_skin
cancel_url=cancel_url, request.form['format'] = format
portal_skin=portal_skin, request.form['display_svg'] = display_svg
override_source_organisation_title=override_source_organisation_title, request.form['document_save'] = document_save
override_source_person_title=override_source_person_title, request.form['document_download'] = document_download
override_destination_organisation_title=override_destination_organisation_title, request.form['override_source_organisation_title'] = override_source_organisation_title
override_destination_person_title=override_destination_person_title, request.form['override_source_person_title'] = override_source_person_title
override_date=override_date, request.form['override_destination_organisation_title'] = override_destination_organisation_title
format=format, request.form['override_destination_person_title'] = override_destination_person_title
display_head=display_head, request.form['override_date'] = override_date
display_svg=display_svg, request.form['display_head'] = display_head
document_download=document_download, request.form['destination_position_in_letter'] = destination_position_in_letter
document_save=document_save, request.form['display_sender_company_above_recipient'] = display_sender_company_above_recipient
destination_position_in_letter = destination_position_in_letter, request.form['destination_position_padding_left'] = destination_position_padding_left
display_sender_company_above_recipient=display_sender_company_above_recipient, request.form['letter_header_margin_to_top'] = letter_header_margin_to_top
destination_position_padding_left = destination_position_padding_left,
letter_header_margin_to_top = letter_header_margin_to_top, return context.Base_renderForm(dialog_id)
**kw
)
)
...@@ -23,19 +23,15 @@ Update a press release dialog with parameters manually entered ...@@ -23,19 +23,15 @@ Update a press release dialog with parameters manually entered
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
if dialog_id is not None: if dialog_id is not None:
return context.Base_redirect( request = container.REQUEST
dialog_id, request.form['portal_status_message'] = translateString('Preview updated.')
keep_items = dict( request.form['cancel_url'] = cancel_url
portal_status_message=translateString('Preview updated.'), request.form['portal_skin'] = portal_skin
cancel_url=cancel_url, request.form['override_source_organisation_title'] = override_source_organisation_title
portal_skin=portal_skin, request.form['override_source_person_title'] = override_source_person_title
override_source_organisation_title=override_source_organisation_title, request.form['format'] = format
override_source_person_title=override_source_person_title, request.form['display_svg'] = display_svg
format=format, request.form['display_about'] = display_about
display_svg=display_svg, request.form['document_save'] = document_save
display_about=display_about, request.form['document_download'] = document_download
document_save=document_save, return context.Base_renderForm(dialog_id)
document_download=document_download,
**kw
)
)
...@@ -27,18 +27,16 @@ Update the slide dialog with parameters manually entered ...@@ -27,18 +27,16 @@ Update the slide dialog with parameters manually entered
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
if dialog_id is not None: if dialog_id is not None:
return context.Base_redirect( request = container.REQUEST
dialog_id, request.form['portal_status_message'] = translateString('Preview updated.')
keep_items = dict( request.form['cancel_url'] = cancel_url
portal_status_message=translateString('Preview updated.'), request.form['portal_skin'] = portal_skin
cancel_url=cancel_url, request.form['format'] = format
portal_skin=portal_skin, request.form['display_svg'] = display_svg
override_logo_reference=override_logo_reference, request.form['document_save'] = document_save
override_source_organisation_title=override_source_organisation_title, request.form['document_download'] = document_download
display_note=display_note, request.form['override_logo_reference'] = override_logo_reference
display_svg=display_svg, request.form['override_source_organisation_title'] = override_source_organisation_title
document_save=document_save, request.form['display_note'] = display_note
document_download=document_download,
format=format, return context.Base_renderForm(dialog_id)
)
)
# ERP5 web uses format= argument, which is also a python builtin
# pylint: disable=redefined-builtin
return context.WebPage_viewAsContract( return context.WebPage_viewAsContract(
document_save=document_save, document_save=document_save,
display_svg=display_svg, display_svg=display_svg,
......
<?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>corporate_identity_renderjs_ui_test_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>testAndUpdateTestBookTemplate</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>Test and Update Test Files for BOOK Template</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Book Template UI</td></tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/web_page_module</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tal:block tal:define="search_query python: 'reference: Template.Test.Book AND version: 001'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Workflows</td>
<td></td>
</tr>
<tal:block tal:define="exchange_configuration python: {'action_title': 'Export as Book'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/go_to_selected_exchange_dialog" />
</tal:block>
<tr>
<td>waitForTextPresent</td>
<td>Export Book</td>
<td></td>
</tr>
<tr>
<td>uncheck</td>
<td>name=field_include_content_table</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>selectFrame</td>
<td>//div[@class="bottom"]//iframe</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>ISO 16016</td>
<td></td>
</tr>
<tr>
<td>selectFrame</td>
<td>relative=top</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_logo_reference</td>
<td>Template.Test.Image.Erp5.Logo</td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_history_table</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_content_table</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_reference_table</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_linked_content</td>
<td></td>
</tr>
<tr>
<td>check</td>
<td>name=field_include_report_content</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_description</td>
<td>foobar</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_title</td>
<td>Couscous</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_short_title</td>
<td>Cous</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_reference</td>
<td>P-XYZ-Foobar</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_organisation_title</td>
<td>Test Organisation</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_person_title</td>
<td>Test Sender</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_document_version</td>
<td>333</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>selectFrame</td>
<td>//div[@class="bottom"]//iframe</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>ISO 16016</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class='ci-book-header-title' and contains(text(), 'Couscous')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class='ci-book-header-subtitle' and contains(text(), 'Cous')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//span[@class='ci-book-header-value' and contains(text(), '333')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[contains(@src, 'Template.Test.Image.Erp5.Logo')]</td>
<td></td>
</tr>
<tr>
<td>selectFrame</td>
<td>relative=top</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//select[@name='field_format']</td>
<td>pdf</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Data received.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</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>testAndUpdateTestLeafletTemplate</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>Test and Update Test Files for LEAFLET Template</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Leaflet Template UI</td></tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/web_page_module</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tal:block tal:define="search_query python: 'reference: Template.Test.Leaflet AND version: 001'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Workflows</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tal:block tal:define="exchange_configuration python: {'action_title': 'Export as Leaflet'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/go_to_selected_exchange_dialog" />
</tal:block>
<tr>
<td>waitForTextPresent</td>
<td>Export Leaflet</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>selectFrame</td>
<td>//div[@class="bottom"]//iframe</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>@</td>
<td></td>
</tr>
<tr>
<td>selectFrame</td>
<td>relative=top</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_organisation_title</td>
<td>Test Association</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_person_title</td>
<td>Test Recipient</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_leaflet_header_title</td>
<td>Couscous</td>
</tr>
<tr>
<td>uncheck</td>
<td>name=field_display_side</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>selectFrame</td>
<td>//div[@class="bottom"]//iframe</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//p[@class='ci-leaflet-source-header' and contains(text(), 'Test Association:Couscous')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementNotPresent</td>
<td>//div[@id='legalese']</td>
<td></td>
</tr>
<tr>
<td>selectFrame</td>
<td>relative=top</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//select[@name='field_format']</td>
<td>pdf</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Data received.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</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>testAndUpdateTestLetterTemplate</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>Test and Update Test Files for LETTER Template</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Letter Template UI</td></tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/web_page_module</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tal:block tal:define="search_query python: 'reference: Template.Test.Letter AND version: 001'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Workflows</td>
<td></td>
</tr>
<tal:block tal:define="exchange_configuration python: {'action_title': 'Export as Letter'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/go_to_selected_exchange_dialog" />
</tal:block>
<tr>
<td>waitForTextPresent</td>
<td>Export Letter</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>selectFrame</td>
<td>//div[@class="bottom"]//iframe</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[contains(text(), 'Address')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementNotPresent</td>
<td>//span[contains(text(), 'IBAN')]</td>
<td></td>
</tr>
<tr>
<td>selectFrame</td>
<td>relative=top</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_organisation_title</td>
<td>Test Association</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>selectFrame</td>
<td>//div[@class="bottom"]//iframe</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[contains(text(), 'Test Association')]</td>
<td></td>
</tr>
<tr>
<td>selectFrame</td>
<td>relative=top</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//select[@name='field_format']</td>
<td>pdf</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Data received.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</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>testAndUpdateTestReleaseTemplate</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>Test and Update Test Files for RELEASE Template</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Release Template UI</td></tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/web_page_module</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tal:block tal:define="search_query python: 'reference: Template.Test.Release AND version: 001'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Template.Test.Release')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Release')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Workflows</td>
<td></td>
</tr>
<tal:block tal:define="exchange_configuration python: {'action_title': 'Export as Press Release'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/go_to_selected_exchange_dialog" />
</tal:block>
<tr>
<td>waitForTextPresent</td>
<td>Export Release</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>selectFrame</td>
<td>//div[@class="bottom"]//iframe</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>©</td>
<td></td>
</tr>
<tr>
<td>selectFrame</td>
<td>relative=top</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Release</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_organisation_title</td>
<td>Test Association</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_person_title</td>
<td>Test Association Member</td>
</tr>
<tr>
<td>check</td>
<td>name=field_display_about</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>selectFrame</td>
<td>//div[@class="bottom"]//iframe</td>
<td></td>
</tr>
<tr>
<td>selectFrame</td>
<td>relative=top</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//select[@name='field_format']</td>
<td>pdf</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Data received.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</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>testAndUpdateTestSlideTemplate</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>Test and Update Test Files for SLIDE Template</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test Slide Template UI</td></tr>
</thead>
<tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/web_page_module</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tal:block tal:define="search_query python: 'reference: Template.Test.Slideshow AND version: 001'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Template Test Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template Test Slideshow')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Workflows</td>
<td></td>
</tr>
<tal:block tal:define="exchange_configuration python: {'action_title': 'Export as SlideShow'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/go_to_selected_exchange_dialog" />
</tal:block>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_logo_reference</td>
<td>Template.Test.Image.Logo.Alternativ</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_source_organisation_title</td>
<td>Foobarbazbam</td>
</tr>
<tr>
<td>click</td>
<td>//input[@value="svg"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/update_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>selectFrame</td>
<td>//div[@class="bottom"]//iframe</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>©</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//img[contains(@src, 'Template.Test.Image.Logo.Alternativ')]</td>
<td></td>
</tr>
<tr>
<td>selectFrame</td>
<td>relative=top</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//select[@name='field_format']</td>
<td>pdf</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Data received.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
##############################################################################
#
# Copyright (c) 2002-2018 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
import unittest
from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import ERP5TypeFunctionalTestCase
class testFunctionalCorporateIdentityInRenderJSUI(ERP5TypeFunctionalTestCase):
foreground = 0
run_only = "corporate_identity_renderjs_ui_test_zuite"
def getBusinessTemplateList(self):
return (
'erp5_corporate_identity',
'erp5_corporate_identity_test',
'erp5_ui_test_core',
'erp5_ui_test',
'erp5_web_renderjs_ui_test_core'
)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(testFunctionalCorporateIdentityInRenderJSUI))
return suite
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testFunctionalCorporateIdentityInRenderJSUI</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testFunctionalCorporateIdentityInRenderJSUI</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Test Component</string> </value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>version</string> </key>
<value> <string>erp5</string> </value>
</item>
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary>
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
<key> <string>action</string> </key>
<value> <string>validate</string> </value>
</item>
<item>
<key> <string>validation_state</string> </key>
<value> <string>validated</string> </value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
erp5_corporate_identity_test
erp5_web_renderjs_ui_test_core
\ No newline at end of file
Test and output files used for portal component tests of erp5_corporate_identity. Tests.
\ No newline at end of file
portal_tests/corporate_identity_renderjs_ui_test_zuite
portal_tests/corporate_identity_renderjs_ui_test_zuite/**
\ No newline at end of file
portal_tests/corporate_identity_renderjs_ui_test_zuite
portal_tests/corporate_identity_renderjs_ui_test_zuite/**
\ No newline at end of file
test.erp5.testFunctionalCorporateIdentityInRenderJSUI
\ No newline at end of file
erp5_full_text_mroonga_catalog
\ No newline at end of file
erp5_corporate_identity_renderjs_ui_test
\ 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