Commit 19792691 authored by Sven Franck's avatar Sven Franck

erp5_corporate_identity_test: add UI tests

parent 490af3ba
...@@ -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>
......
...@@ -26,1838 +26,1895 @@ http://seleniummaster.com/sitecontent/index.php/introduction-to-selenium-automat ...@@ -26,1838 +26,1895 @@ http://seleniummaster.com/sitecontent/index.php/introduction-to-selenium-automat
<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 RenderJS 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 else False">
<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_setupTemplateTest</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Ok</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td tal:content="python: ''.join(['skipping save: ', str(no_file_update)])"></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> <!-- store location 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>
<!-- 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>001</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 2: - template_test_book_output_expected_002_en_html -->
<td></td> <tr>
</tr> <td>echo</td>
<tr> <td>CASE 2 => template_test_lealflet_book_expected_002_en_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>001</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> <!-- don't save once to set modification date for live tests, because this
<td></td> will up revision and it's the second time this document is used, so
</tr> revision on prior tests using this web page will be off by 1
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForElementPresent</td>
<td>Web Pages</td> <td>//button[@class="save"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>verifyElementPresent</td>
<td>//a[contains(text(), 'Web Pages')]</td> <td>//button[@class="save"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>clickAndWait</td>
<td>records</td> <td>//button[@class="save"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>waitForElementPresent</td>
<td>name=listbox_reference</td> <td>//div[@class="transition_message"]</td>
<td>%Template% AND %Output% AND %Book%</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>assertTextPresent</td>
<td>name=listbox_version</td> <td>Data updated.</td>
<td>001</td> <td></td>
</tr> </tr>
<tr> -->
<td>keyPressAndWait</td> <tr>
<td>listbox_reference</td> <td>waitForElementPresent</td>
<td>\13</td> <td>//button[@class="import_export"]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template.Test.Book.Expected.Output.Sample</td> <td>click</td>
<td></td> <td>//button[@class="import_export"]</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <tr>
<td>//a[contains(text(), 'Template.Test.Book.Expected.Output.Sample')]</td> <td>waitForTextPresent</td>
<td></td> <td>Export Slideshow</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Short Title</td> <td>selectAndWait</td>
<td></td> <td>name=select_dialog</td>
</tr> <td>index=3</td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//a/span[contains(text(), 'Edit')]</td> <td>waitForTextPresent</td>
<td></td> <td>Export Book</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <!-- Base_callDialogMethod max 2000 chars for url_params_string fails here -->
<td>//a/span[contains(text(), 'Edit')]</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=field_override_logo_reference</td>
<tr> <td>Template.Test.Image.Erp5.Logo</td>
<td>waitForElementPresent</td> </tr>
<td>//textarea[@name="field_my_text_content"]</td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>name=Base_showUpdateDialog:method</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>waitForElementPresent</td>
</tr> <td>//div[@class="transition_message"]</td>
<tr> <td></td>
<td>storeEval</td> </tr>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td> <tr>
<td>dump</td> <td>waitForTextPresent</td>
</tr> <td>Preview updated.</td>
<tr> <td></td>
<td>type</td> </tr>
<td>//textarea[@name="field_my_text_content"]</td> <tr>
<td>${dump}</td> <td>check</td>
</tr> <td>name=field_include_history_table</td>
<tr> <td></td>
<td>verifyElementPresent</td> </tr>
<td>//button[@class="save"]</td> <tr>
<td></td> <td>check</td>
</tr> <td>name=field_include_content_table</td>
<tr> <td></td>
<td>clickAndWait</td> </tr>
<td>//button[@class="save"]</td> <tr>
<td></td> <td>check</td>
</tr> <td>name=field_include_reference_table</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//div[@class="transition_message"]</td> <tr>
<td></td> <td>check</td>
</tr> <td>name=field_include_linked_content</td>
<tr> <td></td>
<td>assertTextPresent</td> </tr>
<td>Data updated.</td> <tr>
<td></td> <td>check</td>
</tr> <td>name=field_include_report_content</td>
<!-- update 2nd output - template_test_book_output_expected_002_en_html --> <td></td>
<tr> </tr>
<td>echo</td> <tr>
<td>update => template_test_lealflet_book_expected_002_en_html</td> <td>type</td>
<td></td> <td>name=field_override_document_description</td>
</tr> <td>foobar</td>
<tr> </tr>
<td>verifyTextPresent</td> <tr>
<td>Web Pages</td> <td>type</td>
<td></td> <td>name=field_override_document_title</td>
</tr> <td>Couscous</td>
<tr> </tr>
<td>click</td> <tr>
<td>//a[contains(text(), 'Web Pages')]</td> <td>type</td>
<td></td> <td>name=field_override_document_short_title</td>
</tr> <td>Cous</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>records</td> <td>type</td>
<td></td> <td>name=field_override_document_reference</td>
</tr> <td>P-XYZ-Foobar</td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_reference</td> <td>type</td>
<td>Template.Test.Book</td> <td>name=field_override_source_organisation_title</td>
</tr> <td>Test Organisation</td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_version</td> <td>type</td>
<td>001</td> <td>name=field_override_source_person_title</td>
</tr> <td>Test Sender</td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_version</td> <td>type</td>
<td>\13</td> <td>name=field_override_document_version</td>
</tr> <td>333</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template Test Book</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(), 'Template.Test.Book')]</td> <td>waitForElementNotPresent</td>
<td></td> <td>name=Base_callDialogMethod:method</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Short Title</td> <td>waitForPageToLoad</td>
<td></td> <td></td>
</tr> <td></td>
<!-- don't save once to set modification date for live tests, because this </tr>
will up revision and it's the second time this document is used, so <tr>
revision on prior tests using this web page will be off by 1 <td>waitForTextPresent</td>
<tr> <td>ISO 16016</td>
<td>waitForElementPresent</td> <td></td>
<td>//button[@class="save"]</td> </tr>
<td></td> <tal:block tal:condition="python: no_file_update == False">
</tr> <!-- store URL for rerequesting -->
<tr> <tr>
<td>verifyElementPresent</td> <td>storeLocation</td>
<td>//button[@class="save"]</td> <td>url</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>echo</td>
<td>//button[@class="save"]</td> <td>${url}</td>
<td></td> <td></td>
</tr> </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>002</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> <!-- CASE 3: template_test_book_output_expected_003_de_html -->
<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>echo</td>
<td>pdf_source</td> <td>CASE 3 => template_test_book_output_expected_003_de_html</td>
</tr> <td></td>
<!-- pause to let the ajax request finish. now if the table was a async, queue </tr>
that would be nice--> <tr>
<tr> <td>verifyTextPresent</td>
<td>pause</td> <td>Web Pages</td>
<td>3000</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>goBackAndWait</td> <td>//a[contains(text(), 'Web Pages')]</td>
<td></td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForPageToLoad</td> <td>records</td>
<td></td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>waitForTextPresent</td> <td>name=listbox_reference</td>
<td>Web Pages</td> <td>Template.Test.Book</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>click</td> <td>name=listbox_version</td>
<td>//a[contains(text(), 'ERP5')]</td> <td>002</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>keyPressAndWait</td>
<td>waitForElementPresent</td> <td>listbox_version</td>
<td>//a[contains(text(), 'Documents')]</td> <td>\13</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>click</td> <td>Template Test Book</td>
<td>//a[contains(text(), 'Documents')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>waitForTextPresent</td> <td>//a[contains(text(), 'Template.Test.Book')]</td>
<td>records</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>type</td> <td>Short Title</td>
<td>name=listbox_reference</td> <td></td>
<td>Template.Test.Book</td> </tr>
</tr> <!-- Save once to set modification date for live tests -->
<tr> <tr>
<td>type</td> <td>waitForElementPresent</td>
<td>name=listbox_version</td> <td>//button[@class="save"]</td>
<td>001</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>keyPressAndWait</td> <td>verifyElementPresent</td>
<td>listbox_version</td> <td>//button[@class="save"]</td>
<td>\13</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>clickAndWait</td>
<td>Template Test Book</td> <td>//button[@class="save"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>waitForElementPresent</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td> <td>//div[@class="transition_message"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>assertTextPresent</td>
<td>Short Title</td> <td>Data updated.</td>
<td></td> <td></td>
</tr> </tr>
<!-- manual form submit --> <tr>
<tr> <td>waitForElementPresent</td>
<td>storeLocation</td> <td>//button[@class="import_export"]</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>click</td>
the iframe and a page-reload resets all (bad) parameters manually set --> <td>//button[@class="import_export"]</td>
<tr> <td></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>waitForTextPresent</td>
</tr> <td>Export Slideshow</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>selectAndWait</td>
</tr> <td>name=select_dialog</td>
<tr> <td>index=3</td>
<td>echo</td> </tr>
<td>${pdf_dump}</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Export Book</td>
<tr> <td></td>
<td>verifyNotExpression</td> </tr>
<td>${pdf_dump}</td> <tr>
<td>null</td> <td>clickAndWait</td>
</tr> <td>name=Base_showUpdateDialog:method</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>clickAndWait</td>
</tr> <td>name=Base_showUpdateDialog:method</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>waitForElementPresent</td>
</tr> <td>//div[@class="transition_message"]</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//div[@class="transition_message"]</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Preview updated.</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Data updated.</td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>name=Base_callDialogMethod:method</td>
<!-- generate image - template_test_book_input_page_4_001_en_bmp --> <td></td>
<tr> </tr>
<td>echo</td> <tr>
<td>update => template_test_book_input_page_4_001_en_bmp</td> <td>waitForPageToLoad</td>
<td></td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>storeEval</td> <tr>
<td>storedVars["url"].split("?")[0]</td> <td>waitForElementNotPresent</td>
<td>screenshot_url</td> <td>name=Base_callDialogMethod:method</td>
</tr> <td></td>
<tr> </tr>
<td>echo</td> <tr>
<td>${screenshot_url}</td> <td>waitForTextPresent</td>
<td></td> <td>ISO 16016</td>
</tr> <td></td>
<tr> </tr>
<td>open</td> <tal:block tal:condition="python: no_file_update == False">
<td>${screenshot_url}/Document_createScreenshot?frame=4&amp;doc_id=template_test_book_input_page_4_001_en_bmp</td>
<td></td> <!-- store url for re-requesting -->
</tr> <tr>
<tr> <td>storeLocation</td>
<td>waitForTextPresent</td> <td>url</td>
<td>Screenshot updated.</td> <td></td>
<td></td> </tr>
</tr> <tr>
<!-- update 2nd pdf document - template_test_book_input_002_en_pdf --> <td>echo</td>
<tr> <td>${url}</td>
<td>echo</td> <td></td>
<td>update => template_test_book_input_002_en_pdf</td> </tr>
<td></td>
</tr> <!-- Can't fetch iframe source, so request page again -->
<tr> <tr>
<td>open</td> <td>storeEval</td>
<td>${base_url}/web_page_module/</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>waitForTextPresent</td> <tr>
<td>records</td> <td>goBackAndWait</td>
<td></td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_reference</td> <td>waitForPageToLoad</td>
<td>Template.Test.Book</td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_version</td> <td>waitForTextPresent</td>
<td>001</td> <td>Web Pages</td>
</tr> <td></td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_version</td> <td>click</td>
<td>\13</td> <td>//a[contains(text(), 'Web Pages')]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template Test Book</td> <td>waitForTextPresent</td>
<td></td> <td>records</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <tr>
<td>//a[contains(text(), '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>waitForTextPresent</td> <tr>
<td>Short Title</td> <td>type</td>
<td></td> <td>name=listbox_version</td>
</tr> <td>003</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>select</td> <tr>
<td>name=field_format</td> <td>click</td>
<td>index=1</td> <td>//a/span[contains(text(), 'Edit')]</td>
</tr> <td></td>
<tr> </tr>
<td>check</td> <tr>
<td>name=field_include_history_table</td> <td>waitForElementPresent</td>
<td></td> <td>//div[@class="input"]/div/textarea</td>
</tr> <td></td>
<tr> </tr>
<td>check</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>check</td> </tr>
<td>name=field_include_reference_table</td> <tr>
<td></td> <td>storeEval</td>
</tr> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<tr> <td>dump</td>
<td>check</td> </tr>
<td>name=field_include_linked_content</td> <tr>
<td></td> <td>type</td>
</tr> <td>//div[@class="input"]/div/textarea</td>
<tr> <td>${dump}</td>
<td>check</td> </tr>
<td>name=field_include_report_content</td> </tal:block>
<td></td> <tr>
</tr> <td>verifyElementPresent</td>
<tr> <td>//button[@class="save"]</td>
<td>type</td> <td></td>
<td>name=field_override_document_description</td> </tr>
<td>foobar</td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>//button[@class="save"]</td>
<td>type</td> <td></td>
<td>name=field_override_document_title</td> </tr>
<td>Couscous</td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//div[@class="transition_message"]</td>
<td>type</td> <td></td>
<td>name=field_override_document_short_title</td> </tr>
<td>Cous</td> <tr>
</tr> <td>assertTextPresent</td>
<tr> <td>Data updated.</td>
<td>type</td> <td></td>
<td>name=field_override_document_reference</td> </tr>
<td>P-XYZ-Foobar</td>
</tr> <!-- CASE 1 (pdf) - template_test_book_input_001_en_pdf -->
<tr> <tr>
<td>type</td> <td>echo</td>
<td>name=field_override_logo_reference</td> <td>CASE 1 (pdf) => template_test_book_input_001_en_pdf</td>
<td>Template.Test.Image.Erp5.Logo</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>open</td>
<td>name=field_override_source_organisation_title</td> <td>${base_url}/web_page_module/</td>
<td>Test Organisation</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>waitForTextPresent</td>
<td>name=field_override_source_person_title</td> <td>records</td>
<td>Test Sender</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>name=field_override_document_version</td> <td>name=listbox_reference</td>
<td>333</td> <td>Template.Test.Book</td>
</tr> </tr>
<!-- update dialog fails if param-string is larger than 2000 chars (here) --> <tr>
<tr> <td>type</td>
<td>clickAndWait</td> <td>name=listbox_version</td>
<td>name=Base_callDialogMethod:method</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>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded --> <td>waitForTextPresent</td>
<tr> <td>Template Test Book</td>
<td>waitForTitle</td> <td></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Template.Test.Book')]</td>
<td>verifyTitle</td> <td></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<!-- Store this location for re-requesting --> <td>Short Title</td>
<tr> <td></td>
<td>storeLocation</td> </tr>
<td>url</td> <tr>
<td></td> <td>waitForElementPresent</td>
</tr> <td>//button[@class="import_export"]</td>
<tr> <td></td>
<td>echo</td> </tr>
<td>${url}</td> <tr>
<td></td> <td>click</td>
</tr> <td>//button[@class="import_export"]</td>
<!-- Can't fetch pdf 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.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>Export Slideshow</td>
</tr> <td></td>
<!-- pause to let the ajax request finish. now if the table was a async, queue </tr>
that would be nice--> <tr>
<tr> <td>selectAndWait</td>
<td>pause</td> <td>name=select_dialog</td>
<td>9000</td> <td>index=3</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>goBackAndWait</td> <td>Export Book</td>
<td></td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>select</td>
<td>waitForPageToLoad</td> <td>name=field_format</td>
<td></td> <td>index=1</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>uncheck</td>
<td>waitForTextPresent</td> <td>name=field_include_content_table</td>
<td>Web Pages</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>clickAndWait</td>
<td>click</td> <td>name=Base_callDialogMethod:method</td>
<td>//a[contains(text(), 'ERP5')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForPageToLoad</td>
<td>waitForElementPresent</td> <td></td>
<td>//a[contains(text(), 'Documents')]</td> <td></td>
<td></td> </tr>
</tr> <!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr> <tr>
<td>click</td> <td>waitForTitle</td>
<td>//a[contains(text(), 'Documents')]</td> <td></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>verifyTitle</td>
<td>records</td> <td></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tal:block tal:condition="python: no_file_update == False">
<td>type</td>
<td>name=listbox_reference</td> <!-- Store this location for re-requesting -->
<td>Template.Test.Book</td> <tr>
</tr> <td>storeLocation</td>
<tr> <td>url</td>
<td>type</td> <td></td>
<td>name=listbox_version</td> </tr>
<td>002</td> <tr>
</tr> <td>echo</td>
<tr> <td>${url}</td>
<td>keyPressAndWait</td> <td></td>
<td>listbox_version</td> </tr>
<td>\13</td>
</tr> <!-- Can't access pdf source inside iframe, so request page again -->
<tr> <tr>
<td>waitForTextPresent</td> <td>storeEval</td>
<td>Template Test Book</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>clickAndWait</td> that would be nice 3/6/9000 didn't work -->
<td>//a[contains(text(), 'Template.Test.Book')]</td> <tr>
<td></td> <td>pause</td>
</tr> <td>12000</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Short Title</td> </tal:block>
<td></td> <tr>
</tr> <td>goBackAndWait</td>
<!-- manual form submit --> <td></td>
<tr> <td></td>
<td>storeLocation</td> </tr>
<td>url</td> <tr>
<td></td> <td>waitForPageToLoad</td>
</tr> <td></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>Web Pages</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>//a[contains(text(), 'ERP5')]</td>
<td>pdf_dump</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>echo</td> <td>waitForElementPresent</td>
<td>${pdf_dump}</td> <td>//a[contains(text(), 'Documents')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyNotExpression</td> <td>click</td>
<td>${pdf_dump}</td> <td>//a[contains(text(), 'Documents')]</td>
<td>null</td> <td></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"], "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>records</td>
<td>promise</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>storeEval</td> <td>type</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=listbox_reference</td>
<td></td> <td>Template.Test.Book</td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>type</td>
<td>//div[@class="transition_message"]</td> <td>name=listbox_version</td>
<td></td> <td>001</td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>keyPressAndWait</td>
<td>Data updated.</td> <td>listbox_version</td>
<td></td> <td>\13</td>
</tr> </tr>
<!-- generate images - <tr>
template_test_book_input_page_4_002_en_bmp <td>waitForTextPresent</td>
template_test_book_input_page_5_002_en_bmp <td>Template Test Book</td>
template_test_book_input_page_9_002_en_bmp <td></td>
--> </tr>
<tr> <tr>
<td>echo</td> <td>clickAndWait</td>
<td>update => template_test_book_input_page_4_002_en_bmp</td> <td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>storeEval</td> <td>waitForTextPresent</td>
<td>storedVars["url"].split("?")[0]</td> <td>Short Title</td>
<td>screenshot_url</td> <td></td>
</tr> </tr>
<tr> <tal:block tal:condition="python: no_file_update == False">
<td>echo</td> <!-- manual form submit -->
<td>${screenshot_url}</td> <tr>
<td></td> <td>storeLocation</td>
</tr> <td>url</td>
<tr> <td></td>
<td>open</td> </tr>
<td>${screenshot_url}/Document_createScreenshot?frame=4&amp;doc_id=template_test_book_input_page_4_002_en_bmp</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>Screenshot updated.</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>storeEval</td>
<td>open</td> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>${screenshot_url}/Document_createScreenshot?frame=5&amp;doc_id=template_test_book_input_page_5_002_en_bmp</td> <td>pdf_dump</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>echo</td>
<td>waitForTextPresent</td> <td>${pdf_dump}</td>
<td>Screenshot updated.</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>verifyNotExpression</td>
<td>open</td> <td>${pdf_dump}</td>
<td>${screenshot_url}/Document_createScreenshot?frame=10&amp;doc_id=template_test_book_input_page_10_002_en_bmp</td> <td>null</td>
<td></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.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>Screenshot updated.</td> <td>promise</td>
<td></td> </tr>
</tr> <tr>
<!-- update 3rd pdf document - template_test_book_input_003_de_pdf --> <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>echo</td> <td></td>
<td>update => template_test_book_input_003_de_pdf</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//div[@class="transition_message"]</td>
<td>open</td> <td></td>
<td>${base_url}/web_page_module/</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Data updated.</td>
<td>waitForTextPresent</td> <td></td>
<td>records</td> </tr>
<td></td> <!-- generate image - template_test_book_input_page_4_001_en_bmp -->
</tr> <tr>
<tr> <td>echo</td>
<td>type</td> <td>update => template_test_book_input_page_4_001_en_bmp</td>
<td>name=listbox_reference</td> <td></td>
<td>Template.Test.Book</td> </tr>
</tr> <tr>
<tr> <td>storeEval</td>
<td>type</td> <td>storedVars["url"].split("?")[0]</td>
<td>name=listbox_version</td> <td>screenshot_url</td>
<td>002</td> </tr>
</tr> <tr>
<tr> <td>echo</td>
<td>keyPressAndWait</td> <td>${screenshot_url}</td>
<td>listbox_version</td> <td></td>
<td>\13</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>Template Test Book</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>click</td> <td>Screenshot updated.</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td> <td></td>
<td></td> </tr>
</tr> </tal:block>
<tr>
<td>waitForTextPresent</td> <!-- CASE 2 (pdf) - template_test_book_input_002_en_pdf -->
<td>Short Title</td> <tr>
<td></td> <td>echo</td>
</tr> <td>CASE 2 (pdf) => template_test_book_input_002_en_pdf</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//button[@class="import_export"]</td> <tr>
<td></td> <td>open</td>
</tr> <td>${base_url}/web_page_module/</td>
<tr> <td></td>
<td>click</td> </tr>
<td>//button[@class="import_export"]</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>records</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Export Slideshow</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=listbox_reference</td>
<tr> <td>Template.Test.Book</td>
<td>selectAndWait</td> </tr>
<td>name=select_dialog</td> <tr>
<td>index=3</td> <td>type</td>
</tr> <td>name=listbox_version</td>
<tr> <td>001</td>
<td>waitForTextPresent</td> </tr>
<td>Export Book</td> <tr>
<td></td> <td>keyPressAndWait</td>
</tr> <td>listbox_version</td>
<tr> <td>\13</td>
<td>select</td> </tr>
<td>name=field_format</td> <tr>
<td>index=1</td> <td>waitForTextPresent</td>
</tr> <td>Template Test Book</td>
<tr> <td></td>
<td>clickAndWait</td> </tr>
<td>name=Base_callDialogMethod:method</td> <tr>
<td></td> <td>click</td>
</tr> <td>//a[contains(text(), 'Template.Test.Book')]</td>
<tr> <td></td>
<td>waitForPageToLoad</td> </tr>
<td></td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Short Title</td>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded --> <td></td>
<tr> </tr>
<td>waitForTitle</td> <tr>
<td></td> <td>waitForElementPresent</td>
<td></td> <td>//button[@class="import_export"]</td>
</tr> <td></td>
<tr> </tr>
<td>verifyTitle</td> <tr>
<td></td> <td>click</td>
<td></td> <td>//button[@class="import_export"]</td>
</tr> <td></td>
<!-- Store this location for re-requesting --> </tr>
<tr> <tr>
<td>storeLocation</td> <td>waitForTextPresent</td>
<td>url</td> <td>Export Slideshow</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>echo</td> <td>selectAndWait</td>
<td>${url}</td> <td>name=select_dialog</td>
<td></td> <td>index=3</td>
</tr> </tr>
<!-- Can't fetch pdf source, so request page again --> <tr>
<tr> <td>waitForTextPresent</td>
<td>storeEval</td> <td>Export Book</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>select</td>
that would be nice--> <td>name=field_format</td>
<tr> <td>index=1</td>
<td>pause</td> </tr>
<td>3000</td> <tr>
<td></td> <td>check</td>
</tr> <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_logo_reference</td>
<td>Template.Test.Image.Erp5.Logo</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>
<!-- update dialog fails if param-string is larger than 2000 chars (here) -->
<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>
<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 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/6/9000 didn't work -->
<tr>
<td>pause</td>
<td>12000</td>
<td></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(), '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.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>clickAndWait</td>
<td>//a[contains(text(), 'Template.Test.Book')]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Short Title</td>
<td></td>
</tr>
<tal:block tal:condition="python: no_file_update == False">
<!-- 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"], "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>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 images -
template_test_book_input_page_4_002_en_bmp
template_test_book_input_page_5_002_en_bmp
template_test_book_input_page_9_002_en_bmp
-->
<tr>
<td>echo</td>
<td>update => template_test_book_input_page_4_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=4&amp;doc_id=template_test_book_input_page_4_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${screenshot_url}/Document_createScreenshot?frame=5&amp;doc_id=template_test_book_input_page_5_002_en_bmp</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Screenshot updated.</td>
<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>
<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>
<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>
<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> </tal:block>
</tr> <tr>
<tr> <td>goBackAndWait</td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'ERP5')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForPageToLoad</td>
<td>waitForElementPresent</td> <td></td>
<td>//a[contains(text(), 'Documents')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>click</td> <td>Web Pages</td>
<td>//a[contains(text(), 'Documents')]</td> <td></td>
<td></td> </tr>
</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
...@@ -26,1706 +26,1758 @@ Note: ...@@ -26,1706 +26,1758 @@ Note:
<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 RenderJS 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 else False">
<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_setupTemplateTest</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Ok</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td tal:content="python: ''.join(['skipping save: ', str(no_file_update)])"></td>
<td></td>
</tr>
<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> <!-- 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>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">
<!-- 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> <!-- Can't fetch iframe source, so request page again -->
<td>open</td> <tr>
<td>${base_url}/web_page_module/</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>waitForTextPresent</td> </tal:block>
<td>records</td> <tr>
<td></td> <td>goBackAndWait</td>
</tr> <td></td>
<tr> <td></td>
<td>type</td> </tr>
<td>name=listbox_reference</td> <tr>
<td>Template.Test.Leaflet</td> <td>waitForPageToLoad</td>
</tr> <td></td>
<tr> <td></td>
<td>type</td> </tr>
<td>name=listbox_version</td> <tr>
<td>001</td> <td>waitForTextPresent</td>
</tr> <td>Web Pages</td>
<tr> <td></td>
<td>keyPressAndWait</td> </tr>
<td>listbox_version</td> <tr>
<td>\13</td> <td>click</td>
</tr> <td>//a[contains(text(), 'Web Pages')]</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Template Test Leaflet</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>records</td>
<tr> <td></td>
<td>click</td> </tr>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=listbox_reference</td>
<tr> <td>%Template% AND %Output% AND %Leaflet%</td>
<td>waitForTextPresent</td> </tr>
<td>Short Title</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=listbox_version</td>
<!-- Save once to set modification date for live tests --> <td>002</td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//button[@class="save"]</td> <td>keyPressAndWait</td>
<td></td> <td>listbox_reference</td>
</tr> <td>\13</td>
<tr> </tr>
<td>verifyElementPresent</td> <tr>
<td>//button[@class="save"]</td> <td>waitForTextPresent</td>
<td></td> <td>Template.Test.Leaflet.Expected.Output.Sample</td>
</tr> <td></td>
<tr> </tr>
<td>clickAndWait</td> <tr>
<td>//button[@class="save"]</td> <td>click</td>
<td></td> <td>//a[contains(text(), 'Template.Test.Leaflet.Expected.Output.Sample')]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//div[@class="transition_message"]</td> <td>waitForTextPresent</td>
<td></td> <td>Short Title</td>
</tr> <td></td>
<tr> </tr>
<td>assertTextPresent</td> <tr>
<td>Data updated.</td> <td>waitForElementPresent</td>
<td></td> <td>//a/span[contains(text(), 'Edit')]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//button[@class="import_export"]</td> <td>click</td>
<td></td> <td>//a/span[contains(text(), 'Edit')]</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <tr>
<td>//button[@class="import_export"]</td> <td>waitForElementPresent</td>
<td></td> <td>//div[@class="input"]/div/textarea</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tal:block tal:condition="python: no_file_update == False">
<td>Export Slideshow</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>selectAndWait</td> </tr>
<td>name=select_dialog</td> <tr>
<td>index=2</td> <td>storeEval</td>
</tr> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<tr> <td>dump</td>
<td>waitForTextPresent</td> </tr>
<td>Export Leaflet</td> <tr>
<td></td> <td>type</td>
</tr> <td>//div[@class="input"]/div/textarea</td>
<tr> <td>${dump}</td>
<td>clickAndWait</td> </tr>
<td>name=Base_showUpdateDialog:method</td> </tal:block>
<td></td> <tr>
</tr> <td>verifyElementPresent</td>
<tr> <td>//button[@class="save"]</td>
<td>waitForElementPresent</td> <td></td>
<td>//div[@class="transition_message"]</td> </tr>
<td></td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>//button[@class="save"]</td>
<td>waitForTextPresent</td> <td></td>
<td>Preview updated.</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//div[@class="transition_message"]</td>
<td>clickAndWait</td> <td></td>
<td>name=Base_callDialogMethod:method</td> </tr>
<td></td> <tr>
</tr> <td>assertTextPresent</td>
<tr> <td>Data updated.</td>
<td>waitForElementNotPresent</td> <td></td>
<td>name=Base_callDialogMethod:method</td> </tr>
<td></td> <!-- CASE 3 - template_test_leaflet_output_expected_003_de_html -->
</tr> <tr>
<tr> <td>echo</td>
<td>waitForPageToLoad</td> <td>CASE 3 => template_test_leaflet_output_expected_003_de_html</td>
<td></td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>verifyTextPresent</td>
<td>waitForTextPresent</td> <td>Web Pages</td>
<td>©</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>storeLocation</td> <td>//a[contains(text(), 'Web Pages')]</td>
<td>url</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>echo</td> <td>records</td>
<td>${url}</td> <td></td>
<td></td> </tr>
</tr> <tr>
<!-- Can't fetch iframe source, so request page again --> <td>type</td>
<tr> <td>name=listbox_reference</td>
<td>storeEval</td> <td>Template.Test.Leaflet</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>type</td>
<tr> <td>name=listbox_version</td>
<td>goBackAndWait</td> <td>002</td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>keyPressAndWait</td>
<tr> <td>listbox_version</td>
<td>waitForPageToLoad</td> <td>\13</td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Template Test Leaflet</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.Leaflet')]</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> <!-- Save once to set modification date for live tests -->
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>type</td> <td>//button[@class="save"]</td>
<td>name=listbox_reference</td> <td></td>
<td>%Template% AND %Output% AND %Leaflet%</td> </tr>
</tr> <tr>
<tr> <td>verifyElementPresent</td>
<td>type</td> <td>//button[@class="save"]</td>
<td>name=listbox_version</td> <td></td>
<td>001</td> </tr>
</tr> <tr>
<tr> <td>clickAndWait</td>
<td>keyPressAndWait</td> <td>//button[@class="save"]</td>
<td>listbox_reference</td> <td></td>
<td>\13</td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>waitForTextPresent</td> <td>//div[@class="transition_message"]</td>
<td>Template.Test.Leaflet.Expected.Output.Sample</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>assertTextPresent</td>
<td>click</td> <td>Data updated.</td>
<td>//a[contains(text(), 'Template.Test.Leaflet.Expected.Output.Sample')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>waitForTextPresent</td> <td>//button[@class="import_export"]</td>
<td>Short Title</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>waitForElementPresent</td> <td>//button[@class="import_export"]</td>
<td>//a/span[contains(text(), 'Edit')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>click</td> <td>Export Slideshow</td>
<td>//a/span[contains(text(), 'Edit')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>selectAndWait</td>
<td>waitForElementPresent</td> <td>name=select_dialog</td>
<td>//textarea[@name="field_my_text_content"]</td> <td>index=2</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>storeEval</td> <td>Export Leaflet</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>clickAndWait</td>
<td>storeEval</td> <td>name=Base_showUpdateDialog:method</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td> <td></td>
<td>dump</td> </tr>
</tr> <tr>
<tr> <td>clickAndWait</td>
<td>type</td> <td>name=Base_showUpdateDialog:method</td>
<td>//textarea[@name="field_my_text_content"]</td> <td></td>
<td>${dump}</td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>verifyElementPresent</td> <td>//div[@class="transition_message"]</td>
<td>//button[@class="save"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>clickAndWait</td> <td>Preview updated.</td>
<td>//button[@class="save"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>clickAndWait</td>
<td>waitForElementPresent</td> <td>name=Base_callDialogMethod:method</td>
<td>//div[@class="transition_message"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForPageToLoad</td>
<td>assertTextPresent</td> <td></td>
<td>Data updated.</td> <td></td>
<td></td> </tr>
</tr> <tr>
<!-- update 2nd output - template_test_leaflet_output_expected_002_en_html --> <td>waitForElementNotPresent</td>
<tr> <td>name=Base_callDialogMethod:method</td>
<td>echo</td> <td></td>
<td>update => template_test_lealflet_output_expected_002_en_html</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>©</td>
<td>verifyTextPresent</td> <td></td>
<td>Web Pages</td> </tr>
<td></td> <tal:block tal:condition="python: no_file_update == False">
</tr>
<tr> <!-- store url for re-requesting -->
<td>click</td> <tr>
<td>//a[contains(text(), 'Web Pages')]</td> <td>storeLocation</td>
<td></td> <td>url</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>records</td> <td>echo</td>
<td></td> <td>${url}</td>
</tr> <td></td>
<tr> </tr>
<td>type</td>
<td>name=listbox_reference</td> <!-- Can't fetch iframe source, so request page again -->
<td>Template.Test.Leaflet</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>type</td> <td>page_source</td>
<td>name=listbox_version</td> </tr>
<td>001</td> </tal:block>
</tr> <tr>
<tr> <td>goBackAndWait</td>
<td>keyPressAndWait</td> <td></td>
<td>listbox_version</td> <td></td>
<td>\13</td> </tr>
</tr> <tr>
<tr> <td>waitForPageToLoad</td>
<td>waitForTextPresent</td> <td></td>
<td>Template Test Leaflet</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>click</td> <td>Web Pages</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>waitForTextPresent</td> <td>//a[contains(text(), 'Web Pages')]</td>
<td>Short Title</td> <td></td>
<td></td> </tr>
</tr> <tr>
<!-- Save once to set modification date for live tests --> <td>waitForTextPresent</td>
<tr> <td>records</td>
<td>waitForElementPresent</td> <td></td>
<td>//button[@class="save"]</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_reference</td>
<td>verifyElementPresent</td> <td>%Template% AND %Output% AND %Leaflet%</td>
<td>//button[@class="save"]</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_version</td>
<td>clickAndWait</td> <td>003</td>
<td>//button[@class="save"]</td> </tr>
<td></td> <tr>
</tr> <td>keyPressAndWait</td>
<tr> <td>listbox_reference</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.Leaflet.Expected.Output.Sample</td>
<td>assertTextPresent</td> <td></td>
<td>Data updated.</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Template.Test.Leaflet.Expected.Output.Sample')]</td>
<td>waitForElementPresent</td> <td></td>
<td>//button[@class="import_export"]</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Short Title</td>
<td>click</td> <td></td>
<td>//button[@class="import_export"]</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//a/span[contains(text(), 'Edit')]</td>
<td>waitForTextPresent</td> <td></td>
<td>Export Slideshow</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//a/span[contains(text(), 'Edit')]</td>
<td>selectAndWait</td> <td></td>
<td>name=select_dialog</td> </tr>
<td>index=2</td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//div[@class="input"]/div/textarea</td>
<td>waitForTextPresent</td> <td></td>
<td>Export Leaflet</td> </tr>
<td></td> <tal:block tal:condition="python: no_file_update == False">
</tr> <tr>
<tr> <td>storeEval</td>
<td>type</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>name=field_override_source_organisation_title</td> <td></td>
<td>Test Association</td> </tr>
</tr> <tr>
<tr> <td>storeEval</td>
<td>type</td> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>name=field_override_source_person_title</td> <td>dump</td>
<td>Test Recipient</td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>type</td> <td>//div[@class="input"]/div/textarea</td>
<td>name=field_override_leaflet_header_title</td> <td>${dump}</td>
<td>Couscous</td> </tr>
</tr> </tal:block>
<tr> <tr>
<td>uncheck</td> <td>verifyElementPresent</td>
<td>name=field_display_side</td> <td>//button[@class="save"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
<td>name=Base_showUpdateDialog:method</td> <td>//button[@class="save"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@class="transition_message"]</td> <td>//div[@class="transition_message"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>assertTextPresent</td>
<td>Preview updated.</td> <td>Data updated.</td>
<td></td> <td></td>
</tr> </tr>
<tr> <!-- CASE 1 (pdf) - template_test_leaflet_input_001_en_pdf -->
<td>clickAndWait</td> <tr>
<td>name=Base_callDialogMethod:method</td> <td>echo</td>
<td></td> <td>CASE 1 (pdf) => template_test_leaflet_input_001_en_pdf</td>
</tr> <td></td>
<tr> </tr>
<td>waitForPageToLoad</td> <tr>
<td></td> <td>open</td>
<td></td> <td>${base_url}/web_page_module/</td>
</tr> <td></td>
<tr> </tr>
<td>waitForElementNotPresent</td> <tr>
<td>name=Base_callDialogMethod:method</td> <td>waitForTextPresent</td>
<td></td> <td>records</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>©</td> <td>type</td>
<td></td> <td>name=listbox_reference</td>
</tr> <td>Template.Test.Leaflet</td>
<tr> </tr>
<td>storeLocation</td> <tr>
<td>url</td> <td>type</td>
<td></td> <td>name=listbox_version</td>
</tr> <td>001</td>
<tr> </tr>
<td>echo</td> <tr>
<td>${url}</td> <td>keyPressAndWait</td>
<td></td> <td>listbox_version</td>
</tr> <td>\13</td>
<!-- Can't fetch iframe source, 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.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 Test Leaflet</td>
<td>page_source</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>goBackAndWait</td> <td>click</td>
<td></td> <td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForPageToLoad</td> <td>waitForTextPresent</td>
<td></td> <td>Short Title</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForElementPresent</td>
<td>Web Pages</td> <td>//button[@class="import_export"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[contains(text(), 'Web Pages')]</td> <td>//button[@class="import_export"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>records</td> <td>Export Slideshow</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>selectAndWait</td>
<td>name=listbox_reference</td> <td>name=select_dialog</td>
<td>%Template% AND %Output% AND %Leaflet%</td> <td>index=2</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>waitForTextPresent</td>
<td>name=listbox_version</td> <td>Export Leaflet</td>
<td>002</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>keyPressAndWait</td> <td>select</td>
<td>listbox_reference</td> <td>name=field_format</td>
<td>\13</td> <td>index=1</td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>clickAndWait</td>
<td>Template.Test.Leaflet.Expected.Output.Sample</td> <td>name=Base_callDialogMethod:method</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>waitForPageToLoad</td>
<td>//a[contains(text(), 'Template.Test.Leaflet.Expected.Output.Sample')]</td> <td></td>
<td></td> <td></td>
</tr> </tr>
<tr> <!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<td>waitForTextPresent</td> <tr>
<td>Short Title</td> <td>waitForTitle</td>
<td></td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//a/span[contains(text(), 'Edit')]</td> <td>verifyTitle</td>
<td></td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <tal:block tal:condition="python: no_file_update == False">
<td>//a/span[contains(text(), 'Edit')]</td>
<td></td> <!-- Store this location for re-requesting -->
</tr> <tr>
<tr> <td>storeLocation</td>
<td>waitForElementPresent</td> <td>url</td>
<td>//textarea[@name="field_my_text_content"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>echo</td>
<td>storeEval</td> <td>${url}</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> <!-- Can't access pdf source inside iframe, so request page again -->
<td>storeEval</td> <tr>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td> <td>storeEval</td>
<td>dump</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>type</td> <!-- pause to let the ajax request finish. now if the table was a async, queue
<td>//textarea[@name="field_my_text_content"]</td> that would be nice, 3/6/9000 not enough-->
<td>${dump}</td> <tr>
</tr> <td>pause</td>
<tr> <td>12000</td>
<td>verifyElementPresent</td> <td></td>
<td>//button[@class="save"]</td> </tr>
<td></td> </tal:block>
</tr> <tr>
<tr> <td>goBackAndWait</td>
<td>clickAndWait</td> <td></td>
<td>//button[@class="save"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForPageToLoad</td>
<td>waitForElementPresent</td> <td></td>
<td>//div[@class="transition_message"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>assertTextPresent</td> <td>Web Pages</td>
<td>Data updated.</td> <td></td>
<td></td> </tr>
</tr> <tr>
<!-- update 3rd output - template_test_leaflet_output_expected_003_de_html --> <td>click</td>
<tr> <td>//a[contains(text(), 'ERP5')]</td>
<td>echo</td> <td></td>
<td>update => template_test_leaflet_output_expected_003_de_html</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//a[contains(text(), 'Documents')]</td>
<td>verifyTextPresent</td> <td></td>
<td>Web Pages</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Documents')]</td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'Web Pages')]</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.Leaflet</td>
<td>name=listbox_reference</td> </tr>
<td>Template.Test.Leaflet</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>002</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 Leaflet</td>
<td>waitForTextPresent</td> <td></td>
<td>Template Test Leaflet</td> </tr>
<td></td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</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> <tal:block tal:condition="python: no_file_update == False">
</tr> <!-- manual form submit -->
<!-- Save once to set modification date for live tests --> <tr>
<tr> <td>storeLocation</td>
<td>waitForElementPresent</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>verifyElementPresent</td> <tr>
<td>//button[@class="save"]</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>clickAndWait</td> <tr>
<td>//button[@class="save"]</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>//div[@class="transition_message"]</td> <td>echo</td>
<td></td> <td>${pdf_dump}</td>
</tr> <td></td>
<tr> </tr>
<td>assertTextPresent</td> <tr>
<td>Data updated.</td> <td>verifyNotExpression</td>
<td></td> <td>${pdf_dump}</td>
</tr> <td>null</td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//button[@class="import_export"]</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>click</td> <tr>
<td>//button[@class="import_export"]</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>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=2</td> <td>Data updated.</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <!-- generate image - template_test_leaflet_input_page_1_001_en_bmp -->
<td>Export Leaflet</td> <tr>
<td></td> <td>echo</td>
</tr> <td>update => template_test_leaflet_input_page_1_001_en_bmp</td>
<tr> <td></td>
<td>clickAndWait</td> </tr>
<td>name=Base_showUpdateDialog:method</td> <tr>
<td></td> <td>storeEval</td>
</tr> <td>storedVars["url"].split("?")[0]</td>
<tr> <td>screenshot_url</td>
<td>clickAndWait</td> </tr>
<td>name=Base_showUpdateDialog:method</td> <tr>
<td></td> <td>echo</td>
</tr> <td>${screenshot_url}</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//div[@class="transition_message"]</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>waitForTextPresent</td> </tr>
<td>Preview updated.</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Screenshot updated.</td>
<tr> <td></td>
<td>clickAndWait</td> </tr>
<td>name=Base_callDialogMethod:method</td> </tal:block>
<td></td> <!-- CASE 2 (pdf) - template_test_leaflet_input_002_en_pdf -->
</tr> <tr>
<tr> <td>echo</td>
<td>waitForPageToLoad</td> <td>CASE 2 (pdf) => template_test_leaflet_input_002_en_pdf</td>
<td></td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>open</td>
<td>waitForElementNotPresent</td> <td>${base_url}/web_page_module/</td>
<td>name=Base_callDialogMethod:method</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForTextPresent</td> <td>records</td>
<td>©</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>storeLocation</td> <td>name=listbox_reference</td>
<td>url</td> <td>Template.Test.Leaflet</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>echo</td> <td>name=listbox_version</td>
<td>${url}</td> <td>001</td>
<td></td> </tr>
</tr> <tr>
<!-- Can't fetch iframe source, so request page again --> <td>keyPressAndWait</td>
<tr> <td>listbox_version</td>
<td>storeEval</td> <td>\13</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>waitForTextPresent</td>
<tr> <td>Template Test Leaflet</td>
<td>goBackAndWait</td> <td></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td>waitForPageToLoad</td> <td></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Short Title</td>
<td>waitForTextPresent</td> <td></td>
<td>Web Pages</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</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>click</td>
<tr> <td>//button[@class="import_export"]</td>
<td>waitForTextPresent</td> <td></td>
<td>records</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Export Slideshow</td>
<td>type</td> <td></td>
<td>name=listbox_reference</td> </tr>
<td>%Template% AND %Output% AND %Leaflet%</td> <tr>
</tr> <td>selectAndWait</td>
<tr> <td>name=select_dialog</td>
<td>type</td> <td>index=2</td>
<td>name=listbox_version</td> </tr>
<td>003</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Export Leaflet</td>
<td>keyPressAndWait</td> <td></td>
<td>listbox_reference</td> </tr>
<td>\13</td> <tr>
</tr> <td>select</td>
<tr> <td>name=field_format</td>
<td>waitForTextPresent</td> <td>index=1</td>
<td>Template.Test.Leaflet.Expected.Output.Sample</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=field_override_source_organisation_title</td>
<td>click</td> <td>Test Association</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_source_person_title</td>
<td>waitForTextPresent</td> <td>Test Recipient</td>
<td>Short Title</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=field_override_leaflet_header_title</td>
<td>waitForElementPresent</td> <td>Couscous</td>
<td>//a/span[contains(text(), 'Edit')]</td> </tr>
<td></td> <tr>
</tr> <td>check</td>
<tr> <td>name=field_display_side</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_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> <!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
</tr> <tr>
<tr> <td>waitForTitle</td>
<td>storeEval</td> <td></td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td> <td></td>
<td>dump</td> </tr>
</tr> <tr>
<tr> <td>verifyTitle</td>
<td>type</td> <td></td>
<td>//textarea[@name="field_my_text_content"]</td> <td></td>
<td>${dump}</td> </tr>
</tr> <tal:block tal:condition="python: no_file_update == False">
<tr> <!-- Store this location for re-requesting -->
<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> </tal:block>
</tr> <tr>
<tr> <td>goBackAndWait</td>
<td>open</td> <td></td>
<td>${base_url}/web_page_module/</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForPageToLoad</td>
<td>waitForTextPresent</td> <td></td>
<td>records</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>type</td> <td>Web Pages</td>
<td>name=listbox_reference</td> <td></td>
<td>Template.Test.Leaflet</td> </tr>
</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>002</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-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>
</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_002_en_bmp -->
</tr> <tr>
<tr> <td>echo</td>
<td>goBackAndWait</td> <td>update => template_test_leaflet_input_page_0_002_en_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_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> </tal:block>
<tr> <!-- CASE 3 (pdf) - template_test_leaflet_input_003_de_pdf -->
<td>click</td> <tr>
<td>//a[contains(text(), 'Documents')]</td> <td>echo</td>
<td></td> <td>CASE 3 (pdf) => template_test_leaflet_input_003_de_pdf</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>002</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="import_export"]</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="import_export"]</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>Export 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>Export Leaflet</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>select</td>
<tr> <td>name=field_format</td>
<td>storeEval</td> <td>index=1</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>clickAndWait</td>
<tr> <td>name=Base_callDialogMethod:method</td>
<td>waitForElementPresent</td> <td></td>
<td>//div[@class="transition_message"]</td> </tr>
<td></td> <tr>
</tr> <td>waitForPageToLoad</td>
<tr> <td></td>
<td>waitForTextPresent</td> <td></td>
<td>Data updated.</td> </tr>
<td></td> <!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
</tr> <tr>
<!-- generate image - template_test_leaflet_input_page_1_001_en_bmp --> <td>waitForTitle</td>
<tr> <td></td>
<td>echo</td> <td></td>
<td>update => template_test_leaflet_input_page_1_001_en_bmp</td> </tr>
<td></td> <tr>
</tr> <td>verifyTitle</td>
<tr> <td></td>
<td>storeEval</td> <td></td>
<td>storedVars["url"].split("?")[0]</td> </tr>
<td>screenshot_url</td> <tal:block tal:condition="python: no_file_update == False">
</tr> <!-- Store this location for re-requesting -->
<tr> <tr>
<td>echo</td> <td>storeLocation</td>
<td>${screenshot_url}</td> <td>url</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>open</td> <td>echo</td>
<td>${screenshot_url}/Document_createScreenshot?frame=1&amp;doc_id=template_test_leaflet_input_page_1_001_en_bmp</td> <td>${url}</td>
<td></td> <td></td>
</tr> </tr>
<tr> <!-- Can't fetch pdf source, so request page again -->
<td>waitForTextPresent</td> <tr>
<td>Screenshot updated.</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>
<!-- update 2nd pdf document - template_test_leaflet_input_002_en_pdf --> </tr>
<tr> <!-- pause to let the ajax request finish. now if the table was a async, queue
<td>echo</td> that would be nice 3/6000 did not work-->
<td>update => template_test_leaflet_input_002_en_pdf</td> <tr>
<td></td> <td>pause</td>
</tr> <td>9000</td>
<tr> <td></td>
<td>open</td> </tr>
<td>${base_url}/web_page_module/</td> </tal:block>
<td></td> <tr>
</tr> <td>goBackAndWait</td>
<tr> <td></td>
<td>waitForTextPresent</td> <td></td>
<td>records</td> </tr>
<td></td> <tr>
</tr> <td>waitForPageToLoad</td>
<tr> <td></td>
<td>type</td> <td></td>
<td>name=listbox_reference</td> </tr>
<td>Template.Test.Leaflet</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Web Pages</td>
<td>type</td> <td></td>
<td>name=listbox_version</td> </tr>
<td>001</td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'ERP5')]</td>
<td>keyPressAndWait</td> <td></td>
<td>listbox_version</td> </tr>
<td>\13</td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//a[contains(text(), 'Documents')]</td>
<td>waitForTextPresent</td> <td></td>
<td>Template Test Leaflet</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Documents')]</td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>records</td>
<td>waitForTextPresent</td> <td></td>
<td>Short Title</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_reference</td>
<td>waitForElementPresent</td> <td>Template.Test.Leaflet</td>
<td>//button[@class="import_export"]</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_version</td>
<td>click</td> <td>003</td>
<td>//button[@class="import_export"]</td> </tr>
<td></td> <tr>
</tr> <td>keyPressAndWait</td>
<tr> <td>listbox_version</td>
<td>waitForTextPresent</td> <td>\13</td>
<td>Export Slideshow</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Template Test Leaflet</td>
<td>selectAndWait</td> <td></td>
<td>name=select_dialog</td> </tr>
<td>index=2</td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td>waitForTextPresent</td> <td></td>
<td>Export Leaflet</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Short Title</td>
<td>select</td> <td></td>
<td>name=field_format</td> </tr>
<td>index=1</td> <tal:block tal:condition="python: no_file_update == False">
</tr> <!-- manual form submit -->
<tr> <tr>
<td>type</td> <td>storeLocation</td>
<td>name=field_override_source_organisation_title</td> <td>url</td>
<td>Test Association</td> <td></td>
</tr> </tr>
<tr> <!-- only handle pdf_source (a promise!) here, because it needs to be set on
<td>type</td> the iframe and a page-reload resets all (bad) parameters manually set -->
<td>name=field_override_source_person_title</td> <tr>
<td>Test Recipient</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>type</td> </tr>
<td>name=field_override_leaflet_header_title</td> <tr>
<td>Couscous</td> <td>storeEval</td>
</tr> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<tr> <td>pdf_dump</td>
<td>check</td> </tr>
<td>name=field_display_side</td> <tr>
<td></td> <td>echo</td>
</tr> <td>${pdf_dump}</td>
<tr> <td></td>
<td>clickAndWait</td> </tr>
<td>name=Base_callDialogMethod:method</td> <tr>
<td></td> <td>verifyNotExpression</td>
</tr> <td>${pdf_dump}</td>
<tr> <td>null</td>
<td>waitForPageToLoad</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.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>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded --> <td>promise</td>
<tr> </tr>
<td>waitForTitle</td> <tr>
<td></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>verifyTitle</td> <tr>
<td></td> <td>waitForElementPresent</td>
<td></td> <td>//div[@class="transition_message"]</td>
</tr> <td></td>
<!-- Store this location for re-requesting --> </tr>
<tr> <tr>
<td>storeLocation</td> <td>waitForTextPresent</td>
<td>url</td> <td>Data updated.</td>
<td></td> <td></td>
</tr> </tr>
<tr> <!-- generate image - template_test_leaflet_input_page_0_003_de_bmp -->
<td>echo</td> <tr>
<td>${url}</td> <td>echo</td>
<td></td> <td>update => template_test_leaflet_input_page_0_003_de_bmp</td>
</tr> <td></td>
<!-- Can't fetch pdf source, so request page again --> </tr>
<tr> <tr>
<td>storeEval</td> <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>storedVars["url"].split("?")[0]</td>
<td>pdf_source</td> <td>screenshot_url</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>echo</td>
<tr> <td>${screenshot_url}</td>
<td>pause</td> <td></td>
<td>9000</td> </tr>
<td></td> <tr>
</tr> <td>open</td>
<tr> <td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_leaflet_input_page_0_003_de_bmp</td>
<td>goBackAndWait</td> <td></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Screenshot updated.</td>
<td>waitForPageToLoad</td> <td></td>
<td></td> </tr>
<td></td> </tal:block>
</tr> <!-- make sure print exchange works -->
<tr> <tr>
<td>waitForTextPresent</td> <td>echo</td>
<td>Web Pages</td> <td>ACTION => PRINT</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>open</td>
<td>//a[contains(text(), 'ERP5')]</td> <td>${base_url}/web_page_module/</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForTextPresent</td>
<td>//a[contains(text(), 'Documents')]</td> <td>records</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>type</td>
<td>//a[contains(text(), 'Documents')]</td> <td>name=listbox_reference</td>
<td></td> <td>Template.Test.Leaflet</td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>type</td>
<td>records</td> <td>name=listbox_version</td>
<td></td> <td>001</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>keyPressAndWait</td>
<td>name=listbox_reference</td> <td>listbox_version</td>
<td>Template.Test.Leaflet</td> <td>\13</td>
</tr> </tr>
<tr> <tr>
<td>type</td> <td>waitForTextPresent</td>
<td>name=listbox_version</td> <td>Template Test Leaflet</td>
<td>002</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>keyPressAndWait</td> <td>click</td>
<td>listbox_version</td> <td>//a[contains(text(), 'Template.Test.Leaflet')]</td>
<td>\13</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>Template Test Leaflet</td> <td>Short Title</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>waitForElementPresent</td>
<td>//a[contains(text(), 'Template.Test.Leaflet')]</td> <td>//button[@class="print"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>click</td>
<td>Short Title</td> <td>//button[@class="print"]</td>
<td></td> <td></td>
</tr> </tr>
<!-- manual form submit --> <tr>
<tr> <td>waitForTextPresent</td>
<td>storeLocation</td> <td>Print As Slideshow</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>selectAndWait</td>
the iframe and a page-reload resets all (bad) parameters manually set --> <td>name=select_dialog</td>
<tr> <td>index=2</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>waitForTextPresent</td>
</tr> <td>Display Side Panel</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>clickAndWait</td>
</tr> <td>name=Base_showUpdateDialog:method</td>
<tr> <td></td>
<td>echo</td> </tr>
<td>${pdf_dump}</td> <tr>
<td></td> <td>waitForElementPresent</td>
</tr> <td>//div[@class="transition_message"]</td>
<tr> <td></td>
<td>verifyNotExpression</td> </tr>
<td>${pdf_dump}</td> <tr>
<td>null</td> <td>waitForTextPresent</td>
</tr> <td>Preview updated.</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.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> </tal:block>
<td>promise</td> </tbody>
</tr> </table>
<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
...@@ -27,747 +27,788 @@ Note: ...@@ -27,747 +27,788 @@ Note:
<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 RenderJS 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 else False">
<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_setupTemplateTest</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Ok</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td tal:content="python: ''.join(['skipping save: ', str(no_file_update)])"></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>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>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>
<!-- 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_document_title_list')]</td>
<td></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>
<!-- update 5th pdf document - template_test_letter_input_005_en_pdf -->
<tal:block tal:condition="python: no_file_update == False">
<tr> <!-- Store location 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>
<!-- generate letter from support request with sender/recipient organisation --> </tr>
<tr>
<td>echo</td>
<td>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>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> <!-- Can't access pdf source inside iframe, 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"].replace("view?ignore_layout:int=1", "WebPage_viewAsWeb") + "?batch_mode=True");</td>
</tr> <td>pdf_source</td>
<tr> </tr>
<td>waitForPageToLoad</td> <!-- pause to let the ajax request finish. 3000 wait not long enough -->
<td></td> <tr>
<td></td> <td>pause</td>
</tr> <td>6000</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Documents</td> </tal:block>
<td></td> <tr>
</tr> <td>goBackAndWait</td>
<tr> <td></td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'Documents')]</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>Documents</td>
<td>type</td> <td></td>
<td>name=listbox_reference</td> </tr>
<td>Template.Test.Letter</td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Documents')]</td>
<td>type</td> <td></td>
<td>name=listbox_version</td> </tr>
<td>006</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>records</td>
<td>keyPressAndWait</td> <td></td>
<td>listbox_version</td> </tr>
<td>\13</td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_reference</td>
<td>waitForTextPresent</td> <td>Template.Test.Letter</td>
<td>Template Test Letter</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_version</td>
<td>clickAndWait</td> <td>005</td>
<td>//a[contains(text(), 'Template.Test.Letter')]</td> </tr>
<td></td> <tr>
</tr> <td>keyPressAndWait</td>
<tr> <td>listbox_version</td>
<td>waitForTextPresent</td> <td>\13</td>
<td>Short Title</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<!-- manual form submit --> <td>Template Test Letter</td>
<tr> <td></td>
<td>storeLocation</td> </tr>
<td>url</td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>//a[contains(text(), 'Template.Test.Letter')]</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>Short Title</td>
<td></td> <td></td>
</tr> </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> <!-- 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>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>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 -->
<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>
<!-- 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>
</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>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 -->
<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
...@@ -27,1172 +27,1207 @@ Note: ...@@ -27,1172 +27,1207 @@ Note:
<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 RenderJS 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 else False">
<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_setupTemplateTest</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>Ok</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> <tr>
<td>records</td> <td>echo</td>
<td></td> <td>ACTION => EXPORT</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <!-- CASE 1 - template_test_release_output_expected_001_en_html -->
<td>name=listbox_reference</td> <tr>
<td>Template.Test.Release</td> <td>echo</td>
</tr> <td>CASE 1 => template_test_release_output_expected_001_en_html</td>
<tr> <td></td>
<td>type</td> </tr>
<td>name=listbox_version</td> <tr>
<td>001</td> <td>open</td>
</tr> <td>${base_url}/web_page_module/</td>
<tr> <td></td>
<td>keyPressAndWait</td> </tr>
<td>listbox_version</td> <tr>
<td>\13</td> <td>waitForTextPresent</td>
</tr> <td>records</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Template Test Release</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=listbox_reference</td>
<tr> <td>Template.Test.Release</td>
<td>click</td> </tr>
<td>//a[contains(text(), 'Template.Test.Release')]</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=listbox_version</td>
<tr> <td>001</td>
<td>waitForTextPresent</td> </tr>
<td>Short Title</td> <tr>
<td></td> <td>keyPressAndWait</td>
</tr> <td>listbox_version</td>
<!-- Save once to set modification date for live tests --> <td>\13</td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//button[@class="save"]</td> <td>waitForTextPresent</td>
<td></td> <td>Template Test Release</td>
</tr> <td></td>
<tr> </tr>
<td>verifyElementPresent</td> <tr>
<td>//button[@class="save"]</td> <td>click</td>
<td></td> <td>//a[contains(text(), 'Template.Test.Release')]</td>
</tr> <td></td>
<tr> </tr>
<td>clickAndWait</td> <tr>
<td>//button[@class="save"]</td> <td>waitForTextPresent</td>
<td></td> <td>Short Title</td>
</tr> <td></td>
<tr> </tr>
<td>waitForElementPresent</td> <!-- Save once to set modification date for live tests -->
<td>//div[@class="transition_message"]</td> <tr>
<td></td> <td>waitForElementPresent</td>
</tr> <td>//button[@class="save"]</td>
<tr> <td></td>
<td>assertTextPresent</td> </tr>
<td>Data updated.</td> <tr>
<td></td> <td>verifyElementPresent</td>
</tr> <td>//button[@class="save"]</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//button[@class="import_export"]</td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>//button[@class="save"]</td>
<tr> <td></td>
<td>click</td> </tr>
<td>//button[@class="import_export"]</td> <tr>
<td></td> <td>waitForElementPresent</td>
</tr> <td>//div[@class="transition_message"]</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Export Slideshow</td> <tr>
<td></td> <td>assertTextPresent</td>
</tr> <td>Data updated.</td>
<tr> <td></td>
<td>selectAndWait</td> </tr>
<td>name=select_dialog</td> <tr>
<td>index=4</td> <td>waitForElementPresent</td>
</tr> <td>//button[@class="import_export"]</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Export Release</td> <tr>
<td></td> <td>click</td>
</tr> <td>//button[@class="import_export"]</td>
<tr> <td></td>
<td>clickAndWait</td> </tr>
<td>name=Base_showUpdateDialog:method</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Export Slideshow</td>
<tr> <td></td>
<td>waitForElementPresent</td> </tr>
<td>//div[@class="transition_message"]</td> <tr>
<td></td> <td>selectAndWait</td>
</tr> <td>name=select_dialog</td>
<tr> <td>index=4</td>
<td>waitForTextPresent</td> </tr>
<td>Preview updated.</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Export Release</td>
<tr> <td></td>
<td>clickAndWait</td> </tr>
<td>name=Base_callDialogMethod:method</td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>name=Base_showUpdateDialog:method</td>
<tr> <td></td>
<td>waitForElementNotPresent</td> </tr>
<td>name=Base_callDialogMethod:method</td> <tr>
<td></td> <td>waitForElementPresent</td>
</tr> <td>//div[@class="transition_message"]</td>
<tr> <td></td>
<td>waitForPageToLoad</td> </tr>
<td></td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>Preview updated.</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>©</td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>name=Base_callDialogMethod:method</td>
<tr> <td></td>
<td>storeLocation</td> </tr>
<td>url</td> <tr>
<td></td> <td>waitForElementNotPresent</td>
</tr> <td>name=Base_callDialogMethod:method</td>
<tr> <td></td>
<td>echo</td> </tr>
<td>${url}</td> <tr>
<td></td> <td>waitForPageToLoad</td>
</tr> <td></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>©</td>
</tr> <td></td>
<tr> </tr>
<td>goBackAndWait</td> <tal:block tal:condition="python: no_file_update == False">
<td></td> <tr>
<td></td> <td>storeLocation</td>
</tr> <td>url</td>
<tr> <td></td>
<td>waitForPageToLoad</td> </tr>
<td></td> <tr>
<td></td> <td>echo</td>
</tr> <td>${url}</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Web Pages</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>click</td> <td>page_source</td>
<td>//a[contains(text(), 'Web Pages')]</td> </tr>
<td></td> </tal:block>
</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% AND %Output% AND %Release%</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(), 'Web Pages')]</td>
<td>listbox_reference</td> <td></td>
<td>\13</td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>waitForTextPresent</td> <td>records</td>
<td>Template.Test.Release.Expected.Output.Sample</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>click</td> <td>name=listbox_reference</td>
<td>//a[contains(text(), 'Template.Test.Release.Expected.Output.Sample')]</td> <td>%Template% AND %Output% AND %Release%</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>type</td>
<td>waitForTextPresent</td> <td>name=listbox_version</td>
<td>Short Title</td> <td>001</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>keyPressAndWait</td>
<td>waitForElementPresent</td> <td>listbox_reference</td>
<td>//a/span[contains(text(), 'Edit')]</td> <td>\13</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>click</td> <td>Template.Test.Release.Expected.Output.Sample</td>
<td>//a/span[contains(text(), 'Edit')]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>waitForElementPresent</td> <td>//a[contains(text(), 'Template.Test.Release.Expected.Output.Sample')]</td>
<td>//textarea[@name="field_my_text_content"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>storeEval</td> <td>Short Title</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>waitForElementPresent</td>
<td>storeEval</td> <td>//a/span[contains(text(), 'Edit')]</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td> <td></td>
<td>dump</td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>type</td> <td>//a/span[contains(text(), 'Edit')]</td>
<td>//textarea[@name="field_my_text_content"]</td> <td></td>
<td>${dump}</td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>verifyElementPresent</td> <td>//div[@class="input"]/div/textarea</td>
<td>//button[@class="save"]</td> <td></td>
<td></td> </tr>
</tr> <tal:block tal:condition="python: no_file_update == False">
<tr> <tr>
<td>clickAndWait</td> <td>storeEval</td>
<td>//button[@class="save"]</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>waitForElementPresent</td> <td>storeEval</td>
<td>//div[@class="transition_message"]</td> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td></td> <td>dump</td>
</tr> </tr>
<tr> <tr>
<td>assertTextPresent</td> <td>type</td>
<td>Data updated.</td> <td>//div[@class="input"]/div/textarea</td>
<td></td> <td>${dump}</td>
</tr> </tr>
<!-- update 2nd output - template_test_release_output_expected_002_de_html --> </tal:block>
<tr> <tr>
<td>echo</td> <td>verifyElementPresent</td>
<td>update => template_test_release_output_expected_002_de_html</td> <td>//button[@class="save"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyTextPresent</td> <td>clickAndWait</td>
<td>Web Pages</td> <td>//button[@class="save"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>waitForElementPresent</td>
<td>//a[contains(text(), 'Web Pages')]</td> <td>//div[@class="transition_message"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>assertTextPresent</td>
<td>records</td> <td>Data updated.</td>
<td></td> <td></td>
</tr> </tr>
<tr> <!-- CASE 2 - template_test_release_output_expected_002_de_html -->
<td>type</td> <tr>
<td>name=listbox_reference</td> <td>echo</td>
<td>Template.Test.Release</td> <td>CASE 2 => template_test_release_output_expected_002_de_html</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_version</td> <td>verifyTextPresent</td>
<td>002</td> <td>Web Pages</td>
</tr> <td></td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_version</td> <td>click</td>
<td>\13</td> <td>//a[contains(text(), 'Web Pages')]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template Test Release</td> <td>waitForTextPresent</td>
<td></td> <td>records</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <tr>
<td>//a[contains(text(), 'Template.Test.Release')]</td> <td>type</td>
<td></td> <td>name=listbox_reference</td>
</tr> <td>Template.Test.Release</td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Short Title</td> <td>type</td>
<td></td> <td>name=listbox_version</td>
</tr> <td>002</td>
<!-- Save once to set modification date for live tests --> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>keyPressAndWait</td>
<td>//button[@class="save"]</td> <td>listbox_version</td>
<td></td> <td>\13</td>
</tr> </tr>
<tr> <tr>
<td>verifyElementPresent</td> <td>waitForTextPresent</td>
<td>//button[@class="save"]</td> <td>Template Test Release</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>click</td>
<td>//button[@class="save"]</td> <td>//a[contains(text(), 'Template.Test.Release')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForTextPresent</td>
<td>//div[@class="transition_message"]</td> <td>Short Title</td>
<td></td> <td></td>
</tr> </tr>
<tr> <!-- Save once to set modification date for live tests -->
<td>assertTextPresent</td> <tr>
<td>Data updated.</td> <td>waitForElementPresent</td>
<td></td> <td>//button[@class="save"]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForElementPresent</td> <tr>
<td>//button[@class="import_export"]</td> <td>verifyElementPresent</td>
<td></td> <td>//button[@class="save"]</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <tr>
<td>//button[@class="import_export"]</td> <td>clickAndWait</td>
<td></td> <td>//button[@class="save"]</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>assertTextPresent</td>
<td>index=4</td> <td>Data updated.</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Export Release</td> <td>waitForElementPresent</td>
<td></td> <td>//button[@class="import_export"]</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=field_override_source_organisation_title</td> <td>click</td>
<td>Test Association</td> <td>//button[@class="import_export"]</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=field_override_source_person_title</td> <td>waitForTextPresent</td>
<td>Test Association Member</td> <td>Export Slideshow</td>
</tr> <td></td>
<tr> </tr>
<td>uncheck</td> <tr>
<td>name=field_display_about</td> <td>selectAndWait</td>
<td></td> <td>name=select_dialog</td>
</tr> <td>index=4</td>
<tr> </tr>
<td>clickAndWait</td> <tr>
<td>name=Base_showUpdateDialog:method</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>waitForTextPresent</td> <tr>
<td>Preview updated.</td> <td>type</td>
<td></td> <td>name=field_override_source_person_title</td>
</tr> <td>Test Association Member</td>
<tr> </tr>
<td>clickAndWait</td> <tr>
<td>name=Base_callDialogMethod:method</td> <td>uncheck</td>
<td></td> <td>name=field_display_about</td>
</tr> <td></td>
<tr> </tr>
<td>waitForPageToLoad</td> <tr>
<td></td> <td>clickAndWait</td>
<td></td> <td>name=Base_showUpdateDialog:method</td>
</tr> <td></td>
<tr> </tr>
<td>waitForElementNotPresent</td> <tr>
<td>name=Base_callDialogMethod:method</td> <td>waitForElementPresent</td>
<td></td> <td>//div[@class="transition_message"]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>©</td> <td>waitForTextPresent</td>
<td></td> <td>Preview updated.</td>
</tr> <td></td>
<tr> </tr>
<td>storeLocation</td> <tr>
<td>url</td> <td>clickAndWait</td>
<td></td> <td>name=Base_callDialogMethod:method</td>
</tr> <td></td>
<tr> </tr>
<td>echo</td> <tr>
<td>${url}</td> <td>waitForPageToLoad</td>
<td></td> <td></td>
</tr> <td></td>
<!-- Can't fetch iframe source, so request page again --> </tr>
<tr> <tr>
<td>storeEval</td> <td>waitForElementNotPresent</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=Base_callDialogMethod:method</td>
<td>page_source</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>goBackAndWait</td> <td>waitForTextPresent</td>
<td></td> <td>©</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tal:block tal:condition="python: no_file_update == False">
<td>waitForPageToLoad</td> <tr>
<td></td> <td>storeLocation</td>
<td></td> <td>url</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Web Pages</td> <td>echo</td>
<td></td> <td>${url}</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> <!-- Can't fetch iframe source, so request page again -->
<td>//a[contains(text(), 'Web Pages')]</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% AND %Output% AND %Release%</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_reference</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.Release.Expected.Output.Sample</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>records</td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'Template.Test.Release.Expected.Output.Sample')]</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_reference</td>
<td>waitForTextPresent</td> <td>%Template% AND %Output% AND %Release%</td>
<td>Short Title</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_version</td>
<td>waitForElementPresent</td> <td>002</td>
<td>//a/span[contains(text(), 'Edit')]</td> </tr>
<td></td> <tr>
</tr> <td>keyPressAndWait</td>
<tr> <td>listbox_reference</td>
<td>click</td> <td>\13</td>
<td>//a/span[contains(text(), 'Edit')]</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Template.Test.Release.Expected.Output.Sample</td>
<td>waitForElementPresent</td> <td></td>
<td>//textarea[@name="field_my_text_content"]</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Template.Test.Release.Expected.Output.Sample')]</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>Short Title</td>
<td>storeEval</td> <td></td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td> </tr>
<td>dump</td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//a/span[contains(text(), 'Edit')]</td>
<td>type</td> <td></td>
<td>//textarea[@name="field_my_text_content"]</td> </tr>
<td>${dump}</td> <tr>
</tr> <td>click</td>
<tr> <td>//a/span[contains(text(), 'Edit')]</td>
<td>verifyElementPresent</td> <td></td>
<td>//button[@class="save"]</td> </tr>
<td></td> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//div[@class="input"]/div/textarea</td>
<td>clickAndWait</td> <td></td>
<td>//button[@class="save"]</td> </tr>
<td></td> <tal:block tal:condition="python: no_file_update == False">
</tr> <tr>
<tr> <td>storeEval</td>
<td>waitForElementPresent</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>//div[@class="transition_message"]</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>storeEval</td>
<td>assertTextPresent</td> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_parameter;</td>
<td>Data updated.</td> <td>dump</td>
<td></td> </tr>
</tr> <tr>
<!-- update 1st pdf document - template_test_release_input_001_en_pdf --> <td>type</td>
<tr> <td>//div[@class="input"]/div/textarea</td>
<td>echo</td> <td>${dump}</td>
<td>update => template_test_release_input_001_en_pdf</td> </tr>
<td></td> </tal:block>
</tr> <tr>
<tr> <td>verifyElementPresent</td>
<td>open</td> <td>//button[@class="save"]</td>
<td>${base_url}/web_page_module/</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>clickAndWait</td>
<td>waitForTextPresent</td> <td>//button[@class="save"]</td>
<td>records</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForElementPresent</td>
<td>type</td> <td>//div[@class="transition_message"]</td>
<td>name=listbox_reference</td> <td></td>
<td>Template.Test.Release</td> </tr>
</tr> <tr>
<tr> <td>assertTextPresent</td>
<td>type</td> <td>Data updated.</td>
<td>name=listbox_version</td> <td></td>
<td>001</td> </tr>
</tr> <!-- CASE 1 (pdf) - template_test_release_input_001_en_pdf -->
<tr> <tr>
<td>keyPressAndWait</td> <td>echo</td>
<td>listbox_version</td> <td>CASE 1 (pdf) => template_test_release_input_001_en_pdf</td>
<td>\13</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>open</td>
<td>Template Test Release</td> <td>${base_url}/web_page_module/</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>waitForTextPresent</td>
<td>//a[contains(text(), 'Template.Test.Release')]</td> <td>records</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>type</td>
<td>Short Title</td> <td>name=listbox_reference</td>
<td></td> <td>Template.Test.Release</td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>type</td>
<td>//button[@class="import_export"]</td> <td>name=listbox_version</td>
<td></td> <td>001</td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>keyPressAndWait</td>
<td>//button[@class="import_export"]</td> <td>listbox_version</td>
<td></td> <td>\13</td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>Export Slideshow</td> <td>Template Test Release</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>selectAndWait</td> <td>click</td>
<td>name=select_dialog</td> <td>//a[contains(text(), 'Template.Test.Release')]</td>
<td>index=4</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>Export Release</td> <td>Short Title</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>select</td> <td>waitForElementPresent</td>
<td>name=field_format</td> <td>//button[@class="import_export"]</td>
<td>index=1</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>click</td>
<td>name=Base_callDialogMethod:method</td> <td>//button[@class="import_export"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForPageToLoad</td> <td>waitForTextPresent</td>
<td></td> <td>Export Slideshow</td>
<td></td> <td></td>
</tr> </tr>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded --> <tr>
<tr> <td>selectAndWait</td>
<td>waitForTitle</td> <td>name=select_dialog</td>
<td></td> <td>index=4</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>verifyTitle</td> <td>Export Release</td>
<td></td> <td></td>
<td></td> </tr>
</tr> <tr>
<!-- Store this location for re-requesting --> <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>
<tr> <td>name=Base_callDialogMethod:method</td>
<td>echo</td> <td></td>
<td>${url}</td> </tr>
<td></td> <tr>
</tr> <td>waitForPageToLoad</td>
<!-- Can't access pdf source inside iframe, so request page again --> <td></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> <!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<td>pdf_source</td> <tr>
</tr> <td>waitForTitle</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 not enough--> <td></td>
<tr> </tr>
<td>pause</td> <tr>
<td>12000</td> <td>verifyTitle</td>
<td></td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>goBackAndWait</td> <tal:block tal:condition="python: no_file_update == False">
<td></td> <!-- Store this location for re-requesting -->
<td></td> <tr>
</tr> <td>storeLocation</td>
<tr> <td>url</td>
<td>waitForPageToLoad</td> <td></td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>echo</td>
<tr> <td>${url}</td>
<td>waitForTextPresent</td> <td></td>
<td>Web Pages</td> </tr>
<td></td> <!-- Can't access pdf source inside iframe, so request page again -->
</tr> <tr>
<tr> <td>storeEval</td>
<td>click</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>//a[contains(text(), 'ERP5')]</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>waitForElementPresent</td> <tr>
<td>//a[contains(text(), 'Documents')]</td> <td>pause</td>
<td></td> <td>12000</td>
</tr> <td></td>
<tr> </tr>
<td>click</td> </tal:block>
<td>//a[contains(text(), 'Documents')]</td> <tr>
<td></td> <td>goBackAndWait</td>
</tr> <td></td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>records</td> <tr>
<td></td> <td>waitForPageToLoad</td>
</tr> <td></td>
<tr> <td></td>
<td>type</td> </tr>
<td>name=listbox_reference</td> <tr>
<td>Template.Test.Release</td> <td>waitForTextPresent</td>
</tr> <td>Web Pages</td>
<tr> <td></td>
<td>type</td> </tr>
<td>name=listbox_version</td> <tr>
<td>001</td> <td>click</td>
</tr> <td>//a[contains(text(), 'ERP5')]</td>
<tr> <td></td>
<td>keyPressAndWait</td> </tr>
<td>listbox_version</td> <tr>
<td>\13</td> <td>waitForElementPresent</td>
</tr> <td>//a[contains(text(), 'Documents')]</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Template Test Release</td> <tr>
<td></td> <td>click</td>
</tr> <td>//a[contains(text(), 'Documents')]</td>
<tr> <td></td>
<td>clickAndWait</td> </tr>
<td>//a[contains(text(), 'Template.Test.Release')]</td> <tr>
<td></td> <td>waitForTextPresent</td>
</tr> <td>records</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Short Title</td> <tr>
<td></td> <td>type</td>
</tr> <td>name=listbox_reference</td>
<!-- manual form submit --> <td>Template.Test.Release</td>
<tr> </tr>
<td>storeLocation</td> <tr>
<td>url</td> <td>type</td>
<td></td> <td>name=listbox_version</td>
</tr> <td>001</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>keyPressAndWait</td>
<td>storeEval</td> <td>listbox_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>\13</td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>storeEval</td> <td>Template Test Release</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td> <td></td>
<td>pdf_dump</td> </tr>
</tr> <tr>
<tr> <td>clickAndWait</td>
<td>echo</td> <td>//a[contains(text(), 'Template.Test.Release')]</td>
<td>${pdf_dump}</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>verifyNotExpression</td> <td>Short Title</td>
<td>${pdf_dump}</td> <td></td>
<td>null</td> </tr>
</tr> <tal:block tal:condition="python: no_file_update == False">
<tr> <!-- manual form submit -->
<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.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> <td>storeLocation</td>
<td>promise</td> <td>url</td>
</tr> <td></td>
<tr> </tr>
<td>storeEval</td> <!-- only handle pdf_source (a promise!) here, because it needs to be set on
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</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>waitForElementPresent</td> <td></td>
<td>//div[@class="transition_message"]</td> </tr>
<td></td> <tr>
</tr> <td>storeEval</td>
<tr> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<td>waitForTextPresent</td> <td>pdf_dump</td>
<td>Data updated.</td> </tr>
<td></td> <tr>
</tr> <td>echo</td>
<!-- generate image - template_test_release_input_page_0_001_en_bmp --> <td>${pdf_dump}</td>
<tr> <td></td>
<td>echo</td> </tr>
<td>update => template_test_release_input_page_0_001_en_bmp</td> <tr>
<td></td> <td>verifyNotExpression</td>
</tr> <td>${pdf_dump}</td>
<tr> <td>null</td>
<td>storeEval</td> </tr>
<td>storedVars["url"].split("?")[0]</td> <tr>
<td>screenshot_url</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.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>
<td>echo</td> </tr>
<td>${screenshot_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>open</td> </tr>
<td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_release_input_page_0_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>Data updated.</td>
<!-- update 2nd pdf document - template_test_release_input_002_de_pdf --> <td></td>
<tr> </tr>
<td>echo</td> <!-- generate image - template_test_release_input_page_0_001_en_bmp -->
<td>update => template_test_release_input_002_de_pdf</td> <tr>
<td></td> <td>echo</td>
</tr> <td>update => template_test_release_input_page_0_001_en_bmp</td>
<tr> <td></td>
<td>open</td> </tr>
<td>${base_url}/web_page_module/</td> <tr>
<td></td> <td>storeEval</td>
</tr> <td>storedVars["url"].split("?")[0]</td>
<tr> <td>screenshot_url</td>
<td>waitForTextPresent</td> </tr>
<td>records</td> <tr>
<td></td> <td>echo</td>
</tr> <td>${screenshot_url}</td>
<tr> <td></td>
<td>type</td> </tr>
<td>name=listbox_reference</td> <tr>
<td>Template.Test.Release</td> <td>open</td>
</tr> <td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_release_input_page_0_001_en_bmp</td>
<tr> <td></td>
<td>type</td> </tr>
<td>name=listbox_version</td> <tr>
<td>002</td> <td>waitForTextPresent</td>
</tr> <td>Screenshot updated.</td>
<tr> <td></td>
<td>keyPressAndWait</td> </tr>
<td>listbox_version</td> </tal:block>
<td>\13</td> <!-- CASE 2 - template_test_release_input_002_de_pdf -->
</tr> <tr>
<tr> <td>echo</td>
<td>waitForTextPresent</td> <td>CASE 2 => template_test_release_input_002_de_pdf</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>
<tr> <td>type</td>
<td>waitForElementPresent</td> <td>name=listbox_reference</td>
<td>//button[@class="import_export"]</td> <td>Template.Test.Release</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>002</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 Release</td>
<td>name=select_dialog</td> <td></td>
<td>index=4</td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>waitForTextPresent</td> <td>//a[contains(text(), 'Template.Test.Release')]</td>
<td>Export Release</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> <tr>
<tr> <td>waitForElementPresent</td>
<td>type</td> <td>//button[@class="import_export"]</td>
<td>name=field_override_source_organisation_title</td> <td></td>
<td>Test Association</td> </tr>
</tr> <tr>
<tr> <td>click</td>
<td>type</td> <td>//button[@class="import_export"]</td>
<td>name=field_override_source_person_title</td> <td></td>
<td>Test Association Member</td> </tr>
</tr> <tr>
<tr> <td>waitForTextPresent</td>
<td>check</td> <td>Export Slideshow</td>
<td>name=field_display_about</td> <td></td>
<td></td> </tr>
</tr> <tr>
<tr> <td>selectAndWait</td>
<td>clickAndWait</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>
<!-- PDF viewer has no document.title, wait for "" means pdf is loaded --> <td>select</td>
<tr> <td>name=field_format</td>
<td>waitForTitle</td> <td>index=1</td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=field_override_source_organisation_title</td>
<td>verifyTitle</td> <td>Test Association</td>
<td></td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<!-- Store this location for re-requesting --> <td>name=field_override_source_person_title</td>
<tr> <td>Test Association Member</td>
<td>storeLocation</td> </tr>
<td>url</td> <tr>
<td></td> <td>check</td>
</tr> <td>name=field_display_about</td>
<tr> <td></td>
<td>echo</td> </tr>
<td>${url}</td> <tr>
<td></td> <td>clickAndWait</td>
</tr> <td>name=Base_callDialogMethod:method</td>
<!-- Can't fetch pdf 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.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>waitForPageToLoad</td>
<td>pdf_source</td> <td></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/6000 did not work--> <!-- PDF viewer has no document.title, wait for "" means pdf is loaded -->
<tr> <tr>
<td>pause</td> <td>waitForTitle</td>
<td>9000</td> <td></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>goBackAndWait</td> <td>verifyTitle</td>
<td></td> <td></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tal:block tal:condition="python: no_file_update == False">
<td>waitForPageToLoad</td> <!-- Store this location for re-requesting -->
<td></td> <tr>
<td></td> <td>storeLocation</td>
</tr> <td>url</td>
<tr> <td></td>
<td>waitForTextPresent</td> </tr>
<td>Web Pages</td> <tr>
<td></td> <td>echo</td>
</tr> <td>${url}</td>
<tr> <td></td>
<td>click</td> </tr>
<td>//a[contains(text(), 'ERP5')]</td> <!-- Can't fetch pdf 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.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>waitForElementPresent</td> <td>pdf_source</td>
<td>//a[contains(text(), 'Documents')]</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/6000 did not work-->
<tr> <tr>
<td>click</td> <td>pause</td>
<td>//a[contains(text(), 'Documents')]</td> <td>9000</td>
<td></td> <td></td>
</tr> </tr>
<tr> </tal:block>
<td>waitForTextPresent</td> <tr>
<td>records</td> <td>goBackAndWait</td>
<td></td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_reference</td> <td>waitForPageToLoad</td>
<td>Template.Test.Release</td> <td></td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_version</td> <td>waitForTextPresent</td>
<td>002</td> <td>Web Pages</td>
</tr> <td></td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_version</td> <td>click</td>
<td>\13</td> <td>//a[contains(text(), 'ERP5')]</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>Template Test Release</td> <td>waitForElementPresent</td>
<td></td> <td>//a[contains(text(), 'Documents')]</td>
</tr> <td></td>
<tr> </tr>
<td>clickAndWait</td> <tr>
<td>//a[contains(text(), 'Template.Test.Release')]</td> <td>click</td>
<td></td> <td>//a[contains(text(), 'Documents')]</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>
<!-- manual form submit --> </tr>
<tr> <tr>
<td>storeLocation</td> <td>type</td>
<td>url</td> <td>name=listbox_reference</td>
<td></td> <td>Template.Test.Release</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>type</td>
<tr> <td>name=listbox_version</td>
<td>storeEval</td> <td>002</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>keyPressAndWait</td>
<tr> <td>listbox_version</td>
<td>storeEval</td> <td>\13</td>
<td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td> </tr>
<td>pdf_dump</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Template Test Release</td>
<td>echo</td> <td></td>
<td>${pdf_dump}</td> </tr>
<td></td> <tr>
</tr> <td>clickAndWait</td>
<tr> <td>//a[contains(text(), 'Template.Test.Release')]</td>
<td>verifyNotExpression</td> <td></td>
<td>${pdf_dump}</td> </tr>
<td>null</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Short Title</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> <tal:block tal:condition="python: no_file_update == False">
</tr> <!-- manual form submit -->
<tr> <tr>
<td>storeEval</td> <td>storeLocation</td>
<td>storedVars["promise"].then(function () {document.getElementById("selenium_myiframe").src=storedVars["url"].split("?")[0]+"/File_view?portal_status_message=Data%20updated."});</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>waitForElementPresent</td> the iframe and a page-reload resets all (bad) parameters manually set -->
<td>//div[@class="transition_message"]</td> <tr>
<td></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>waitForTextPresent</td> </tr>
<td>Data updated.</td> <tr>
<td></td> <td>storeEval</td>
</tr> <td>document.getElementById("selenium_myiframe").contentDocument.body.bad_pdf_parameter</td>
<!-- generate image - template_test_release_input_page_0_002_de_bmp --> <td>pdf_dump</td>
<tr> </tr>
<td>echo</td> <tr>
<td>update => template_test_release_input_page_0_002_de_bmp</td> <td>echo</td>
<td></td> <td>${pdf_dump}</td>
</tr> <td></td>
<tr> </tr>
<td>storeEval</td> <tr>
<td>storedVars["url"].split("?")[0]</td> <td>verifyNotExpression</td>
<td>screenshot_url</td> <td>${pdf_dump}</td>
</tr> <td>null</td>
<tr> </tr>
<td>echo</td> <tr>
<td>${screenshot_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.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>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_release_input_page_0_002_de_bmp</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>Screenshot updated.</td> <td>waitForElementPresent</td>
<td></td> <td>//div[@class="transition_message"]</td>
</tr> <td></td>
<!-- make sure print exchange works --> </tr>
<tr> <tr>
<td>echo</td> <td>waitForTextPresent</td>
<td>action => print</td> <td>Data updated.</td>
<td></td> <td></td>
</tr> </tr>
<tr> <!-- generate image - template_test_release_input_page_0_002_de_bmp -->
<td>open</td> <tr>
<td>${base_url}/web_page_module/</td> <td>echo</td>
<td></td> <td>update => template_test_release_input_page_0_002_de_bmp</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> <tr>
<td>records</td> <td>storeEval</td>
<td></td> <td>storedVars["url"].split("?")[0]</td>
</tr> <td>screenshot_url</td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_reference</td> <td>echo</td>
<td>Template.Test.Release</td> <td>${screenshot_url}</td>
</tr> <td></td>
<tr> </tr>
<td>type</td> <tr>
<td>name=listbox_version</td> <td>open</td>
<td>001</td> <td>${screenshot_url}/Document_createScreenshot?frame=0&amp;doc_id=template_test_release_input_page_0_002_de_bmp</td>
</tr> <td></td>
<tr> </tr>
<td>keyPressAndWait</td> <tr>
<td>listbox_version</td> <td>waitForTextPresent</td>
<td>\13</td> <td>Screenshot updated.</td>
</tr> <td></td>
<tr> </tr>
<td>waitForTextPresent</td> </tal:block>
<td>Template Test Release</td> <!-- make sure print exchange works -->
<td></td> <tr>
</tr> <td>echo</td>
<tr> <td>ACTION => PRINT</td>
<td>click</td> <td></td>
<td>//a[contains(text(), 'Template.Test.Release')]</td> </tr>
<td></td> <tr>
</tr> <td>open</td>
<tr> <td>${base_url}/web_page_module/</td>
<td>waitForTextPresent</td> <td></td>
<td>Short Title</td> </tr>
<td></td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>records</td>
<td>waitForElementPresent</td> <td></td>
<td>//button[@class="print"]</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_reference</td>
<td>click</td> <td>Template.Test.Release</td>
<td>//button[@class="print"]</td> </tr>
<td></td> <tr>
</tr> <td>type</td>
<tr> <td>name=listbox_version</td>
<td>waitForTextPresent</td> <td>001</td>
<td>Print As Slideshow</td> </tr>
<td></td> <tr>
</tr> <td>keyPressAndWait</td>
<tr> <td>listbox_version</td>
<td>selectAndWait</td> <td>\13</td>
<td>name=select_dialog</td> </tr>
<td>index=4</td> <tr>
</tr> <td>waitForTextPresent</td>
<tr> <td>Template Test Release</td>
<td>waitForTextPresent</td> <td></td>
<td>Display Automatic About</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
<tr> <td>//a[contains(text(), 'Template.Test.Release')]</td>
<td>clickAndWait</td> <td></td>
<td>name=Base_showUpdateDialog:method</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> <tr>
</tr> <td>waitForElementPresent</td>
<tr> <td>//button[@class="print"]</td>
<td>waitForTextPresent</td> <td></td>
<td>Preview updated.</td> </tr>
<td></td> <tr>
</tr> <td>click</td>
</tbody></table> <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
<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 flag for test environment to not save files in Zelenium tests
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
return False
<?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_setSkipSave</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
================================================================================
Tear down preferences set for template test
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
# inspired by erp5_user_tutorial_ui_test
portal = context.getPortalObject()
zuite_preference_id = "zuite_erp5_ui_test_preference"
isTransitionPossible = portal.portal_workflow.isTransitionPossible
preference = getattr(portal.portal_preferences, zuite_preference_id, None)
if preference is None:
preference = context.portal_preferences.newContent(
portal_type="Preference",
id=zuite_preference_id
)
if isTransitionPossible(preference, "enable"):
preference.enable()
preference.setPreferredTextEditor("text_area")
preference.setPreferredSourceCodeEditor("text_area")
portal.portal_caches.clearAllCache()
return "Ok"
<?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_setupTemplateTest</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 transaction
import unittest
from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import ERP5TypeFunctionalTestCase
class TestFunctionalCorporateIdentityTemplateList(ERP5TypeFunctionalTestCase):
foreground = 0
run_only = "template_test_zuite"
def getTitle(self):
return 'Corporate Identity UI Test'
def getBusinessTemplateList(self):
return (
'erp5_base',
'erp5_font',
'erp5_web',
'erp5_dms',
'erp5_corporate_identity',
'erp5_corporate_identity_test',
'erp5_ui_test_core',
'erp5_test_result'
)
def _removeZuite_SetSkipSaveScript(self):
skin_folder = self.portal.portal_skins.custom
if 'Zuite_setSkipSave' in skin_folder.objectIds():
skin_folder.manage_delObjects(['Zuite_setSkipSave'])
def _createZuite_createSetSkipSaveScript(self, return_value=None):
skin_folder = self.portal.portal_skins.custom
if 'Zuite_setSkipSave' not in skin_folder.objectIds():
skin_folder.manage_addProduct['PythonScripts'].\
manage_addPythonScript(id='Zuite_setSkipSave')
python_script = skin_folder['Zuite_setSkipSave']
python_script_body = """return %r""" % (return_value)
python_script.ZPythonScript_edit('REQUEST=None', python_script_body)
def afterSetUp(self):
ERP5TypeFunctionalTestCase.afterSetUp(self)
self._createZuite_createSetSkipSaveScript(return_value=True)
self.tic()
def beforeTearDown(self):
ERP5TypeFunctionalTestCase.beforeTearDown(self)
self._removeZuite_SetSkipSaveScript()
transaction.commit()
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_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
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