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