Commit 5d16de95 authored by Ludovic Kiefer's avatar Ludovic Kiefer Committed by Romain Courteaud

erp5_run_my_doc_renderjs_ui_test: fix tests for the new version of the Slideshow Editor gadget

parent de1f4a97
......@@ -65,22 +65,13 @@
</tal:block>
<tr>
<td colspan="3"><b>Go to the metadata form</b></td>
</tr>
<tr>
<td>click</td>
<td>//button[text()='Metadata']</td>
<td></td>
<td colspan="3"><b>Edit the title of the slide</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>title_html</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b>Edit the metadata</b></td>
</tr>
<tr>
<td>type</td>
<td>title_html</td>
......@@ -88,11 +79,11 @@
</tr>
<tr>
<td colspan="3"><b>Go back to the text form</b></td>
<td colspan="3"><b>Go to the comment form</b></td>
</tr>
<tr>
<td>click</td>
<td>//button[text()='Text']</td>
<td>//button[text()='Comments']</td>
<td></td>
</tr>
<tr>
......@@ -102,18 +93,18 @@
</tr>
<tr>
<td colspan="3"><b>Check text content</b></td>
<td colspan="3"><b>Set text content</b></td>
</tr>
<tal:block tal:define="text_content python: '<p>slide 1 text content</p>'">
<tal:block metal:use-macro="container/Zuite_CommonTemplateForRenderjsUi/macros/verify_ckeditor_text_content"/>
<tal:block tal:define="text_content python: 'slide 1 comment content'">
<tal:block metal:use-macro="container/Zuite_CommonTemplateForRenderjsUi/macros/type_ckeditor_text_content"/>
</tal:block>
<tr>
<td colspan="3"><b>Go back to the metadata form</b></td>
<td colspan="3"><b>Go to the text form</b></td>
</tr>
<tr>
<td>click</td>
<td>//button[text()='Metadata']</td>
<td>//button[text()='Text']</td>
<td></td>
</tr>
<tr>
......@@ -122,6 +113,13 @@
<td></td>
</tr>
<tr>
<td colspan="3"><b>Check text content</b></td>
</tr>
<tal:block tal:define="text_content python: '<p>slide 1 text content</p>'">
<tal:block metal:use-macro="container/Zuite_CommonTemplateForRenderjsUi/macros/verify_ckeditor_text_content"/>
</tal:block>
<tr>
<td colspan="3"><b>Check the metadata</b></td>
</tr>
......@@ -131,6 +129,27 @@
<td>slide 1 test title</td>
</tr>
<tr>
<td colspan="3"><b>Go to the comment form</b></td>
</tr>
<tr>
<td>click</td>
<td>//button[text()='Comments']</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>title_html</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b>Check comment content</b></td>
</tr>
<tal:block tal:define="text_content python: '<p>slide 1 comment content</p>'">
<tal:block metal:use-macro="container/Zuite_CommonTemplateForRenderjsUi/macros/verify_ckeditor_text_content"/>
</tal:block>
<tr>
<td colspan="3"><b>Go back to the slide list</b></td>
</tr>
......@@ -153,12 +172,32 @@
<td>//button[text()='Edit']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Slide 1</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>title_html</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b>Go to the text form</b></td>
</tr>
<tr>
<td>click</td>
<td>//button[text()='Text']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>title_html</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b>Check the metadata</b></td>
</tr>
......@@ -176,6 +215,183 @@
<td>slide 1 test title</td>
</tr>
<tr>
<td colspan="3"><b>Add a new slide</b></td>
</tr>
<tr>
<td>click</td>
<td>//button[text()='New Slide']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Slide 2</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Slide 2</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b>Go to previous slide</b></td>
</tr>
<tr>
<td>click</td>
<td>//button[text()='Previous']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Slide 1</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Slide 1</td>
<td></td>
</tr>
<tr>
<td>assertValue</td>
<td>title_html</td>
<td>slide 1 test title</td>
</tr>
<tr>
<td colspan="3"><b>Change the type to Illustration</b></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name='type']</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='type']</td>
<td>label=Illustration</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>image_url</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>image_url</td>
<td>https://example.com/image.png</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>image_caption</td>
<td></td>
</tr>
<!--<tr>
<td>type</td>
<td>image_caption</td>
<td>Illustration</td>
</tr>-->
<tr>
<td colspan="3"><b>Go to next slide</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[text()='Next']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[text()='Next']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Slide 2</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Slide 2</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b>Delete slide</b></td>
</tr>
<tr>
<td>click</td>
<td>//button[text()='Delete']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>1 Slides</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>1 Slides</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//img[@src='https://example.com/image.png']</td>
<td></td>
</tr>
<!--
<tr>
<td>assertElementPresent</td>
<td>//img[@title='Illustration']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//img[@alt='Illustration']</td>
<td></td>
</tr>
-->
<tr>
<td colspan="3"><b>Go back to the slide 1</b></td>
</tr>
<tr>
<td>click</td>
<td>//button[text()='Edit']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Slide 1</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>title_html</td>
<td></td>
</tr>
<tr>
<td colspan="3"><b>Check text content</b></td>
</tr>
<tal:block tal:define="text_content python: '<p>slide 1 text content</p>'">
<tal:block metal:use-macro="container/Zuite_CommonTemplateForRenderjsUi/macros/verify_ckeditor_text_content"/>
</tal:block>
<td colspan="3"><b>Check the title</b></td>
<tr>
<td>assertValue</td>
<td>title_html</td>
<td>slide 1 test title</td>
</tr>
<td colspan="3"><b>Check the image url</b></td>
<tr>
<td>assertValue</td>
<td>image_url</td>
<td>https://example.com/image.png</td>
</tr>
</tbody></table>
</body>
</html>
\ 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