Commit 1358385d authored by Tomáš Peterka's avatar Tomáš Peterka

[renderjs_test] Add more coverage

parent 3e781963
...@@ -23,15 +23,15 @@ ...@@ -23,15 +23,15 @@
<!-- Create 3 Foo objects relation, 2 with embedded documents and one empty --> <!-- Create 3 Foo objects relation, 2 with embedded documents and one empty -->
<tr><td>open</td> <tr><td>open</td>
<td>${base_url}/foo_module/FooModule_createObjects?start:int=1&amp;num:int=3&amp;big_category_related:bool=True</td><td></td></tr> <td>${base_url}/foo_module/FooModule_createObjects?start:int=100&amp;num:int=49&amp;big_category_related:bool=True</td><td></td></tr>
<tr><td>assertTextPresent</td> <tr><td>assertTextPresent</td>
<td>Created Successfully.</td><td></td></tr> <td>Created Successfully.</td><td></td></tr>
<tr><td>open</td> <tr><td>open</td>
<td>${base_url}/foo_module/FooModule_createObjects?start:int=4&amp;num:int=2&amp;create_line:bool=True</td><td></td></tr> <td>${base_url}/foo_module/FooModule_createObjects?start:int=200&amp;num:int=21&amp;create_line:bool=True</td><td></td></tr>
<tr><td>assertTextPresent</td> <tr><td>assertTextPresent</td>
<td>Created Successfully.</td><td></td></tr> <td>Created Successfully.</td><td></td></tr>
<tr><td>open</td> <tr><td>open</td>
<td>${base_url}/foo_module/FooModule_createObjects?start:int=6&amp;num:int=1</td><td></td></tr> <td>${base_url}/foo_module/FooModule_createObjects?start:int=300&amp;num:int=2</td><td></td></tr>
<tr><td>assertTextPresent</td> <tr><td>assertTextPresent</td>
<td>Created Successfully.</td><td></td></tr> <td>Created Successfully.</td><td></td></tr>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<tr><td>open</td> <tr><td>open</td>
<td>${renderjs_url}/#/foo_module</td><td></td></tr> <td>${renderjs_url}/#/foo_module</td><td></td></tr>
<tal:block tal:define="search_query string:( title: &quot;Title 3&quot; OR id: &quot;5&quot; )"> <tal:block tal:define="search_query string:( title: &quot;Title 3&#37;&quot; )">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block> </tal:block>
...@@ -70,6 +70,12 @@ ...@@ -70,6 +70,12 @@
'text': 'Deleted.'}"> 'text': 'Deleted.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr><td>open</td>
<td>${renderjs_url}/#/foo_module</td><td></td></tr>
<tal:block tal:define="search_query string:( title: &quot;Title 3&#37;&quot; )">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(2)', 'footer': '2 Records'}"> <tal:block tal:define="pagination_configuration python: {'header': '(2)', 'footer': '2 Records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
...@@ -85,7 +91,7 @@ ...@@ -85,7 +91,7 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/clear_query" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/clear_query" />
<tal:block tal:define="pagination_configuration python: {'header': '(6)', 'footer': '6 Records'}"> <tal:block tal:define="pagination_configuration python: {'header': '(1 - 10 / 72)', 'footer': 'Records 1 - 10 / 72'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block> </tal:block>
...@@ -94,14 +100,20 @@ ...@@ -94,14 +100,20 @@
<td>draft</td></tr> <td>draft</td></tr>
<tr><td>assertText</td> <tr><td>assertText</td>
<td>//div[@data-gadget-scope="field_listbox"]//table/tbody/tr[3]/td[4]//a</td> <td>//div[@data-gadget-scope="field_listbox"]//table/tbody/tr[3]/td[4]//a</td>
<td>deleted</td></tr> <td>draft</td></tr>
<tr><td>assertText</td> <tr><td>assertText</td>
<td>//div[@data-gadget-scope="field_listbox"]//table/tbody/tr[5]/td[4]//a</td> <td>//div[@data-gadget-scope="field_listbox"]//table/tbody/tr[5]/td[4]//a</td>
<td>deleted</td></tr> <td>draft</td></tr>
<tr><td>assertText</td> <tr><td>assertText</td>
<td>//div[@data-gadget-scope="field_listbox"]//table/tbody/tr[6]/td[4]//a</td> <td>//div[@data-gadget-scope="field_listbox"]//table/tbody/tr[6]/td[4]//a</td>
<td>draft</td></tr> <td>draft</td></tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter" />
<tal:block tal:define="filter_section_configuration python: {'index': 0, 'key': 'COLUMN_simulation_state', 'value': 'draft'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>//a[@data-i18n='Actions']</td><td></td></tr> <td>//a[@data-i18n='Actions']</td><td></td></tr>
<tr><td>click</td> <tr><td>click</td>
...@@ -112,19 +124,21 @@ ...@@ -112,19 +124,21 @@
<tr><td>click</td> <tr><td>click</td>
<td>//a[@data-i18n='Delete Multiple Documents']</td><td></td></tr> <td>//a[@data-i18n='Delete Multiple Documents']</td><td></td></tr>
<tal:block tal:define="pagination_configuration python: {'header': '(1 - 10 / 70)', 'footer': 'Records 1 - 10 / 70'}">
<tal:block tal:define="pagination_configuration python: {'header': '(6)', 'footer': '6 Records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block> </tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="notification_configuration python: {'class': 'error', <tal:block tal:define="notification_configuration python: {'class': 'error',
'text': 'All documents are selected! Submit again to proceed or Cancel and narrow down your search.'}"> 'text': 'Too many documents selected! Submit again to proceed with the first 50 or Cancel and narrow down your search.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block> </tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(1 - 10 / 70)', 'footer': 'Records 1 - 10 / 70'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr><td>waitForElementNotPresent</td> <tr><td>waitForElementNotPresent</td>
...@@ -135,22 +149,22 @@ ...@@ -135,22 +149,22 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block> </tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(6)', 'footer': '6 Records'}"> <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr><td>open</td>
<td>${renderjs_url}/#/foo_module</td><td></td></tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter" />
<tal:block tal:define="filter_section_configuration python: {'index': 0, 'key': 'COLUMN_simulation_state', 'value': 'deleted'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="pagination_configuration python: {'header': '(1 - 10 / 52)', 'footer': 'Records 1 - 10 / 52'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block> </tal:block>
<tr><td>assertText</td> <tr><td>assertText</td>
<td>//div[@data-gadget-scope="field_listbox"]//table/tbody/tr[1]/td[4]//a</td> <td>//div[@data-gadget-scope="field_listbox"]//table/tbody/tr[1]/td[4]//a</td>
<td>deleted</td></tr> <td>deleted</td></tr>
<tr><td>assertText</td>
<td>//div[@data-gadget-scope="field_listbox"]//table/tbody/tr[4]/td[4]//a</td>
<td>deleted</td></tr>
<tr><td>assertText</td>
<td>//div[@data-gadget-scope="field_listbox"]//table/tbody/tr[6]/td[4]//a</td>
<td>deleted</td></tr>
</tbody></table> </tbody></table>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><th rowspan="1" colspan="3">Test RenderJS UI Module Action Change State</th></tr> <tr><th rowspan="1" colspan="3">Test RenderJS UI Module Action Change State (expected failure)</th></tr>
</thead><tbody> </thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
<tr><td>assertElementPresent</td> <tr><td>assertElementPresent</td>
<td>//select[@name="field_workflow_action"]/option[@value="invalidate_action"]</td><td></td></tr> <td>//select[@name="field_workflow_action"]/option[@value="invalidate_action"]</td><td></td></tr>
<tr><th>Check Listbox filtering of documents with available selected action</th><tr> <tr><th colspan="3">Check Listbox filtering of documents with available selected action</th><tr>
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>//select[@name="field_workflow_action"]/option[@value="validate_action"]</td><td></td></tr> <td>//select[@name="field_workflow_action"]/option[@value="validate_action"]</td><td></td></tr>
<tr><td>select</td> <tr><td>select</td>
...@@ -290,6 +290,52 @@ ...@@ -290,6 +290,52 @@
<tr><td>select</td> <tr><td>select</td>
<td>//select[@name="field_workflow_action"]</td> <td>//select[@name="field_workflow_action"]</td>
<td>value=invalidate_action</td></tr> <td>value=invalidate_action</td></tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'error', 'text': 'Form updated.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tr><td>waitForElementPresent</td>
<td>//textarea[@name="field_workflow_dialog_your_comment"]</td><td></td></tr>
<tr><td>type</td>
<td>//textarea[@name="field_workflow_dialog_your_comment"]</td>
<td>Pain perdu</td></tr>
<tr><td>pause</td><td>2000</td><td></td></tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success', 'text': 'Workflow modification in progress.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tr><td>open</td>
<td>${base_url}/Zuite_waitForActivities</td><td></td></tr>
<tr><td>assertTextPresent</td>
<td>Done.</td><td></td></tr>
<tr><td>open</td>
<td>${renderjs_url}/#/foo_module</td><td></td></tr>
<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 6)', 'footer': 'Records 1 - 3 / 6'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_listbox"]//tbody/tr[1]/td[1]//a</td><td></td></tr>
<tr><td>click</td>
<td>//div[@data-gadget-scope="field_listbox"]//tbody/tr[1]/td[1]//a</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-role="header"]//a[@data-i18n="Views"]</td><td></td></tr>
<tr><td>click</td>
<td>//div[@data-role="header"]//a[@data-i18n="Views"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@role="main"]//ul[@data-role="listview"]//a[@data-i18n="History"]</td><td></td></tr>
<tr><td>click</td>
<td>//div[@role="main"]//ul[@data-role="listview"]//a[@data-i18n="History"]</td><td></td></tr>
<tr><td>waitForTextPresent</td>
<td>Pain perdu</td><td></td></tr>
<tr><td>assertTextPresent</td>
<td>Pain perdu</td><td></td></tr>
</tbody></table> </tbody></table>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<body> <body>
<table cellpadding="1" cellspacing="1" border="1"> <table cellpadding="1" cellspacing="1" border="1">
<thead> <thead>
<tr><th rowspan="1" colspan="3">Test RenderJS UI Module Action Change State</th></tr> <tr><th rowspan="1" colspan="3">Test RenderJS UI Module Action Change State (expected failure)</th></tr>
</thead><tbody> </thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
......
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