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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
83f3e1fe
Commit
83f3e1fe
authored
Sep 15, 2020
by
Aurel
Committed by
Romain Courteaud
Oct 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui_test: test date filtering at timezone limits
parent
7a3141b2
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
456 additions
and
1 deletion
+456
-1
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_createObjects.py
...Item/portal_skins/erp5_ui_test/FooModule_createObjects.py
+3
-0
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_createObjects.xml
...tem/portal_skins/erp5_ui_test/FooModule_createObjects.xml
+1
-1
bt5/erp5_web_renderjs_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.WebRenderJSTestUtils.py
.../portal_components/extension.erp5.WebRenderJSTestUtils.py
+10
-0
bt5/erp5_web_renderjs_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.WebRenderJSTestUtils.xml
...portal_components/extension.erp5.WebRenderJSTestUtils.xml
+127
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterByDate.xml
...rtal_tests/renderjs_ui_listbox_zuite/testFilterByDate.xml
+58
-0
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterByDate.zpt
...rtal_tests/renderjs_ui_listbox_zuite/testFilterByDate.zpt
+161
-0
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/ERP5Site_setTimezone.xml
..._skins/erp5_web_renderjs_ui_test/ERP5Site_setTimezone.xml
+28
-0
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/FooModule_getLocalTimezone.py
...s/erp5_web_renderjs_ui_test/FooModule_getLocalTimezone.py
+5
-0
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/FooModule_getLocalTimezone.xml
.../erp5_web_renderjs_ui_test/FooModule_getLocalTimezone.xml
+62
-0
bt5/erp5_web_renderjs_ui_test/bt/template_extension_id_list
bt5/erp5_web_renderjs_ui_test/bt/template_extension_id_list
+1
-0
No files found.
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_createObjects.py
View file @
83f3e1fe
...
@@ -10,6 +10,9 @@ for i in range(start, start + num):
...
@@ -10,6 +10,9 @@ for i in range(start, start + num):
foo_category
=
category
,
portal_type
=
portal_type
)
foo_category
=
category
,
portal_type
=
portal_type
)
if
set_dates
:
if
set_dates
:
foo
.
setStartDate
(
DateTime
(
i
,
i
,
i
))
foo
.
setStartDate
(
DateTime
(
i
,
i
,
i
))
if
set_datetimes
:
foo
.
setStartDate
(
DateTime
(
i
,
i
,
i
,
23
,
58
))
if
create_line
:
if
create_line
:
for
i
in
range
(
0
,
int
(
create_line
)):
for
i
in
range
(
0
,
int
(
create_line
)):
foo
.
newContent
()
foo
.
newContent
()
...
...
bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/FooModule_createObjects.xml
View file @
83f3e1fe
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
start=0, num=10, set_dates=0, portal_type=\'Foo\', create_line=0, big_category_related=False, category_list=None, title_format="Title {index:d}"
</string>
</value>
<value>
<string>
start=0, num=10, set_dates=0,
set_datetimes=0,
portal_type=\'Foo\', create_line=0, big_category_related=False, category_list=None, title_format="Title {index:d}"
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_web_renderjs_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.WebRenderJSTestUtils.py
0 → 100644
View file @
83f3e1fe
import
os
,
time
from
DateTime
import
DateTime
def
setTimezone
(
timezone
):
# timezone must be for example GMT-7
os
.
environ
[
'TZ'
]
=
timezone
time
.
tzset
()
DateTime
.
_isDST
=
False
DateTime
.
_localzone
=
DateTime
.
_localzone0
=
DateTime
.
_localzone1
=
timezone
return
"Timezone Updated"
bt5/erp5_web_renderjs_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.WebRenderJSTestUtils.xml
0 → 100644
View file @
83f3e1fe
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Extension Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
WebRenderJSTestUtils
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
extension.erp5.WebRenderJSTestUtils
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Extension Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterByDate.xml
0 → 100644
View file @
83f3e1fe
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testFilterByDate
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_listbox_zuite/testFilterByDate.zpt
0 → 100644
View file @
83f3e1fe
<html
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test RenderJS UI
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test RenderJS UI
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/bar_module/ERP5Site_setTimezone?timezone=GMT%2D7
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Timezone Updated
</td>
<td></td>
</tr>
<!-- be specific that we expect id DESC default sorting -->
<tr>
<td>
open
</td>
<td>
${base_url}/bar_module/ListBoxZuite_reset?field_sort=id+%7C+DESC
</td>
<!-- ?field_sort="id | DESC" -->
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Reset Successfully.
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_viewFooList/listbox/ListBox_setPropertyList?field_search_columns=delivery.start_date%0Aid
&
field_columns=delivery.start_date%0Aid
&
field_sort_columns=delivery.start_date%0Aid
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Set Successfully.
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_createObjects?set_datetimes:int=1
&
start:int=1
&
num:int=3
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Created Successfully.
</td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/foo_module/FooModule_getLocalTimezone
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
GMT-7
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/wait_for_activities"
/>
<!-- Initialize -->
<tr>
<td>
open
</td>
<td>
${base_url}/web_site_module/renderjs_runner/#/foo_module
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded"
/>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(3)', 'footer': '3 Records'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
</tal:block>
<!-- Check search without panel -->
<tal:block
tal:define=
"search_query python: 'delivery.start_date:"2001-01-01"'"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list"
/>
</tal:block>
<tal:block
tal:define=
"parsed_query python: 'delivery.start_date: "2001-01-01"';
search_query python: ''"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list"
/>
</tal:block>
<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>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/clear_query"
/>
<tal:block
tal:define=
"search_query python: 'delivery.start_date:"2001/01/01"'"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list"
/>
</tal:block>
<tal:block
tal:define=
"parsed_query python: 'delivery.start_date: "2001/01/01"';
search_query python: ''"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list"
/>
</tal:block>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(1)', 'footer': '1 Records'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/clear_query"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tr>
<td
colspan=
"3"
><b>
Check that a default filter section is displayed
</b></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//div[@class='filter_item_container']/div[1]
</td>
<td></td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//div[@class='filter_item_container']/div[1]//select
</td>
<td>
COLUMN_delivery.start_date
</td>
</tr>
<tr>
<td>
verifyValue
</td>
<td>
//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//div[@class='filter_item_container']/div[1]//input
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b></b></td>
</tr>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'COLUMN_delivery.start_date', 'value': '2001-01-01', 'index': 0}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section"
/>
</tal:block>
<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:define=
"parsed_query python: 'delivery.start_date: "2001/01/01"';
search_query python: ''"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list"
/>
</tal:block>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(1)', 'footer': '1 Records'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_listbox_pagination_text"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and"
/>
<tal:block
tal:define=
"filter_section_configuration python: {'key': 'COLUMN_delivery.start_date', 'value': '2001-01-01', 'index': 0}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/check_filter_section"
/>
</tal:block>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/ERP5Site_setTimezone.xml
0 → 100644
View file @
83f3e1fe
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ExternalMethod"
module=
"Products.ExternalMethod.ExternalMethod"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_function
</string>
</key>
<value>
<string>
setTimezone
</string>
</value>
</item>
<item>
<key>
<string>
_module
</string>
</key>
<value>
<string>
WebRenderJSTestUtils
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_setTimezone
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/FooModule_getLocalTimezone.py
0 → 100644
View file @
83f3e1fe
from
DateTime
import
DateTime
d
=
DateTime
()
return
d
.
localZone
()
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/FooModule_getLocalTimezone.xml
0 → 100644
View file @
83f3e1fe
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
FooModule_getLocalTimezone
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_renderjs_ui_test/bt/template_extension_id_list
0 → 100644
View file @
83f3e1fe
extension.erp5.WebRenderJSTestUtils
\ No newline at end of file
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