Commit bcb30893 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_officejs_*ui_test] Use macros

Install erp5js tests to use its macros.

Translation attributes have been removed.
parent b6e072dd
......@@ -56,11 +56,7 @@
<td>//span[@data-i18n='Publisher List']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Next']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>click</td>
<td>//button[@data-i18n='Menu']</td>
......@@ -81,11 +77,7 @@
<td>//span[@data-i18n='Software List']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Next']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>click</td>
<td>//button[@data-i18n='Menu']</td>
......@@ -106,11 +98,7 @@
<td>//span[@data-i18n='Success Story List']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Next']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>click</td>
<td>//button[@data-i18n='Menu']</td>
......
......@@ -56,11 +56,7 @@
<td>//span[@data-i18n='Publisher List']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Next']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>assertElementPresent</td>
<td>//input[@id='search']</td>
......@@ -116,11 +112,7 @@
<td>//span[@data-i18n='Statistics']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Next']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>assertElementPresent</td>
<td>//input[@id='search']</td>
......@@ -171,11 +163,7 @@
<td>//span[@data-i18n='Software List']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Next']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>assertElementPresent</td>
<td>//input[@id='search']</td>
......@@ -226,11 +214,7 @@
<td>//span[@data-i18n='Success Story List']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Next']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>assertElementPresent</td>
<td>//input[@id='search']</td>
......
......@@ -3,4 +3,5 @@ erp5_web_renderjs_ui
erp5_ui_test_core
erp5_ui_test
erp5_accounting
erp5_test_result
\ No newline at end of file
erp5_test_result
erp5_web_renderjs_ui_test
\ No newline at end of file
......@@ -14,21 +14,13 @@
<td>${base_url}/web_site_module/erp5_officejs_support_request_ui/</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Next"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Next"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/paginate_next" />
<tr>
<td>refresh</td>
<td></td>
......@@ -39,11 +31,7 @@
<td>10000</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Next"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -141,10 +141,10 @@ and compare real click with simulated clicks.
<tr><td>selectFrame</td>
<td>relative=top</td><td></td></tr>
<tr><td>waitForText</td>
<td>//h1[@data-i18n="Recent Updates"]</td>
<td>//h1[contains(text(), "Recent Updates")]</td>
<td>Recent Updates (3)</td></tr> <!-- FIXME: this should be 2 here. 123dsfa is not "last month" -->
<tr><td>waitForText</td>
<td>//h1[@data-i18n="Recent Updates"]/../..//td[1]/a</td>
<td>//h1[contains(text(), "Recent Updates")]/../..//td[1]/a</td>
<td>Yesterday - RobotMaking - Submitted</td></tr>
<!-- reset filter is now enabled -->
......@@ -154,7 +154,7 @@ and compare real click with simulated clicks.
<tr><td>click</td>
<td>//input[@data-i18n="[value]Reset Filter"]</td><td></td></tr>
<tr><td>waitForText</td>
<td>//h1[@data-i18n="Recent Updates"]</td>
<td>//h1[contains(text(), "Recent Updates")]</td>
<td>glob:Recent Updates (1 - 5 / *)</td></tr>
</tbody></table>
......
......@@ -143,10 +143,10 @@ The approximated formula (by trial and error, so it migth be just wrong) is:
<tr><td>selectFrame</td>
<td>relative=top</td><td></td></tr>
<tr><td>waitForText</td>
<td>//h1[@data-i18n="Recent Updates"]</td>
<td>//h1[contains(text(), "Recent Updates")]</td>
<td>Recent Updates (1)</td></tr>
<tr><td>waitForText</td>
<td>//h1[@data-i18n="Recent Updates"]/../..//td[1]/a</td>
<td>//h1[contains(text(), "Recent Updates")]/../..//td[1]/a</td>
<td>Yesterday - PlaneMaking - Open</td></tr>
<!-- reset filter is now enabled -->
......@@ -156,7 +156,7 @@ The approximated formula (by trial and error, so it migth be just wrong) is:
<tr><td>click</td>
<td>//input[@data-i18n="[value]Reset Filter"]</td><td></td></tr>
<tr><td>waitForText</td>
<td>//h1[@data-i18n="Recent Updates"]</td>
<td>//h1[contains(text(), "Recent Updates")]</td>
<td>glob:Recent Updates (1 - 5 / *)</td></tr>
</tbody></table>
......
......@@ -14,23 +14,21 @@
<td>${base_url}/web_site_module/erp5_officejs_support_request_ui/</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tr>
<td>click</td>
<td>//a[@data-i18n='Support Requests']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>assertElementPresent</td>
<td>//a[@data-i18n='Support Request Module']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>assertTextPresent</td>
<td>Title</td>
<td></td>
</tr>
......
......@@ -17,14 +17,16 @@
<td>${base_url}/web_site_module/erp5_officejs_support_request_ui/</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>assertElementPresent</td>
<td>//h1[@data-i18n="[value]Support Request WorkLists"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>assertElementPresent</td>
<td>//section[@class="document_list"]//li[1]</td>
<td></td>
</tr>
......@@ -66,24 +68,24 @@
<td>//section[@class="document_list"]//li/a[contains(text(), "Suspended Support Requests")]/span[text() = "1"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>assertElementPresent</td>
<td>//h1/a[@data-i18n="Support Request Module"]</td>
<td></td>
</tr>
<!-- The module is filtered according to worklist definition, so it shows one document -->
<tr>
<td>waitForElementPresent</td>
<td>//h1[@data-i18n="Support Requests"]//span[text() = "(1)"]</td>
<td></td>
</tr>
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '1 Records'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<!-- Query editor buttons are also present -->
<tr>
<td>waitForElementPresent</td>
<td>div.search_parsed_value > button:nth-of-type(3)</td>
</tr>
<tal:block tal:define="search_query python: '( ( local_roles: &#34;Assignor&#34; OR local_roles: &#34;Assignee&#34; ) AND portal_type: &#34;Support Request&#34; AND translated_simulation_state_title: &#34;Suspended&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
</tbody></table>
</body>
......
......@@ -302,6 +302,7 @@
<td>${base_url}/web_site_module/${install_url}/</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Preferences']</td>
......@@ -332,11 +333,7 @@
<td>//input[@name='search_engine']</td>
<td>${base_url}/ERP5Site_printParameterAsHTMLTitle?parameter=</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Save']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_save" />
<tr>
<td>waitForElementPresent</td>
<td>css=div.visible[data-gadget-scope="notification"]</td>
......
......@@ -72,19 +72,11 @@
<td>Synchronize your data</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Next']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>assertElementPresent</td>
<td>//a[contains(@href,'test_audio')]</td>
<td></td>
</tr>
......
......@@ -107,16 +107,8 @@
<td>Synchronize your data</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Next']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>open</td>
<td>${base_url}/web_page_module/Zuite_waitForActivities</td>
......
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