Commit 49026d9d authored by Tomáš Peterka's avatar Tomáš Peterka Committed by Tomáš Peterka

[renderjs_ui_test] Cover more features of Mass Workflow Transition with a test

parent 6bc39b14
......@@ -108,6 +108,14 @@
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tbody/tr[3]/td[1]//p</td>
<td>10</td></tr>
<tr><td>waitForElementPresent</td>
<td>//select[@name="field_workflow_action"]/option</td><td></td></tr>
<tr><td>assertElementPresent</td>
<td>//select[@name="field_workflow_action"]/option[@value="validate_action"]</td><td></td></tr>
<tr><td>assertElementNotPresent</td>
<td>//select[@name="field_workflow_action"]/option[@value="invalidate_action"]</td><td></td></tr>
<tr><th colspan="3">Search <em>( title: "Title 1%" OR title: "Title 3%" )</em> so we work on subset</th></tr>
<tr><td>click</td>
<td>//div[@data-role="header"]//h1//a</td><td></td></tr>
......@@ -170,7 +178,6 @@
</tal:block>
<tr><td>waitForText</td>
<tr><td>assertText</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tbody/tr[1]/td[3]//a</td>
<td>validated</td></tr>
<tr><td>assertText</td>
......@@ -180,9 +187,109 @@
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tbody/tr[3]/td[3]//a</td>
<td>draft</td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-role="header"]//a[@data-i18n="Actions"]</td><td></td></tr>
<tr><td>click</td>
<td>//div[@data-role="header"]//a[@data-i18n="Actions"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//ul[@data-role="listview"]//a[@data-i18n="Change State"]</td><td></td></tr>
<tr><td>click</td>
<td>//ul[@data-role="listview"]//a[@data-i18n="Change State"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//select[@name="field_workflow_action"]/option</td><td></td></tr>
<tr><td>assertElementPresent</td>
<td>//select[@name="field_workflow_action"]/option[@value="validate_action"]</td><td></td></tr>
<tr><td>assertElementPresent</td>
<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><td>waitForElementPresent</td>
<td>//select[@name="field_workflow_action"]/option[@value="validate_action"]</td><td></td></tr>
<tr><td>select</td>
<td>//select[@name="field_workflow_action"]</td>
<td>value=validate_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>
<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>
<tr><td>waitForText</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tbody/tr[1]/td[3]//a</td>
<td>draft</td></tr>
<tr><td>assertText</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tbody/tr[1]/td[3]//a</td>
<td>draft</td></tr>
<tr><td>assertText</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tbody/tr[2]/td[3]//a</td>
<td>draft</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>
<!-- clear_query -->
<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>waitForText</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tbody/tr[1]/td[3]//a</td>
<td>validated</td></tr>
<tr><td>assertText</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tbody/tr[2]/td[3]//a</td>
<td>validated</td></tr>
<tr><td>assertText</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tbody/tr[3]/td[3]//a</td>
<td>validated</td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//nav/a[@data-i18n="Next"]</td><td></td></tr>
<tr><td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//nav/a[@data-i18n="Next"]</td><td></td></tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr><td>waitForText</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tbody/tr[1]/td[3]//a</td>
<td>validated</td></tr>
<tr><td>assertText</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tbody/tr[2]/td[3]//a</td>
<td>validated</td></tr>
<tr><td>assertText</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tbody/tr[3]/td[3]//a</td>
<td>validated</td></tr>
<tr><td>waitForElementPresent</td>
<td>//div[@data-role="header"]//a[@data-i18n="Actions"]</td><td></td></tr>
<tr><td>click</td>
<td>//div[@data-role="header"]//a[@data-i18n="Actions"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//ul[@data-role="listview"]//a[@data-i18n="Change State"]</td><td></td></tr>
<tr><td>click</td>
<td>//ul[@data-role="listview"]//a[@data-i18n="Change State"]</td><td></td></tr>
<tr><td>waitForElementPresent</td>
<td>//select[@name="field_workflow_action"]/option</td><td></td></tr>
<tr><td>assertElementNotPresent</td>
<td>//select[@name="field_workflow_action"]/option[@value="validate_action"]</td><td></td></tr>
<tr><td>assertElementPresent</td>
<td>//select[@name="field_workflow_action"]/option[@value="invalidate_action"]</td><td></td></tr>
<tr><td>select</td>
<td>//select[@name="field_workflow_action"]</td>
<td>value=invalidate_action</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