Commit ed7949b7 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Listbox line selection was broken

See nexedi/erp5@8fdc1a15

Add tests to prevent future regression.
parent 697605be
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
</th> </th>
{{/if}} {{/if}}
<td> <td>
<input value="{{value}}" type="checkbox" checked="true" class="hide_element"> <input value="{{uid}}" type="checkbox" checked="true" class="hide_element">
</td> </td>
{{#each cell_list}} {{#each cell_list}}
<td> <td>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>965.42445.26451.18841</string> </value> <value> <string>965.63630.22597.59392</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1519380501.26</float> <float>1520243676.37</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -45,7 +45,11 @@ ...@@ -45,7 +45,11 @@
</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_content_loaded" />
<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<!-- Sort by ID -->
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//button[@data-i18n='Sort']</td> <td>//button[@data-i18n='Sort']</td>
...@@ -97,12 +101,35 @@ ...@@ -97,12 +101,35 @@
</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_content_loaded" />
<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertElementPresent</td>
<td>link=Title 0</td> <td>link=Title 0</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>link=Title 1</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>link=Title 2</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>link=Title 3</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>link=Title 4</td>
<td></td>
</tr>
...@@ -136,6 +163,9 @@ ...@@ -136,6 +163,9 @@
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="pagination_configuration python: {'header': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
...@@ -195,6 +225,9 @@ ...@@ -195,6 +225,9 @@
<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="pagination_configuration python: {'header': '(1 - 3 / 8)', 'footer': 'Records 1 - 3 / 8'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<tr> <tr>
<td>waitForElementNotPresent</td> <td>waitForElementNotPresent</td>
...@@ -244,6 +277,31 @@ ...@@ -244,6 +277,31 @@
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>link=Title 0</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>link=Title 1</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>link=Title 2</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>link=Title 3</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>link=Title 4</td>
<td></td>
</tr>
<tr> <tr>
<td>click</td> <td>click</td>
...@@ -279,6 +337,9 @@ ...@@ -279,6 +337,9 @@
<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="pagination_configuration python: {'header': '(1 - 3 / 7)', 'footer': 'Records 1 - 3 / 7'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<tr> <tr>
<td>waitForElementNotPresent</td> <td>waitForElementNotPresent</td>
...@@ -311,11 +372,69 @@ ...@@ -311,11 +372,69 @@
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementNotPresent</td>
<td>link=Title 0</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>link=Title 1</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>link=Title 2</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>link=Title 3</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>link=Title 4</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>link=Title 5</td>
<td></td>
</tr>
<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': '(1 - 3 / 10)', 'footer': 'Records 1 - 3 / 10'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text" />
</tal:block>
<tr>
<td>assertElementPresent</td>
<td>link=Title 0</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>link=Title 1</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>link=Title 2</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>link=Title 3</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>link=Title 4</td>
<td></td>
</tr>
</tbody></table> </tbody></table>
......
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