Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
erp5
Commits
bbb5d569
Commit
bbb5d569
authored
Feb 21, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Display the count method result
Display also the pagination state next to the listbox title
parent
674cad95
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
107 additions
and
79 deletions
+107
-79
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.html
...ateItem/web_page_module/rjs_gadget_erp5_listbox_html.html
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.xml
...lateItem/web_page_module/rjs_gadget_erp5_listbox_html.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
...emplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
+20
-9
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
...mplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
+2
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testEditableFieldInEditableColumn.zpt
...js_ui_listbox_zuite/testEditableFieldInEditableColumn.zpt
+3
-5
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testEmptyListboxWithStat.zpt
...ts/renderjs_ui_listbox_zuite/testEmptyListboxWithStat.zpt
+4
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testManualPagination.zpt
..._tests/renderjs_ui_listbox_zuite/testManualPagination.zpt
+9
-6
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testNoEditableFieldOnFormList.zpt
...nderjs_ui_listbox_zuite/testNoEditableFieldOnFormList.zpt
+3
-5
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testNoEditableFieldWhenEditableColumnIsEmpty.zpt
...ox_zuite/testNoEditableFieldWhenEditableColumnIsEmpty.zpt
+3
-5
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testStatColumns.zpt
...ortal_tests/renderjs_ui_listbox_zuite/testStatColumns.zpt
+3
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testStatMethod.zpt
...portal_tests/renderjs_ui_listbox_zuite/testStatMethod.zpt
+3
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testStatMissing.zpt
...ortal_tests/renderjs_ui_listbox_zuite/testStatMissing.zpt
+3
-2
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListSearchResetsPagination.zpt
...ge_templates_zuite/testFormListSearchResetsPagination.zpt
+9
-15
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testPageFront.zpt
...ortal_tests/renderjs_ui_translate_zuite/testPageFront.zpt
+0
-3
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/testDeleteDocument.zpt
...tem/portal_tests/renderjs_ui_zuite/testDeleteDocument.zpt
+6
-16
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/Zuite_CommonTemplateForRenderjsUi.zpt
...eb_renderjs_ui_test/Zuite_CommonTemplateForRenderjsUi.zpt
+36
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.html
View file @
bbb5d569
...
@@ -171,7 +171,7 @@
...
@@ -171,7 +171,7 @@
<script
id=
"listbox-nav-template"
type=
"text/x-handlebars-template"
>
<script
id=
"listbox-nav-template"
type=
"text/x-handlebars-template"
>
<
a
class
=
"
{{previous_classname}}
"
data
-
i18n
=
"
Previous
"
href
=
"
{{previous_url}}
"
>
Previous
<
/a
>
<
a
class
=
"
{{previous_classname}}
"
data
-
i18n
=
"
Previous
"
href
=
"
{{previous_url}}
"
>
Previous
<
/a
>
<
a
class
=
"
{{next_classname}}
"
data
-
i18n
=
"
Next
"
href
=
"
{{next_url}}
"
>
Next
<
/a
>
<
a
class
=
"
{{next_classname}}
"
data
-
i18n
=
"
Next
"
href
=
"
{{next_url}}
"
>
Next
<
/a
>
<
span
class
=
"
ui-disabled ui-right
"
data
-
i18n
=
"
{{record}}
"
>
{{
record
}}
<
/span
>
<
span
class
=
"
ui-disabled ui-right
"
>
{{
record
}}
<
/span
>
</script>
</script>
<script
id=
"listbox-template"
type=
"text/x-handlebars-template"
>
<script
id=
"listbox-template"
type=
"text/x-handlebars-template"
>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_html.xml
View file @
bbb5d569
...
@@ -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.
14600.20468.49988
</string>
</value>
<value>
<string>
965.
42445.26451.18841
</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>
151
8012378.11
</float>
<float>
151
9380501.26
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.js
View file @
bbb5d569
...
@@ -446,10 +446,13 @@
...
@@ -446,10 +446,13 @@
// Trigger line content calculation
// Trigger line content calculation
result_queue
result_queue
.
push
(
function
()
{
.
push
(
function
()
{
var
loading_element_classList
=
gadget
.
element
.
querySelector
(
"
.listboxloader
"
).
classList
,
var
loading_element
=
gadget
.
element
.
querySelector
(
"
.listboxloader
"
),
loading_element_classList
=
loading_element
.
classList
,
tbody_classList
=
gadget
.
element
.
querySelector
(
"
table
"
).
querySelector
(
"
tbody
"
).
classList
;
tbody_classList
=
gadget
.
element
.
querySelector
(
"
table
"
).
querySelector
(
"
tbody
"
).
classList
;
// Set the loading icon and trigger line calculation
// Set the loading icon and trigger line calculation
loading_element_classList
.
add
.
apply
(
loading_element_classList
,
loading_class_list
);
loading_element_classList
.
add
.
apply
(
loading_element_classList
,
loading_class_list
);
// remove pagination information
loading_element
.
textContent
=
''
;
tbody_classList
.
add
(
disabled_class
);
tbody_classList
.
add
(
disabled_class
);
return
gadget
.
fetchLineContent
(
false
);
return
gadget
.
fetchLineContent
(
false
);
...
@@ -463,7 +466,8 @@
...
@@ -463,7 +466,8 @@
var
lines
=
gadget
.
state
.
lines
,
var
lines
=
gadget
.
state
.
lines
,
promise_list
=
[],
promise_list
=
[],
allDocs_result
=
gadget
.
state
.
allDocs_result
,
allDocs_result
=
gadget
.
state
.
allDocs_result
,
counter
;
counter
,
pagination_message
=
''
;
column_list
=
JSON
.
parse
(
gadget
.
state
.
column_list_json
);
column_list
=
JSON
.
parse
(
gadget
.
state
.
column_list_json
);
// for actual allDocs_result structure see ref:gadget_erp5_jio.js
// for actual allDocs_result structure see ref:gadget_erp5_jio.js
...
@@ -583,10 +587,16 @@
...
@@ -583,10 +587,16 @@
if
((
gadget
.
state
.
begin_from
===
0
)
&&
(
counter
===
0
))
{
if
((
gadget
.
state
.
begin_from
===
0
)
&&
(
counter
===
0
))
{
record
=
variable
.
translated_no_record
;
record
=
variable
.
translated_no_record
;
pagination_message
=
0
;
}
else
if
((
allDocs_result
.
data
.
rows
.
length
<=
lines
)
&&
(
gadget
.
state
.
begin_from
===
0
))
{
}
else
if
((
allDocs_result
.
data
.
rows
.
length
<=
lines
)
&&
(
gadget
.
state
.
begin_from
===
0
))
{
record
=
counter
+
"
"
+
variable
.
translated_records
;
record
=
counter
+
"
"
+
variable
.
translated_records
;
pagination_message
=
counter
;
}
else
{
}
else
{
record
=
variable
.
translated_records
+
"
"
+
(((
gadget
.
state
.
begin_from
+
lines
)
/
lines
-
1
)
*
lines
+
1
)
+
"
-
"
+
(((
gadget
.
state
.
begin_from
+
lines
)
/
lines
-
1
)
*
lines
+
counter
);
pagination_message
=
(((
gadget
.
state
.
begin_from
+
lines
)
/
lines
-
1
)
*
lines
+
1
)
+
"
-
"
+
(((
gadget
.
state
.
begin_from
+
lines
)
/
lines
-
1
)
*
lines
+
counter
);
if
(
allDocs_result
.
count
!==
undefined
)
{
pagination_message
+=
'
/
'
+
allDocs_result
.
count
;
}
record
=
variable
.
translated_records
+
"
"
+
pagination_message
;
}
}
if
(
gadget
.
state
.
begin_from
===
0
)
{
if
(
gadget
.
state
.
begin_from
===
0
)
{
...
@@ -603,12 +613,11 @@
...
@@ -603,12 +613,11 @@
"
next_classname
"
:
next_classname
,
"
next_classname
"
:
next_classname
,
"
next_url
"
:
next_url
"
next_url
"
:
next_url
})
})
)
);
})
.
push
(
function
(
listbox_nav_html
)
{
.
push
(
function
(
listbox_nav_html
)
{
gadget
.
element
.
querySelector
(
'
nav
'
).
innerHTML
=
listbox_nav_html
;
gadget
.
element
.
querySelector
(
'
nav
'
).
innerHTML
=
listbox_nav_html
;
});
})
.
push
(
function
()
{
var
result_sum
=
(
gadget
.
state
.
allDocs_result
.
sum
||
{}).
rows
||
[],
// render summary footer if available
var
result_sum
=
(
gadget
.
state
.
allDocs_result
.
sum
||
{}).
rows
||
[],
// render summary footer if available
summary
=
result_sum
.
map
(
function
(
row
,
row_index
)
{
summary
=
result_sum
.
map
(
function
(
row
,
row_index
)
{
var
row_editability
=
row
[
'
listbox_uid:list
'
]
!==
undefined
;
var
row_editability
=
row
[
'
listbox_uid:list
'
]
!==
undefined
;
...
@@ -639,8 +648,10 @@
...
@@ -639,8 +648,10 @@
return
renderTablePart
(
gadget
,
listbox_tfoot_template
,
summary
,
"
tfoot
"
);
return
renderTablePart
(
gadget
,
listbox_tfoot_template
,
summary
,
"
tfoot
"
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
var
loading_element_classList
=
gadget
.
element
.
querySelector
(
"
.listboxloader
"
).
classList
;
var
loading_element
=
gadget
.
element
.
querySelector
(
"
.listboxloader
"
),
loading_element_classList
=
loading_element
.
classList
;
loading_element_classList
.
remove
.
apply
(
loading_element_classList
,
loading_class_list
);
loading_element_classList
.
remove
.
apply
(
loading_element_classList
,
loading_class_list
);
loading_element
.
textContent
=
'
(
'
+
pagination_message
+
'
)
'
;
});
});
});
});
}
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_listbox_js.xml
View file @
bbb5d569
...
@@ -236,7 +236,7 @@
...
@@ -236,7 +236,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
4.60204.10137.19421
</string>
</value>
<value>
<string>
96
5.44873.24271.11298
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -254,7 +254,7 @@
...
@@ -254,7 +254,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
151
6364900.78
</float>
<float>
151
9377228.21
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testEditableFieldInEditableColumn.zpt
View file @
bbb5d569
...
@@ -64,11 +64,9 @@
...
@@ -64,11 +64,9 @@
<td></td>
<td></td>
</tr>
</tr>
<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>
//span[@data-i18n='1 Records']
</td>
</tal:block>
<td></td>
</tr>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testEmptyListboxWithStat.zpt
View file @
bbb5d569
...
@@ -35,8 +35,10 @@ Ensure empty listbox does not show stat line even though it receives stat data.
...
@@ -35,8 +35,10 @@ Ensure empty listbox does not show stat line even though it receives stat data.
<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>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//nav/span[@data-i18n="No records"]
</td><td></td></tr>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(0)', 'footer': 'No records'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
</tal:block>
<tr><td>
assertElementNotPresent
</td>
<tr><td>
assertElementNotPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tfoot/tr
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tfoot/tr
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testManualPagination.zpt
View file @
bbb5d569
...
@@ -50,8 +50,9 @@ a damn about limits so it is perfect adept for testing.
...
@@ -50,8 +50,9 @@ a damn about limits so it is perfect adept for testing.
<td>
${listbox}//a[@data-i18n="Next"]
</td><td></td></tr>
<td>
${listbox}//a[@data-i18n="Next"]
</td><td></td></tr>
<tr><td>
assertElementNotPresent
</td>
<!-- "Next" link must be enabled -->
<tr><td>
assertElementNotPresent
</td>
<!-- "Next" link must be enabled -->
<td>
${listbox}//a[@data-i18n="Next" and contains(@class, "ui-disabled")]
</td><td></td></tr>
<td>
${listbox}//a[@data-i18n="Next" and contains(@class, "ui-disabled")]
</td><td></td></tr>
<tr><td>
assertTextPresent
</td>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(1 - 3)', 'footer': 'Records 1 - 3'}"
>
<td>
Records 1 - 3
</td><td></td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
</tal:block>
<tr><td>
click
</td>
<tr><td>
click
</td>
<td>
${listbox}//a[@data-i18n="Next"]
</td><td></td></tr>
<td>
${listbox}//a[@data-i18n="Next"]
</td><td></td></tr>
...
@@ -60,8 +61,9 @@ a damn about limits so it is perfect adept for testing.
...
@@ -60,8 +61,9 @@ a damn about limits so it is perfect adept for testing.
<td>
${listbox}//a[@data-i18n="Next"]
</td><td></td></tr>
<td>
${listbox}//a[@data-i18n="Next"]
</td><td></td></tr>
<tr><td>
assertElementNotPresent
</td>
<!-- "Next" link must be enabled -->
<tr><td>
assertElementNotPresent
</td>
<!-- "Next" link must be enabled -->
<td>
${listbox}//a[@data-i18n="Next" and contains(@class, "ui-disabled")]
</td><td></td></tr>
<td>
${listbox}//a[@data-i18n="Next" and contains(@class, "ui-disabled")]
</td><td></td></tr>
<tr><td>
assertTextPresent
</td>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(4 - 6)', 'footer': 'Records 4 - 6'}"
>
<td>
Records 4 - 6
</td><td></td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
</tal:block>
<tr><td>
click
</td>
<!-- wait explicitely for the first listbox which holds the modification history -->
<tr><td>
click
</td>
<!-- wait explicitely for the first listbox which holds the modification history -->
<td>
${listbox}//a[@data-i18n="Next"]
</td><td></td></tr>
<td>
${listbox}//a[@data-i18n="Next"]
</td><td></td></tr>
...
@@ -70,8 +72,9 @@ a damn about limits so it is perfect adept for testing.
...
@@ -70,8 +72,9 @@ a damn about limits so it is perfect adept for testing.
<td>
${listbox}//a[@data-i18n="Next"]
</td><td></td></tr>
<td>
${listbox}//a[@data-i18n="Next"]
</td><td></td></tr>
<tr><td>
assertElementPresent
</td>
<!-- "Next" link must be disabled because we are at the end -->
<tr><td>
assertElementPresent
</td>
<!-- "Next" link must be disabled because we are at the end -->
<td>
${listbox}//a[@data-i18n="Next" and contains(@class, "ui-disabled")]
</td><td></td></tr>
<td>
${listbox}//a[@data-i18n="Next" and contains(@class, "ui-disabled")]
</td><td></td></tr>
<tr><td>
assertTextPresent
</td>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(7 - 8)', 'footer': 'Records 7 - 8'}"
>
<td>
Records 7 - 8
</td><td></td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
</tal:block>
</tbody></table>
</tbody></table>
</body>
</body>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testNoEditableFieldOnFormList.zpt
View file @
bbb5d569
...
@@ -64,11 +64,9 @@
...
@@ -64,11 +64,9 @@
<td></td>
<td></td>
</tr>
</tr>
<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>
//span[@data-i18n='1 Records']
</td>
</tal:block>
<td></td>
</tr>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testNoEditableFieldWhenEditableColumnIsEmpty.zpt
View file @
bbb5d569
...
@@ -108,11 +108,9 @@
...
@@ -108,11 +108,9 @@
<td></td>
<td></td>
</tr>
</tr>
<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>
//span[@data-i18n='1 Records']
</td>
</tal:block>
<td></td>
</tr>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testStatColumns.zpt
View file @
bbb5d569
...
@@ -44,8 +44,9 @@ Ensure Stat Column methods are executed correctly and result displayed in tfoot
...
@@ -44,8 +44,9 @@ Ensure Stat Column methods are executed correctly and result displayed in tfoot
<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>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(2)', 'footer': '2 Records'}"
>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//nav/span[@data-i18n="2 Records"]
</td><td></td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
</tal:block>
<tr><td>
store
</td>
<tr><td>
store
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testStatMethod.zpt
View file @
bbb5d569
...
@@ -44,8 +44,9 @@ Ensure stat_method gets executed and result displayed in tfoot element of the li
...
@@ -44,8 +44,9 @@ Ensure stat_method gets executed and result displayed in tfoot element of the li
<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>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(3)', 'footer': '3 Records'}"
>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//nav/span[@data-i18n="3 Records"]
</td><td></td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
</tal:block>
<tr><td>
store
</td>
<tr><td>
store
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testStatMissing.zpt
View file @
bbb5d569
...
@@ -41,8 +41,9 @@ Ensure no stat line is displayed when no stat_method and no stat_columns are def
...
@@ -41,8 +41,9 @@ Ensure no stat line is displayed when no stat_method and no stat_columns are def
<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>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(3)', 'footer': '3 Records'}"
>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//nav/span[@data-i18n="3 Records"]
</td><td></td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
</tal:block>
<tr><td>
assertElementNotPresent
</td>
<tr><td>
assertElementNotPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tfoot/tr
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//table/tfoot/tr
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListSearchResetsPagination.zpt
View file @
bbb5d569
...
@@ -70,21 +70,17 @@
...
@@ -70,21 +70,17 @@
<td>
Title 10
</td>
<td>
Title 10
</td>
<td></td>
<td></td>
</tr>
</tr>
<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>
//span[@data-i18n='1 Records']
</td>
</tal:block>
<td></td>
</tr>
<!-- Pagination keeps search query -->
<!-- Pagination keeps search query -->
<tal:block
tal:define=
"search_query python: '%'"
>
<tal:block
tal:define=
"search_query python: '%'"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list"
/>
</tal:block>
</tal:block>
<tr>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(1 - 3 / 25)', 'footer': 'Records 1 - 3 / 25'}"
>
<td>
waitForElementPresent
</td>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
<td>
//span[@data-i18n='Records 1 - 3']
</td>
</tal:block>
<td></td>
</tr>
<tal:block
tal:define=
"parsed_query python: '';
<tal:block
tal:define=
"parsed_query python: '';
search_query python: '%'"
>
search_query python: '%'"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list"
/>
...
@@ -94,11 +90,9 @@
...
@@ -94,11 +90,9 @@
<td>
//a[@data-i18n='Next']
</td>
<td>
//a[@data-i18n='Next']
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(4 - 6 / 25)', 'footer': 'Records 4 - 6 / 25'}"
>
<td>
waitForElementPresent
</td>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
<td>
//span[@data-i18n='Records 4 - 6']
</td>
</tal:block>
<td></td>
</tr>
<tal:block
tal:define=
"parsed_query python: '';
<tal:block
tal:define=
"parsed_query python: '';
search_query python: '%'"
>
search_query python: '%'"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list"
/>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_translate_zuite/testPageFront.zpt
View file @
bbb5d569
...
@@ -106,9 +106,6 @@
...
@@ -106,9 +106,6 @@
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/clear_query"
/>
</tbody></table>
</tbody></table>
</body>
</body>
</html>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/testDeleteDocument.zpt
View file @
bbb5d569
...
@@ -168,11 +168,9 @@
...
@@ -168,11 +168,9 @@
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(2)', 'footer': '2 Records'}"
>
<td>
waitForTextPresent
</td>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
<td>
2 Records
</td>
</tal:block>
<td></td>
</tr>
<!-- Wait for the action page and click on the delete link -->
<!-- Wait for the action page and click on the delete link -->
<tr>
<tr>
...
@@ -333,17 +331,9 @@
...
@@ -333,17 +331,9 @@
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(0)', 'footer': 'No records'}"
>
<td>
waitForTextPresent
</td>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
<td>
No records
</td>
</tal:block>
<td></td>
</tr>
<tr>
<td>
verifyTextPresent
</td>
<td>
No records
</td>
<td></td>
</tr>
<!-- Wait for the action page and check no delete link is here-->
<!-- Wait for the action page and check no delete link is here-->
<tr>
<tr>
...
...
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/Zuite_CommonTemplateForRenderjsUi.zpt
View file @
bbb5d569
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/trash_editor_configuration" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/trash_editor_configuration" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<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" />
</tal:block>
</tal:block>
<tal:block metal:define-macro="submit_search_filter">
<tal:block metal:define-macro="submit_search_filter">
...
@@ -231,13 +231,47 @@
...
@@ -231,13 +231,47 @@
</tr>
</tr>
</tal:block>
</tal:block>
<tal:block metal:define-macro="check_listbox_pagination_text">
<tr>
<td colspan="3"><b tal:content="python: 'Check the listbox pagination text: %s' % pagination_configuration"></b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_field_listbox.html\')]//h1//span[@class=\'listboxloader\' and text()=\'%(header)s\']' % pagination_configuration"></td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_field_listbox.html\')]//h1//span[@class=\'listboxloader\' and text()=\'%(header)s\']' % pagination_configuration"></td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_field_listbox.html\')]//nav//span[@class=\'ui-disabled ui-right\' and text()=\'%(footer)s\']' % pagination_configuration"></td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_field_listbox.html\')]//nav//span[@class=\'ui-disabled ui-right\' and text()=\'%(footer)s\']' % pagination_configuration"></td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="wait_for_listbox_loaded">
<tal:block metal:define-macro="wait_for_listbox_loaded">
<tr>
<tr>
<td colspan="3"><b>Wait for the listbox to be loaded</b></td>
<td colspan="3"><b>Wait for the listbox to be loaded</b></td>
</tr>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//h1//span[contains(@class, "ui-icon-spinner")]</td>
<td></td>
</tr>
<tr>
<tr>
<td>waitForElementPresent</td>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//nav//span[contains(
@data-i18n, "Records
")]</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//nav//span[contains(
text(), "ecord
")]</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment