Commit 7e5b5fd1 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Listbox column translations are not included in the listbox gadget

parent adfb08e4
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
{{/if}} {{/if}}
{{#each head_value}} {{#each head_value}}
{{#if sort_link}} {{#if sort_link}}
<th class="{{class_value}}"><a href="{{sort_link}}" data-i18n="{{data-i18n}}">{{text}}</a></th> <th class="{{class_value}}"><a href="{{sort_link}}">{{text}}</a></th>
{{else}} {{else}}
<th data-i18n="{{data-i18n}}" class="{{class_value}}">{{text}}</th> <th class="{{class_value}}">{{text}}</th>
{{/if}} {{/if}}
{{/each}} {{/each}}
{{#if line_icon}} {{#if line_icon}}
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
{{/if}} {{/if}}
<th></th> <th></th>
{{#each head_value}} {{#each head_value}}
<th data-i18n="{{data-i18n}}" class="{{class_value}}">{{text}}</th> <th class="{{class_value}}">{{text}}</th>
{{/each}} {{/each}}
{{#if line_icon}} {{#if line_icon}}
<th></th> <th></th>
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>966.44073.11272.27409</string> </value> <value> <string>967.24634.17714.15001</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>1523002868.97</float> <float>1526286250.56</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -405,7 +405,6 @@ ...@@ -405,7 +405,6 @@
} }
return { return {
"data-i18n": column[1],
"class_value": class_value, "class_value": class_value,
"sort_link": column_sort_link_list[index], "sort_link": column_sort_link_list[index],
"text": column[1] "text": column[1]
......
...@@ -27,7 +27,7 @@ bar</td></tr> ...@@ -27,7 +27,7 @@ bar</td></tr>
<!-- Change sorting of the listbox --> <!-- Change sorting of the listbox -->
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table/thead/tr/th/a[@data-i18n='Title']</td><td></td></tr> <td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table/thead/tr/th/a[text()='Title']</td><td></td></tr>
<tr> <tr>
<td>chooseOkOnNextConfirmation</td> <td>chooseOkOnNextConfirmation</td>
<td></td> <td></td>
...@@ -35,7 +35,7 @@ bar</td></tr> ...@@ -35,7 +35,7 @@ bar</td></tr>
</tr> </tr>
<tr><td>click</td> <tr><td>click</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table/thead/tr/th/a[@data-i18n='Title']</td><td></td></tr> <td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table/thead/tr/th/a[text()='Title']</td><td></td></tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_confirmation" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_confirmation" />
...@@ -75,7 +75,7 @@ bar</td></tr> ...@@ -75,7 +75,7 @@ bar</td></tr>
<td></td> <td></td>
</tr> </tr>
<tr><td>click</td> <tr><td>click</td>
<td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table/thead/tr/th/a[@data-i18n='Title']</td> <td>//div[@data-gadget-url="${renderjs_url}/gadget_erp5_field_listbox.html"]//table/thead/tr/th/a[text()='Title']</td>
<td></td></tr> <td></td></tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_confirmation" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_confirmation" />
......
...@@ -55,13 +55,13 @@ ...@@ -55,13 +55,13 @@
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//th/a[@data-i18n='ID']</td> <td>//th/a[text()='ID']</td>
<td></td> <td></td>
</tr> </tr>
<!-- Issue sorting - should cycle from DESC to ASC --> <!-- Issue sorting - should cycle from DESC to ASC -->
<tr> <tr>
<td>click</td> <td>click</td>
<td>//th/a[@data-i18n='ID']</td> <td>//th/a[text()='ID']</td>
<td></td> <td></td>
</tr> </tr>
...@@ -69,14 +69,14 @@ ...@@ -69,14 +69,14 @@
<tr> <tr>
<td>waitForElementPresent</td><!-- verification --> <td>waitForElementPresent</td><!-- verification -->
<td>//th[@class='ui-icon ui-icon-sort-amount-desc']/a[@data-i18n='ID']</td> <td>//th[@class='ui-icon ui-icon-sort-amount-desc']/a[text()='ID']</td>
<td></td> <td></td>
</tr> </tr>
<!-- The default sort should cycle back on the next click --> <!-- The default sort should cycle back on the next click -->
<tr> <tr>
<td>click</td> <td>click</td>
<td>//th[@class='ui-icon ui-icon-sort-amount-desc']/a[@data-i18n='ID']</td> <td>//th[@class='ui-icon ui-icon-sort-amount-desc']/a[text()='ID']</td>
<td></td> <td></td>
</tr> </tr>
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
<tr> <tr>
<td>waitForElementPresent</td><!-- verification --> <td>waitForElementPresent</td><!-- verification -->
<td>//th[@class='ui-icon ui-icon-sort-amount-asc']/a[@data-i18n='ID']</td> <td>//th[@class='ui-icon ui-icon-sort-amount-asc']/a[text()='ID']</td>
<td></td> <td></td>
</tr> </tr>
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<!-- Click to a different column should reset the default (and any other sort) --> <!-- Click to a different column should reset the default (and any other sort) -->
<tr> <tr>
<td>click</td> <td>click</td>
<td>//th/a[@data-i18n='Title']</td> <td>//th/a[text()='Title']</td>
<td></td> <td></td>
</tr> </tr>
...@@ -120,19 +120,19 @@ ...@@ -120,19 +120,19 @@
<!-- Test that the first sort is DESC --> <!-- Test that the first sort is DESC -->
<tr> <tr>
<td>waitForElementPresent</td><!-- verification --> <td>waitForElementPresent</td><!-- verification -->
<td>//th[@class='ui-icon ui-icon-sort-amount-desc']/a[@data-i18n='Title']</td> <td>//th[@class='ui-icon ui-icon-sort-amount-desc']/a[text()='Title']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyElementNotPresent</td> <td>verifyElementNotPresent</td>
<td>//th[@class='ui-icon ui-icon-sort-amount-asc']/a[@data-i18n='ID']</td> <td>//th[@class='ui-icon ui-icon-sort-amount-asc']/a[text()='ID']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyElementNotPresent</td> <td>verifyElementNotPresent</td>
<td>//th[@class='ui-icon ui-icon-sort-amount-asc']/a[@data-i18n='ID']</td> <td>//th[@class='ui-icon ui-icon-sort-amount-asc']/a[text()='ID']</td>
<td></td> <td></td>
</tr> </tr>
...@@ -179,7 +179,7 @@ Test whether search query stays if we change the sort order ...@@ -179,7 +179,7 @@ Test whether search query stays if we change the sort order
<!-- That the last sort stayed --> <!-- That the last sort stayed -->
<tr> <tr>
<td>waitForElementPresent</td><!-- verification --> <td>waitForElementPresent</td><!-- verification -->
<td>//th[@class='ui-icon ui-icon-sort-amount-desc']/a[@data-i18n='Title']</td> <td>//th[@class='ui-icon ui-icon-sort-amount-desc']/a[text()='Title']</td>
<td></td> <td></td>
</tr> </tr>
......
...@@ -42,10 +42,10 @@ Frontend should not suppose default sorting ...@@ -42,10 +42,10 @@ Frontend should not suppose default sorting
<tr><td>open</td> <tr><td>open</td>
<td>${renderjs_url}/#/foo_module</td><td></td></tr> <td>${renderjs_url}/#/foo_module</td><td></td></tr>
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>//a[@data-i18n='ID']</td><td></td></tr> <td>//a[text()='ID']</td><td></td></tr>
<!-- No default sort must be shown because the definition is broken "id | id" --> <!-- No default sort must be shown because the definition is broken "id | id" -->
<tr><td>verifyElementPresent</td> <tr><td>verifyElementPresent</td>
<td>//th[@class='']/a[@data-i18n='ID']</td><td></td></tr> <td>//th[@class='']/a[text()='ID']</td><td></td></tr>
<!-- Make sure broken definitions don't appear in sort editor --> <!-- Make sure broken definitions don't appear in sort editor -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_sort" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_sort" />
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
...@@ -63,10 +63,10 @@ Frontend should not suppose default sorting ...@@ -63,10 +63,10 @@ Frontend should not suppose default sorting
<tr><td>open</td> <tr><td>open</td>
<td>${renderjs_url}//#/foo_module</td><td></td></tr> <td>${renderjs_url}//#/foo_module</td><td></td></tr>
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>//a[@data-i18n='ID']</td><td></td></tr> <td>//a[text()='ID']</td><td></td></tr>
<!-- Default sort on ID column has to be ASCENDING --> <!-- Default sort on ID column has to be ASCENDING -->
<tr><td>verifyElementPresent</td> <tr><td>verifyElementPresent</td>
<td>//th[@class='ui-icon ui-icon-sort-amount-asc']/a[@data-i18n='ID']</td><td></td></tr> <td>//th[@class='ui-icon ui-icon-sort-amount-asc']/a[text()='ID']</td><td></td></tr>
<!-- Verify that the default sort is visible in Sort Editor --> <!-- Verify that the default sort is visible in Sort Editor -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_sort" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_sort" />
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
...@@ -88,13 +88,13 @@ Frontend should not suppose default sorting ...@@ -88,13 +88,13 @@ Frontend should not suppose default sorting
<tr><td>open</td> <tr><td>open</td>
<td>${renderjs_url}/#/foo_module</td><td></td></tr> <td>${renderjs_url}/#/foo_module</td><td></td></tr>
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>//a[@data-i18n='Title']</td><td></td></tr> <td>//a[text()='Title']</td><td></td></tr>
<!-- Default sort on Title column has to be DESCENDING --> <!-- Default sort on Title column has to be DESCENDING -->
<tr><td>verifyElementPresent</td> <tr><td>verifyElementPresent</td>
<td>//th[@class='ui-icon ui-icon-sort-amount-desc']/a[@data-i18n='Title']</td><td></td></tr> <td>//th[@class='ui-icon ui-icon-sort-amount-desc']/a[text()='Title']</td><td></td></tr>
<!-- No other sort must be shown --> <!-- No other sort must be shown -->
<tr><td>verifyElementPresent</td> <tr><td>verifyElementPresent</td>
<td>//th[@class='']/a[@data-i18n='ID']</td><td></td></tr> <td>//th[@class='']/a[text()='ID']</td><td></td></tr>
<!-- Verify that the default sort is visible in Sort Editor --> <!-- Verify that the default sort is visible in Sort Editor -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_sort" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_sort" />
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
...@@ -119,9 +119,9 @@ Frontend should not suppose default sorting ...@@ -119,9 +119,9 @@ Frontend should not suppose default sorting
<!-- Verify that default sort arrow disappeared --> <!-- Verify that default sort arrow disappeared -->
<tr><td>verifyElementPresent</td> <tr><td>verifyElementPresent</td>
<td>//th[@class='']/a[@data-i18n='Title']</td><td></td></tr> <td>//th[@class='']/a[text()='Title']</td><td></td></tr>
<tr><td>verifyElementPresent</td> <tr><td>verifyElementPresent</td>
<td>//th[@class='ui-icon ui-icon-sort-amount-desc']/a[@data-i18n='ID']</td><td></td></tr> <td>//th[@class='ui-icon ui-icon-sort-amount-desc']/a[text()='ID']</td><td></td></tr>
</tbody></table> </tbody></table>
</body> </body>
......
...@@ -194,19 +194,19 @@ ...@@ -194,19 +194,19 @@
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//th/a[@data-i18n="Title"]</td><!-- Title is sortable --> <td>//th/a[text()="Title"]</td><!-- Title is sortable -->
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyElementPresent</td> <td>verifyElementPresent</td>
<td>//th/a[@data-i18n="Title"]</td> <td>//th/a[text()="Title"]</td>
<td></td> <td></td>
</tr> </tr>
<tr><th colspan="3"><font color="red">Quatity is not sortable but there is a catalog column of such name</font></th></tr> <tr><th colspan="3"><font color="red">Quatity is not sortable but there is a catalog column of such name</font></th></tr>
<tr> <tr>
<td>verifyElementPresent</td> <td>verifyElementPresent</td>
<td>//th/a[@data-i18n="Quantity"]</td><!-- Should be only //th[@data-i18n="Quantity"] --> <td>//th/a[text()="Quantity"]</td><!-- Should be only //th[text()="Quantity"] -->
<td></td> <td></td>
</tr> </tr>
......
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