Commit 3b5c38b3 authored by Sven Franck's avatar Sven Franck Committed by Tristan Cavelier

erp5_corporate_identity: update templates and activate ui tests

/reviewed-on !711
parent 67655b59
...@@ -19,4 +19,8 @@ ...@@ -19,4 +19,8 @@
<skin_folder>erp5_corporate_identity_slide</skin_folder> <skin_folder>erp5_corporate_identity_slide</skin_folder>
<skin_selection>Slide</skin_selection> <skin_selection>Slide</skin_selection>
</skin_folder_selection> </skin_folder_selection>
<skin_folder_selection>
<skin_folder>erp5_xhtml_style</skin_folder>
<skin_selection>Book,Leaflet,Letter,Release,Report,Slide</skin_selection>
</skin_folder_selection>
</registered_skin_selection> </registered_skin_selection>
\ No newline at end of file
...@@ -13,7 +13,7 @@ blank = '' ...@@ -13,7 +13,7 @@ blank = ''
# ------------------------------- Set Theme ----------------------------------- # ------------------------------- Set Theme -----------------------------------
# XXX images in portal_skins folders don't convert with ?params. Only format # XXX images in portal_skins folders don't convert with ?params. Only format
# is kept in Base_convertHtmlToSingleFile # is kept in Base_convertHtmlToSingleFile
pdf = ".pdf" if doc_format == "pdf" else blank pdf = ".pdf.css" if doc_format == "pdf" else ".css"
css = "default_theme_css_url" css = "default_theme_css_url"
font = "default_theme_font_css_url_list" font = "default_theme_font_css_url_list"
param = "?format=png" param = "?format=png"
...@@ -43,8 +43,11 @@ theme_dict["theme_logo_description"] = theme_logo_dict.get("description", blank) ...@@ -43,8 +43,11 @@ theme_dict["theme_logo_description"] = theme_logo_dict.get("description", blank)
theme_dict["theme_logo_url"] = context.Base_getTemplateParameter("fallback_image") theme_dict["theme_logo_url"] = context.Base_getTemplateParameter("fallback_image")
if theme_logo_dict.get("relative_url", None) is not None: if theme_logo_dict.get("relative_url", None) is not None:
theme_dict["theme_logo_url"] = theme_logo_dict.get("relative_url") + param theme_dict["theme_logo_url"] = theme_logo_dict.get("relative_url") + param
theme_dict["template_css_url"] = css_path + pdf + ".css" theme_dict["template_css_url"] = css_path + pdf
theme_dict["fallback_img_url"] = context.Base_getTemplateParameter("fallback_image") or blank theme_dict["fallback_img_url"] = context.Base_getTemplateParameter("fallback_image") or blank
theme_dict["theme_css_font_list"] = context.Base_getTemplateParameter(font) or [] theme_dict["theme_css_font_list"] = []
theme_font_list = context.Base_getTemplateParameter(font) or []
for font in theme_font_list:
theme_dict["theme_css_font_list"].append(font + pdf)
theme_dict["theme_css_url"] = context.Base_getTemplateParameter(css) or context.Base_getTemplateParameter(css) or blank theme_dict["theme_css_url"] = context.Base_getTemplateParameter(css) or context.Base_getTemplateParameter(css) or blank
return theme_dict return theme_dict
"""
================================================================================
Return parameters to correctly display the RenderJS gadget
================================================================================
"""
# parameters
# ------------------------------------------------------------------------------
# context_url: relative url of the context calling this script
return [('editor', 'pdf'), ('portal_type', context.Letter_getPredecessor(context_url=context_url).getPortalType()), ('maximize', True)]
<?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>context_url=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Letter_getRenderJSExtraPreviewParameterList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -8,7 +8,7 @@ Print letter in any of the supported formats ...@@ -8,7 +8,7 @@ Print letter in any of the supported formats
# parameters (*default) # parameters (*default)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# #REQUEST: request object # #REQUEST: request object
# format: output format # format: output format
# portal_skin: skin to use for output # portal_skin: skin to use for output
# batch_mode: used for tests # batch_mode: used for tests
......
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
<value> <value>
<list> <list>
<string>default</string> <string>default</string>
<string>description</string> <string>renderjs_extra</string>
<string>gadget_url</string>
<string>title</string> <string>title</string>
</list> </list>
</value> </value>
...@@ -57,10 +56,6 @@ ...@@ -57,10 +56,6 @@
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
...@@ -70,7 +65,7 @@ ...@@ -70,7 +65,7 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>gadget_url</string> </key> <key> <string>renderjs_extra</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
...@@ -90,21 +85,19 @@ ...@@ -90,21 +85,19 @@
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>field_id</string> </key> <key> <string>field_id</string> </key>
<value> <string>my_iframe_gadget_field</string> </value> <value> <string>my_view_mode_text_content</string> </value>
</item> </item>
<item> <item>
<key> <string>form_id</string> </key> <key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value> <value> <string>Base_viewFieldLibrary</string> </value>
</item> </item>
<item> <item>
<key> <string>gadget_url</string> </key> <key> <string>renderjs_extra</string> </key>
<value> <string></string> </value> <value>
<list/>
</value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -124,7 +117,7 @@ ...@@ -124,7 +117,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: context.Letter_getPredecessor(context_url=context.getRelativeUrl()).getData().encode("base64")</string> </value> <value> <string>python: context.Letter_getPredecessor(context_url=context.getRelativeUrl()).absolute_url()+\'/getData\'</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
...@@ -137,7 +130,7 @@ ...@@ -137,7 +130,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: field.restrictedTraverse(\'pdf_js/pdfjs.gadget.html\').absolute_url() + "?auto_focus=1"</string> </value> <value> <string>python: context.Letter_getRenderJSExtraPreviewParameterList(context_url=context.getRelativeUrl())</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -148,7 +148,7 @@ Creates the Book sections (version, authors, etc). ...@@ -148,7 +148,7 @@ Creates the Book sections (version, authors, etc).
<td width="15%">001</td> <td width="15%">001</td>
<td width="20%">20xx-xx-xx</td> <td width="20%">20xx-xx-xx</td>
<td width="15%">All</td> <td width="15%">All</td>
<td width="55%" style="text-align: left">Added example content, corrections.</td> <td width="55%" style="text-align: right">Added example content, corrections.</td>
</tr> </tr>
</tal:block> </tal:block>
</tbody> </tbody>
......
...@@ -33,6 +33,7 @@ if doc_save: ...@@ -33,6 +33,7 @@ if doc_save:
source_reference=''.join([doc_reference, '.pdf']), source_reference=''.join([doc_reference, '.pdf']),
file=doc_pdf_file file=doc_pdf_file
) )
document.setContentType("application/pdf")
# setting aggregate in case context is an event # setting aggregate in case context is an event
if context.portal_type != 'Web Page': if context.portal_type != 'Web Page':
......
...@@ -41,7 +41,7 @@ blank = '' ...@@ -41,7 +41,7 @@ blank = ''
# ------------------ HTML cleanup/converter methods ---------------------------- # ------------------ HTML cleanup/converter methods ----------------------------
def translateText(snip): def translateText(snip):
return book_localiser.erp5_ui.gettext(snip, lang=book_language).encode('utf-8').strip() return book_localiser.erp5_ui.gettext(snip, lang=book_language).encode('UTF-8').strip()
# -------------------------- Setup --------------------------------------------- # -------------------------- Setup ---------------------------------------------
book = context book = context
...@@ -84,6 +84,13 @@ book_version = html_quote(override_document_version) if override_document_versio ...@@ -84,6 +84,13 @@ book_version = html_quote(override_document_version) if override_document_versio
book_description = html_quote(override_document_description) if override_document_description else book.getDescription() book_description = html_quote(override_document_description) if override_document_description else book.getDescription()
book_title = html_quote(override_document_title) if override_document_title else book.getTitle() book_title = html_quote(override_document_title) if override_document_title else book.getTitle()
# unicode
if isinstance(book_content, unicode):
book_content = book_content.encode("UTF-8")
# backcompat
book_history_section_list = re.findall('<section*?>.+?</section>', book_content, re.S)
# override for tests # override for tests
if override_batch_mode: if override_batch_mode:
book_modification_date = DateTime("1976-11-04") book_modification_date = DateTime("1976-11-04")
...@@ -122,7 +129,7 @@ book_table_list = [] ...@@ -122,7 +129,7 @@ book_table_list = []
book_table_of_content = blank book_table_of_content = blank
# backcompat # backcompat
book_content.replace("${WebPage_insertTableOfReferences}", blank) book_content = book_content.replace("${WebPage_insertTableOfReferences}", blank)
# XXX: not done # XXX: not done
if book_include_history_table: if book_include_history_table:
...@@ -178,8 +185,15 @@ if book_include_reference_table: ...@@ -178,8 +185,15 @@ if book_include_reference_table:
book_image_list=book_image_list, book_image_list=book_image_list,
book_table_list=book_table_list book_table_list=book_table_list
) )
if book_format == 'html' or book_format == 'mhtml': #if book_format == 'html' or book_format == 'mhtml':
book_content = book_references.encode('utf-8').strip() + book_content # book_references = book_references.encode('UTF-8').strip()
# backcompat for manual history tables at the beginning of documents
# NOTE: assumes <section>s are not used elsewhere!
if len(book_history_section_list) > 0:
book_content = book_content.replace(book_history_section_list[-1], (book_history_section_list[-1] + book_references.encode('UTF-8').strip()))
else:
book_content = book_references.encode('UTF-8').strip() + book_content
# table of content has to be created manually to run over everything that # table of content has to be created manually to run over everything that
# should be indexed in the toc # should be indexed in the toc
...@@ -188,7 +202,7 @@ if book_include_content_table: ...@@ -188,7 +202,7 @@ if book_include_content_table:
if book_format == "pdf": if book_format == "pdf":
book_table_of_content = book.WebPage_createBookXslTableOfContent( book_table_of_content = book.WebPage_createBookXslTableOfContent(
book_toc_title=book_translated_toc_title book_toc_title=book_translated_toc_title
).encode('utf-8').strip() ).encode('UTF-8').strip()
elif book_format == "html": elif book_format == "html":
book_content, book_table_of_content = book.WebPage_createTableOfContent( book_content, book_table_of_content = book.WebPage_createTableOfContent(
doc_content=book_content, doc_content=book_content,
...@@ -209,6 +223,7 @@ for image in re.findall('(<img.*?/>)', book_content): ...@@ -209,6 +223,7 @@ for image in re.findall('(<img.*?/>)', book_content):
# ========================== Format: mhtml/html ================================ # ========================== Format: mhtml/html ================================
if book_format == "html" or book_format == "mhtml": if book_format == "html" or book_format == "mhtml":
context.REQUEST.RESPONSE.setHeader("Content-Type", "text/html; charset=utf-8")
book_output = book.WebPage_createBook( book_output = book.WebPage_createBook(
book_theme=book_theme.get("theme"), book_theme=book_theme.get("theme"),
book_title=book_title, book_title=book_title,
...@@ -252,7 +267,6 @@ if book_format == "html" or book_format == "mhtml": ...@@ -252,7 +267,6 @@ if book_format == "html" or book_format == "mhtml":
) )
if book_format == "mhtml": if book_format == "mhtml":
context.REQUEST.RESPONSE.setHeader("Content-Type", "text/html;")
return book.Base_convertHtmlToSingleFile(book_output, allow_script=True) return book.Base_convertHtmlToSingleFile(book_output, allow_script=True)
# ============================= Format: pdf ==================================== # ============================= Format: pdf ====================================
...@@ -284,7 +298,7 @@ if book_format == "pdf": ...@@ -284,7 +298,7 @@ if book_format == "pdf":
book_distribution_list=book_distribution_list, book_distribution_list=book_distribution_list,
) )
# book_references created above # book_references created and added above
book_content = book.WebPage_createBookContent( book_content = book.WebPage_createBookContent(
book_format=book_format, book_format=book_format,
...@@ -338,10 +352,10 @@ if book_format == "pdf": ...@@ -338,10 +352,10 @@ if book_format == "pdf":
before_toc_data_list.append( before_toc_data_list.append(
b64encode(book.Base_convertHtmlToSingleFile(book_history, allow_script=True)) b64encode(book.Base_convertHtmlToSingleFile(book_history, allow_script=True))
) )
if book_include_reference_table: #if book_include_reference_table:
after_toc_data_list.append( # after_toc_data_list.append(
b64encode(book.Base_convertHtmlToSingleFile(book_references, allow_script=True)) # b64encode(book.Base_convertHtmlToSingleFile(book_references, allow_script=True))
) # )
xsl_style_sheet_data = book_table_of_content xsl_style_sheet_data = book_table_of_content
embedded_html_data = book.Base_convertHtmlToSingleFile(book_content, allow_script=True) embedded_html_data = book.Base_convertHtmlToSingleFile(book_content, allow_script=True)
footer_embedded_html_data = book.Base_convertHtmlToSingleFile(book_foot, allow_script=True) footer_embedded_html_data = book.Base_convertHtmlToSingleFile(book_foot, allow_script=True)
......
"""
================================================================================
(Backcompat) Retrieve theme parameter for Website css
================================================================================
"""
# XXX Keep until a new website template is available, the old erp5_ci_web needs
# to keep working. This method fetches the parameters required. Remove once no
# longer needed.
# parameters (* default)
# ------------------------------------------------------------------------------
# parameter: parameter to retriev
# proxy: proxy role is required to access parameter
# source_uid: uid to use when requiring parameter value
page = context
if parameter is not None:
page_theme = page.Base_getThemeDict(doc_format="html", css_path="template_css/web")
page_source = page.Base_getSourceDict(theme_logo_url=page_theme.get('theme_logo_url'))
if parameter == "Theme":
return page_theme.get("theme")
if parameter == "default_themes_css_url":
return page_theme.get("theme_css_url")
if parameter == "site_publisher":
return page_source.get('organisation_title') or ''
return "XXX could not retrieve %s" % (parameter or " undefined parameter")
<?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>parameter=None, proxy=None, source_uid=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>WebSite_getThemeBasedProperty</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Backcompat</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -428,6 +428,15 @@ ...@@ -428,6 +428,15 @@
.ci-book p + table td a { .ci-book p + table td a {
display: block; display: block;
} }
/* opinionated align for content tables, overwrite in html if required */
.ci-book a + table tbody tr td:first-child,
.ci-book a + table tbody tr th:first-child {
text-align: center;
}
.ci-book a + table tbody tr td:not(:first-child),
.ci-book a + table tbody tr th:not(:first-child) {
text-align: right;
}
/* table formatting */ /* table formatting */
.ci-book table { .ci-book table {
...@@ -754,7 +763,9 @@ html .ci-book table td p { ...@@ -754,7 +763,9 @@ html .ci-book table td p {
padding-top: 2mm; padding-top: 2mm;
padding-bottom: 2mm; padding-bottom: 2mm;
} }
.ci-book .ci-book-distribution-list tbody tr td ul { .ci-book .ci-book-distribution-list tbody tr td ul,
/* backcompat */
.ci-book section tbody tr td ul {
vertical-align: top; vertical-align: top;
margin-left: 0; margin-left: 0;
padding-left: 0; padding-left: 0;
...@@ -763,14 +774,18 @@ html .ci-book table td p { ...@@ -763,14 +774,18 @@ html .ci-book table td p {
padding-top: 5mm; padding-top: 5mm;
padding-bottom: 5mm; padding-bottom: 5mm;
} }
.ci-book .ci-book-distribution-list tbody tr td ul li { .ci-book .ci-book-distribution-list tbody tr td ul li,
/* backcompat */
.ci-book section tbody tr td ul li {
padding: 0; padding: 0;
list-style: none; list-style: none;
text-indent: 0; text-indent: 0;
line-height: 18pt; line-height: 18pt;
text-align: left; text-align: left;
} }
.ci-book .ci-book-distribution-list tbody tr td ul li:before { .ci-book .ci-book-distribution-list tbody tr td ul li:before,
/* backcompat */
.ci-book section tbody tr td ul li:before {
content: "■"; content: "■";
padding-right: 8px; padding-right: 8px;
vertical-align: middle; vertical-align: middle;
...@@ -783,9 +798,20 @@ html .ci-book table td p { ...@@ -783,9 +798,20 @@ html .ci-book table td p {
box-sizing: border-box; box-sizing: border-box;
display: inline-block; display: inline-block;
} }
/* backcompat */
.ci-book section tbody tr td ul li span,
.ci-book section tbody tr td ul li div,
.ci-book section tbody tr td ul li p {
display: inline-block;
width: 46%;
}
.ci-book .ci-book-distribution-list tbody tr td ul li, .ci-book .ci-book-distribution-list tbody tr td ul li,
.ci-book .ci-book-distribution-list tbody tr td ul div, .ci-book .ci-book-distribution-list tbody tr td ul div,
.ci-book .ci-book-distribution-list tbody tr td ul span { .ci-book .ci-book-distribution-list tbody tr td ul span,
/* backcompat */
.ci-book section tbody tr td ul li,
.ci-book section tbody tr td ul div,
.ci-book section tbody tr td ul span {
vertical-align: middle; vertical-align: middle;
} }
/* Version List */ /* Version List */
......
...@@ -421,6 +421,15 @@ ...@@ -421,6 +421,15 @@
padding: 0 2mm; padding: 0 2mm;
text-align: center; text-align: center;
} }
/* opinionated align for content tables, overwrite in html if required */
.ci-book a + table tbody tr td:first-child,
.ci-book a + table tbody tr th:first-child {
text-align: center;
}
.ci-book a + table tbody tr td:not(:first-child),
.ci-book a + table tbody tr th:not(:first-child) {
text-align: right;
}
.ci-book table thead tr th p { .ci-book table thead tr th p {
color: black !important; color: black !important;
} }
...@@ -758,23 +767,29 @@ html .ci-book table td p { ...@@ -758,23 +767,29 @@ html .ci-book table td p {
padding-top: 2mm; padding-top: 2mm;
padding-bottom: 2mm; padding-bottom: 2mm;
} }
.ci-book .ci-book-distribution-list tbody tr td ul { .ci-book .ci-book-distribution-list tbody tr td ul,
/* backcompat */
.ci-book section tbody tr td ul {
vertical-align: top; vertical-align: top;
margin-left: 0; margin-left: 0;
padding-left: 0; padding-left: 0;
display: inline-block; display: inline-block;
width: 49%; width: 47%;
padding-top: 5mm; padding-top: 5mm;
padding-bottom: 5mm; padding-bottom: 5mm;
} }
.ci-book .ci-book-distribution-list tbody tr td ul li { .ci-book .ci-book-distribution-list tbody tr td ul li,
/* backcompat */
.ci-book section tbody tr td ul li {
padding: 0; padding: 0;
list-style: none; list-style: none;
text-indent: 0; text-indent: 0;
line-height: 18pt; line-height: 18pt;
text-align: left; text-align: left;
} }
.ci-book .ci-book-distribution-list tbody tr td ul li:before { .ci-book .ci-book-distribution-list tbody tr td ul li:before,
/* backcompat */
.ci-book section tbody tr td ul li:before {
content: "■"; content: "■";
padding-right: 8px; padding-right: 8px;
vertical-align: middle; vertical-align: middle;
...@@ -787,9 +802,20 @@ html .ci-book table td p { ...@@ -787,9 +802,20 @@ html .ci-book table td p {
box-sizing: border-box; box-sizing: border-box;
display: inline-block; display: inline-block;
} }
/* backcompat */
.ci-book section tbody tr td ul li span,
.ci-book section tbody tr td ul li div,
.ci-book section tbody tr td ul li p {
display: inline-block;
}
.ci-book .ci-book-distribution-list tbody tr td ul li, .ci-book .ci-book-distribution-list tbody tr td ul li,
.ci-book .ci-book-distribution-list tbody tr td ul div, .ci-book .ci-book-distribution-list tbody tr td ul div,
.ci-book .ci-book-distribution-list tbody tr td ul span { .ci-book .ci-book-distribution-list tbody tr td ul span,
/* backcompat */
.ci-book section tbody tr td ul li,
.ci-book section tbody tr td ul div,
.ci-book section tbody tr td ul span,
.ci-book section tbody tr td ul p {
vertical-align: middle; vertical-align: middle;
} }
/* Version List */ /* Version List */
......
...@@ -11,7 +11,8 @@ html { ...@@ -11,7 +11,8 @@ html {
/* === font size === */ /* === font size === */
.ci-slideshow h1, .ci-slideshow h1,
.ci-slideshow h2 { .ci-slideshow h2,
.ci-slideshow-handout .ci-slideshow-handout-header {
font-size: 42px; font-size: 42px;
} }
.ci-slideshow h1 ~ *:not(h2), .ci-slideshow h1 ~ *:not(h2),
...@@ -28,19 +29,25 @@ html { ...@@ -28,19 +29,25 @@ html {
.ci-slideshow code { .ci-slideshow code {
font-size: 20px; font-size: 20px;
} }
.ci-slideshow-handout section section pre,
.ci-slideshow-handout section section code {
font-size: 5mm;
}
.ci-slideshow-handout h1, .ci-slideshow-handout h1,
.ci-slideshow-handout h2 { .ci-slideshow-handout h2 {
font-size: 24px; font-size: 24px;
} }
.ci-slideshow .ci-slideshow-intro:before {
font-size: 28px;
}
.ci-slideshow-handout ul li, .ci-slideshow-handout ul li,
.ci-slideshow-handout ul li a, .ci-slideshow-handout ul li a,
.ci-slideshow-handout div p { .ci-slideshow-handout div p {
font-size: 24px; font-size: 24px;
} }
.ci-slideshow .ci-slideshow-intro:before { .ci-slideshow-handout details,
font-size: 28px; .ci-slideshow-handout details ul li,
} .ci-slideshow-handout details ul li a {
.ci-slideshow-handout details {
font-size: 20px; font-size: 20px;
} }
.ci-slideshow-footer div, .ci-slideshow-footer div,
...@@ -195,10 +202,12 @@ section { ...@@ -195,10 +202,12 @@ section {
width: auto; width: auto;
} }
/* code */ /* code */
html .ci-slideshow code { html .ci-slideshow code,
html .ci-slideshow-handout code {
background-color: #eee; background-color: #eee;
} }
html .ci-slideshow pre { html .ci-slideshow pre,
html .ci-slideshow-handout pre {
-webkit-box-shadow: none; -webkit-box-shadow: none;
-moz-box-shadow: none; -moz-box-shadow: none;
box-shadow: none; box-shadow: none;
...@@ -222,6 +231,15 @@ html .ci-slideshow pre { ...@@ -222,6 +231,15 @@ html .ci-slideshow pre {
display: inline-block; display: inline-block;
margin-top: 10%; margin-top: 10%;
} }
.ci-slideshow section ul ul,
.ci-slideshow section ul ol,
.ci-slideshow section ol ul,
.ci-slideshow section ol ol {
padding: 0;
margin: 0;
margin-left: 4%;
margin-top: 1%;
}
.ci-slideshow section details ul, .ci-slideshow section details ul,
.ci-slideshow section details ol { .ci-slideshow section details ol {
display: block display: block
...@@ -490,7 +508,7 @@ html .ci-slideshow section img + img:last-child { ...@@ -490,7 +508,7 @@ html .ci-slideshow section img + img:last-child {
.ci-slideshow-handout, .ci-slideshow-handout,
.ci-slideshow-handout h1, .ci-slideshow-handout h1,
.ci-slideshow-handout details { .ci-slideshow-handout details {
color: #969696; color: #000; /* JP can't read #969696; */
} }
.ci-slideshow-handout section section ul, .ci-slideshow-handout section section ul,
.ci-slideshow-handout section section ol { .ci-slideshow-handout section section ol {
......
...@@ -3,4 +3,10 @@ erp5_corporate_identity_book | Report ...@@ -3,4 +3,10 @@ erp5_corporate_identity_book | Report
erp5_corporate_identity_leaflet | Leaflet erp5_corporate_identity_leaflet | Leaflet
erp5_corporate_identity_letter | Letter erp5_corporate_identity_letter | Letter
erp5_corporate_identity_release | Release erp5_corporate_identity_release | Release
erp5_corporate_identity_slide | Slide erp5_corporate_identity_slide | Slide
\ No newline at end of file erp5_xhtml_style | Book
erp5_xhtml_style | Leaflet
erp5_xhtml_style | Letter
erp5_xhtml_style | Release
erp5_xhtml_style | Report
erp5_xhtml_style | Slide
\ No newline at end of file
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts23973667.4</string> </value> <value> <string>ts28818112.51</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>bb2054b607ee9817f218e15e52789e29</string> </value> <value> <string>3521a0724f55d83b02da77987d086c17</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>86901</int> </value> <value> <int>108153</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts23973691.25</string> </value> <value> <string>ts28818148.81</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>4c7c69526342683cdd01eb8c580e2dd1</string> </value> <value> <string>a0ce9582f7c99820f6f14b3278be4166</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>161904</int> </value> <value> <int>180285</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts23973710.89</string> </value> <value> <string>ts28818185.46</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>090b6879eb49e5182c1101363a9018c8</string> </value> <value> <string>2a62c7336be2e26f88121148d3753af5</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts24219940.57</string> </value> <value> <string>ts28793492.71</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>e081a527a4a14481a854b204dfb9e69f</string> </value> <value> <string>9d769a9126156dec2c1abaea8e831309</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts24219963.95</string> </value> <value> <string>ts28793535.06</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>527ab92a98ac5c36c06c3b421e0e80cb</string> </value> <value> <string>50533d58c881785e959dac0abf7edea7</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts24219998.56</string> </value> <value> <string>ts28793562.83</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>7aeb14dddc4606daf750e8e5d5b364f9</string> </value> <value> <string>51e0e212c20bd112c07bb99b7ad58d68</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts24219736.6</string> </value> <value> <string>ts28793785.32</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>af71e66beb6943dd195610dd9a7d490f</string> </value> <value> <string>962518be8d584e7d3eba04a641c4f415</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts24219753.19</string> </value> <value> <string>ts28793805.71</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>41e3ace41fba409cd960a8033195f24b</string> </value> <value> <string>6fb54895e66d500afbdadef7dff60b4d</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts24219777.67</string> </value> <value> <string>ts28793846.92</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>7825bf344ed5c4c48b36fd0f010d868d</string> </value> <value> <string>942b2344e8b6ac86aa6577c931866998</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts24219796.65</string> </value> <value> <string>ts28793867.29</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>83f44808946bd7de4b403b4647d3d281</string> </value> <value> <string>5990ddcff7022659a9872b95df5e47d4</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts24219848.05</string> </value> <value> <string>ts28882626.08</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>1f4ddeeaea584acb7ded363458f4f156</string> </value> <value> <string>79a3d8b38376c4e101137656d4a28dcd</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts24219871.79</string> </value> <value> <string>ts28882547.32</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>9077e814ba6792079b84d2e21d1820bc</string> </value> <value> <string>0999833df18e7433a0639d5c728b2ef4</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts24220068.43</string> </value> <value> <string>ts28793940.04</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>b056cab4e707f24ad4538899929b6cbd</string> </value> <value> <string>41bbc3e9d011d7a7cac9a84d2f4b14d6</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts24220090.65</string> </value> <value> <string>ts28793968.68</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>fe10e65e99bbede9c04fa45fdf1a1165</string> </value> <value> <string>c1ae66d5d3849d4e018cc093a8ecd079</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts23978445.11</string> </value> <value> <string>ts28796891.17</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>3879ec0b0c1f58c41ccc3626e44c9b7a</string> </value> <value> <string>c566e3c9adb8cf7e23e6de714d527efe</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts23978485.91</string> </value> <value> <string>ts28796968.67</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>c46b41ab18fcd6902af839662acf0914</string> </value> <value> <string>e7b357b0b0c08656696e52510120efd1</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts23978507.58</string> </value> <value> <string>ts28797008.41</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>3085fbe4d726274917ee1bbf99c143c6</string> </value> <value> <string>70a57c0723069395546e29825d9a5176</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts23978467.48</string> </value> <value> <string>ts28796928.44</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>71bcd0c501c0c172233b85d61eddf9c8</string> </value> <value> <string>274c1d5153a216b28c603cbe86e17942</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>377618</int> </value> <value> <int>377473</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</item> </item>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts23978532.86</string> </value> <value> <string>ts28797054.07</string> </value>
</item> </item>
<item> <item>
<key> <string>_Modify_portal_content_Permission</string> </key> <key> <string>_Modify_portal_content_Permission</string> </key>
...@@ -83,11 +83,11 @@ ...@@ -83,11 +83,11 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>37cafef1d815c7dcc22ff218298f3757</string> </value> <value> <string>8743d85788c04220a3c7ab55538d1467</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
<value> <string>application/unknown</string> </value> <value> <string>application/pdf</string> </value>
</item> </item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>381449</int> </value> <value> <int>381275</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>c94e282b3ef308a01909e97442f859fc</string> </value> <value> <string>1fa4ce97d8ab6401164a4f774cdad85f</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>44cd41a98bcace059855dbd43ca00082</string> </value> <value> <string>231780bc3ee170b538da62e734177a40</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>aea99e06b679d35dc50b86fc964a66d3</string> </value> <value> <string>4a92af525f76b275d4d73a8ead62d4f0</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>29a2c357be83b6e22ab7e3cc46d7d4fd</string> </value> <value> <string>6f73555274e70c9a2f41ee6738d3e8e3</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>baa58e79cb47cac9acd69e92f9ff4194</string> </value> <value> <string>b663eec882823e2c8df1c55e77bf9510</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
</item> </item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <string>33dd061d418f33c442a25181e77f6165</string> </value> <value> <string>125dda705d2c7c8942345bf6f5dd3eaa</string> </value>
</item> </item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
......
...@@ -6,1858 +6,1930 @@ ...@@ -6,1858 +6,1930 @@
</head> </head>
<body> <body>
<!-- <!--
UPDATE comparison files for LIVE TESTS | DON'T RUN AUTOMATICALLY TEST UI and/or UPDATE FILES for live tests
(else tests will always pass...)
This Zuite updates all test files (diff-html, pdfs, bmps) used in the LiveTests This Zuite updates all test files (diff-html, pdfs, bmp) used in the LiveTests
based on the example web pages included in this bt5. Run this zuite after making based on the example web pages included in this bt5. The parameter no_file_update
changes to the bt5 which will alter their look to automatically update all files determines whether files are updated (default True). To update test files,
(else you need to do it by hand). This also means: DON'T RUN THIS AUTOMATICALLY, create a script Zuite_setSkipSave in custom folder which returns False
because it will also update all test files with any errors you make, causing
liveTests to always pass (comparing wrong rendering to wrong test file).
Help: Help:
http://www.seleniumhq.org/docs/02_selenium_ide.jsp#selenium-commands-selenese http://www.seleniumhq.org/docs/02_selenium_ide.jsp#selenium-commands-selenese
http://seleniummaster.com/sitecontent/index.php/introduction-to-selenium-automation/selenium-ide/114-selenium-ide-complete-list-of-commands http://seleniummaster.com/sitecontent/index.php/introduction-to-selenium-automation/selenium-ide/114-selenium-ide-complete-list-of-commands
# Note: Note:
# make sure to set editor to plain text in (erp5 test preferences) # uses pause when updating files to wait for Cloudooo pdf rendering
# requires text-area editor
# test waitForTitle does not work in FF
--> -->
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr> <tr><td rowspan="1" colspan="3">Test Book Template UI</td></tr>
</thead><tbody> </thead>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> <tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tal:block tal:define="portal here/portal_url/getPortalObject;
caller python: getattr(context, 'Zuite_setSkipSave', None);
no_file_update python: caller() if caller is not None else True;">
<tr>
<td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/Zuite_setPreferredTextEditor</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Editor set to Textarea.</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td tal:content="python: ''.join(['skipping save: ', str(no_file_update)])"></td>
<td></td>
</tr>
<tal:block tal:condition="python: no_file_update == True">
<tr>
<td>open</td>
<td>${base_url}/Zuite_setConversionServerUrl</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Conversion Server Url set.</td>
<td></td>
</tr>
</tal:block>
<tr>
<td>echo</td>
<td>ACTION => EXPORT</td>
<td></td>
</tr>
<!-- CASE 1: template_test_book_output_expected_001_en_html -->
<tr>
<td>echo</td>
<td>ACTION => EXPORT</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>CASE 1 => template_test_book_output_expected_001_en_html</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>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>Short Title</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=3</td>
</tr>
<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>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>ISO 16016</td>
<td></td>
</tr>
<tal:block tal:condition="python: no_file_update == False">
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<tr> <!-- Can't fetch iframe source, so request page again -->
<td>open</td> <tr>
<td>${base_url}/bar_module/ListBoxZuite_reset</td> <td>storeEval</td>
<td></td> <td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
</tr> <td>page_source</td>
<tr> </tr>
<td>assertTextPresent</td> </tal:block>
<td>Reset Successfully.</td> <tr>
<td></td> <td>goBackAndWait</td>
</tr> <td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Book%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Book.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Book.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="input"]/div/textarea</td>
<td></td>
</tr>
<tal:block tal:condition="python: no_file_update == False">
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="input"]/div/textarea</td>
<td>${dump}</td>
</tr>
</tal:block>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- CASE 2: - template_test_book_output_expected_002_en_html -->
<tr>
<td>echo</td>
<td>CASE 2 => template_test_lealflet_book_expected_002_en_html</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>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>Short Title</td>
<td></td>
</tr>
<!-- don't save once to set modification date for live tests, because this
will up revision and it's the second time this document is used, so
revision on prior tests using this web page will be off by 1
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
-->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=3</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Book</td>
<td></td>
</tr>
<!-- Base_callDialogMethod max 2000 chars for url_params_string fails here -->
<tr>
<td>type</td>
<td>name=field_override_logo_reference</td>
<td>Template.Test.Image.Erp5.Logo</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></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>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>ISO 16016</td>
<td></td>
</tr>
<tal:block tal:condition="python: no_file_update == False">
<!-- store URL for rerequesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- update 1st output - template_test_book_output_expected_001_en_html --> <!-- Can't fetch iframe source, so request page again -->
<tr> <tr>
<td>echo</td> <td>storeEval</td>
<td>action => export</td> <td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td></td> <td>page_source</td>
</tr> </tr>
<tr> </tal:block>
<td>echo</td> <tr>
<td>update => template_test_book_output_expected_001_en_html</td> <td>goBackAndWait</td>
<td></td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>open</td> <tr>
<td>${base_url}/web_page_module/</td> <td>waitForPageToLoad</td>
<td></td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>records</td> <td>waitForTextPresent</td>
<td></td> <td>Web Pages</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_reference</td> <td>click</td>
<td>Template.Test.Book</td> <td>//a[contains(text(), 'Web Pages')]</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_version</td> <td>waitForTextPresent</td>
<td>001</td> <td>records</td>
</tr> <td></td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_version</td> <td>type</td>
<td>\13</td> <td>name=listbox_reference</td>
</tr> <td>%Template% AND %Output% AND %Book%</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template Test Book</td> <td>type</td>
<td></td> <td>name=listbox_version</td>
</tr> <td>002</td>
<tr> </tr>
<td>click</td> <tr>
<td>//a[contains(text(), 'Template.Test.Book')]</td> <td>keyPressAndWait</td>
<td></td> <td>listbox_reference</td>
</tr> <td>\13</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Short Title</td> <td>waitForTextPresent</td>
<td></td> <td>Template.Test.Book.Expected.Output.Sample</td>
</tr> <td></td>
<!-- Save once to set modification date for live tests --> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>click</td>
<td>//button[@class="save"]</td> <td>//a[contains(text(), 'Template.Test.Book.Expected.Output.Sample')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyElementPresent</td> <td>waitForTextPresent</td>
<td>//button[@class="save"]</td> <td>Short Title</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>waitForElementPresent</td>
<td>//button[@class="save"]</td> <td>//a/span[contains(text(), 'Edit')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>click</td>
<td>//div[@class="transition_message"]</td> <td>//a/span[contains(text(), 'Edit')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>assertTextPresent</td> <td>waitForElementPresent</td>
<td>Data updated.</td> <td>//div[@class="input"]/div/textarea</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tal:block tal:condition="python: no_file_update == False">
<td>waitForElementPresent</td> <tr>
<td>//button[@class="import_export"]</td> <td>storeEval</td>
<td></td> <td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <tr>
<td>//button[@class="import_export"]</td> <td>storeEval</td>
<td></td> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
</tr> <td>dump</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Export Slideshow</td> <td>type</td>
<td></td> <td>//div[@class="input"]/div/textarea</td>
</tr> <td>${dump}</td>
<tr> </tr>
<td>selectAndWait</td> </tal:block>
<td>name=select_dialog</td> <tr>
<td>index=3</td> <td>verifyElementPresent</td>
</tr> <td>//button[@class="save"]</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Export Book</td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>//button[@class="save"]</td>
<tr> <td></td>
<td>uncheck</td> </tr>
<td>name=field_include_content_table</td> <tr>
<td></td> <td>waitForElementPresent</td>
</tr> <td>//div[@class="transition_message"]</td>
<tr> <td></td>
<td>clickAndWait</td> </tr>
<td>name=Base_showUpdateDialog:method</td> <tr>
<td></td> <td>assertTextPresent</td>
</tr> <td>Data updated.</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//div[@class="transition_message"]</td> <!-- CASE 3: template_test_book_output_expected_003_de_html -->
<td></td> <tr>
</tr> <td>echo</td>
<tr> <td>CASE 3 => template_test_book_output_expected_003_de_html</td>
<td>waitForTextPresent</td> <td></td>
<td>Preview updated.</td> </tr>
<td></td> <tr>
</tr> <td>verifyTextPresent</td>
<tr> <td>Web Pages</td>
<td>clickAndWait</td> <td></td>
<td>name=Base_callDialogMethod:method</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Web Pages')]</td>
<td>waitForElementNotPresent</td> <td></td>
<td>name=Base_callDialogMethod:method</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>records</td>
<td>waitForPageToLoad</td> <td></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_reference</td>
<td>waitForTextPresent</td> <td>Template.Test.Book</td>
<td>ISO 16016</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_version</td>
<td>storeLocation</td> <td>002</td>
<td>url</td> </tr>
<td></td> <tr>
</tr> <td>keyPressAndWait</td>
<tr> <td>listbox_version</td>
<td>echo</td> <td>\13</td>
<td>${url}</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<!-- Can't fetch iframe source, so request page again --> <td>Template Test Book</td>
<tr> <td></td>
<td>storeEval</td> </tr>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td> <tr>
<td>page_source</td> <td>click</td>
</tr> <td>//a[contains(text(), 'Template.Test.Book')]</td>
<tr> <td></td>
<td>goBackAndWait</td> </tr>
<td></td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Short Title</td>
<tr> <td></td>
<td>waitForPageToLoad</td> </tr>
<td></td> <!-- Save once to set modification date for live tests -->
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//button[@class="save"]</td>
<td>waitForTextPresent</td> <td></td>
<td>Web Pages</td> </tr>
<td></td> <tr>
</tr> <td>verifyElementPresent</td>
<tr> <td>//button[@class="save"]</td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'Web Pages')]</td> </tr>
<td></td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>//button[@class="save"]</td>
<td>waitForTextPresent</td> <td></td>
<td>records</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//div[@class="transition_message"]</td>
<td>type</td> <td></td>
<td>name=listbox_reference</td> </tr>
<td>%Template% AND %Output% AND %Book%</td> <tr>
</tr> <td>assertTextPresent</td>
<tr> <td>Data updated.</td>
<td>type</td> <td></td>
<td>name=listbox_version</td> </tr>
<td>001</td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//button[@class="import_export"]</td>
<td>keyPressAndWait</td> <td></td>
<td>listbox_reference</td> </tr>
<td>\13</td> <tr>
</tr> <td>click</td>
<tr> <td>//button[@class="import_export"]</td>
<td>waitForTextPresent</td> <td></td>
<td>Template.Test.Book.Expected.Output.Sample</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Export Slideshow</td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'Template.Test.Book.Expected.Output.Sample')]</td> </tr>
<td></td> <tr>
</tr> <td>selectAndWait</td>
<tr> <td>name=select_dialog</td>
<td>waitForTextPresent</td> <td>index=3</td>
<td>Short Title</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Export Book</td>
<td>waitForElementPresent</td> <td></td>
<td>//a/span[contains(text(), 'Edit')]</td> </tr>
<td></td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>name=Base_showUpdateDialog:method</td>
<td>click</td> <td></td>
<td>//a/span[contains(text(), 'Edit')]</td> </tr>
<td></td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>name=Base_showUpdateDialog:method</td>
<td>waitForElementPresent</td> <td></td>
<td>//textarea[@name="field_my_text_content"]</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//div[@class="transition_message"]</td>
<td>storeEval</td> <td></td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Preview updated.</td>
<td>storeEval</td> <td></td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td> </tr>
<td>dump</td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>name=Base_callDialogMethod:method</td>
<td>type</td> <td></td>
<td>//textarea[@name="field_my_text_content"]</td> </tr>
<td>${dump}</td> <tr>
</tr> <td>waitForPageToLoad</td>
<tr> <td></td>
<td>verifyElementPresent</td> <td></td>
<td>//button[@class="save"]</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementNotPresent</td>
<tr> <td>name=Base_callDialogMethod:method</td>
<td>clickAndWait</td> <td></td>
<td>//button[@class="save"]</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>ISO 16016</td>
<td>waitForElementPresent</td> <td></td>
<td>//div[@class="transition_message"]</td> </tr>
<td></td> <tal:block tal:condition="python: no_file_update == False">
</tr> <tr>
<tr> <td>storeLocation</td>
<td>assertTextPresent</td> <td>url</td>
<td>Data updated.</td> <td></td>
<td></td> </tr>
</tr> <tr>
<!-- update 2nd output - template_test_book_output_expected_002_en_html --> <td>echo</td>
<tr> <td>${url}</td>
<td>echo</td> <td></td>
<td>update => template_test_lealflet_book_expected_002_en_html</td> </tr>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>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>Short Title</td>
<td></td>
</tr>
<!-- don't save once to set modification date for live tests, because this
will up revision and it's the second time this document is used, so
revision on prior tests using this web page will be off by 1
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
-->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=3</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Book</td>
<td></td>
</tr>
<!-- Base_callDialogMethod max 2000 chars for url_params_string fails here -->
<tr>
<td>type</td>
<td>name=field_override_logo_reference</td>
<td>Template.Test.Image.Erp5.Logo</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></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>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>ISO 16016</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Book%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Book.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Book.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 3rd output - template_test_book_output_expected_003_de_html -->
<tr>
<td>echo</td>
<td>update => template_test_book_output_expected_003_de_html</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>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>Short Title</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=3</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Book</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>ISO 16016</td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Book%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>003</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Book.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Book.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@name="field_my_text_content"]</td>
<td>${dump}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- update 1st pdf documents - template_test_book_input_001_en_pdf --> <!-- Can't fetch iframe source, so request page again -->
<tr> <tr>
<td>echo</td> <td>storeEval</td>
<td>update => template_test_book_input_001_en_pdf</td> <td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td></td> <td>page_source</td>
</tr> </tr>
<tr> </tal:block>
<td>open</td> <tr>
<td>${base_url}/web_page_module/</td> <td>goBackAndWait</td>
<td></td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>records</td> <td>waitForPageToLoad</td>
<td></td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_reference</td> <td>waitForTextPresent</td>
<td>Template.Test.Book</td> <td>Web Pages</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_version</td> <td>click</td>
<td>001</td> <td>//a[contains(text(), 'Web Pages')]</td>
</tr> <td></td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_version</td> <td>waitForTextPresent</td>
<td>\13</td> <td>records</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template Test Book</td> <td>type</td>
<td></td> <td>name=listbox_reference</td>
</tr> <td>%Template% AND %Output% AND %Book%</td>
<tr> </tr>
<td>click</td> <tr>
<td>//a[contains(text(), 'Template.Test.Book')]</td> <td>type</td>
<td></td> <td>name=listbox_version</td>
</tr> <td>003</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Short Title</td> <td>keyPressAndWait</td>
<td></td> <td>listbox_reference</td>
</tr> <td>\13</td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//button[@class="import_export"]</td> <td>waitForTextPresent</td>
<td></td> <td>Template.Test.Book.Expected.Output.Sample</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <tr>
<td>//button[@class="import_export"]</td> <td>click</td>
<td></td> <td>//a[contains(text(), 'Template.Test.Book.Expected.Output.Sample')]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Export Slideshow</td> <td>waitForTextPresent</td>
<td></td> <td>Short Title</td>
</tr> <td></td>
<tr> </tr>
<td>selectAndWait</td> <tr>
<td>name=select_dialog</td> <td>waitForElementPresent</td>
<td>index=3</td> <td>//a/span[contains(text(), 'Edit')]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Export Book</td> <td>click</td>
<td></td> <td>//a/span[contains(text(), 'Edit')]</td>
</tr> <td></td>
<tr> </tr>
<td>select</td> <tr>
<td>name=field_format</td> <td>waitForElementPresent</td>
<td>index=1</td> <td>//div[@class="input"]/div/textarea</td>
</tr> <td></td>
<tr> </tr>
<td>uncheck</td> <tal:block tal:condition="python: no_file_update == False">
<td>name=field_include_content_table</td> <tr>
<td></td> <td>storeEval</td>
</tr> <td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<tr> <td></td>
<td>clickAndWait</td> </tr>
<td>name=Base_callDialogMethod:method</td> <tr>
<td></td> <td>storeEval</td>
</tr> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<tr> <td>dump</td>
<td>waitForPageToLoad</td> </tr>
<td></td> <tr>
<td></td> <td>type</td>
</tr> <td>//div[@class="input"]/div/textarea</td>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded --> <td>${dump}</td>
<tr> </tr>
<td>waitForTitle</td> </tal:block>
<td></td> <tr>
<td></td> <td>verifyElementPresent</td>
</tr> <td>//button[@class="save"]</td>
<tr> <td></td>
<td>verifyTitle</td> </tr>
<td></td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>//button[@class="save"]</td>
<!-- Store this location for re-requesting --> <td></td>
<tr> </tr>
<td>storeLocation</td> <tr>
<td>url</td> <td>waitForElementPresent</td>
<td></td> <td>//div[@class="transition_message"]</td>
</tr> <td></td>
<tr> </tr>
<td>echo</td> <tr>
<td>${url}</td> <td>assertTextPresent</td>
<td></td> <td>Data updated.</td>
</tr> <td></td>
<!-- Can't access pdf source inside iframe, so request page again --> </tr>
<tr>
<td>storeEval</td> <!-- CASE 1 (pdf) - template_test_book_input_001_en_pdf -->
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob"; xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td> <tr>
<td>pdf_source</td> <td>echo</td>
</tr> <td>CASE 1 (pdf) => template_test_book_input_001_en_pdf</td>
<!-- pause to let the ajax request finish. now if the table was a async, queue <td></td>
that would be nice--> </tr>
<tr> <tr>
<td>pause</td> <td>open</td>
<td>3000</td> <td>${base_url}/web_page_module/</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>goBackAndWait</td> <td>waitForTextPresent</td>
<td></td> <td>records</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForPageToLoad</td> <td>type</td>
<td></td> <td>name=listbox_reference</td>
<td></td> <td>Template.Test.Book</td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>type</td>
<td>Web Pages</td> <td>name=listbox_version</td>
<td></td> <td>001</td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>keyPressAndWait</td>
<td>//a[contains(text(), 'ERP5')]</td> <td>listbox_version</td>
<td></td> <td>\13</td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForTextPresent</td>
<td>//a[contains(text(), 'Documents')]</td> <td>Template Test Book</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[contains(text(), 'Documents')]</td> <td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>records</td> <td>Short Title</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>waitForElementPresent</td>
<td>name=listbox_reference</td> <td>//button[@class="import_export"]</td>
<td>Template.Test.Book</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>click</td>
<td>name=listbox_version</td> <td>//button[@class="import_export"]</td>
<td>001</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>keyPressAndWait</td> <td>waitForTextPresent</td>
<td>listbox_version</td> <td>Export Slideshow</td>
<td>\13</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>selectAndWait</td>
<td>Template Test Book</td> <td>name=select_dialog</td>
<td></td> <td>index=3</td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>waitForTextPresent</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td> <td>Export Book</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>select</td>
<td>Short Title</td> <td>name=field_format</td>
<td></td> <td>index=1</td>
</tr> </tr>
<!-- manual form submit --> <tr>
<tr> <td>uncheck</td>
<td>storeLocation</td> <td>name=field_include_content_table</td>
<td>url</td> <td></td>
<td></td> </tr>
</tr> <tal:block tal:condition="python: no_file_update == False">
<!-- only handle pdf_source (a promise!) here, because it needs to be set on <!--
the iframe and a page-reload resets all (bad) parameters manually set --> PDF viewer has no document.title, wait for "" means pdf is loaded
<tr> FIREFOX (51) will prompt to open PDF in new window = we're dead for now
<td>storeEval</td> -->
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>name=Base_callDialogMethod:method</td>
<tr> <td></td>
<td>storeEval</td> </tr>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td> <tr>
<td>pdf_dump</td> <td>waitForPageToLoad</td>
</tr> <td></td>
<tr> <td></td>
<td>echo</td> </tr>
<td>${pdf_dump}</td> <tr>
<td></td> <td>waitForTitle</td>
</tr> <td></td>
<tr> <td></td>
<td>verifyNotExpression</td> </tr>
<td>${pdf_dump}</td> <tr>
<td>null</td> <td>verifyTitle</td>
</tr> <td></td>
<tr> <td></td>
<td>storeEval</td> </tr>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Book-001-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td> <tr>
<td>promise</td> <td>storeLocation</td>
</tr> <td>url</td>
<tr> <td></td>
<td>storeEval</td> </tr>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td> <tr>
<td></td> <td>echo</td>
</tr> <td>${url}</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//div[@class="transition_message"]</td>
<td></td> <!-- Can't access pdf source inside iframe, so request page again -->
</tr> <tr>
<tr> <td>storeEval</td>
<td>waitForTextPresent</td> <td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob"; xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>Data updated.</td> <td>pdf_source</td>
<td></td> </tr>
</tr> <!-- pause to let the ajax request finish. now if the table was a async, queue
<!-- generate image - template_test_book_input_page_4_001_en_bmp --> that would be nice 3/6/9000 didn't work -->
<tr> <tr>
<td>echo</td> <td>pause</td>
<td>update => template_test_book_input_page_4_001_en_bmp</td> <td>12000</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>storeEval</td> <td>goBackAndWait</td>
<td>storedVars["url"].split("?")[0]</td> <td></td>
<td>screenshot_url</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>echo</td> <td>waitForPageToLoad</td>
<td>${screenshot_url}</td> <td></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>open</td> <td>waitForTextPresent</td>
<td>${screenshot_url}/Document_createScreenshot?frame=4&amp;doc_id=template_test_book_input_page_4_001_en_bmp</td> <td>Web Pages</td>
<td></td> <td></td>
</tr> </tr>
<tr> </tal:block>
<td>waitForTextPresent</td> <tr>
<td>Screenshot updated.</td> <td>click</td>
<td></td> <td>//a[contains(text(), 'ERP5')]</td>
</tr> <td></td>
<!-- update 2nd pdf document - template_test_book_input_002_en_pdf --> </tr>
<tr> <tr>
<td>echo</td> <td>waitForElementPresent</td>
<td>update => template_test_book_input_002_en_pdf</td> <td>//a[contains(text(), 'Documents')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>open</td> <td>click</td>
<td>${base_url}/web_page_module/</td> <td>//a[contains(text(), 'Documents')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>records</td> <td>records</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>name=listbox_reference</td> <td>name=listbox_reference</td>
<td>Template.Test.Book</td> <td>Template.Test.Book</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>name=listbox_version</td> <td>name=listbox_version</td>
<td>001</td> <td>001</td>
</tr> </tr>
<tr> <tr>
<td>keyPressAndWait</td> <td>keyPressAndWait</td>
<td>listbox_version</td> <td>listbox_version</td>
<td>\13</td> <td>\13</td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>Template Test Book</td> <td>Template Test Book</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td> <td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>Short Title</td> <td>Short Title</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tal:block tal:condition="python: no_file_update == False">
<td>waitForElementPresent</td> <!-- manual form submit -->
<td>//button[@class="import_export"]</td> <tr>
<td></td> <td>storeLocation</td>
</tr> <td>url</td>
<tr> <td></td>
<td>click</td> </tr>
<td>//button[@class="import_export"]</td> <!-- only handle pdf_source (a promise!) here, because it needs to be set on
<td></td> the iframe and a page-reload resets all (bad) parameters manually set -->
</tr> <tr>
<tr> <td>storeEval</td>
<td>waitForTextPresent</td> <td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td>Export Slideshow</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>storeEval</td>
<td>selectAndWait</td> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>name=select_dialog</td> <td>pdf_dump</td>
<td>index=3</td> </tr>
</tr> <tr>
<tr> <td>echo</td>
<td>waitForTextPresent</td> <td>${pdf_dump}</td>
<td>Export Book</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>verifyNotExpression</td>
<td>select</td> <td>${pdf_dump}</td>
<td>name=field_format</td> <td>null</td>
<td>index=1</td> </tr>
</tr> <tr>
<tr> <td>storeEval</td>
<td>check</td> <td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Book-001-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>name=field_include_history_table</td> <td>promise</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>storeEval</td>
<td>check</td> <td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td>name=field_include_content_table</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>check</td> <td>//div[@class="transition_message"]</td>
<td>name=field_include_reference_table</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>check</td> <td>Data updated.</td>
<td>name=field_include_linked_content</td> <td></td>
<td></td> </tr>
</tr> <!-- generate image - template_test_book_input_page_4_001_en_bmp -->
<tr> <tr>
<td>check</td> <td>echo</td>
<td>name=field_include_report_content</td> <td>update => template_test_book_input_page_4_001_en_bmp</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>storeEval</td>
<td>name=field_override_document_description</td> <td>storedVars["url"].split("?")[0]</td>
<td>foobar</td> <td>screenshot_url</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>echo</td>
<td>name=field_override_document_title</td> <td>${screenshot_url}</td>
<td>Couscous</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>open</td>
<td>name=field_override_document_short_title</td> <td>${screenshot_url}/Document_createScreenshot?frame=4&amp;doc_id=template_test_book_input_page_4_001_en_bmp</td>
<td>Cous</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>waitForTextPresent</td>
<td>name=field_override_document_reference</td> <td>Screenshot updated.</td>
<td>P-XYZ-Foobar</td> <td></td>
</tr> </tr>
<tr> </tal:block>
<td>type</td>
<td>name=field_override_logo_reference</td> <!-- CASE 2 (pdf) - template_test_book_input_002_en_pdf -->
<td>Template.Test.Image.Erp5.Logo</td> <tr>
</tr> <td>echo</td>
<tr> <td>CASE 2 (pdf) => template_test_book_input_002_en_pdf</td>
<td>type</td> <td></td>
<td>name=field_override_source_organisation_title</td> </tr>
<td>Test Organisation</td> <tr>
</tr> <td>open</td>
<tr> <td>${base_url}/web_page_module/</td>
<td>type</td> <td></td>
<td>name=field_override_source_person_title</td> </tr>
<td>Test Sender</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>records</td>
<td>type</td> <td></td>
<td>name=field_override_document_version</td> </tr>
<td>333</td> <tr>
</tr> <td>type</td>
<!-- update dialog fails if param-string is larger than 2000 chars (here) --> <td>name=listbox_reference</td>
<tr> <td>Template.Test.Book</td>
<td>clickAndWait</td> </tr>
<td>name=Base_callDialogMethod:method</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=listbox_version</td>
<tr> <td>001</td>
<td>waitForPageToLoad</td> </tr>
<td></td> <tr>
<td></td> <td>keyPressAndWait</td>
</tr> <td>listbox_version</td>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded --> <td>\13</td>
<tr> </tr>
<td>waitForTitle</td> <tr>
<td></td> <td>waitForTextPresent</td>
<td></td> <td>Template Test Book</td>
</tr> <td></td>
<tr> </tr>
<td>verifyTitle</td> <tr>
<td></td> <td>click</td>
<td></td> <td>//a[contains(text(), 'Template.Test.Book')]</td>
</tr> <td></td>
<!-- Store this location for re-requesting --> </tr>
<tr> <tr>
<td>storeLocation</td> <td>waitForTextPresent</td>
<td>url</td> <td>Short Title</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>echo</td> <td>waitForElementPresent</td>
<td>${url}</td> <td>//button[@class="import_export"]</td>
<td></td> <td></td>
</tr> </tr>
<!-- Can't fetch pdf source, so request page again --> <tr>
<tr> <td>click</td>
<td>storeEval</td> <td>//button[@class="import_export"]</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td> <td></td>
<td>pdf_source</td> </tr>
</tr> <tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue <td>waitForTextPresent</td>
that would be nice--> <td>Export Slideshow</td>
<tr> <td></td>
<td>pause</td> </tr>
<td>9000</td> <tr>
<td></td> <td>selectAndWait</td>
</tr> <td>name=select_dialog</td>
<tr> <td>index=3</td>
<td>goBackAndWait</td> </tr>
<td></td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Export Book</td>
<tr> <td></td>
<td>waitForPageToLoad</td> </tr>
<td></td> <tr>
<td></td> <td>select</td>
</tr> <td>name=field_format</td>
<tr> <td>index=1</td>
<td>waitForTextPresent</td> </tr>
<td>Web Pages</td> <tr>
<td></td> <td>check</td>
</tr> <td>name=field_include_history_table</td>
<tr> <td></td>
<td>click</td> </tr>
<td>//a[contains(text(), 'ERP5')]</td> <tr>
<td></td> <td>check</td>
</tr> <td>name=field_include_content_table</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//a[contains(text(), 'Documents')]</td> <tr>
<td></td> <td>check</td>
</tr> <td>name=field_include_reference_table</td>
<tr> <td></td>
<td>click</td> </tr>
<td>//a[contains(text(), 'Documents')]</td> <tr>
<td></td> <td>check</td>
</tr> <td>name=field_include_linked_content</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>records</td> <tr>
<td></td> <td>check</td>
</tr> <td>name=field_include_report_content</td>
<tr> <td></td>
<td>type</td> </tr>
<td>name=listbox_reference</td> <tr>
<td>Template.Test.Book</td> <td>type</td>
</tr> <td>name=field_override_document_description</td>
<tr> <td>foobar</td>
<td>type</td> </tr>
<td>name=listbox_version</td> <tr>
<td>002</td> <td>type</td>
</tr> <td>name=field_override_document_title</td>
<tr> <td>Couscous</td>
<td>keyPressAndWait</td> </tr>
<td>listbox_version</td> <tr>
<td>\13</td> <td>type</td>
</tr> <td>name=field_override_document_short_title</td>
<tr> <td>Cous</td>
<td>waitForTextPresent</td> </tr>
<td>Template Test Book</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=field_override_document_reference</td>
<tr> <td>P-XYZ-Foobar</td>
<td>clickAndWait</td> </tr>
<td>//a[contains(text(), 'Template.Test.Book')]</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=field_override_logo_reference</td>
<tr> <td>Template.Test.Image.Erp5.Logo</td>
<td>waitForTextPresent</td> </tr>
<td>Short Title</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=field_override_source_organisation_title</td>
<!-- manual form submit --> <td>Test Organisation</td>
<tr> </tr>
<td>storeLocation</td> <tr>
<td>url</td> <td>type</td>
<td></td> <td>name=field_override_source_person_title</td>
</tr> <td>Test Sender</td>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on </tr>
the iframe and a page-reload resets all (bad) parameters manually set --> <tr>
<tr> <td>type</td>
<td>storeEval</td> <td>name=field_override_document_version</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td> <td>333</td>
<td></td> </tr>
</tr> <tal:block tal:condition="python: no_file_update == False">
<tr> <!--
<td>storeEval</td> PDF viewer has no document.title, wait for "" means pdf is loaded
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td> FIREFOX (51) will prompt to open PDF in new window = we're dead for now
<td>pdf_dump</td> -->
</tr> <!-- update dialog fails if param-string is larger than 2000 chars (here) -->
<tr> <tr>
<td>echo</td> <td>clickAndWait</td>
<td>${pdf_dump}</td> <td>name=Base_callDialogMethod:method</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyNotExpression</td> <td>waitForPageToLoad</td>
<td>${pdf_dump}</td> <td></td>
<td>null</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>storeEval</td> <td>waitForTitle</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "P-XYZ-Foobar-333-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td> <td></td>
<td>promise</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>storeEval</td> <td>verifyTitle</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td> <td></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>storeLocation</td>
<td>//div[@class="transition_message"]</td> <td>url</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>echo</td>
<td>Data updated.</td> <td>${url}</td>
<td></td> <td></td>
</tr> </tr>
<!-- generate images -
template_test_book_input_page_4_002_en_bmp <!-- Can't fetch pdf source, so request page again -->
template_test_book_input_page_5_002_en_bmp <tr>
template_test_book_input_page_9_002_en_bmp <td>storeEval</td>
--> <td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<tr> <td>pdf_source</td>
<td>echo</td> </tr>
<td>update => template_test_book_input_page_4_002_en_bmp</td> <!-- pause to let the ajax request finish. now if the table was a async, queue
<td></td> that would be nice, 3/6/9000 didn't work -->
</tr> <tr>
<tr> <td>pause</td>
<td>storeEval</td> <td>12000</td>
<td>storedVars["url"].split("?")[0]</td> <td></td>
<td>screenshot_url</td> </tr>
</tr> <tr>
<tr> <td>goBackAndWait</td>
<td>echo</td> <td></td>
<td>${screenshot_url}</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForPageToLoad</td>
<td>open</td> <td></td>
<td>${screenshot_url}/Document_createScreenshot?frame=4&amp;doc_id=template_test_book_input_page_4_002_en_bmp</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForTextPresent</td> <td>Web Pages</td>
<td>Screenshot updated.</td> <td></td>
<td></td> </tr>
</tr> </tal:block>
<tr> <tr>
<td>open</td> <td>click</td>
<td>${screenshot_url}/Document_createScreenshot?frame=5&amp;doc_id=template_test_book_input_page_5_002_en_bmp</td> <td>//a[contains(text(), 'ERP5')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForElementPresent</td>
<td>Screenshot updated.</td> <td>//a[contains(text(), 'Documents')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>open</td> <td>click</td>
<td>${screenshot_url}/Document_createScreenshot?frame=10&amp;doc_id=template_test_book_input_page_10_002_en_bmp</td> <td>//a[contains(text(), 'Documents')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>Screenshot updated.</td> <td>records</td>
<td></td> <td></td>
</tr> </tr>
<!-- update 3rd pdf document - template_test_book_input_003_de_pdf --> <tr>
<tr> <td>type</td>
<td>echo</td> <td>name=listbox_reference</td>
<td>update => template_test_book_input_003_de_pdf</td> <td>Template.Test.Book</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>open</td> <td>name=listbox_version</td>
<td>${base_url}/web_page_module/</td> <td>002</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>keyPressAndWait</td>
<td>waitForTextPresent</td> <td>listbox_version</td>
<td>records</td> <td>\13</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>type</td> <td>Template Test Book</td>
<td>name=listbox_reference</td> <td></td>
<td>Template.Test.Book</td> </tr>
</tr> <tr>
<tr> <td>clickAndWait</td>
<td>type</td> <td>//a[contains(text(), 'Template.Test.Book')]</td>
<td>name=listbox_version</td> <td></td>
<td>002</td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>keyPressAndWait</td> <td>Short Title</td>
<td>listbox_version</td> <td></td>
<td>\13</td> </tr>
</tr> <tal:block tal:condition="python: no_file_update == False">
<tr> <!-- manual form submit -->
<td>waitForTextPresent</td> <tr>
<td>Template Test Book</td> <td>storeLocation</td>
<td></td> <td>url</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <!-- only handle pdf_source (a promise!) here, because it needs to be set on
<td>//a[contains(text(), 'Template.Test.Book')]</td> the iframe and a page-reload resets all (bad) parameters manually set -->
<td></td> <tr>
</tr> <td>storeEval</td>
<tr> <td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td>waitForTextPresent</td> <td></td>
<td>Short Title</td> </tr>
<td></td> <tr>
</tr> <td>storeEval</td>
<tr> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>waitForElementPresent</td> <td>pdf_dump</td>
<td>//button[@class="import_export"]</td> </tr>
<td></td> <tr>
</tr> <td>echo</td>
<tr> <td>${pdf_dump}</td>
<td>click</td> <td></td>
<td>//button[@class="import_export"]</td> </tr>
<td></td> <tr>
</tr> <td>verifyNotExpression</td>
<tr> <td>${pdf_dump}</td>
<td>waitForTextPresent</td> <td>null</td>
<td>Export Slideshow</td> </tr>
<td></td> <tr>
</tr> <td>storeEval</td>
<tr> <td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "P-XYZ-Foobar-333-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>selectAndWait</td> <td>promise</td>
<td>name=select_dialog</td> </tr>
<td>index=3</td> <tr>
</tr> <td>storeEval</td>
<tr> <td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td>waitForTextPresent</td> <td></td>
<td>Export Book</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//div[@class="transition_message"]</td>
<td>select</td> <td></td>
<td>name=field_format</td> </tr>
<td>index=1</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Data updated.</td>
<td>clickAndWait</td> <td></td>
<td>name=Base_callDialogMethod:method</td> </tr>
<td></td> <!-- generate images -
</tr> template_test_book_input_page_4_002_en_bmp
<tr> template_test_book_input_page_5_002_en_bmp
<td>waitForPageToLoad</td> template_test_book_input_page_9_002_en_bmp
<td></td> -->
<td></td> <tr>
</tr> <td>echo</td>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded --> <td>update => template_test_book_input_page_4_002_en_bmp</td>
<tr> <td></td>
<td>waitForTitle</td> </tr>
<td></td> <tr>
<td></td> <td>storeEval</td>
</tr> <td>storedVars["url"].split("?")[0]</td>
<tr> <td>screenshot_url</td>
<td>verifyTitle</td> </tr>
<td></td> <tr>
<td></td> <td>echo</td>
</tr> <td>${screenshot_url}</td>
<!-- Store this location for re-requesting --> <td></td>
<tr> </tr>
<td>storeLocation</td> <tr>
<td>url</td> <td>open</td>
<td></td> <td>${screenshot_url}/Document_createScreenshot?frame=4&amp;doc_id=template_test_book_input_page_4_002_en_bmp</td>
</tr> <td></td>
<tr> </tr>
<td>echo</td> <tr>
<td>${url}</td> <td>waitForTextPresent</td>
<td></td> <td>Screenshot updated.</td>
</tr> <td></td>
<!-- Can't fetch pdf source, so request page again --> </tr>
<tr> <tr>
<td>storeEval</td> <td>open</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td> <td>${screenshot_url}/Document_createScreenshot?frame=5&amp;doc_id=template_test_book_input_page_5_002_en_bmp</td>
<td>pdf_source</td> <td></td>
</tr> </tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue <tr>
that would be nice--> <td>waitForTextPresent</td>
<tr> <td>Screenshot updated.</td>
<td>pause</td> <td></td>
<td>3000</td> </tr>
<td></td> <tr>
</tr> <td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=10&amp;doc_id=template_test_book_input_page_10_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
</tal:block>
<!-- CASE 3 (pdf) - template_test_book_input_003_de_pdf -->
<tr>
<td>echo</td>
<td>CASE 3 (pdf) => template_test_book_input_003_de_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Book</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>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>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=3</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Book</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tal:block tal:condition="python: no_file_update == False">
<!--
PDF viewer has no document.title, wait for "" means pdf is loaded
FIREFOX (51) will prompt to open PDF in new window = we're dead for now
-->
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<tr>
<td>verifyTitle</td>
<td></td>
<td></td>
</tr>
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<tr> <!-- Can't fetch pdf source, so request page again -->
<td>goBackAndWait</td> <tr>
<td></td> <td>storeEval</td>
<td></td> <td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
</tr> <td>pdf_source</td>
<tr> </tr>
<td>waitForPageToLoad</td> <!-- pause to let the ajax request finish. now if the table was a async, queue
<td></td> that would be nice, 3/6/9000 didn't work -->
<td></td> <tr>
</tr> <td>pause</td>
<tr> <td>12000</td>
<td>waitForTextPresent</td> <td></td>
<td>Web Pages</td> </tr>
<td></td> <tr>
</tr> <td>goBackAndWait</td>
<tr> <td></td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'ERP5')]</td> </tr>
<td></td> <tr>
</tr> <td>waitForPageToLoad</td>
<tr> <td></td>
<td>waitForElementPresent</td> <td></td>
<td>//a[contains(text(), 'Documents')]</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Web Pages</td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'Documents')]</td> </tr>
<td></td> </tal:block>
</tr> <tr>
<tr> <td>click</td>
<td>waitForTextPresent</td> <td>//a[contains(text(), 'ERP5')]</td>
<td>records</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>type</td> <td>//a[contains(text(), 'Documents')]</td>
<td>name=listbox_reference</td> <td></td>
<td>Template.Test.Book</td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>type</td> <td>//a[contains(text(), 'Documents')]</td>
<td>name=listbox_version</td> <td></td>
<td>003</td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>keyPressAndWait</td> <td>records</td>
<td>listbox_version</td> <td></td>
<td>\13</td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>waitForTextPresent</td> <td>name=listbox_reference</td>
<td>Template Test Book</td> <td>Template.Test.Book</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>clickAndWait</td> <td>name=listbox_version</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td> <td>003</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>keyPressAndWait</td>
<td>waitForTextPresent</td> <td>listbox_version</td>
<td>Short Title</td> <td>\13</td>
<td></td> </tr>
</tr> <tr>
<!-- manual form submit --> <td>waitForTextPresent</td>
<tr> <td>Template Test Book</td>
<td>storeLocation</td> <td></td>
<td>url</td> </tr>
<td></td> <tr>
</tr> <td>clickAndWait</td>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on <td>//a[contains(text(), 'Template.Test.Book')]</td>
the iframe and a page-reload resets all (bad) parameters manually set --> <td></td>
<tr> </tr>
<td>storeEval</td> <tr>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td> <td>waitForTextPresent</td>
<td></td> <td>Short Title</td>
</tr> <td></td>
<tr> </tr>
<td>storeEval</td> <tal:block tal:condition="python: no_file_update == False">
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td> <!-- manual form submit -->
<td>pdf_dump</td> <tr>
</tr> <td>storeLocation</td>
<tr> <td>url</td>
<td>echo</td> <td></td>
<td>${pdf_dump}</td> </tr>
<td></td> <!-- only handle pdf_source (a promise!) here, because it needs to be set on
</tr> the iframe and a page-reload resets all (bad) parameters manually set -->
<tr> <tr>
<td>verifyNotExpression</td> <td>storeEval</td>
<td>${pdf_dump}</td> <td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td>null</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>storeEval</td> <td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Book-003-de.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>promise</td> <td>pdf_dump</td>
</tr> </tr>
<tr> <tr>
<td>storeEval</td> <td>echo</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td> <td>${pdf_dump}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>verifyNotExpression</td>
<td>//div[@class="transition_message"]</td> <td>${pdf_dump}</td>
<td></td> <td>null</td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>storeEval</td>
<td>Data updated.</td> <td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Book-003-de.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td></td> <td>promise</td>
</tr> </tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_book_input_page_1_003_de_bmp --> <!-- generate image - template_test_book_input_page_1_003_de_bmp -->
<tr> <tr>
<td>echo</td> <td>echo</td>
<td>update => template_test_book_input_page_1_003_de_bmp</td> <td>update => template_test_book_input_page_1_003_de_bmp</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>storeEval</td> <td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td> <td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td> <td>screenshot_url</td>
</tr> </tr>
<tr> <tr>
<td>echo</td> <td>echo</td>
<td>${screenshot_url}</td> <td>${screenshot_url}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>open</td> <td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=1&amp;doc_id=template_test_book_input_page_1_003_de_bmp</td> <td>${screenshot_url}/Document_createScreenshot?frame=1&amp;doc_id=template_test_book_input_page_1_003_de_bmp</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>Screenshot updated.</td> <td>Screenshot updated.</td>
<td></td> <td></td>
</tr> </tr>
<!-- make sure print exchange works --> </tal:block>
<tr> <!-- make sure print exchange works -->
<td>echo</td> <tr>
<td>action => print</td> <td>echo</td>
<td></td> <td>ACTION => PRINT</td>
</tr> <td></td>
<tr> </tr>
<td>open</td> <tr>
<td>${base_url}/web_page_module/</td> <td>open</td>
<td></td> <td>${base_url}/web_page_module/</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>records</td> <td>waitForTextPresent</td>
<td></td> <td>records</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_reference</td> <td>type</td>
<td>Template.Test.Book</td> <td>name=listbox_reference</td>
</tr> <td>Template.Test.Book</td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_version</td> <td>type</td>
<td>001</td> <td>name=listbox_version</td>
</tr> <td>001</td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_version</td> <td>keyPressAndWait</td>
<td>\13</td> <td>listbox_version</td>
</tr> <td>\13</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template Test Book</td> <td>waitForTextPresent</td>
<td></td> <td>Template Test Book</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <tr>
<td>//a[contains(text(), 'Template.Test.Book')]</td> <td>click</td>
<td></td> <td>//a[contains(text(), 'Template.Test.Book')]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Short Title</td> <td>waitForTextPresent</td>
<td></td> <td>Short Title</td>
</tr> <td></td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//button[@class="print"]</td> <td>waitForElementPresent</td>
<td></td> <td>//button[@class="print"]</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <tr>
<td>//button[@class="print"]</td> <td>click</td>
<td></td> <td>//button[@class="print"]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Print As Book</td> <td>waitForTextPresent</td>
<td></td> <td>Print As Book</td>
</tr> <td></td>
<tr> </tr>
<td>selectAndWait</td> <tr>
<td>name=select_dialog</td> <td>selectAndWait</td>
<td>index=3</td> <td>name=select_dialog</td>
</tr> <td>index=3</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Include History Table</td> <td>waitForTextPresent</td>
<td></td> <td>Include History Table</td>
</tr> <td></td>
<tr> </tr>
<td>clickAndWait</td> <tr>
<td>name=Base_showUpdateDialog:method</td> <td>clickAndWait</td>
<td></td> <td>name=Base_showUpdateDialog:method</td>
</tr> <td></td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//div[@class="transition_message"]</td> <td>waitForElementPresent</td>
<td></td> <td>//div[@class="transition_message"]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Preview updated.</td> <td>waitForTextPresent</td>
<td></td> <td>Preview updated.</td>
</tr> <td></td>
</tbody></table> </tr>
</tal:block>
</tbody>
</table>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -6,1726 +6,1792 @@ ...@@ -6,1726 +6,1792 @@
</head> </head>
<body> <body>
<!-- <!--
UPDATE comparison files for LIVE TESTS | DON'T RUN AUTOMATICALLY TEST UI and/or UPDATE FILES for live tests
(else tests will always pass...)
This Zuite updates all test files (diff-html, pdfs, bmps) used in the LiveTests This Zuite updates all test files (diff-html, pdfs, bmp) used in the LiveTests
based on the example web pages included in this bt5. Run this zuite after making based on the example web pages included in this bt5. The parameter no_file_update
changes to the bt5 which will alter their look to automatically update all files determines whether files are updated (default True). To update test files,
(else you need to do it by hand). This also means: DON'T RUN THIS AUTOMATICALLY, create a script Zuite_setSkipSave in custom folder which returns False
because it will also update all test files with any errors you make, causing
liveTests to always pass (comparing wrong rendering to wrong test file).
Help: Help:
http://www.seleniumhq.org/docs/02_selenium_ide.jsp#selenium-commands-selenese http://www.seleniumhq.org/docs/02_selenium_ide.jsp#selenium-commands-selenese
http://seleniummaster.com/sitecontent/index.php/introduction-to-selenium-automation/selenium-ide/114-selenium-ide-complete-list-of-commands http://seleniummaster.com/sitecontent/index.php/introduction-to-selenium-automation/selenium-ide/114-selenium-ide-complete-list-of-commands
Note: Note:
# make sure to set editor to plain text in (erp5 test preferences) # uses pause when updating files to wait for Cloudooo pdf rendering
# requires text-area editor
# test waitForTitle does not work in FF
--> -->
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr> <tr><td rowspan="1" colspan="3">Test Leaflet Template UI</td></tr>
</thead><tbody> </thead>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> <tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tal:block tal:define="portal here/portal_url/getPortalObject;
caller python: getattr(context, 'Zuite_setSkipSave', None);
no_file_update python: caller() if caller is not None else True;">
<tr>
<td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/Zuite_setPreferredTextEditor</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Editor set to Textarea.</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td tal:content="python: ''.join(['skipping save: ', str(no_file_update)])"></td>
<td></td>
</tr>
<tal:block tal:condition="python: no_file_update == True">
<tr>
<td>open</td>
<td>${base_url}/Zuite_setConversionServerUrl</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Conversion Server Url set.</td>
<td></td>
</tr>
</tal:block>
<tr>
<td>echo</td>
<td>ACTION => EXPORT</td>
<td></td>
</tr>
<!-- CASE 1 - template_test_lealflet_output_expected_001_en_html -->
<tr>
<td>echo</td>
<td>CASE 1 => template_test_lealflet_output_expected_001_en_html</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>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>Short Title</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=2</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Leaflet</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>©</td>
<td></td>
</tr>
<tal:block tal:condition="python: no_file_update == False">
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
</tal:block>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Leaflet%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Leaflet.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Leaflet.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="input"]/div/textarea</td>
<td></td>
</tr>
<tal:block tal:condition="python: no_file_update == False">
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="input"]/div/textarea</td>
<td>${dump}</td>
</tr>
</tal:block>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- CASE 2 - template_test_leaflet_output_expected_002_en_html -->
<tr>
<td>echo</td>
<td>CASE 2 => template_test_lealflet_output_expected_002_en_html</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>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>Short Title</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=2</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Leaflet</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>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>©</td>
<td></td>
</tr>
<tal:block tal:condition="python: no_file_update == False">
<tr> <!-- store url for re-requesting -->
<td>open</td> <tr>
<td>${base_url}/bar_module/ListBoxZuite_reset</td> <td>storeLocation</td>
<td></td> <td>url</td>
</tr> <td></td>
<tr> </tr>
<td>assertTextPresent</td> <tr>
<td>Reset Successfully.</td> <td>echo</td>
<td></td> <td>${url}</td>
</tr> <td></td>
</tr>
<!-- Can't fetch iframe source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>page_source</td>
</tr>
</tal:block>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>%Template% AND %Output% AND %Leaflet%</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_reference</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template.Test.Leaflet.Expected.Output.Sample</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template.Test.Leaflet.Expected.Output.Sample')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="input"]/div/textarea</td>
<td></td>
</tr>
<tal:block tal:condition="python: no_file_update == False">
<tr>
<td>storeEval</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>dump</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="input"]/div/textarea</td>
<td>${dump}</td>
</tr>
</tal:block>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- CASE 3 - template_test_leaflet_output_expected_003_de_html -->
<tr>
<td>echo</td>
<td>CASE 3 => template_test_leaflet_output_expected_003_de_html</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>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>Short Title</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=2</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Leaflet</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>©</td>
<td></td>
</tr>
<tal:block tal:condition="python: no_file_update == False">
<!-- update 1st output - template_test_lealflet_output_expected_001_en_html --> <!-- store url for re-requesting -->
<tr> <tr>
<td>echo</td> <td>storeLocation</td>
<td>action => export</td> <td>url</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>echo</td> <td>echo</td>
<td>update => template_test_lealflet_output_expected_001_en_html</td> <td>${url}</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>open</td> <!-- Can't fetch iframe source, so request page again -->
<td>${base_url}/web_page_module/</td> <tr>
<td></td> <td>storeEval</td>
</tr> <td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<tr> <td>page_source</td>
<td>waitForTextPresent</td> </tr>
<td>records</td> </tal:block>
<td></td> <tr>
</tr> <td>goBackAndWait</td>
<tr> <td></td>
<td>type</td> <td></td>
<td>name=listbox_reference</td> </tr>
<td>Template.Test.Leaflet</td> <tr>
</tr> <td>waitForPageToLoad</td>
<tr> <td></td>
<td>type</td> <td></td>
<td>name=listbox_version</td> </tr>
<td>001</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Web Pages</td>
<td>keyPressAndWait</td> <td></td>
<td>listbox_version</td> </tr>
<td>\13</td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Web Pages')]</td>
<td>waitForTextPresent</td> <td></td>
<td>Template Test Leaflet</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>records</td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_reference</td>
<td>waitForTextPresent</td> <td>%Template% AND %Output% AND %Leaflet%</td>
<td>Short Title</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<!-- Save once to set modification date for live tests --> <td>name=listbox_version</td>
<tr> <td>003</td>
<td>waitForElementPresent</td> </tr>
<td>//button[@class="save"]</td> <tr>
<td></td> <td>keyPressAndWait</td>
</tr> <td>listbox_reference</td>
<tr> <td>\13</td>
<td>verifyElementPresent</td> </tr>
<td>//button[@class="save"]</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Template.Test.Leaflet.Expected.Output.Sample</td>
<tr> <td></td>
<td>clickAndWait</td> </tr>
<td>//button[@class="save"]</td> <tr>
<td></td> <td>click</td>
</tr> <td>//a[contains(text(), 'Template.Test.Leaflet.Expected.Output.Sample')]</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//div[@class="transition_message"]</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Short Title</td>
<tr> <td></td>
<td>assertTextPresent</td> </tr>
<td>Data updated.</td> <tr>
<td></td> <td>waitForElementPresent</td>
</tr> <td>//a/span[contains(text(), 'Edit')]</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//button[@class="import_export"]</td> <tr>
<td></td> <td>click</td>
</tr> <td>//a/span[contains(text(), 'Edit')]</td>
<tr> <td></td>
<td>click</td> </tr>
<td>//button[@class="import_export"]</td> <tr>
<td></td> <td>waitForElementPresent</td>
</tr> <td>//div[@class="input"]/div/textarea</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Export Slideshow</td> <tal:block tal:condition="python: no_file_update == False">
<td></td> <tr>
</tr> <td>storeEval</td>
<tr> <td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td>selectAndWait</td> <td></td>
<td>name=select_dialog</td> </tr>
<td>index=2</td> <tr>
</tr> <td>storeEval</td>
<tr> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>waitForTextPresent</td> <td>dump</td>
<td>Export Leaflet</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>//div[@class="input"]/div/textarea</td>
<td>clickAndWait</td> <td>${dump}</td>
<td>name=Base_showUpdateDialog:method</td> </tr>
<td></td> </tal:block>
</tr> <tr>
<tr> <td>verifyElementPresent</td>
<td>waitForElementPresent</td> <td>//button[@class="save"]</td>
<td>//div[@class="transition_message"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>clickAndWait</td>
<td>waitForTextPresent</td> <td>//button[@class="save"]</td>
<td>Preview updated.</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>clickAndWait</td> <td>//div[@class="transition_message"]</td>
<td>name=Base_callDialogMethod:method</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>assertTextPresent</td>
<td>waitForElementNotPresent</td> <td>Data updated.</td>
<td>name=Base_callDialogMethod:method</td> <td></td>
<td></td> </tr>
</tr> <!-- CASE 1 (pdf) - template_test_leaflet_input_001_en_pdf -->
<tr> <tr>
<td>waitForPageToLoad</td> <td>echo</td>
<td></td> <td>CASE 1 (pdf) => template_test_leaflet_input_001_en_pdf</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>open</td>
<td>©</td> <td>${base_url}/web_page_module/</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>storeLocation</td> <td>waitForTextPresent</td>
<td>url</td> <td>records</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>echo</td> <td>type</td>
<td>${url}</td> <td>name=listbox_reference</td>
<td></td> <td>Template.Test.Leaflet</td>
</tr> </tr>
<!-- Can't fetch iframe source, so request page again --> <tr>
<tr> <td>type</td>
<td>storeEval</td> <td>name=listbox_version</td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td> <td>001</td>
<td>page_source</td> </tr>
</tr> <tr>
<tr> <td>keyPressAndWait</td>
<td>goBackAndWait</td> <td>listbox_version</td>
<td></td> <td>\13</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForPageToLoad</td> <td>Template Test Leaflet</td>
<td></td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>waitForTextPresent</td> <td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td>Web Pages</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>click</td> <td>Short Title</td>
<td>//a[contains(text(), 'Web Pages')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>waitForTextPresent</td> <td>//button[@class="import_export"]</td>
<td>records</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>type</td> <td>//button[@class="import_export"]</td>
<td>name=listbox_reference</td> <td></td>
<td>%Template% AND %Output% AND %Leaflet%</td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>type</td> <td>Export Slideshow</td>
<td>name=listbox_version</td> <td></td>
<td>001</td> </tr>
</tr> <tr>
<tr> <td>selectAndWait</td>
<td>keyPressAndWait</td> <td>name=select_dialog</td>
<td>listbox_reference</td> <td>index=2</td>
<td>\13</td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForTextPresent</td> <td>Export Leaflet</td>
<td>Template.Test.Leaflet.Expected.Output.Sample</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>select</td>
<td>click</td> <td>name=field_format</td>
<td>//a[contains(text(), 'Template.Test.Leaflet.Expected.Output.Sample')]</td> <td>index=1</td>
<td></td> </tr>
</tr> <tal:block tal:condition="python: no_file_update == False">
<tr> <!--
<td>waitForTextPresent</td> PDF viewer has no document.title, wait for "" means pdf is loaded
<td>Short Title</td> FIREFOX (51) will prompt to open PDF in new window = we're dead for now
<td></td> -->
</tr> <tr>
<tr> <td>clickAndWait</td>
<td>waitForElementPresent</td> <td>name=Base_callDialogMethod:method</td>
<td>//a/span[contains(text(), 'Edit')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForPageToLoad</td>
<td>click</td> <td></td>
<td>//a/span[contains(text(), 'Edit')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTitle</td>
<td>waitForElementPresent</td> <td></td>
<td>//textarea[@name="field_my_text_content"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>verifyTitle</td>
<td>storeEval</td> <td></td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>storeLocation</td>
<td>storeEval</td> <td>url</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td> <td></td>
<td>dump</td> </tr>
</tr> <tr>
<tr> <td>echo</td>
<td>type</td> <td>${url}</td>
<td>//textarea[@name="field_my_text_content"]</td> <td></td>
<td>${dump}</td> </tr>
</tr>
<tr> <!-- Can't access pdf source inside iframe, so request page again -->
<td>verifyElementPresent</td> <tr>
<td>//button[@class="save"]</td> <td>storeEval</td>
<td></td> <td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob"; xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
</tr> <td>pdf_source</td>
<tr> </tr>
<td>clickAndWait</td> <!-- pause to let the ajax request finish. now if the table was a async, queue
<td>//button[@class="save"]</td> that would be nice, 3/6/9000 not enough-->
<td></td> <tr>
</tr> <td>pause</td>
<tr> <td>12000</td>
<td>waitForElementPresent</td> <td></td>
<td>//div[@class="transition_message"]</td> </tr>
<td></td> <tr>
</tr> <td>goBackAndWait</td>
<tr> <td></td>
<td>assertTextPresent</td> <td></td>
<td>Data updated.</td> </tr>
<td></td> <tr>
</tr> <td>waitForPageToLoad</td>
<!-- update 2nd output - template_test_leaflet_output_expected_002_en_html --> <td></td>
<tr> <td></td>
<td>echo</td> </tr>
<td>update => template_test_lealflet_output_expected_002_en_html</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Web Pages</td>
<tr> <td></td>
<td>verifyTextPresent</td> </tr>
<td>Web Pages</td> </tal:block>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'ERP5')]</td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'Web Pages')]</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//a[contains(text(), 'Documents')]</td>
<td>waitForTextPresent</td> <td></td>
<td>records</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Documents')]</td>
<td>type</td> <td></td>
<td>name=listbox_reference</td> </tr>
<td>Template.Test.Leaflet</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>records</td>
<td>type</td> <td></td>
<td>name=listbox_version</td> </tr>
<td>001</td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_reference</td>
<td>keyPressAndWait</td> <td>Template.Test.Leaflet</td>
<td>listbox_version</td> </tr>
<td>\13</td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_version</td>
<td>waitForTextPresent</td> <td>001</td>
<td>Template Test Leaflet</td> </tr>
<td></td> <tr>
</tr> <td>keyPressAndWait</td>
<tr> <td>listbox_version</td>
<td>click</td> <td>\13</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Template Test Leaflet</td>
<td>waitForTextPresent</td> <td></td>
<td>Short Title</td> </tr>
<td></td> <tr>
</tr> <td>clickAndWait</td>
<!-- Save once to set modification date for live tests --> <td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//button[@class="save"]</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Short Title</td>
<tr> <td></td>
<td>verifyElementPresent</td> </tr>
<td>//button[@class="save"]</td> <tal:block tal:condition="python: no_file_update == False">
<td></td> <!-- manual form submit -->
</tr> <tr>
<tr> <td>storeLocation</td>
<td>clickAndWait</td> <td>url</td>
<td>//button[@class="save"]</td> <td></td>
<td></td> </tr>
</tr> <!-- only handle pdf_source (a promise!) here, because it needs to be set on
<tr> the iframe and a page-reload resets all (bad) parameters manually set -->
<td>waitForElementPresent</td> <tr>
<td>//div[@class="transition_message"]</td> <td>storeEval</td>
<td></td> <td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
</tr> <td></td>
<tr> </tr>
<td>assertTextPresent</td> <tr>
<td>Data updated.</td> <td>storeEval</td>
<td></td> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
</tr> <td>pdf_dump</td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//button[@class="import_export"]</td> <td>echo</td>
<td></td> <td>${pdf_dump}</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <tr>
<td>//button[@class="import_export"]</td> <td>verifyNotExpression</td>
<td></td> <td>${pdf_dump}</td>
</tr> <td>null</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Export Slideshow</td> <td>storeEval</td>
<td></td> <td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Leaflet-001-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
</tr> <td>promise</td>
<tr> </tr>
<td>selectAndWait</td> <tr>
<td>name=select_dialog</td> <td>storeEval</td>
<td>index=2</td> <td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Export Leaflet</td> <td>waitForElementPresent</td>
<td></td> <td>//div[@class="transition_message"]</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=field_override_source_organisation_title</td> <td>waitForTextPresent</td>
<td>Test Association</td> <td>Data updated.</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <!-- generate image - template_test_leaflet_input_page_1_001_en_bmp -->
<td>name=field_override_source_person_title</td> <tr>
<td>Test Recipient</td> <td>echo</td>
</tr> <td>update => template_test_leaflet_input_page_1_001_en_bmp</td>
<tr> <td></td>
<td>type</td> </tr>
<td>name=field_override_leaflet_header_title</td> <tr>
<td>Couscous</td> <td>storeEval</td>
</tr> <td>storedVars["url"].split("?")[0]</td>
<tr> <td>screenshot_url</td>
<td>uncheck</td> </tr>
<td>name=field_display_side</td> <tr>
<td></td> <td>echo</td>
</tr> <td>${screenshot_url}</td>
<tr> <td></td>
<td>clickAndWait</td> </tr>
<td>name=Base_showUpdateDialog:method</td> <tr>
<td></td> <td>open</td>
</tr> <td>${screenshot_url}/Document_createScreenshot?frame=1&amp;doc_id=template_test_leaflet_input_page_1_001_en_bmp</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//div[@class="transition_message"]</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Screenshot updated.</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Preview updated.</td> </tal:block>
<td></td> <!-- CASE 2 (pdf) - template_test_leaflet_input_002_en_pdf -->
</tr> <tr>
<tr> <td>echo</td>
<td>clickAndWait</td> <td>CASE 2 (pdf) => template_test_leaflet_input_002_en_pdf</td>
<td>name=Base_callDialogMethod:method</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>open</td>
<td>waitForPageToLoad</td> <td>${base_url}/web_page_module/</td>
<td></td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForElementNotPresent</td> <td>records</td>
<td>name=Base_callDialogMethod:method</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>waitForTextPresent</td> <td>name=listbox_reference</td>
<td>©</td> <td>Template.Test.Leaflet</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>storeLocation</td> <td>name=listbox_version</td>
<td>url</td> <td>001</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>keyPressAndWait</td>
<td>echo</td> <td>listbox_version</td>
<td>${url}</td> <td>\13</td>
<td></td> </tr>
</tr> <tr>
<!-- Can't fetch iframe source, so request page again --> <td>waitForTextPresent</td>
<tr> <td>Template Test Leaflet</td>
<td>storeEval</td> <td></td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td> </tr>
<td>page_source</td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td>goBackAndWait</td> <td></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Short Title</td>
<td>waitForPageToLoad</td> <td></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//button[@class="import_export"]</td>
<td>waitForTextPresent</td> <td></td>
<td>Web Pages</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//button[@class="import_export"]</td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'Web Pages')]</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Export Slideshow</td>
<td>waitForTextPresent</td> <td></td>
<td>records</td> </tr>
<td></td> <tr>
</tr> <td>selectAndWait</td>
<tr> <td>name=select_dialog</td>
<td>type</td> <td>index=2</td>
<td>name=listbox_reference</td> </tr>
<td>%Template% AND %Output% AND %Leaflet%</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Export Leaflet</td>
<td>type</td> <td></td>
<td>name=listbox_version</td> </tr>
<td>002</td> <tr>
</tr> <td>select</td>
<tr> <td>name=field_format</td>
<td>keyPressAndWait</td> <td>index=1</td>
<td>listbox_reference</td> </tr>
<td>\13</td> <tr>
</tr> <td>type</td>
<tr> <td>name=field_override_source_organisation_title</td>
<td>waitForTextPresent</td> <td>Test Association</td>
<td>Template.Test.Leaflet.Expected.Output.Sample</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=field_override_source_person_title</td>
<td>click</td> <td>Test Recipient</td>
<td>//a[contains(text(), 'Template.Test.Leaflet.Expected.Output.Sample')]</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=field_override_leaflet_header_title</td>
<td>waitForTextPresent</td> <td>Couscous</td>
<td>Short Title</td> </tr>
<td></td> <tr>
</tr> <td>check</td>
<tr> <td>name=field_display_side</td>
<td>waitForElementPresent</td> <td></td>
<td>//a/span[contains(text(), 'Edit')]</td> </tr>
<td></td> <tal:block tal:condition="python: no_file_update == False">
</tr> <!--
<tr> PDF viewer has no document.title, wait for "" means pdf is loaded
<td>click</td> FIREFOX (51) will prompt to open PDF in new window = we're dead for now
<td>//a/span[contains(text(), 'Edit')]</td> -->
<td></td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>name=Base_callDialogMethod:method</td>
<td>waitForElementPresent</td> <td></td>
<td>//textarea[@name="field_my_text_content"]</td> </tr>
<td></td> <tr>
</tr> <td>waitForPageToLoad</td>
<tr> <td></td>
<td>storeEval</td> <td></td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td> </tr>
<td></td> <tr>
</tr> <td>waitForTitle</td>
<tr> <td></td>
<td>storeEval</td> <td></td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td> </tr>
<td>dump</td> <tr>
</tr> <td>verifyTitle</td>
<tr> <td></td>
<td>type</td> <td></td>
<td>//textarea[@name="field_my_text_content"]</td> </tr>
<td>${dump}</td> <tr>
</tr> <td>storeLocation</td>
<tr> <td>url</td>
<td>verifyElementPresent</td> <td></td>
<td>//button[@class="save"]</td> </tr>
<td></td> <tr>
</tr> <td>echo</td>
<tr> <td>${url}</td>
<td>clickAndWait</td> <td></td>
<td>//button[@class="save"]</td> </tr>
<td></td> <!-- Can't fetch pdf source, so request page again -->
</tr> <tr>
<tr> <td>storeEval</td>
<td>waitForElementPresent</td> <td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>//div[@class="transition_message"]</td> <td>pdf_source</td>
<td></td> </tr>
</tr> <!-- pause to let the ajax request finish. now if the table was a async, queue
<tr> that would be nice, 3/6000 did not work-->
<td>assertTextPresent</td> <tr>
<td>Data updated.</td> <td>pause</td>
<td></td> <td>9000</td>
</tr> <td></td>
<!-- update 3rd output - template_test_leaflet_output_expected_003_de_html --> </tr>
<tr> <tr>
<td>echo</td> <td>goBackAndWait</td>
<td>update => template_test_leaflet_output_expected_003_de_html</td> <td></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyTextPresent</td> <td>waitForPageToLoad</td>
<td>Web Pages</td> <td></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>waitForTextPresent</td>
<td>//a[contains(text(), 'Web Pages')]</td> <td>Web Pages</td>
<td></td> <td></td>
</tr> </tr>
<tr> </tal:block>
<td>waitForTextPresent</td> <tr>
<td>records</td> <td>click</td>
<td></td> <td>//a[contains(text(), 'ERP5')]</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_reference</td> <td>waitForElementPresent</td>
<td>Template.Test.Leaflet</td> <td>//a[contains(text(), 'Documents')]</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_version</td> <td>click</td>
<td>002</td> <td>//a[contains(text(), 'Documents')]</td>
</tr> <td></td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_version</td> <td>waitForTextPresent</td>
<td>\13</td> <td>records</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template Test Leaflet</td> <td>type</td>
<td></td> <td>name=listbox_reference</td>
</tr> <td>Template.Test.Leaflet</td>
<tr> </tr>
<td>click</td> <tr>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td> <td>type</td>
<td></td> <td>name=listbox_version</td>
</tr> <td>002</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Short Title</td> <td>keyPressAndWait</td>
<td></td> <td>listbox_version</td>
</tr> <td>\13</td>
<!-- Save once to set modification date for live tests --> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForTextPresent</td>
<td>//button[@class="save"]</td> <td>Template Test Leaflet</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyElementPresent</td> <td>clickAndWait</td>
<td>//button[@class="save"]</td> <td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>waitForTextPresent</td>
<td>//button[@class="save"]</td> <td>Short Title</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tal:block tal:condition="python: no_file_update == False">
<td>waitForElementPresent</td> <!-- manual form submit -->
<td>//div[@class="transition_message"]</td> <tr>
<td></td> <td>storeLocation</td>
</tr> <td>url</td>
<tr> <td></td>
<td>assertTextPresent</td> </tr>
<td>Data updated.</td> <!-- only handle pdf_source (a promise!) here, because it needs to be set on
<td></td> the iframe and a page-reload resets all (bad) parameters manually set -->
</tr> <tr>
<tr> <td>storeEval</td>
<td>waitForElementPresent</td> <td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td>//button[@class="import_export"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>storeEval</td>
<td>click</td> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>//button[@class="import_export"]</td> <td>pdf_dump</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>echo</td>
<td>waitForTextPresent</td> <td>${pdf_dump}</td>
<td>Export Slideshow</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>verifyNotExpression</td>
<td>selectAndWait</td> <td>${pdf_dump}</td>
<td>name=select_dialog</td> <td>null</td>
<td>index=2</td> </tr>
</tr> <tr>
<tr> <td>storeEval</td>
<td>waitForTextPresent</td> <td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Leaflet-002-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>Export Leaflet</td> <td>promise</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>storeEval</td>
<td>clickAndWait</td> <td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td>name=Base_showUpdateDialog:method</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>clickAndWait</td> <td>//div[@class="transition_message"]</td>
<td>name=Base_showUpdateDialog:method</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForElementPresent</td> <td>Data updated.</td>
<td>//div[@class="transition_message"]</td> <td></td>
<td></td> </tr>
</tr> <!-- generate image - template_test_leaflet_input_page_0_002_en_bmp -->
<tr> <tr>
<td>waitForTextPresent</td> <td>echo</td>
<td>Preview updated.</td> <td>update => template_test_leaflet_input_page_0_002_en_bmp</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>storeEval</td>
<td>name=Base_callDialogMethod:method</td> <td>storedVars["url"].split("?")[0]</td>
<td></td> <td>screenshot_url</td>
</tr> </tr>
<tr> <tr>
<td>waitForPageToLoad</td> <td>echo</td>
<td></td> <td>${screenshot_url}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementNotPresent</td> <td>open</td>
<td>name=Base_callDialogMethod:method</td> <td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_leaflet_input_page_0_002_en_bmp</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>©</td> <td>Screenshot updated.</td>
<td></td> <td></td>
</tr> </tr>
<tr> </tal:block>
<td>storeLocation</td> <!-- CASE 3 (pdf) - template_test_leaflet_input_003_de_pdf -->
<td>url</td> <tr>
<td></td> <td>echo</td>
</tr> <td>CASE 3 (pdf) => template_test_leaflet_input_003_de_pdf</td>
<tr> <td></td>
<td>echo</td> </tr>
<td>${url}</td> <tr>
<td></td> <td>open</td>
</tr> <td>${base_url}/web_page_module/</td>
<!-- Can't fetch iframe source, so request page again --> <td></td>
<tr> </tr>
<td>storeEval</td> <tr>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td> <td>waitForTextPresent</td>
<td>page_source</td> <td>records</td>
</tr> <td></td>
<tr> </tr>
<td>goBackAndWait</td> <tr>
<td></td> <td>type</td>
<td></td> <td>name=listbox_reference</td>
</tr> <td>Template.Test.Leaflet</td>
<tr> </tr>
<td>waitForPageToLoad</td> <tr>
<td></td> <td>type</td>
<td></td> <td>name=listbox_version</td>
</tr> <td>002</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Web Pages</td> <td>keyPressAndWait</td>
<td></td> <td>listbox_version</td>
</tr> <td>\13</td>
<tr> </tr>
<td>click</td> <tr>
<td>//a[contains(text(), 'Web Pages')]</td> <td>waitForTextPresent</td>
<td></td> <td>Template Test Leaflet</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>records</td> <td>click</td>
<td></td> <td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_reference</td> <td>waitForTextPresent</td>
<td>%Template% AND %Output% AND %Leaflet%</td> <td>Short Title</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_version</td> <td>waitForElementPresent</td>
<td>003</td> <td>//button[@class="import_export"]</td>
</tr> <td></td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_reference</td> <td>click</td>
<td>\13</td> <td>//button[@class="import_export"]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template.Test.Leaflet.Expected.Output.Sample</td> <td>waitForTextPresent</td>
<td></td> <td>Export Slideshow</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <tr>
<td>//a[contains(text(), 'Template.Test.Leaflet.Expected.Output.Sample')]</td> <td>selectAndWait</td>
<td></td> <td>name=select_dialog</td>
</tr> <td>index=2</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Short Title</td> <td>waitForTextPresent</td>
<td></td> <td>Export Leaflet</td>
</tr> <td></td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//a/span[contains(text(), 'Edit')]</td> <td>select</td>
<td></td> <td>name=field_format</td>
</tr> <td>index=1</td>
<tr> </tr>
<td>click</td> <tal:block tal:condition="python: no_file_update == False">
<td>//a/span[contains(text(), 'Edit')]</td> <!--
<td></td> PDF viewer has no document.title, wait for "" means pdf is loaded
</tr> FIREFOX (51) will prompt to open PDF in new window = we're dead for now
<tr> -->
<td>waitForElementPresent</td> <tr>
<td>//textarea[@name="field_my_text_content"]</td> <td>clickAndWait</td>
<td></td> <td>name=Base_callDialogMethod:method</td>
</tr> <td></td>
<tr> </tr>
<td>storeEval</td> <tr>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td> <td>waitForPageToLoad</td>
<td></td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>storeEval</td> <tr>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td> <td>waitForTitle</td>
<td>dump</td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>//textarea[@name="field_my_text_content"]</td> <td>verifyTitle</td>
<td>${dump}</td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>verifyElementPresent</td> <tr>
<td>//button[@class="save"]</td> <td>storeLocation</td>
<td></td> <td>url</td>
</tr> <td></td>
<tr> </tr>
<td>clickAndWait</td> <tr>
<td>//button[@class="save"]</td> <td>echo</td>
<td></td> <td>${url}</td>
</tr> <td></td>
<tr> </tr>
<td>waitForElementPresent</td> <!-- Can't fetch pdf source, so request page again -->
<td>//div[@class="transition_message"]</td> <tr>
<td></td> <td>storeEval</td>
</tr> <td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<tr> <td>pdf_source</td>
<td>assertTextPresent</td> </tr>
<td>Data updated.</td> <!-- pause to let the ajax request finish. now if the table was a async, queue
<td></td> that would be nice 3/6000 did not work-->
</tr> <tr>
<!-- update 1st pdf documents - template_test_leaflet_input_001_en_pdf --> <td>pause</td>
<tr> <td>9000</td>
<td>echo</td> <td></td>
<td>update => template_test_leaflet_input_001_en_pdf</td> </tr>
<td></td> <tr>
</tr> <td>goBackAndWait</td>
<tr> <td></td>
<td>open</td> <td></td>
<td>${base_url}/web_page_module/</td> </tr>
<td></td> <tr>
</tr> <td>waitForPageToLoad</td>
<tr> <td></td>
<td>waitForTextPresent</td> <td></td>
<td>records</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Web Pages</td>
<td>type</td> <td></td>
<td>name=listbox_reference</td> </tr>
<td>Template.Test.Leaflet</td> </tal:block>
</tr> <tr>
<tr> <td>click</td>
<td>type</td> <td>//a[contains(text(), 'ERP5')]</td>
<td>name=listbox_version</td> <td></td>
<td>001</td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>keyPressAndWait</td> <td>//a[contains(text(), 'Documents')]</td>
<td>listbox_version</td> <td></td>
<td>\13</td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>waitForTextPresent</td> <td>//a[contains(text(), 'Documents')]</td>
<td>Template Test Leaflet</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>click</td> <td>records</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>waitForTextPresent</td> <td>name=listbox_reference</td>
<td>Short Title</td> <td>Template.Test.Leaflet</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>waitForElementPresent</td> <td>name=listbox_version</td>
<td>//button[@class="import_export"]</td> <td>003</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>keyPressAndWait</td>
<td>click</td> <td>listbox_version</td>
<td>//button[@class="import_export"]</td> <td>\13</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForTextPresent</td> <td>Template Test Leaflet</td>
<td>Export Slideshow</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>clickAndWait</td>
<td>selectAndWait</td> <td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td>name=select_dialog</td> <td></td>
<td>index=2</td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForTextPresent</td> <td>Short Title</td>
<td>Export Leaflet</td> <td></td>
<td></td> </tr>
</tr> <tal:block tal:condition="python: no_file_update == False">
<tr> <!-- manual form submit -->
<td>select</td> <tr>
<td>name=field_format</td> <td>storeLocation</td>
<td>index=1</td> <td>url</td>
</tr> <td></td>
<tr> </tr>
<td>clickAndWait</td> <!-- only handle pdf_source (a promise!) here, because it needs to be set on
<td>name=Base_callDialogMethod:method</td> the iframe and a page-reload resets all (bad) parameters manually set -->
<td></td> <tr>
</tr> <td>storeEval</td>
<tr> <td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td>waitForPageToLoad</td> <td></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>storeEval</td>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded --> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<tr> <td>pdf_dump</td>
<td>waitForTitle</td> </tr>
<td></td> <tr>
<td></td> <td>echo</td>
</tr> <td>${pdf_dump}</td>
<tr> <td></td>
<td>verifyTitle</td> </tr>
<td></td> <tr>
<td></td> <td>verifyNotExpression</td>
</tr> <td>${pdf_dump}</td>
<!-- Store this location for re-requesting --> <td>null</td>
<tr> </tr>
<td>storeLocation</td> <tr>
<td>url</td> <td>storeEval</td>
<td></td> <td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Leaflet-003-de.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
</tr> <td>promise</td>
<tr> </tr>
<td>echo</td> <tr>
<td>${url}</td> <td>storeEval</td>
<td></td> <td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
</tr> <td></td>
<!-- Can't access pdf source inside iframe, so request page again --> </tr>
<tr> <tr>
<td>storeEval</td> <td>waitForElementPresent</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob"; xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td> <td>//div[@class="transition_message"]</td>
<td>pdf_source</td> <td></td>
</tr> </tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue <tr>
that would be nice, 3/6/9000 not enough--> <td>waitForTextPresent</td>
<tr> <td>Data updated.</td>
<td>pause</td> <td></td>
<td>12000</td> </tr>
<td></td> <!-- generate image - template_test_leaflet_input_page_0_003_de_bmp -->
</tr> <tr>
<tr> <td>echo</td>
<td>goBackAndWait</td> <td>update => template_test_leaflet_input_page_0_003_de_bmp</td>
<td></td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>storeEval</td>
<td>waitForPageToLoad</td> <td>storedVars["url"].split("?")[0]</td>
<td></td> <td>screenshot_url</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>echo</td>
<td>waitForTextPresent</td> <td>${screenshot_url}</td>
<td>Web Pages</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>open</td>
<td>click</td> <td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_leaflet_input_page_0_003_de_bmp</td>
<td>//a[contains(text(), 'ERP5')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForElementPresent</td> <td>Screenshot updated.</td>
<td>//a[contains(text(), 'Documents')]</td> <td></td>
<td></td> </tr>
</tr> </tal:block>
<tr> <!-- make sure print exchange works -->
<td>click</td> <tr>
<td>//a[contains(text(), 'Documents')]</td> <td>echo</td>
<td></td> <td>ACTION => PRINT</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>records</td> <td>open</td>
<td></td> <td>${base_url}/web_page_module/</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_reference</td> <td>waitForTextPresent</td>
<td>Template.Test.Leaflet</td> <td>records</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_version</td> <td>type</td>
<td>001</td> <td>name=listbox_reference</td>
</tr> <td>Template.Test.Leaflet</td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_version</td> <td>type</td>
<td>\13</td> <td>name=listbox_version</td>
</tr> <td>001</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template Test Leaflet</td> <td>keyPressAndWait</td>
<td></td> <td>listbox_version</td>
</tr> <td>\13</td>
<tr> </tr>
<td>clickAndWait</td> <tr>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td> <td>waitForTextPresent</td>
<td></td> <td>Template Test Leaflet</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Short Title</td> <td>click</td>
<td></td> <td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
</tr> <td></td>
<!-- manual form submit --> </tr>
<tr> <tr>
<td>storeLocation</td> <td>waitForTextPresent</td>
<td>url</td> <td>Short Title</td>
<td></td> <td></td>
</tr> </tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on <tr>
the iframe and a page-reload resets all (bad) parameters manually set --> <td>waitForElementPresent</td>
<tr> <td>//button[@class="print"]</td>
<td>storeEval</td> <td></td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//button[@class="print"]</td>
<td>storeEval</td> <td></td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td> </tr>
<td>pdf_dump</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Print As Slideshow</td>
<td>echo</td> <td></td>
<td>${pdf_dump}</td> </tr>
<td></td> <tr>
</tr> <td>selectAndWait</td>
<tr> <td>name=select_dialog</td>
<td>verifyNotExpression</td> <td>index=2</td>
<td>${pdf_dump}</td> </tr>
<td>null</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Display Side Panel</td>
<td>storeEval</td> <td></td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Leaflet-001-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td> </tr>
<td>promise</td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>name=Base_showUpdateDialog:method</td>
<td>storeEval</td> <td></td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//div[@class="transition_message"]</td>
<td>waitForElementPresent</td> <td></td>
<td>//div[@class="transition_message"]</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Preview updated.</td>
<td>waitForTextPresent</td> <td></td>
<td>Data updated.</td> </tr>
<td></td> </tal:block>
</tr> </tbody>
<!-- generate image - template_test_leaflet_input_page_1_001_en_bmp --> </table>
<tr>
<td>echo</td>
<td>update => template_test_leaflet_input_page_1_001_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=1&amp;doc_id=template_test_leaflet_input_page_1_001_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- update 2nd pdf document - template_test_leaflet_input_002_en_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_leaflet_input_002_en_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>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>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=2</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Leaflet</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 Recipient</td>
</tr>
<tr>
<td>type</td>
<td>name=field_override_leaflet_header_title</td>
<td>Couscous</td>
</tr>
<tr>
<td>check</td>
<td>name=field_display_side</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<tr>
<td>verifyTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch pdf source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice, 3/6000 did not work-->
<tr>
<td>pause</td>
<td>9000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Leaflet</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Leaflet-002-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_leaflet_input_page_0_002_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_leaflet_input_page_0_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_leaflet_input_page_0_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- update 3rd pdf document - template_test_leaflet_input_003_de_pdf -->
<tr>
<td>echo</td>
<td>update => template_test_leaflet_input_003_de_pdf</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>002</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>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>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="import_export"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=2</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Export Leaflet</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_format</td>
<td>index=1</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr>
<td>waitForTitle</td>
<td></td>
<td></td>
</tr>
<tr>
<td>verifyTitle</td>
<td></td>
<td></td>
</tr>
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't fetch pdf source, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice 3/6000 did not work-->
<tr>
<td>pause</td>
<td>9000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Web Pages</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'ERP5')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>003</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Leaflet</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Leaflet-003-de.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_leaflet_input_page_0_003_de_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_leaflet_input_page_0_003_de_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_leaflet_input_page_0_003_de_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- make sure print exchange works -->
<tr>
<td>echo</td>
<td>action => print</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_page_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Leaflet</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>001</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>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>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="print"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="print"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Print As Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=2</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Display Side Panel</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
</tbody></table>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -2,772 +2,837 @@ ...@@ -2,772 +2,837 @@
xmlns:metal="http://xml.zope.org/namespaces/metal"> xmlns:metal="http://xml.zope.org/namespaces/metal">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test and Update Test Files for LETTER EVENT Template</title> <title>Test and Update Test Files for LETTER(EVENT) Template</title>
</head> </head>
<body> <body>
<!-- <!--
UPDATE comparison files for LIVE TESTS | DON'T RUN AUTOMATICALLY TEST UI and/or UPDATE FILES for live tests
(else tests will always pass...)
This Zuite updates all test files (diff-html, pdfs, bmps) used in the LiveTests This Zuite updates all test files (diff-html, pdfs, bmp) used in the LiveTests
based on the example web pages included in this bt5. Run this zuite after making based on the example web pages included in this bt5. The parameter no_file_update
changes to the bt5 which will alter their look to automatically update all files determines whether files are updated (default True). To update test files,
(else you need to do it by hand). This also means: DON'T RUN THIS AUTOMATICALLY, create a script Zuite_setSkipSave in custom folder which returns False
because it will also update all test files with any errors you make, causing
liveTests to always pass (comparing wrong rendering to wrong test file).
Help: Help:
http://www.seleniumhq.org/docs/02_selenium_ide.jsp#selenium-commands-selenese http://www.seleniumhq.org/docs/02_selenium_ide.jsp#selenium-commands-selenese
http://seleniummaster.com/sitecontent/index.php/introduction-to-selenium-automation/selenium-ide/114-selenium-ide-complete-list-of-commands http://seleniummaster.com/sitecontent/index.php/introduction-to-selenium-automation/selenium-ide/114-selenium-ide-complete-list-of-commands
Note: Note:
# make sure to set editor to plain text in (erp5 test preferences) # uses pause when updating files to wait for Cloudooo pdf rendering
# requires text-area editor
# test waitForTitle does not work in FF
--> -->
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr> <tr><td rowspan="1" colspan="3">Test Letter(Event) Template UI</td></tr>
</thead><tbody> </thead>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> <tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tal:block tal:define="portal here/portal_url/getPortalObject;
caller python: getattr(context, 'Zuite_setSkipSave', None);
no_file_update python: caller() if caller is not None else True;">
<tr>
<td>open</td>
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/Zuite_setPreferredTextEditor</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Editor set to Textarea.</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td tal:content="python: ''.join(['skipping save: ', str(no_file_update)])"></td>
<td></td>
</tr>
<tal:block tal:condition="python: no_file_update == True">
<tr>
<td>open</td>
<td>${base_url}/Zuite_setConversionServerUrl</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Conversion Server Url set.</td>
<td></td>
</tr>
</tal:block>
<tr>
<td>echo</td>
<td>ACTION => EXPORT</td>
<td></td>
</tr>
<!-- CASE 1: event letter, sender/recipient are organisations -->
<tr>
<td>echo</td>
<td>CASE 1: event letter, sender/recipient are organisations</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/support_request_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_title</td>
<td>Template Test Support Request</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_title</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Support Request</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template Test Support Request')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Requester</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- Create a new Event -->
<tr>
<td>selectAndWait</td>
<td>name=select_action</td>
<td>Create New Event</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Event Type</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_your_portal_type
<td>Letter</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Letter</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_your_title</td>
<td>Test</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="bottom"]/div/textarea</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="bottom"]/div/textarea</td>
<td>Hello</td>
</tr>
<tr>
<td>type</td>
<td>name=subfield_field_your_start_date_year</td>
<td>1999</td>
</tr>
<tr>
<td>type</td>
<td>name=subfield_field_your_start_date_month</td>
<td>12</td>
<tr>
<tr>
<td>type</td>
<td>name=subfield_field_your_start_date_day</td>
<td>31</td>
</tr>
<tr>
<td>select</td>
<td>name=field_your_source</td>
<td>index=2</td>
</tr>
<tr>
<td>select</td>
<td>name=field_your_destination</td>
<td>index=2</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Created and associated a new Letter to the ticket.</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>name=field_my_aggregate_document_title_list</td>
<td>Test</td>
</tr>
<tr> <!-- test whether preview loads correctly both by accessing
<td>open</td> preview on the event and the document itself. DOESN'T WORK IN FF51-->
<td>${base_url}/bar_module/ListBoxZuite_reset</td> <tal:block tal:condition="python: no_file_update == False">
<td></td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>//a/span[contains(text(), 'Preview')]</td>
<td>assertTextPresent</td> <td></td>
<td>Reset Successfully.</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<!-- generate letter from support request with sender/recipient organisation --> <td>//div[contains(text(), '1999-12-31')]</td>
<tr> <td></td>
<td>echo</td> </tr>
<td>event letter, sender/recipient are organisations</td> <tr>
<td></td> <td>verifyElementPresent</td>
</tr> <td>//div[contains(text(), '1999-12-31')]</td>
<tr> <td></td>
<td>open</td> </tr>
<td>${base_url}/support_request_module/</td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>//a[contains(text(), 'Test')]</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>records</td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>//a/span[contains(text(), 'View')]</td>
<tr> <td></td>
<td>type</td> </tr>
<td>name=listbox_title</td> <tr>
<td>Template Test Support Request</td> <td>waitForElementPresent</td>
</tr> <td>//a[contains(@href, 'my_aggregate_document_title_list')]</td>
<tr> <td></td>
<td>keyPressAndWait</td> </tr>
<td>listbox_title</td> <tr>
<td>\13</td> <td>clickAndWait</td>
</tr> <td>//a[contains(@href, 'my_aggregate_document_title_list')]</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Template Test Support Request</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Short Title</td>
<tr> <td></td>
<td>click</td> </tr>
<td>//a[contains(text(), 'Template Test Support Request')]</td> <tr>
<td></td> <td>waitForElementPresent</td>
</tr> <td>//a/span[contains(text(), 'Preview')]</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Requester</td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>//a/span[contains(text(), 'Preview')]</td>
<!-- Save once to set modification date for live tests --> <td></td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//button[@class="save"]</td> <td>waitForElementPresent</td>
<td></td> <td>//div[contains(text(), '1999-12-31')]</td>
</tr> <td></td>
<tr> </tr>
<td>verifyElementPresent</td> <tr>
<td>//button[@class="save"]</td> <td>verifyElementPresent</td>
<td></td> <td>//div[contains(text(), '1999-12-31')]</td>
</tr> <td></td>
<tr> </tr>
<td>clickAndWait</td> <tr>
<td>//button[@class="save"]</td> <td>clickAndWait</td>
<td></td> <td>//a[contains(text(), 'Test')]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForElementPresent</td> </tal:block>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- Create a new Event -->
<tr>
<td>selectAndWait</td>
<td>name=select_action</td>
<td>index=6</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Event Type</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_your_portal_type
<td>index=5</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Letter</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_your_title</td>
<td>Test</td>
</tr>
<tr>
<td>type</td>
<td>name=field_your_text_content</td>
<td>Hello</td>
</tr>
<tr>
<td>type</td>
<td>name=subfield_field_your_start_date_year</td>
<td>1999</td>
</tr>
<tr>
<td>type</td>
<td>name=subfield_field_your_start_date_month</td>
<td>12</td>
<tr>
<tr>
<td>type</td>
<td>name=subfield_field_your_start_date_day</td>
<td>31</td>
</tr>
<tr>
<td>select</td>
<td>name=field_your_source</td>
<td>index=2</td>
</tr>
<tr>
<td>select</td>
<td>name=field_your_destination</td>
<td>index=2</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Created and associated a new Letter to the ticket.</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>name=field_my_aggregate_title_list</td>
<td>Test</td>
</tr>
<!-- test whether preview loads correctly -->
<tr>
<td>clickAndWait</td>
<td>//a/span[contains(text(), 'Preview')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(text(), '1999-12-31')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(text(), '1999-12-31')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Test')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a/span[contains(text(), 'View')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(@href, 'my_aggregate_title_list')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(@href, 'my_aggregate_title_list')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Reader')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a/span[contains(text(), 'Reader')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(text(), '1999-12-31')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(text(), '1999-12-31')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Test')]</td>
<td></td>
</tr>
<!-- update 5th pdf document - template_test_letter_input_005_en_pdf -->
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't access pdf source inside iframe, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob"; xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"].replace("view?ignore_layout:int=1", "WebPage_viewAsWeb") + "?batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice, 3000 not enough -->
<tr>
<td>pause</td>
<td>6000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Documents</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>005</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Letter-001-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_slideshow_input_slide_0_005_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_slide_0_005_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_letter_input_page_0_005_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<!-- generate letter from support request with sender/recipient person -->
<tr>
<td>echo</td>
<td>event letter, sender/recipient are persons without career subordinate</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/support_request_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_title</td>
<td>Template Test Support Request</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_title</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Support Request</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template Test Support Request')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Requester</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- Create a new Event -->
<tr>
<td>selectAndWait</td>
<td>name=select_action</td>
<td>index=6</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Event Type</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_your_portal_type
<td>index=5</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Letter</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_your_title</td>
<td>Test</td>
</tr>
<tr>
<td>type</td>
<td>name=field_your_text_content</td>
<td>Hello</td>
</tr>
<tr>
<td>type</td>
<td>name=subfield_field_your_start_date_year</td>
<td>1999</td>
</tr>
<tr>
<td>type</td>
<td>name=subfield_field_your_start_date_month</td>
<td>12</td>
<tr>
<tr>
<td>type</td>
<td>name=subfield_field_your_start_date_day</td>
<td>31</td>
</tr>
<tr>
<td>select</td>
<td>name=field_your_source</td>
<td>index=4</td>
</tr>
<tr>
<td>select</td>
<td>name=field_your_destination</td>
<td>index=4</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Created and associated a new Letter to the ticket.</td>
<td></td>
</tr>
<!-- test whether preview loads correctly -->
<tr>
<td>clickAndWait</td>
<td>//a/span[contains(text(), 'Preview')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(text(), '1999-12-31')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(text(), '1999-12-31')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Test')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a/span[contains(text(), 'View')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(@href, 'my_aggregate_title_list')]</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>name=field_my_aggregate_title_list</td>
<td>Test</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(@href, 'my_aggregate_title_list')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Reader')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a/span[contains(text(), 'Reader')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(text(), '1999-12-31')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(text(), '1999-12-31')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Test')]</td>
<td></td>
</tr>
<!-- update 6th pdf document - template_test_letter_input_006_en_pdf -->
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't access pdf source inside iframe, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob"; xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"].replace("view?ignore_layout:int=1", "WebPage_viewAsWeb") + "?batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice, 3000 not enough -->
<tr>
<td>pause</td>
<td>6000</td>
<td></td>
</tr>
<tr> <!-- update 5th pdf document - template_test_letter_input_005_en_pdf -->
<td>goBackAndWait</td> <tal:block tal:condition="python: no_file_update == False">
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Documents</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>006</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<!-- manual form submit -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Letter-001-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_slideshow_input_slide_0_006_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_slide_0_006_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_letter_input_page_0_006_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
</tbody></table> <!-- Store location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't access pdf source inside iframe, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob"; xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"].replace("view?ignore_layout:int=1", "WebPage_viewAsWeb") + "?batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. 3000 wait not long enough -->
<tr>
<td>pause</td>
<td>6000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Documents</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>005</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
</tal:block>
<!-- manual form submit -->
<tal:block tal:condition="python: no_file_update == False">
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Letter-001-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_slideshow_input_slide_0_005_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_slide_0_005_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_letter_input_page_0_005_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
</tal:block>
<!-- CASE 2: generate letter from support request with sender/recipient person -->
<tr>
<td>echo</td>
<td>CASE 2: event letter, sender/recipient are persons without career subordinate</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/support_request_module/</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_title</td>
<td>Template Test Support Request</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_title</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Support Request</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Template Test Support Request')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Requester</td>
<td></td>
</tr>
<!-- Save once to set modification date for live tests -->
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//button[@class="save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- Create a new Event -->
<tr>
<td>selectAndWait</td>
<td>name=select_action</td>
<td>Create New Event</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Event Type</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>name=field_your_portal_type
<td>Letter</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Letter</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=field_your_title</td>
<td>Test</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="bottom"]/div/textarea</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="bottom"]/div/textarea</td>
<td>Hello</td>
</tr>
<tr>
<td>type</td>
<td>name=subfield_field_your_start_date_year</td>
<td>1999</td>
</tr>
<tr>
<td>type</td>
<td>name=subfield_field_your_start_date_month</td>
<td>12</td>
<tr>
<tr>
<td>type</td>
<td>name=subfield_field_your_start_date_day</td>
<td>31</td>
</tr>
<tr>
<td>select</td>
<td>name=field_your_source</td>
<td>index=4</td>
</tr>
<tr>
<td>select</td>
<td>name=field_your_destination</td>
<td>index=4</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>name=Base_callDialogMethod:method</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Created and associated a new Letter to the ticket.</td>
<td></td>
</tr>
<!-- test whether preview loads correctly both by accessing
preview on the event and the document itself. DOESN'T WORK IN FF51-->
<tal:block tal:condition="python: no_file_update == False">
<tr>
<td>clickAndWait</td>
<td>//a/span[contains(text(), 'Preview')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(text(), '1999-12-31')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(text(), '1999-12-31')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Test')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a/span[contains(text(), 'View')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(@href, 'my_aggregate_document_title_list')]</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>name=field_my_aggregate_document_title_list</td>
<td>Test</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(@href, 'my_aggregate_document_title_list')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a/span[contains(text(), 'Preview')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a/span[contains(text(), 'Preview')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(text(), '1999-12-31')]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[contains(text(), '1999-12-31')]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Test')]</td>
<td></td>
</tr>
</tal:block>
<!-- update 6th pdf document - template_test_letter_input_006_en_pdf -->
<tal:block tal:condition="python: no_file_update == False">
<!-- Store this location for re-requesting -->
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>
<!-- Can't access pdf source inside iframe, so request page again -->
<tr>
<td>storeEval</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob"; xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"].replace("view?ignore_layout:int=1", "WebPage_viewAsWeb") + "?batch_mode=True");</td>
<td>pdf_source</td>
</tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue
that would be nice, 3000 not enough -->
<tr>
<td>pause</td>
<td>6000</td>
<td></td>
</tr>
<tr>
<td>goBackAndWait</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td></td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Documents</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(text(), 'Documents')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>records</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_reference</td>
<td>Template.Test.Letter</td>
</tr>
<tr>
<td>type</td>
<td>name=listbox_version</td>
<td>006</td>
</tr>
<tr>
<td>keyPressAndWait</td>
<td>listbox_version</td>
<td>\13</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Template Test Letter</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
</tal:block>
<!-- manual form submit -->
<tal:block tal:condition="python: no_file_update == False">
<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on
the iframe and a page-reload resets all (bad) parameters manually set -->
<tr>
<td>storeEval</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>pdf_dump</td>
</tr>
<tr>
<td>echo</td>
<td>${pdf_dump}</td>
<td></td>
</tr>
<tr>
<td>verifyNotExpression</td>
<td>${pdf_dump}</td>
<td>null</td>
</tr>
<tr>
<td>storeEval</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Letter-001-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
<td>promise</td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- generate image - template_test_slideshow_input_slide_0_006_en_bmp -->
<tr>
<td>echo</td>
<td>update => template_test_slideshow_input_slide_0_006_en_bmp</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>storedVars["url"].split("?")[0]</td>
<td>screenshot_url</td>
</tr>
<tr>
<td>echo</td>
<td>${screenshot_url}</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_letter_input_page_0_006_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
</tal:block>
</tal:block>
</tbody>
</table>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -6,1193 +6,1243 @@ ...@@ -6,1193 +6,1243 @@
</head> </head>
<body> <body>
<!-- <!--
UPDATE comparison files for LIVE TESTS | DON'T RUN AUTOMATICALLY TEST UI and/or UPDATE FILES for live tests
(else tests will always pass...)
This Zuite updates all test files (diff-html, pdfs, bmps) used in the LiveTests This Zuite updates all test files (diff-html, pdfs, bmp) used in the LiveTests
based on the example web pages included in this bt5. Run this zuite after making based on the example web pages included in this bt5. The parameter no_file_update
changes to the bt5 which will alter their look to automatically update all files determines whether files are updated (default True). To update test files,
(else you need to do it by hand). This also means: DON'T RUN THIS AUTOMATICALLY, create a script Zuite_setSkipSave in custom folder which returns False
because it will also update all test files with any errors you make, causing
liveTests to always pass (comparing wrong rendering to wrong test file).
Help: Help:
http://www.seleniumhq.org/docs/02_selenium_ide.jsp#selenium-commands-selenese http://www.seleniumhq.org/docs/02_selenium_ide.jsp#selenium-commands-selenese
http://seleniummaster.com/sitecontent/index.php/introduction-to-selenium-automation/selenium-ide/114-selenium-ide-complete-list-of-commands http://seleniummaster.com/sitecontent/index.php/introduction-to-selenium-automation/selenium-ide/114-selenium-ide-complete-list-of-commands
Note: Note:
# make sure to set editor to plain text in (erp5 test preferences) # uses pause when updating files to wait for Cloudooo pdf rendering
# requires text-area editor
# test waitForTitle does not work in FF
--> -->
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr> <tr><td rowspan="1" colspan="3">Test Release Template UI</td></tr>
</thead><tbody> </thead>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> <tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tr> <tal:block tal:define="portal here/portal_url/getPortalObject;
<td>open</td> caller python: getattr(context, 'Zuite_setSkipSave', None);
<td>${base_url}/bar_module/ListBoxZuite_reset</td> no_file_update python: caller() if caller is not None else True;">
<td></td> <tr>
</tr> <td>open</td>
<tr> <td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td>assertTextPresent</td> <td></td>
<td>Reset Successfully.</td> </tr>
<td></td> <tr>
</tr> <td>assertTextPresent</td>
<td>Reset Successfully.</td>
<!-- update 1st output - template_test_release_output_expected_001_en_html --> <td></td>
<tr> </tr>
<td>echo</td> <tr>
<td>action => export</td> <td>open</td>
<td></td> <td>${base_url}/Zuite_setPreferredTextEditor</td>
</tr> <td></td>
<tr> </tr>
<td>echo</td> <tr>
<td>update => template_test_release_output_expected_001_en_html</td> <td>assertTextPresent</td>
<td></td> <td>Editor set to Textarea.</td>
</tr> <td></td>
<tr> </tr>
<td>open</td> <tr>
<td>${base_url}/web_page_module/</td> <td>echo</td>
<td></td> <td tal:content="python: ''.join(['skipping save: ', str(no_file_update)])"></td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tal:block tal:condition="python: no_file_update == True">
<td>records</td> <tr>
<td></td> <td>open</td>
</tr> <td>${base_url}/Zuite_setConversionServerUrl</td>
<tr> <td></td>
<td>type</td> </tr>
<td>name=listbox_reference</td> <tr>
<td>Template.Test.Release</td> <td>assertTextPresent</td>
</tr> <td>Conversion Server Url set.</td>
<tr> <td></td>
<td>type</td> </tr>
<td>name=listbox_version</td> </tal:block>
<td>001</td> <tr>
</tr> <td>echo</td>
<tr> <td>ACTION => EXPORT</td>
<td>keyPressAndWait</td> <td></td>
<td>listbox_version</td> </tr>
<td>\13</td> <!-- CASE 1 - template_test_release_output_expected_001_en_html -->
</tr> <tr>
<tr> <td>echo</td>
<td>waitForTextPresent</td> <td>CASE 1 => template_test_release_output_expected_001_en_html</td>
<td>Template Test Release</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>open</td>
<td>click</td> <td>${base_url}/web_page_module/</td>
<td>//a[contains(text(), 'Template.Test.Release')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForTextPresent</td> <td>records</td>
<td>Short Title</td> <td></td>
<td></td> </tr>
</tr> <tr>
<!-- Save once to set modification date for live tests --> <td>type</td>
<tr> <td>name=listbox_reference</td>
<td>waitForElementPresent</td> <td>Template.Test.Release</td>
<td>//button[@class="save"]</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_version</td>
<td>verifyElementPresent</td> <td>001</td>
<td>//button[@class="save"]</td> </tr>
<td></td> <tr>
</tr> <td>keyPressAndWait</td>
<tr> <td>listbox_version</td>
<td>clickAndWait</td> <td>\13</td>
<td>//button[@class="save"]</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Template Test Release</td>
<td>waitForElementPresent</td> <td></td>
<td>//div[@class="transition_message"]</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Template.Test.Release')]</td>
<td>assertTextPresent</td> <td></td>
<td>Data updated.</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Short Title</td>
<td>waitForElementPresent</td> <td></td>
<td>//button[@class="import_export"]</td> </tr>
<td></td> <!-- Save once to set modification date for live tests -->
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>click</td> <td>//button[@class="save"]</td>
<td>//button[@class="import_export"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>verifyElementPresent</td>
<td>waitForTextPresent</td> <td>//button[@class="save"]</td>
<td>Export Slideshow</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>clickAndWait</td>
<td>selectAndWait</td> <td>//button[@class="save"]</td>
<td>name=select_dialog</td> <td></td>
<td>index=4</td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>waitForTextPresent</td> <td>//div[@class="transition_message"]</td>
<td>Export Release</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>assertTextPresent</td>
<td>clickAndWait</td> <td>Data updated.</td>
<td>name=Base_showUpdateDialog:method</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>waitForElementPresent</td> <td>//button[@class="import_export"]</td>
<td>//div[@class="transition_message"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>waitForTextPresent</td> <td>//button[@class="import_export"]</td>
<td>Preview updated.</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>clickAndWait</td> <td>Export Slideshow</td>
<td>name=Base_callDialogMethod:method</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>selectAndWait</td>
<td>waitForElementNotPresent</td> <td>name=select_dialog</td>
<td>name=Base_callDialogMethod:method</td> <td>index=4</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForPageToLoad</td> <td>Export Release</td>
<td></td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>clickAndWait</td>
<td>waitForTextPresent</td> <td>name=Base_showUpdateDialog:method</td>
<td>©</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>storeLocation</td> <td>//div[@class="transition_message"]</td>
<td>url</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>echo</td> <td>Preview updated.</td>
<td>${url}</td> <td></td>
<td></td> </tr>
</tr> <tr>
<!-- Can't fetch iframe source, so request page again --> <td>clickAndWait</td>
<tr> <td>name=Base_callDialogMethod:method</td>
<td>storeEval</td> <td></td>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td> </tr>
<td>page_source</td> <tr>
</tr> <td>waitForElementNotPresent</td>
<tr> <td>name=Base_callDialogMethod:method</td>
<td>goBackAndWait</td> <td></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>waitForPageToLoad</td>
<tr> <td></td>
<td>waitForPageToLoad</td> <td></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>©</td>
<td>waitForTextPresent</td> <td></td>
<td>Web Pages</td> </tr>
<td></td> <tal:block tal:condition="python: no_file_update == False">
</tr> <tr>
<tr> <td>storeLocation</td>
<td>click</td> <td>url</td>
<td>//a[contains(text(), 'Web Pages')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>echo</td>
<td>waitForTextPresent</td> <td>${url}</td>
<td>records</td> <td></td>
<td></td> </tr>
</tr> <!-- Can't fetch iframe source, so request page again -->
<tr> <tr>
<td>type</td> <td>storeEval</td>
<td>name=listbox_reference</td> <td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>%Template% AND %Output% AND %Release%</td> <td>page_source</td>
</tr> </tr>
<tr> </tal:block>
<td>type</td> <tr>
<td>name=listbox_version</td> <td>goBackAndWait</td>
<td>001</td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_reference</td> <td>waitForPageToLoad</td>
<td>\13</td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template.Test.Release.Expected.Output.Sample</td> <td>waitForTextPresent</td>
<td></td> <td>Web Pages</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <tr>
<td>//a[contains(text(), 'Template.Test.Release.Expected.Output.Sample')]</td> <td>click</td>
<td></td> <td>//a[contains(text(), 'Web Pages')]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Short Title</td> <td>waitForTextPresent</td>
<td></td> <td>records</td>
</tr> <td></td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//a/span[contains(text(), 'Edit')]</td> <td>type</td>
<td></td> <td>name=listbox_reference</td>
</tr> <td>%Template% AND %Output% AND %Release%</td>
<tr> </tr>
<td>click</td> <tr>
<td>//a/span[contains(text(), 'Edit')]</td> <td>type</td>
<td></td> <td>name=listbox_version</td>
</tr> <td>001</td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//textarea[@name="field_my_text_content"]</td> <td>keyPressAndWait</td>
<td></td> <td>listbox_reference</td>
</tr> <td>\13</td>
<tr> </tr>
<td>storeEval</td> <tr>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td> <td>waitForTextPresent</td>
<td></td> <td>Template.Test.Release.Expected.Output.Sample</td>
</tr> <td></td>
<tr> </tr>
<td>storeEval</td> <tr>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td> <td>click</td>
<td>dump</td> <td>//a[contains(text(), 'Template.Test.Release.Expected.Output.Sample')]</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>//textarea[@name="field_my_text_content"]</td> <td>waitForTextPresent</td>
<td>${dump}</td> <td>Short Title</td>
</tr> <td></td>
<tr> </tr>
<td>verifyElementPresent</td> <tr>
<td>//button[@class="save"]</td> <td>waitForElementPresent</td>
<td></td> <td>//a/span[contains(text(), 'Edit')]</td>
</tr> <td></td>
<tr> </tr>
<td>clickAndWait</td> <tr>
<td>//button[@class="save"]</td> <td>click</td>
<td></td> <td>//a/span[contains(text(), 'Edit')]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//div[@class="transition_message"]</td> <td>waitForElementPresent</td>
<td></td> <td>//div[@class="input"]/div/textarea</td>
</tr> <td></td>
<tr> </tr>
<td>assertTextPresent</td> <tal:block tal:condition="python: no_file_update == False">
<td>Data updated.</td> <tr>
<td></td> <td>storeEval</td>
</tr> <td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<!-- update 2nd output - template_test_release_output_expected_002_de_html --> <td></td>
<tr> </tr>
<td>echo</td> <tr>
<td>update => template_test_release_output_expected_002_de_html</td> <td>storeEval</td>
<td></td> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
</tr> <td>dump</td>
<tr> </tr>
<td>verifyTextPresent</td> <tr>
<td>Web Pages</td> <td>type</td>
<td></td> <td>//div[@class="input"]/div/textarea</td>
</tr> <td>${dump}</td>
<tr> </tr>
<td>click</td> </tal:block>
<td>//a[contains(text(), 'Web Pages')]</td> <tr>
<td></td> <td>verifyElementPresent</td>
</tr> <td>//button[@class="save"]</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>records</td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>//button[@class="save"]</td>
<tr> <td></td>
<td>type</td> </tr>
<td>name=listbox_reference</td> <tr>
<td>Template.Test.Release</td> <td>waitForElementPresent</td>
</tr> <td>//div[@class="transition_message"]</td>
<tr> <td></td>
<td>type</td> </tr>
<td>name=listbox_version</td> <tr>
<td>002</td> <td>assertTextPresent</td>
</tr> <td>Data updated.</td>
<tr> <td></td>
<td>keyPressAndWait</td> </tr>
<td>listbox_version</td> <!-- CASE 2 - template_test_release_output_expected_002_de_html -->
<td>\13</td> <tr>
</tr> <td>echo</td>
<tr> <td>CASE 2 => template_test_release_output_expected_002_de_html</td>
<td>waitForTextPresent</td> <td></td>
<td>Template Test Release</td> </tr>
<td></td> <tr>
</tr> <td>verifyTextPresent</td>
<tr> <td>Web Pages</td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'Template.Test.Release')]</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Web Pages')]</td>
<td>waitForTextPresent</td> <td></td>
<td>Short Title</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<!-- Save once to set modification date for live tests --> <td>records</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//button[@class="save"]</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=listbox_reference</td>
<tr> <td>Template.Test.Release</td>
<td>verifyElementPresent</td> </tr>
<td>//button[@class="save"]</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=listbox_version</td>
<tr> <td>002</td>
<td>clickAndWait</td> </tr>
<td>//button[@class="save"]</td> <tr>
<td></td> <td>keyPressAndWait</td>
</tr> <td>listbox_version</td>
<tr> <td>\13</td>
<td>waitForElementPresent</td> </tr>
<td>//div[@class="transition_message"]</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Template Test Release</td>
<tr> <td></td>
<td>assertTextPresent</td> </tr>
<td>Data updated.</td> <tr>
<td></td> <td>click</td>
</tr> <td>//a[contains(text(), 'Template.Test.Release')]</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//button[@class="import_export"]</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Short Title</td>
<tr> <td></td>
<td>click</td> </tr>
<td>//button[@class="import_export"]</td> <!-- Save once to set modification date for live tests -->
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//button[@class="save"]</td>
<td>waitForTextPresent</td> <td></td>
<td>Export Slideshow</td> </tr>
<td></td> <tr>
</tr> <td>verifyElementPresent</td>
<tr> <td>//button[@class="save"]</td>
<td>selectAndWait</td> <td></td>
<td>name=select_dialog</td> </tr>
<td>index=4</td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>//button[@class="save"]</td>
<td>waitForTextPresent</td> <td></td>
<td>Export Release</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//div[@class="transition_message"]</td>
<td>type</td> <td></td>
<td>name=field_override_source_organisation_title</td> </tr>
<td>Test Association</td> <tr>
</tr> <td>assertTextPresent</td>
<tr> <td>Data updated.</td>
<td>type</td> <td></td>
<td>name=field_override_source_person_title</td> </tr>
<td>Test Association Member</td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//button[@class="import_export"]</td>
<td>uncheck</td> <td></td>
<td>name=field_display_about</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//button[@class="import_export"]</td>
<td>clickAndWait</td> <td></td>
<td>name=Base_showUpdateDialog:method</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Export Slideshow</td>
<td>waitForElementPresent</td> <td></td>
<td>//div[@class="transition_message"]</td> </tr>
<td></td> <tr>
</tr> <td>selectAndWait</td>
<tr> <td>name=select_dialog</td>
<td>waitForTextPresent</td> <td>index=4</td>
<td>Preview updated.</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Export Release</td>
<td>clickAndWait</td> <td></td>
<td>name=Base_callDialogMethod:method</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=field_override_source_organisation_title</td>
<td>waitForPageToLoad</td> <td>Test Association</td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=field_override_source_person_title</td>
<td>waitForElementNotPresent</td> <td>Test Association Member</td>
<td>name=Base_callDialogMethod:method</td> </tr>
<td></td> <tr>
</tr> <td>uncheck</td>
<tr> <td>name=field_display_about</td>
<td>waitForTextPresent</td> <td></td>
<td>©</td> </tr>
<td></td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>name=Base_showUpdateDialog:method</td>
<td>storeLocation</td> <td></td>
<td>url</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//div[@class="transition_message"]</td>
<td>echo</td> <td></td>
<td>${url}</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<!-- Can't fetch iframe source, so request page again --> <td>Preview updated.</td>
<tr> <td></td>
<td>storeEval</td> </tr>
<td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td> <tr>
<td>page_source</td> <td>clickAndWait</td>
</tr> <td>name=Base_callDialogMethod:method</td>
<tr> <td></td>
<td>goBackAndWait</td> </tr>
<td></td> <tr>
<td></td> <td>waitForPageToLoad</td>
</tr> <td></td>
<tr> <td></td>
<td>waitForPageToLoad</td> </tr>
<td></td> <tr>
<td></td> <td>waitForElementNotPresent</td>
</tr> <td>name=Base_callDialogMethod:method</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Web Pages</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>©</td>
<tr> <td></td>
<td>click</td> </tr>
<td>//a[contains(text(), 'Web Pages')]</td> <tal:block tal:condition="python: no_file_update == False">
<td></td> <tr>
</tr> <td>storeLocation</td>
<tr> <td>url</td>
<td>waitForTextPresent</td> <td></td>
<td>records</td> </tr>
<td></td> <tr>
</tr> <td>echo</td>
<tr> <td>${url}</td>
<td>type</td> <td></td>
<td>name=listbox_reference</td> </tr>
<td>%Template% AND %Output% AND %Release%</td> <!-- Can't fetch iframe source, so request page again -->
</tr> <tr>
<tr> <td>storeEval</td>
<td>type</td> <td>function ajax(url) {var xhr = new XMLHttpRequest();return new Promise(function(resolve, reject) {var k;xhr.open("GET", url, true);xhr.addEventListener("load", function(e) {if (e.target.status >= 400) {return reject(e);}resolve(e);});xhr.addEventListener("error", reject);xhr.send();}, function() {xhr.abort();});};ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>name=listbox_version</td> <td>page_source</td>
<td>002</td> </tr>
</tr> </tal:block>
<tr> <tr>
<td>keyPressAndWait</td> <td>goBackAndWait</td>
<td>listbox_reference</td> <td></td>
<td>\13</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForPageToLoad</td>
<td>Template.Test.Release.Expected.Output.Sample</td> <td></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>waitForTextPresent</td>
<td>//a[contains(text(), 'Template.Test.Release.Expected.Output.Sample')]</td> <td>Web Pages</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>click</td>
<td>Short Title</td> <td>//a[contains(text(), 'Web Pages')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForTextPresent</td>
<td>//a/span[contains(text(), 'Edit')]</td> <td>records</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>type</td>
<td>//a/span[contains(text(), 'Edit')]</td> <td>name=listbox_reference</td>
<td></td> <td>%Template% AND %Output% AND %Release%</td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>type</td>
<td>//textarea[@name="field_my_text_content"]</td> <td>name=listbox_version</td>
<td></td> <td>002</td>
</tr> </tr>
<tr> <tr>
<td>storeEval</td> <td>keyPressAndWait</td>
<td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td> <td>listbox_reference</td>
<td></td> <td>\13</td>
</tr> </tr>
<tr> <tr>
<td>storeEval</td> <td>waitForTextPresent</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td> <td>Template.Test.Release.Expected.Output.Sample</td>
<td>dump</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>click</td>
<td>//textarea[@name="field_my_text_content"]</td> <td>//a[contains(text(), 'Template.Test.Release.Expected.Output.Sample')]</td>
<td>${dump}</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyElementPresent</td> <td>waitForTextPresent</td>
<td>//button[@class="save"]</td> <td>Short Title</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>waitForElementPresent</td>
<td>//button[@class="save"]</td> <td>//a/span[contains(text(), 'Edit')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>click</td>
<td>//div[@class="transition_message"]</td> <td>//a/span[contains(text(), 'Edit')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>assertTextPresent</td> <td>waitForElementPresent</td>
<td>Data updated.</td> <td>//div[@class="input"]/div/textarea</td>
<td></td> <td></td>
</tr> </tr>
<!-- update 1st pdf document - template_test_release_input_001_en_pdf --> <tal:block tal:condition="python: no_file_update == False">
<tr> <tr>
<td>echo</td> <td>storeEval</td>
<td>update => template_test_release_input_001_en_pdf</td> <td>storedVars["page_source"].then(function (evt) {var content = evt.target.response || evt.target.responseText;document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter = content;})</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>open</td> <td>storeEval</td>
<td>${base_url}/web_page_module/</td> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td></td> <td>dump</td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>type</td>
<td>records</td> <td>//div[@class="input"]/div/textarea</td>
<td></td> <td>${dump}</td>
</tr> </tr>
<tr> </tal:block>
<td>type</td> <tr>
<td>name=listbox_reference</td> <td>verifyElementPresent</td>
<td>Template.Test.Release</td> <td>//button[@class="save"]</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_version</td> <td>clickAndWait</td>
<td>001</td> <td>//button[@class="save"]</td>
</tr> <td></td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_version</td> <td>waitForElementPresent</td>
<td>\13</td> <td>//div[@class="transition_message"]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template Test Release</td> <td>assertTextPresent</td>
<td></td> <td>Data updated.</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <!-- CASE 1 (pdf) - template_test_release_input_001_en_pdf -->
<td>//a[contains(text(), 'Template.Test.Release')]</td> <tr>
<td></td> <td>echo</td>
</tr> <td>CASE 1 (pdf) => template_test_release_input_001_en_pdf</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Short Title</td> <tr>
<td></td> <td>open</td>
</tr> <td>${base_url}/web_page_module/</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//button[@class="import_export"]</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>records</td>
<tr> <td></td>
<td>click</td> </tr>
<td>//button[@class="import_export"]</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=listbox_reference</td>
<tr> <td>Template.Test.Release</td>
<td>waitForTextPresent</td> </tr>
<td>Export Slideshow</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=listbox_version</td>
<tr> <td>001</td>
<td>selectAndWait</td> </tr>
<td>name=select_dialog</td> <tr>
<td>index=4</td> <td>keyPressAndWait</td>
</tr> <td>listbox_version</td>
<tr> <td>\13</td>
<td>waitForTextPresent</td> </tr>
<td>Export Release</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Template Test Release</td>
<tr> <td></td>
<td>select</td> </tr>
<td>name=field_format</td> <tr>
<td>index=1</td> <td>click</td>
</tr> <td>//a[contains(text(), 'Template.Test.Release')]</td>
<tr> <td></td>
<td>clickAndWait</td> </tr>
<td>name=Base_callDialogMethod:method</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Short Title</td>
<tr> <td></td>
<td>waitForPageToLoad</td> </tr>
<td></td> <tr>
<td></td> <td>waitForElementPresent</td>
</tr> <td>//button[@class="import_export"]</td>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded --> <td></td>
<tr> </tr>
<td>waitForTitle</td> <tr>
<td></td> <td>click</td>
<td></td> <td>//button[@class="import_export"]</td>
</tr> <td></td>
<tr> </tr>
<td>verifyTitle</td> <tr>
<td></td> <td>waitForTextPresent</td>
<td></td> <td>Export Slideshow</td>
</tr> <td></td>
<!-- Store this location for re-requesting --> </tr>
<tr> <tr>
<td>storeLocation</td> <td>selectAndWait</td>
<td>url</td> <td>name=select_dialog</td>
<td></td> <td>index=4</td>
</tr> </tr>
<tr> <tr>
<td>echo</td> <td>waitForTextPresent</td>
<td>${url}</td> <td>Export Release</td>
<td></td> <td></td>
</tr> </tr>
<!-- Can't access pdf source inside iframe, so request page again --> <tr>
<tr> <td>select</td>
<td>storeEval</td> <td>name=field_format</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob"; xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td> <td>index=1</td>
<td>pdf_source</td> </tr>
</tr> <tal:block tal:condition="python: no_file_update == False">
<!-- pause to let the ajax request finish. now if the table was a async, queue <!--
that would be nice, 3/6/9000 not enough--> PDF viewer has no document.title, wait for "" means pdf is loaded
<tr> FIREFOX (51) will prompt to open PDF in new window = we're dead for now
<td>pause</td> -->
<td>12000</td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>name=Base_callDialogMethod:method</td>
<tr> <td></td>
<td>goBackAndWait</td> </tr>
<td></td> <tr>
<td></td> <td>waitForPageToLoad</td>
</tr> <td></td>
<tr> <td></td>
<td>waitForPageToLoad</td> </tr>
<td></td> <tr>
<td></td> <td>waitForTitle</td>
</tr> <td></td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Web Pages</td> <tr>
<td></td> <td>verifyTitle</td>
</tr> <td></td>
<tr> <td></td>
<td>click</td> </tr>
<td>//a[contains(text(), 'ERP5')]</td> <tr>
<td></td> <td>storeLocation</td>
</tr> <td>url</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//a[contains(text(), 'Documents')]</td> <tr>
<td></td> <td>echo</td>
</tr> <td>${url}</td>
<tr> <td></td>
<td>click</td> </tr>
<td>//a[contains(text(), 'Documents')]</td> <!-- Can't access pdf source inside iframe, so request page again -->
<td></td> <tr>
</tr> <td>storeEval</td>
<tr> <td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob"; xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>waitForTextPresent</td> <td>pdf_source</td>
<td>records</td> </tr>
<td></td> <!-- pause to let the ajax request finish. now if the table was a async, queue
</tr> that would be nice, 3/6/9000 not enough-->
<tr> <tr>
<td>type</td> <td>pause</td>
<td>name=listbox_reference</td> <td>12000</td>
<td>Template.Test.Release</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>goBackAndWait</td>
<td>name=listbox_version</td> <td></td>
<td>001</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>keyPressAndWait</td> <td>waitForPageToLoad</td>
<td>listbox_version</td> <td></td>
<td>\13</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>Template Test Release</td> <td>Web Pages</td>
<td></td> <td></td>
</tr> </tr>
<tr> </tal:block>
<td>clickAndWait</td> <tr>
<td>//a[contains(text(), 'Template.Test.Release')]</td> <td>click</td>
<td></td> <td>//a[contains(text(), 'ERP5')]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Short Title</td> <td>waitForElementPresent</td>
<td></td> <td>//a[contains(text(), 'Documents')]</td>
</tr> <td></td>
<!-- manual form submit --> </tr>
<tr> <tr>
<td>storeLocation</td> <td>click</td>
<td>url</td> <td>//a[contains(text(), 'Documents')]</td>
<td></td> <td></td>
</tr> </tr>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on <tr>
the iframe and a page-reload resets all (bad) parameters manually set --> <td>waitForTextPresent</td>
<tr> <td>records</td>
<td>storeEval</td> <td></td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_reference</td>
<td>storeEval</td> <td>Template.Test.Release</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td> </tr>
<td>pdf_dump</td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_version</td>
<td>echo</td> <td>001</td>
<td>${pdf_dump}</td> </tr>
<td></td> <tr>
</tr> <td>keyPressAndWait</td>
<tr> <td>listbox_version</td>
<td>verifyNotExpression</td> <td>\13</td>
<td>${pdf_dump}</td> </tr>
<td>null</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Template Test Release</td>
<td>storeEval</td> <td></td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Release-001-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td> </tr>
<td>promise</td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>//a[contains(text(), 'Template.Test.Release')]</td>
<td>storeEval</td> <td></td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Short Title</td>
<td>waitForElementPresent</td> <td></td>
<td>//div[@class="transition_message"]</td> </tr>
<td></td> <tal:block tal:condition="python: no_file_update == False">
</tr> <!-- manual form submit -->
<tr> <tr>
<td>waitForTextPresent</td> <td>storeLocation</td>
<td>Data updated.</td> <td>url</td>
<td></td> <td></td>
</tr> </tr>
<!-- generate image - template_test_release_input_page_0_001_en_bmp --> <!-- only handle pdf_source (a promise!) here, because it needs to be set on
<tr> the iframe and a page-reload resets all (bad) parameters manually set -->
<td>echo</td> <tr>
<td>update => template_test_release_input_page_0_001_en_bmp</td> <td>storeEval</td>
<td></td> <td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
</tr> <td></td>
<tr> </tr>
<td>storeEval</td> <tr>
<td>storedVars["url"].split("?")[0]</td> <td>storeEval</td>
<td>screenshot_url</td> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
</tr> <td>pdf_dump</td>
<tr> </tr>
<td>echo</td> <tr>
<td>${screenshot_url}</td> <td>echo</td>
<td></td> <td>${pdf_dump}</td>
</tr> <td></td>
<tr> </tr>
<td>open</td> <tr>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_release_input_page_0_001_en_bmp</td> <td>verifyNotExpression</td>
<td></td> <td>${pdf_dump}</td>
</tr> <td>null</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Screenshot updated.</td> <td>storeEval</td>
<td></td> <td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Release-001-en.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
</tr> <td>promise</td>
<!-- update 2nd pdf document - template_test_release_input_002_de_pdf --> </tr>
<tr> <tr>
<td>echo</td> <td>storeEval</td>
<td>update => template_test_release_input_002_de_pdf</td> <td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>open</td> <td>waitForElementPresent</td>
<td>${base_url}/web_page_module/</td> <td>//div[@class="transition_message"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>records</td> <td>Data updated.</td>
<td></td> <td></td>
</tr> </tr>
<tr> <!-- generate image - template_test_release_input_page_0_001_en_bmp -->
<td>type</td> <tr>
<td>name=listbox_reference</td> <td>echo</td>
<td>Template.Test.Release</td> <td>update => template_test_release_input_page_0_001_en_bmp</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_version</td> <td>storeEval</td>
<td>002</td> <td>storedVars["url"].split("?")[0]</td>
</tr> <td>screenshot_url</td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_version</td> <td>echo</td>
<td>\13</td> <td>${screenshot_url}</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template Test Release</td> <td>open</td>
<td></td> <td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_release_input_page_0_001_en_bmp</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <tr>
<td>//a[contains(text(), 'Template.Test.Release')]</td> <td>waitForTextPresent</td>
<td></td> <td>Screenshot updated.</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> </tal:block>
<td>Short Title</td> <!-- CASE 2 - template_test_release_input_002_de_pdf -->
<td></td> <tr>
</tr> <td>echo</td>
<tr> <td>CASE 2 => template_test_release_input_002_de_pdf</td>
<td>waitForElementPresent</td> <td></td>
<td>//button[@class="import_export"]</td> </tr>
<td></td> <tr>
</tr> <td>open</td>
<tr> <td>${base_url}/web_page_module/</td>
<td>click</td> <td></td>
<td>//button[@class="import_export"]</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>records</td>
<td>waitForTextPresent</td> <td></td>
<td>Export Slideshow</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_reference</td>
<td>selectAndWait</td> <td>Template.Test.Release</td>
<td>name=select_dialog</td> </tr>
<td>index=4</td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_version</td>
<td>waitForTextPresent</td> <td>002</td>
<td>Export Release</td> </tr>
<td></td> <tr>
</tr> <td>keyPressAndWait</td>
<tr> <td>listbox_version</td>
<td>select</td> <td>\13</td>
<td>name=field_format</td> </tr>
<td>index=1</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Template Test Release</td>
<td>type</td> <td></td>
<td>name=field_override_source_organisation_title</td> </tr>
<td>Test Association</td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Template.Test.Release')]</td>
<td>type</td> <td></td>
<td>name=field_override_source_person_title</td> </tr>
<td>Test Association Member</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Short Title</td>
<td>check</td> <td></td>
<td>name=field_display_about</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//button[@class="import_export"]</td>
<td>clickAndWait</td> <td></td>
<td>name=Base_callDialogMethod:method</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//button[@class="import_export"]</td>
<td>waitForPageToLoad</td> <td></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded --> <td>Export Slideshow</td>
<tr> <td></td>
<td>waitForTitle</td> </tr>
<td></td> <tr>
<td></td> <td>selectAndWait</td>
</tr> <td>name=select_dialog</td>
<tr> <td>index=4</td>
<td>verifyTitle</td> </tr>
<td></td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Export Release</td>
<!-- Store this location for re-requesting --> <td></td>
<tr> </tr>
<td>storeLocation</td> <tr>
<td>url</td> <td>select</td>
<td></td> <td>name=field_format</td>
</tr> <td>index=1</td>
<tr> </tr>
<td>echo</td> <tr>
<td>${url}</td> <td>type</td>
<td></td> <td>name=field_override_source_organisation_title</td>
</tr> <td>Test Association</td>
<!-- Can't fetch pdf source, so request page again --> </tr>
<tr> <tr>
<td>storeEval</td> <td>type</td>
<td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td> <td>name=field_override_source_person_title</td>
<td>pdf_source</td> <td>Test Association Member</td>
</tr> </tr>
<!-- pause to let the ajax request finish. now if the table was a async, queue <tr>
that would be nice, 3/6000 did not work--> <td>check</td>
<tr> <td>name=field_display_about</td>
<td>pause</td> <td></td>
<td>9000</td> </tr>
<td></td> <tal:block tal:condition="python: no_file_update == False">
</tr> <!--
<tr> PDF viewer has no document.title, wait for "" means pdf is loaded
<td>goBackAndWait</td> FIREFOX (51) will prompt to open PDF in new window = we're dead for now
<td></td> -->
<td></td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>name=Base_callDialogMethod:method</td>
<td>waitForPageToLoad</td> <td></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>waitForPageToLoad</td>
<tr> <td></td>
<td>waitForTextPresent</td> <td></td>
<td>Web Pages</td> </tr>
<td></td> <tr>
</tr> <td>waitForTitle</td>
<tr> <td></td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'ERP5')]</td> </tr>
<td></td> <tr>
</tr> <td>verifyTitle</td>
<tr> <td></td>
<td>waitForElementPresent</td> <td></td>
<td>//a[contains(text(), 'Documents')]</td> </tr>
<td></td> <tr>
</tr> <td>storeLocation</td>
<tr> <td>url</td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'Documents')]</td> </tr>
<td></td> <tr>
</tr> <td>echo</td>
<tr> <td>${url}</td>
<td>waitForTextPresent</td> <td></td>
<td>records</td> </tr>
<td></td> <!-- Can't fetch pdf source, so request page again -->
</tr> <tr>
<tr> <td>storeEval</td>
<td>type</td> <td>function ajax(url) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("GET", url, true); xhr.responseType = "blob", xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); xhr.send(); }, function() { xhr.abort(); }); }; ajax(storedVars["url"] + "&amp;batch_mode=True");</td>
<td>name=listbox_reference</td> <td>pdf_source</td>
<td>Template.Test.Release</td> </tr>
</tr> <!-- pause to let the ajax request finish. now if the table was a async, queue
<tr> that would be nice, 3/6000 did not work-->
<td>type</td> <tr>
<td>name=listbox_version</td> <td>pause</td>
<td>002</td> <td>9000</td>
</tr> <td></td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_version</td> <td>goBackAndWait</td>
<td>\13</td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template Test Release</td> <td>waitForPageToLoad</td>
<td></td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>clickAndWait</td> <tr>
<td>//a[contains(text(), 'Template.Test.Release')]</td> <td>waitForTextPresent</td>
<td></td> <td>Web Pages</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> </tal:block>
<td>Short Title</td> <tr>
<td></td> <td>click</td>
</tr> <td>//a[contains(text(), 'ERP5')]</td>
<!-- manual form submit --> <td></td>
<tr> </tr>
<td>storeLocation</td> <tr>
<td>url</td> <td>waitForElementPresent</td>
<td></td> <td>//a[contains(text(), 'Documents')]</td>
</tr> <td></td>
<!-- only handle pdf_source (a promise!) here, because it needs to be set on </tr>
the iframe and a page-reload resets all (bad) parameters manually set --> <tr>
<tr> <td>click</td>
<td>storeEval</td> <td>//a[contains(text(), 'Documents')]</td>
<td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>storeEval</td> <td>records</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td> <td></td>
<td>pdf_dump</td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>echo</td> <td>name=listbox_reference</td>
<td>${pdf_dump}</td> <td>Template.Test.Release</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>verifyNotExpression</td> <td>name=listbox_version</td>
<td>${pdf_dump}</td> <td>002</td>
<td>null</td> </tr>
</tr> <tr>
<tr> <td>keyPressAndWait</td>
<td>storeEval</td> <td>listbox_version</td>
<td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Release-002-de.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td> <td>\13</td>
<td>promise</td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>storeEval</td> <td>Template Test Release</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>clickAndWait</td>
<td>waitForElementPresent</td> <td>//a[contains(text(), 'Template.Test.Release')]</td>
<td>//div[@class="transition_message"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForTextPresent</td> <td>Short Title</td>
<td>Data updated.</td> <td></td>
<td></td> </tr>
</tr> <tal:block tal:condition="python: no_file_update == False">
<!-- generate image - template_test_release_input_page_0_002_de_bmp --> <!-- manual form submit -->
<tr> <tr>
<td>echo</td> <td>storeLocation</td>
<td>update => template_test_release_input_page_0_002_de_bmp</td> <td>url</td>
<td></td> <td></td>
</tr> </tr>
<tr> <!-- only handle pdf_source (a promise!) here, because it needs to be set on
<td>storeEval</td> the iframe and a page-reload resets all (bad) parameters manually set -->
<td>storedVars["url"].split("?")[0]</td> <tr>
<td>screenshot_url</td> <td>storeEval</td>
</tr> <td>storedVars["pdf_source"].then(function (evt) {document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter = new Blob([evt.target.response || evt.target.responseText], {"type": evt.target.getResponseHeader("Content-Type")});});</td>
<tr> <td></td>
<td>echo</td> </tr>
<td>${screenshot_url}</td> <tr>
<td></td> <td>storeEval</td>
</tr> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<tr> <td>pdf_dump</td>
<td>open</td> </tr>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_release_input_page_0_002_de_bmp</td> <tr>
<td></td> <td>echo</td>
</tr> <td>${pdf_dump}</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Screenshot updated.</td> <tr>
<td></td> <td>verifyNotExpression</td>
</tr> <td>${pdf_dump}</td>
<!-- make sure print exchange works --> <td>null</td>
<tr> </tr>
<td>echo</td> <tr>
<td>action => print</td> <td>storeEval</td>
<td></td> <td>function ajax(url, param) { var xhr = new XMLHttpRequest(); return new Promise(function(resolve, reject) { var k; xhr.open("POST", url, true); xhr.responseType = param.dataType || ""; if (typeof param.headers === 'object' &amp;&amp; param.headers !== null) { for (k in param.headers) { if (param.headers.hasOwnProperty(k)) { xhr.setRequestHeader(k, param.headers[k]); } } } xhr.addEventListener("load", function(e) { if (e.target.status >= 400) { return reject(e); } resolve(e); }); xhr.addEventListener("error", reject); if (typeof param.xhrFields === 'object' &amp;&amp; param.xhrFields !== null) { for (k in param.xhrFields) { if (param.xhrFields.hasOwnProperty(k)) { xhr[k] = param.xhrFields[k]; } } } xhr.send(param.data); }, function() { xhr.abort(); }); } var form_data = new FormData(); form_data.append("field_my_file", storedVars["pdf_dump"], "Template.Test.Release-002-de.pdf"); form_data.append("form_id", "File_view"); x = ajax(storedVars["url"].split("?")[0] + "/Base_edit", {"xhrFields": {"with_credentials": true}, "data": form_data});</td>
</tr> <td>promise</td>
<tr> </tr>
<td>open</td> <tr>
<td>${base_url}/web_page_module/</td> <td>storeEval</td>
<td></td> <td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>records</td> <td>waitForElementPresent</td>
<td></td> <td>//div[@class="transition_message"]</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_reference</td> <td>waitForTextPresent</td>
<td>Template.Test.Release</td> <td>Data updated.</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <!-- generate image - template_test_release_input_page_0_002_de_bmp -->
<td>name=listbox_version</td> <tr>
<td>001</td> <td>echo</td>
</tr> <td>update => template_test_release_input_page_0_002_de_bmp</td>
<tr> <td></td>
<td>keyPressAndWait</td> </tr>
<td>listbox_version</td> <tr>
<td>\13</td> <td>storeEval</td>
</tr> <td>storedVars["url"].split("?")[0]</td>
<tr> <td>screenshot_url</td>
<td>waitForTextPresent</td> </tr>
<td>Template Test Release</td> <tr>
<td></td> <td>echo</td>
</tr> <td>${screenshot_url}</td>
<tr> <td></td>
<td>click</td> </tr>
<td>//a[contains(text(), 'Template.Test.Release')]</td> <tr>
<td></td> <td>open</td>
</tr> <td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_release_input_page_0_002_de_bmp</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Short Title</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Screenshot updated.</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//button[@class="print"]</td> </tal:block>
<td></td> <!-- make sure print exchange works -->
</tr> <tr>
<tr> <td>echo</td>
<td>click</td> <td>ACTION => PRINT</td>
<td>//button[@class="print"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>open</td>
<td>waitForTextPresent</td> <td>${base_url}/web_page_module/</td>
<td>Print As Slideshow</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>selectAndWait</td> <td>records</td>
<td>name=select_dialog</td> <td></td>
<td>index=4</td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>waitForTextPresent</td> <td>name=listbox_reference</td>
<td>Display Automatic About</td> <td>Template.Test.Release</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>clickAndWait</td> <td>name=listbox_version</td>
<td>name=Base_showUpdateDialog:method</td> <td>001</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>keyPressAndWait</td>
<td>waitForElementPresent</td> <td>listbox_version</td>
<td>//div[@class="transition_message"]</td> <td>\13</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForTextPresent</td> <td>Template Test Release</td>
<td>Preview updated.</td> <td></td>
<td></td> </tr>
</tr> <tr>
</tbody></table> <td>click</td>
<td>//a[contains(text(), 'Template.Test.Release')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class="print"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="print"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Print As Slideshow</td>
<td></td>
</tr>
<tr>
<td>selectAndWait</td>
<td>name=select_dialog</td>
<td>index=4</td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Display Automatic About</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Preview updated.</td>
<td></td>
</tr>
</tal:block>
</tbody>
</table>
</body> </body>
</html> </html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Support Request" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>destination_section/organisation_module/template_test_organisation</string>
<string>destination_decision/person_module/template_test_recipient</string>
<string>source_decision/person_module/template_test_sender</string>
<string>source_trade/person_module/template_test_no_member</string>
</tuple>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>Template.Test.Support.Request</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Test support requests for sending templates.</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>template_test_support_request_001</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Support Request</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Template Test Support Request</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<section>
<table>
<thead>
<tr>
<th colspan="4">签收单</th>
</tr>
<tr>
<th>姓名</th>
<th>职位<br />
公司</th>
<th>签名</th>
<th>日期</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>John Doe</strong></td>
<td>总经理, 讯空间大数据科技</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><b>Jane Donaghue</b></td>
<td>销售副总裁</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><strong>Foo Man Chu</strong></td>
<td>CEO, Kontrabass</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</section>
<section>
<table>
<thead>
<tr>
<th>分发列表</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<ul>
<li>
<p>John Doe</p>
<p>CEO, 讯空间大数据科技</p>
</li>
<li>
<p>Jane Donaghue</p>
</li>
</ul>
<ul>
<li>
<p>Foo Man Chu</p>
<p>CEO, Kontrabass</p>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</section>
<section>
<table>
<thead>
<tr>
<th colspan="4">版本列表</th>
</tr>
<tr>
<th>版本</th>
<th>日期</th>
<th>页数</th>
<th>编辑描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>001</td>
<td>2018-5-15</td>
<td>全页</td>
<td>创建内容</td>
</tr>
<tr>
<td>002</td>
<td>2018-5-28</td>
<td>附录四</td>
<td>添加附录四</td>
</tr>
<tr>
<td>003</td>
<td>2018-6-1</td>
<td>全页</td>
<td>修改和完善</td>
</tr>
</tbody>
</table>
</section>
${WebPage_insertTableOfReferences}
<h1>Synthese</h1> <h1>Synthese</h1>
<p>This document is a high level overview measures taken by Foo for Bar project. </p> <p>This document is a high level overview measures taken by Foo for Bar project. </p>
<p> <p>
...@@ -98,7 +202,7 @@ which should not be touched. ...@@ -98,7 +202,7 @@ which should not be touched.
<td>123</td> <td>123</td>
<td>456</td> <td>456</td>
<td>Some text</td> <td>Some text</td>
<td>More description</td> <td style="text-align: center">More description</td>
</tr> </tr>
</tbody> </tbody>
<caption>Table description</caption> <caption>Table description</caption>
......
...@@ -93,7 +93,111 @@ ...@@ -93,7 +93,111 @@
<section class="ci-book-table-of-content"><p class="ci-book-toc-faux-h1">Table of Contents</p><ol><li><div><a href="#synthese_anchor">Synthese</div></a><ol><li><div><a href="#risks-and-measures_anchor">Risks and measures</div></a><ol><li><div><a href="#risk-of-casualties-if-device-does-not-stop-and-destroys-itself_anchor">Risk of casualties if device does not stop and destroys itself</div></a></li><li><div><a href="#risk-of-killing-birds-and-polluting-the-environment_anchor">Risk of killing birds and polluting the environment</div></a></li><li><div><a href="#noise-and-vibration-levels_anchor">Noise and vibration levels</div></a></li></ol></li></ol><li><div><a href="#reports_anchor">Reports</div></a><ol><li><div><a href="#project-reports_anchor">Project Reports</div></a></li><li><div><a href="#sale-order-reports_anchor">Sale Order Reports</div></a></ol></ol></section> <section class="ci-book-table-of-content"><p class="ci-book-toc-faux-h1">Table of Contents</p><ol><li><div><a href="#synthese_anchor">Synthese</div></a><ol><li><div><a href="#risks-and-measures_anchor">Risks and measures</div></a><ol><li><div><a href="#risk-of-casualties-if-device-does-not-stop-and-destroys-itself_anchor">Risk of casualties if device does not stop and destroys itself</div></a></li><li><div><a href="#risk-of-killing-birds-and-polluting-the-environment_anchor">Risk of killing birds and polluting the environment</div></a></li><li><div><a href="#noise-and-vibration-levels_anchor">Noise and vibration levels</div></a></li></ol></li></ol><li><div><a href="#reports_anchor">Reports</div></a><ol><li><div><a href="#project-reports_anchor">Project Reports</div></a></li><li><div><a href="#sale-order-reports_anchor">Sale Order Reports</div></a></ol></ol></section>
<h1><a name="synthese_anchor"></a>Synthese<a class="custom-para" href=Template.Test.Book#synthese><span style="font-size:.75em;line-height:1em;padding-left:.5em;">&para;</span></a></h1> <section>
<table>
<thead>
<tr>
<th colspan="4">签收单</th>
</tr>
<tr>
<th>姓名</th>
<th>职位<br />
公司</th>
<th>签名</th>
<th>日期</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>John Doe</strong></td>
<td>总经理, 讯空间大数据科技</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><b>Jane Donaghue</b></td>
<td>销售副总裁</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><strong>Foo Man Chu</strong></td>
<td>CEO, Kontrabass</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</section>
<section>
<table>
<thead>
<tr>
<th>分发列表</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<ul>
<li>
<p>John Doe</p>
<p>CEO, 讯空间大数据科技</p>
</li>
<li>
<p>Jane Donaghue</p>
</li>
</ul>
<ul>
<li>
<p>Foo Man Chu</p>
<p>CEO, Kontrabass</p>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</section>
<section>
<table>
<thead>
<tr>
<th colspan="4">版本列表</th>
</tr>
<tr>
<th>版本</th>
<th>日期</th>
<th>页数</th>
<th>编辑描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>001</td>
<td>2018-5-15</td>
<td>全页</td>
<td>创建内容</td>
</tr>
<tr>
<td>002</td>
<td>2018-5-28</td>
<td>附录四</td>
<td>添加附录四</td>
</tr>
<tr>
<td>003</td>
<td>2018-6-1</td>
<td>全页</td>
<td>修改和完善</td>
</tr>
</tbody>
</table>
</section>
<h1><a name="synthese_anchor"></a>Synthese<a class="custom-para" href=Template.Test.Book#synthese><span style="font-size:.75em;line-height:1em;padding-left:.5em;">&para;</span></a></h1>
<p>This document is a high level overview measures taken by Foo for Bar project. </p> <p>This document is a high level overview measures taken by Foo for Bar project. </p>
<p> <p>
The purpose of this document is to show possible dangers and measures being The purpose of this document is to show possible dangers and measures being
...@@ -193,7 +297,7 @@ which should not be touched. ...@@ -193,7 +297,7 @@ which should not be touched.
<td>123</td> <td>123</td>
<td>456</td> <td>456</td>
<td>Some text</td> <td>Some text</td>
<td>More description</td> <td style="text-align: center">More description</td>
</tr> </tr>
</tbody> </tbody>
<caption>Table description</caption> <caption>Table description</caption>
......
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
<td width="15%">001</td> <td width="15%">001</td>
<td width="20%">20xx-xx-xx</td> <td width="20%">20xx-xx-xx</td>
<td width="15%">All</td> <td width="15%">All</td>
<td width="55%" style="text-align: left">Added example content, corrections.</td> <td width="55%" style="text-align: right">Added example content, corrections.</td>
</tr> </tr>
</tbody> </tbody>
...@@ -176,7 +176,109 @@ ...@@ -176,7 +176,109 @@
<section class="ci-book-table-of-content"><p class="ci-book-toc-faux-h1">Table of Contents</p><ol><li><div><a href="#introduction_anchor">Introduction</div></a><ol><li><div><a href="#references_anchor">References</div></a><ol><li><div><a href="#applicable-documents_anchor">Applicable Documents</div></a></li><li><div><a href="#referenced-documents_anchor">Referenced Documents</div></a></li></ol><li><div><a href="#abbreviations_anchor">Abbreviations</div></a></li><li><div><a href="#figures_anchor">Figures</div></a></li><li><div><a href="#tables_anchor">Tables</div></a></li></ol><li><div><a href="#synthese_anchor">Synthese</div></a><ol><li><div><a href="#risks-and-measures_anchor">Risks and measures</div></a><ol><li><div><a href="#risk-of-casualties-if-device-does-not-stop-and-destroys-itself_anchor">Risk of casualties if device does not stop and destroys itself</div></a></li><li><div><a href="#risk-of-killing-birds-and-polluting-the-environment_anchor">Risk of killing birds and polluting the environment</div></a></li><li><div><a href="#noise-and-vibration-levels_anchor">Noise and vibration levels</div></a></li></ol></li></ol><li><div><a href="#header-embedded-document_anchor">Header Embedded Document</div></a><ol><li><div><a href="#header-embedded-document-content-examples_anchor">Header Embedded Document content Examples</div></a></li></ol><li><div><a href="#reports_anchor">Reports</div></a><ol><li><div><a href="#project-reports_anchor">Project Reports</div></a></li><li><div><a href="#sale-order-reports_anchor">Sale Order Reports</div></a></ol></ol></section> <section class="ci-book-table-of-content"><p class="ci-book-toc-faux-h1">Table of Contents</p><ol><li><div><a href="#introduction_anchor">Introduction</div></a><ol><li><div><a href="#references_anchor">References</div></a><ol><li><div><a href="#applicable-documents_anchor">Applicable Documents</div></a></li><li><div><a href="#referenced-documents_anchor">Referenced Documents</div></a></li></ol><li><div><a href="#abbreviations_anchor">Abbreviations</div></a></li><li><div><a href="#figures_anchor">Figures</div></a></li><li><div><a href="#tables_anchor">Tables</div></a></li></ol><li><div><a href="#synthese_anchor">Synthese</div></a><ol><li><div><a href="#risks-and-measures_anchor">Risks and measures</div></a><ol><li><div><a href="#risk-of-casualties-if-device-does-not-stop-and-destroys-itself_anchor">Risk of casualties if device does not stop and destroys itself</div></a></li><li><div><a href="#risk-of-killing-birds-and-polluting-the-environment_anchor">Risk of killing birds and polluting the environment</div></a></li><li><div><a href="#noise-and-vibration-levels_anchor">Noise and vibration levels</div></a></li></ol></li></ol><li><div><a href="#header-embedded-document_anchor">Header Embedded Document</div></a><ol><li><div><a href="#header-embedded-document-content-examples_anchor">Header Embedded Document content Examples</div></a></li></ol><li><div><a href="#reports_anchor">Reports</div></a><ol><li><div><a href="#project-reports_anchor">Project Reports</div></a></li><li><div><a href="#sale-order-reports_anchor">Sale Order Reports</div></a></ol></ol></section>
<h1><a name="introduction_anchor"></a>Introduction<a class="custom-para" href=P-XYZ-Foobar#introduction><span style="font-size:.75em;line-height:1em;padding-left:.5em;">&para;</span></a></h1> <section>
<table>
<thead>
<tr>
<th colspan="4">签收单</th>
</tr>
<tr>
<th>姓名</th>
<th>职位<br />
公司</th>
<th>签名</th>
<th>日期</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>John Doe</strong></td>
<td>总经理, 讯空间大数据科技</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><b>Jane Donaghue</b></td>
<td>销售副总裁</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td><strong>Foo Man Chu</strong></td>
<td>CEO, Kontrabass</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</section>
<section>
<table>
<thead>
<tr>
<th>分发列表</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<ul>
<li>
<p>John Doe</p>
<p>CEO, 讯空间大数据科技</p>
</li>
<li>
<p>Jane Donaghue</p>
</li>
</ul>
<ul>
<li>
<p>Foo Man Chu</p>
<p>CEO, Kontrabass</p>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</section>
<section>
<table>
<thead>
<tr>
<th colspan="4">版本列表</th>
</tr>
<tr>
<th>版本</th>
<th>日期</th>
<th>页数</th>
<th>编辑描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>001</td>
<td>2018-5-15</td>
<td>全页</td>
<td>创建内容</td>
</tr>
<tr>
<td>002</td>
<td>2018-5-28</td>
<td>附录四</td>
<td>添加附录四</td>
</tr>
<tr>
<td>003</td>
<td>2018-6-1</td>
<td>全页</td>
<td>修改和完善</td>
</tr>
</tbody>
</table>
</section><h1><a name="introduction_anchor"></a>Introduction<a class="custom-para" href=P-XYZ-Foobar#introduction><span style="font-size:.75em;line-height:1em;padding-left:.5em;">&para;</span></a></h1>
<h2><a name="references_anchor"></a>References<a class="custom-para" href=P-XYZ-Foobar#references><span style="font-size:.75em;line-height:1em;padding-left:.5em;">&para;</span></a></h2> <h2><a name="references_anchor"></a>References<a class="custom-para" href=P-XYZ-Foobar#references><span style="font-size:.75em;line-height:1em;padding-left:.5em;">&para;</span></a></h2>
<p>This section provides the list of applicable documents and references.</p> <p>This section provides the list of applicable documents and references.</p>
<h3><a name="applicable-documents_anchor"></a>Applicable Documents<a class="custom-para" href=P-XYZ-Foobar#applicable-documents><span style="font-size:.75em;line-height:1em;padding-left:.5em;">&para;</span></a></h3> <h3><a name="applicable-documents_anchor"></a>Applicable Documents<a class="custom-para" href=P-XYZ-Foobar#applicable-documents><span style="font-size:.75em;line-height:1em;padding-left:.5em;">&para;</span></a></h3>
...@@ -327,7 +429,9 @@ ...@@ -327,7 +429,9 @@
</tbody> </tbody>
</table><h1><a name="synthese_anchor"></a>Synthese<a class="custom-para" href=P-XYZ-Foobar#synthese><span style="font-size:.75em;line-height:1em;padding-left:.5em;">&para;</span></a></h1> </table>
<h1><a name="synthese_anchor"></a>Synthese<a class="custom-para" href=P-XYZ-Foobar#synthese><span style="font-size:.75em;line-height:1em;padding-left:.5em;">&para;</span></a></h1>
<p>This document is a high level overview measures taken by Foo for Bar project. </p> <p>This document is a high level overview measures taken by Foo for Bar project. </p>
<p> <p>
The purpose of this document is to show possible dangers and measures being The purpose of this document is to show possible dangers and measures being
...@@ -432,7 +536,7 @@ which should not be touched. ...@@ -432,7 +536,7 @@ which should not be touched.
<td>123</td> <td>123</td>
<td>456</td> <td>456</td>
<td>Some text</td> <td>Some text</td>
<td>More description</td> <td style="text-align: center">More description</td>
</tr> </tr>
</tbody> </tbody>
<a href="#TBL-1"></a><caption>TBL-1 - Table description</caption> <a href="#TBL-1"></a><caption>TBL-1 - Table description</caption>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>50.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_corporate_identity_test</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
================================================================================
Set preference for template test to textarea
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# make sure cloudooo is set for pdf conversions on system_preference
conversion_server_url_list = context.portal_preferences.getPreferredDocumentConversionServerUrlList() or ["https://cloudooo.erp5.net"]
system_preference = context.portal_preferences.default_system_preference
system_preference.setPreferredDocumentConversionServerUrlList(conversion_server_url_list)
return "Conversion Server Url set."
<?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>id</string> </key>
<value> <string>Zuite_setConversionServerUrl</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
================================================================================
Set preference for template test to textarea
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# force text_area editor
context.Zuite_setPreference('')
preference = context.portal_preferences.erp5_ui_test_preference
preference.setPreferredTextEditor('text_area')
return "Editor set to Textarea."
<?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>id</string> </key>
<value> <string>Zuite_setPreferredTextEditor</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
================================================================================
Add this script to custom skin selection to update test comparison files
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
return True
<?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>id</string> </key>
<value> <string>xxxZuite_setSkipSave</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2017 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2002-2018 Nexedi SA and Contributors. All Rights Reserved.
# #
# WARNING: This program as such is intended to be used by professional # WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential # programmers who take the whole responsibility of assessing all potential
...@@ -212,7 +212,7 @@ class TestCorporateIdentityTemplateList(ERP5TypeTestCase): ...@@ -212,7 +212,7 @@ class TestCorporateIdentityTemplateList(ERP5TypeTestCase):
if dump: if dump:
expected_page.edit(text_content=html) expected_page.edit(text_content=html)
self.tic() self.tic()
self.assertEquals(html, expected_page.getData()) self.assertEquals(html.encode('UTF-8'), expected_page.getData())
def runPdfTestPattern(self, id1, id2, id3, **kw): def runPdfTestPattern(self, id1, id2, id3, **kw):
""" """
......
##############################################################################
#
# 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 TestFunctionalCorporateIdentityTemplateList(ERP5TypeFunctionalTestCase):
foreground = 0
run_only = "template_test_zuite"
def getBusinessTemplateList(self):
return (
'erp5_corporate_identity',
'erp5_corporate_identity_test',
'erp5_ui_test_core',
'erp5_ui_test',
)
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestFunctionalCorporateIdentityTemplateList))
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>testFunctionalCorporateIdentityTemplateList</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Tests for the corporate identity templates classic user interface.</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>test.erp5.testFunctionalCorporateIdentityTemplateList</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.patches.WorkflowTool"/>
</pickle>
<pickle>
<tuple>
<none/>
<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>
</tuple>
</pickle>
</record>
</ZopeData>
erp5_corporate_identity
erp5_ui_test_core erp5_ui_test_core
erp5_ui_test erp5_ui_test
erp5_test_result \ No newline at end of file
erp5_full_text_mroonga_catalog
erp5_corporate_identity
\ No newline at end of file
Test and output files used for portal component tests of erp5_corporate_identity Test and output files used for portal component tests of erp5_corporate_identity. Tests.
\ No newline at end of file \ No newline at end of file
...@@ -7,4 +7,5 @@ person_module/template_test* ...@@ -7,4 +7,5 @@ person_module/template_test*
person_module/template_test*/default** person_module/template_test*/default**
web_page_module/template_test_* web_page_module/template_test_*
portal_tests/template_test_zuite portal_tests/template_test_zuite
portal_tests/template_test_zuite/testAndUpdateTest* portal_tests/template_test_zuite/testAndUpdateTest*
\ No newline at end of file support_request_module/template_test_*
\ No newline at end of file
...@@ -9,4 +9,5 @@ portal_categories/function/company ...@@ -9,4 +9,5 @@ portal_categories/function/company
portal_categories/function/company/executive portal_categories/function/company/executive
portal_tests/template_test_zuite portal_tests/template_test_zuite
portal_tests/template_test_zuite/testAndUpdateTest* portal_tests/template_test_zuite/testAndUpdateTest*
support_request_module/template_test_*
web_page_module/template_test_* web_page_module/template_test_*
\ No newline at end of file
erp5_corporate_identity_test
\ No newline at end of file
test.erp5.testCorporateIdentityTemplateList test.erp5.testCorporateIdentityTemplateList
\ No newline at end of file test.erp5.testFunctionalCorporateIdentityTemplateList
\ No newline at end of file
erp5_full_text_mroonga_catalog
\ 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