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 @@
{{/if}}
{{#each head_value}}
{{#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}}
<th data-i18n="{{data-i18n}}" class="{{class_value}}">{{text}}</th>
<th class="{{class_value}}">{{text}}</th>
{{/if}}
{{/each}}
{{#if line_icon}}
......@@ -51,7 +51,7 @@
{{/if}}
<th></th>
{{#each head_value}}
<th data-i18n="{{data-i18n}}" class="{{class_value}}">{{text}}</th>
<th class="{{class_value}}">{{text}}</th>
{{/each}}
{{#if line_icon}}
<th></th>
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>966.44073.11272.27409</string> </value>
<value> <string>967.24634.17714.15001</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1523002868.97</float>
<float>1526286250.56</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -405,7 +405,6 @@
}
return {
"data-i18n": column[1],
"class_value": class_value,
"sort_link": column_sort_link_list[index],
"text": column[1]
......
......@@ -27,7 +27,7 @@ bar</td></tr>
<!-- Change sorting of the listbox -->
<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>
<td>chooseOkOnNextConfirmation</td>
<td></td>
......@@ -35,7 +35,7 @@ bar</td></tr>
</tr>
<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" />
......@@ -75,7 +75,7 @@ bar</td></tr>
<td></td>
</tr>
<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>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_confirmation" />
......
......@@ -55,13 +55,13 @@
<tr>
<td>waitForElementPresent</td>
<td>//th/a[@data-i18n='ID']</td>
<td>//th/a[text()='ID']</td>
<td></td>
</tr>
<!-- Issue sorting - should cycle from DESC to ASC -->
<tr>
<td>click</td>
<td>//th/a[@data-i18n='ID']</td>
<td>//th/a[text()='ID']</td>
<td></td>
</tr>
......@@ -69,14 +69,14 @@
<tr>
<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>
</tr>
<!-- The default sort should cycle back on the next click -->
<tr>
<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>
</tr>
......@@ -84,7 +84,7 @@
<tr>
<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>
</tr>
......@@ -111,7 +111,7 @@
<!-- Click to a different column should reset the default (and any other sort) -->
<tr>
<td>click</td>
<td>//th/a[@data-i18n='Title']</td>
<td>//th/a[text()='Title']</td>
<td></td>
</tr>
......@@ -120,19 +120,19 @@
<!-- Test that the first sort is DESC -->
<tr>
<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>
</tr>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
......@@ -179,7 +179,7 @@ Test whether search query stays if we change the sort order
<!-- That the last sort stayed -->
<tr>
<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>
</tr>
......
......@@ -42,10 +42,10 @@ Frontend should not suppose default sorting
<tr><td>open</td>
<td>${renderjs_url}/#/foo_module</td><td></td></tr>
<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" -->
<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 -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_sort" />
<tr><td>waitForElementPresent</td>
......@@ -63,10 +63,10 @@ Frontend should not suppose default sorting
<tr><td>open</td>
<td>${renderjs_url}//#/foo_module</td><td></td></tr>
<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 -->
<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 -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_sort" />
<tr><td>waitForElementPresent</td>
......@@ -88,13 +88,13 @@ Frontend should not suppose default sorting
<tr><td>open</td>
<td>${renderjs_url}/#/foo_module</td><td></td></tr>
<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 -->
<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 -->
<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 -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_sort" />
<tr><td>waitForElementPresent</td>
......@@ -119,9 +119,9 @@ Frontend should not suppose default sorting
<!-- Verify that default sort arrow disappeared -->
<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>
<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>
</body>
......
......@@ -194,19 +194,19 @@
<tr>
<td>waitForElementPresent</td>
<td>//th/a[@data-i18n="Title"]</td><!-- Title is sortable -->
<td>//th/a[text()="Title"]</td><!-- Title is sortable -->
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//th/a[@data-i18n="Title"]</td>
<td>//th/a[text()="Title"]</td>
<td></td>
</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>
<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>
</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