Commit 43d682f5 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼 Committed by Romain Courteaud

[erp5_officejs_ui_test] Fix some OfficeJS UI tests

After clicking on "Documents", we need to wait for the listbox to be loaded before doing anything else. In particular, if we do a search after clicking on "Documents" the listbox is loaded twice (once after clicking on Documents and once after clicking on search). If we don't wait for the listbox to be loaded before doing the search, the search macro might end too early.
parent e7c033c4
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
<td>//a[@data-i18n='Document']</td> <td>//a[@data-i18n='Document']</td>
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Verify Search, add another document --> <!-- Verify Search, add another document -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
...@@ -173,6 +174,7 @@ ...@@ -173,6 +174,7 @@
<td>//a[@data-i18n='Document']</td> <td>//a[@data-i18n='Document']</td>
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="search_query python: 'Titre'"> <tal:block tal:define="search_query python: 'Titre'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list_without_header_url" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list_without_header_url" />
</tal:block> </tal:block>
......
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
<td>//a[@data-i18n='Document']</td> <td>//a[@data-i18n='Document']</td>
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<!-- Verify Search, add another document --> <!-- Verify Search, add another document -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
...@@ -173,6 +174,7 @@ ...@@ -173,6 +174,7 @@
<td>//a[@data-i18n='Document']</td> <td>//a[@data-i18n='Document']</td>
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="search_query python: 'Titre'"> <tal:block tal:define="search_query python: 'Titre'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list_without_header_url" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list_without_header_url" />
</tal:block> </tal:block>
......
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