Commit 79ca6f06 authored by Tristan Cavelier's avatar Tristan Cavelier

erp5_web_renderjs_ui_test: Add macro to edit CKEditor content

parent 46cb1767
......@@ -907,4 +907,57 @@
</tr>
</tal:block>
<tal:block metal:define-macro="verify_ckeditor_text_content"><tal:comment tal:replace="nothing"><!--
this macro needs globals: text_content
--></tal:comment>
<tr>
<td colspan="3"><b>Verify CKEditor Text Content</b></td>
</tr>
<!-- Wait for ckeditor to be loaded :/ How to inspect inside another iframe? -->
<tr>
<td>pause</td>
<td>20000</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>document.querySelector('#selenium_myiframe').contentWindow.document.querySelector('iframe').contentWindow.document.querySelector('iframe').contentWindow.document.body.innerHTML</td>
<td>_macro_verify_ckeditor_text_content_temporary_var</td>
</tr>
<tr>
<td>verifyEval</td>
<td>storedVars['_macro_verify_ckeditor_text_content_temporary_var']</td>
<td tal:content="python: text_content"></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="type_ckeditor_text_content"><tal:comment tal:replace="nothing"><!--
this macro needs globals: text_content
--></tal:comment>
<tr>
<td colspan="3"><b>Type CKEditor Text Content</b></td>
</tr>
<!-- Wait for ckeditor to be loaded :/ How to inspect inside another iframe? -->
<tr>
<td>pause</td>
<td>20000</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td tal:content="python: 'document.querySelector(\'#selenium_myiframe\').contentWindow.document.querySelector(\'iframe\').contentWindow.document.querySelector(\'iframe\').contentWindow.document.body.innerHTML = \'{}\''.format(text_content.replace('\n', '\\n').replace('\'', '\\\''))"></td>
<td>_macro_type_ckeditor_text_content_temporary_var</td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
</tal:block>
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