Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
erp5
Commits
ab4f4f01
Commit
ab4f4f01
authored
Nov 09, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui_test] Add pagination macros
parent
dc33f078
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
66 additions
and
94 deletions
+66
-94
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterWithPager.zpt
...l_tests/renderjs_ui_listbox_zuite/testFilterWithPager.zpt
+2
-15
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterWithPreviousNext.zpt
.../renderjs_ui_listbox_zuite/testFilterWithPreviousNext.zpt
+1
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testListboxResetParameter.zpt
...s/renderjs_ui_listbox_zuite/testListboxResetParameter.zpt
+3
-20
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testManualPagination.zpt
..._tests/renderjs_ui_listbox_zuite/testManualPagination.zpt
+8
-12
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testSortWithPager.zpt
...tal_tests/renderjs_ui_listbox_zuite/testSortWithPager.zpt
+3
-34
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListSearchResetsPagination.zpt
...ge_templates_zuite/testFormListSearchResetsPagination.zpt
+4
-12
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/Zuite_CommonTemplateForRenderjsUi.zpt
...eb_renderjs_ui_test/Zuite_CommonTemplateForRenderjsUi.zpt
+45
-1
No files found.
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterWithPager.zpt
View file @
ab4f4f01
...
...
@@ -88,11 +88,7 @@
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list"
/>
</tal:block>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n="Next"]
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/paginate_next"
/>
<tr>
<td>
waitForElementNotPresent
</td>
...
...
@@ -110,16 +106,7 @@
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Previous"]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n="Previous"]
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/paginate_previous"
/>
<tr>
<td>
waitForElementNotPresent
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterWithPreviousNext.zpt
View file @
ab4f4f01
...
...
@@ -90,6 +90,7 @@
<td>
//a[@data-i18n='Next']
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementNotPresent
</td>
<td>
//a[@data-i18n = "Title 0"]
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testListboxResetParameter.zpt
View file @
ab4f4f01
...
...
@@ -90,19 +90,7 @@
<td></td>
</tr>
<tr>
<td>
waitForElementNotPresent
</td>
<td>
//a[@data-i18n="Next"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Next"]
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded"
/>
<tal:block
tal:define=
"search_query python: 'quantity: invalide'"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list"
/>
...
...
@@ -110,7 +98,7 @@
<tr>
<td>
waitForElementPresent
</td>
<td>
//span[
@data-i18n
="Invalid Search Criteria"]
</td>
<td>
//span[
text()
="Invalid Search Criteria"]
</td>
<td></td>
</tr>
...
...
@@ -120,12 +108,7 @@
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//a[@data-i18n="Next"]
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded"
/>
<tr>
<td>
verifyElementNotPresent
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testManualPagination.zpt
View file @
ab4f4f01
...
...
@@ -47,31 +47,27 @@ a damn about limits so it is perfect adept for testing.
<td>
${renderjs_url}/#/foo_module/1?editable=1
</td><td></td></tr>
<tr><td>
waitForElementPresent
</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[
text()
="Next"]
</td><td></td></tr>
<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[
text()
="Next" and contains(@class, "ui-disabled")]
</td><td></td></tr>
<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><td>
click
</td>
<td>
${listbox}//a[@data-i18n="Next"]
</td><td></td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/paginate_next"
/>
<tr><td>
waitForElementPresent
</td>
<td>
${listbox}//a[
@data-i18n
="Next"]
</td><td></td></tr>
<td>
${listbox}//a[
text()
="Next"]
</td><td></td></tr>
<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[
text()
="Next" and contains(@class, "ui-disabled")]
</td><td></td></tr>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(4 - 6 / 8)', 'footer': 'Records 4 - 6 / 8'}"
>
<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 -->
<td>
${listbox}//a[@data-i18n="Next"]
</td><td></td></tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/paginate_next"
/>
<tr><td>
waitForElementPresent
</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[
text()
="Next"]
</td><td></td></tr>
<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[
text()
="Next" and contains(@class, "ui-disabled")]
</td><td></td></tr>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(7 - 8 / 8)', 'footer': 'Records 7 - 8 / 8'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
</tal:block>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testSortWithPager.zpt
View file @
ab4f4f01
...
...
@@ -107,17 +107,7 @@
<td>
Title 2
</td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Next
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Next
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/paginate_next"
/>
<tr>
<td>
waitForElementNotPresent
</td>
...
...
@@ -151,17 +141,8 @@
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Next
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/paginate_next"
/>
<tr>
<td>
click
</td>
<td>
link=Next
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementNotPresent
</td>
...
...
@@ -194,19 +175,7 @@
<td>
Title 8
</td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
link=Previous
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
link=Previous
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/paginate_previous"
/>
<tr>
<td>
waitForElementNotPresent
</td>
...
...
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormListSearchResetsPagination.zpt
View file @
ab4f4f01
...
...
@@ -54,13 +54,7 @@
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/clear_query"
/>
<!-- start -->
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Next']
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/paginate_next"
/>
<tal:block
tal:define=
"search_query python: 'Title 10'"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list"
/>
...
...
@@ -85,11 +79,9 @@
search_query python: '%'"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list"
/>
</tal:block>
<tr>
<td>
click
</td>
<td>
//a[@data-i18n='Next']
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/paginate_next"
/>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(4 - 6 / 25)', 'footer': 'Records 4 - 6 / 25'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
</tal:block>
...
...
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/Zuite_CommonTemplateForRenderjsUi.zpt
View file @
ab4f4f01
...
...
@@ -214,7 +214,8 @@
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</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 metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
</tal:block>
<tal:block metal:define-macro="search_in_form_list_without_header_url">
...
...
@@ -362,6 +363,49 @@
</tr>
</tal:block>
<tal:block metal:define-macro="paginate_next">
<tr>
<td colspan="3"><b tal:content="python: 'Paginate to the listbox next page'"></b></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//nav//a[@class='ui-btn ui-icon-carat-r ui-btn-icon-right responsive ui-last-child']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//nav//a[@class='ui-btn ui-icon-carat-r ui-btn-icon-right responsive ui-last-child']</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</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_listbox_loaded" />
</tal:block>
<tal:block metal:define-macro="paginate_previous">
<tr>
<td colspan="3"><b tal:content="python: 'Paginate to the listbox previous page'"></b></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//nav//a[@class='ui-btn ui-icon-carat-l ui-btn-icon-left responsive ui-first-child']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//nav//a[@class='ui-btn ui-icon-carat-l ui-btn-icon-left responsive ui-first-child']</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</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_listbox_loaded" />
</tal:block>
<tal:block metal:define-macro="wait_for_listbox_loaded">
<tr>
<td colspan="3"><b>Wait for the listbox to be loaded</b></td>
...
...
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