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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
erp5
Commits
c020b284
Commit
c020b284
authored
Apr 18, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
ui_test_core: address pylint warnings and enable coding style test
See merge request
nexedi/erp5!1589
parents
6bcc62ff
8846bfa2
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
19 additions
and
83 deletions
+19
-83
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Base_setLanguageWithoutRedirect.py
...kins/erp5_ui_test_core/Base_setLanguageWithoutRedirect.py
+3
-0
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/ErrorLog_reportErrorList.py
...ortal_skins/erp5_ui_test_core/ErrorLog_reportErrorList.py
+0
-8
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/ErrorLog_reportErrorList.xml
...rtal_skins/erp5_ui_test_core/ErrorLog_reportErrorList.xml
+0
-62
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_addTest.py
...plateItem/portal_skins/erp5_ui_test_core/Zuite_addTest.py
+7
-1
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_runSeleniumTest.py
...m/portal_skins/erp5_ui_test_core/Zuite_runSeleniumTest.py
+7
-7
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_uploadScreenshot.py
.../portal_skins/erp5_ui_test_core/Zuite_uploadScreenshot.py
+0
-2
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_viewRunZeleniumTestDialog.xml
...ins/erp5_ui_test_core/Zuite_viewRunZeleniumTestDialog.xml
+1
-1
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_viewRunZeleniumTestDialog/your_description.xml
...core/Zuite_viewRunZeleniumTestDialog/your_description.xml
+0
-0
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_viewRunZeleniumTestDialog/your_url_list.xml
...st_core/Zuite_viewRunZeleniumTestDialog/your_url_list.xml
+0
-0
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_viewRunZeleniumTestDialog/your_zuite_id.xml
...st_core/Zuite_viewRunZeleniumTestDialog/your_zuite_id.xml
+0
-0
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_viewZeleniumTestLauncherValidator.py
...5_ui_test_core/Zuite_viewZeleniumTestLauncherValidator.py
+1
-1
bt5/erp5_ui_test_core/bt/skip_coding_style_test
bt5/erp5_ui_test_core/bt/skip_coding_style_test
+0
-1
No files found.
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Base_setLanguageWithoutRedirect.py
View file @
c020b284
# pylint:disable=redefined-builtin
# select_language is a builtin because of a Localizer.itools.i18n.accept patch
context
.
Base_doLanguage
(
select_language
)
context
.
Base_doLanguage
(
select_language
)
# Don't redirect. Base_doLanguage tries to redirect to the same page
# Don't redirect. Base_doLanguage tries to redirect to the same page
# and then selenium main page is loaded again in the bottom frame of
# and then selenium main page is loaded again in the bottom frame of
...
...
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/ErrorLog_reportErrorList.py
deleted
100644 → 0
View file @
6bcc62ff
for
error_entry
in
context
.
error_log
.
getLogEntries
():
for
key
in
error_entry
:
if
key
not
in
[
"tb_text"
,
"tb_html"
,
'req_html'
]:
print
'%s : %s'
%
(
key
,
error_entry
[
key
])
print
'------------- Traceback ------------'
print
error_entry
[
"tb_text"
]
print
"="
*
79
return
printed
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/ErrorLog_reportErrorList.xml
deleted
100644 → 0
View file @
6bcc62ff
<?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>
ErrorLog_reportErrorList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_addTest.py
View file @
c020b284
...
@@ -7,7 +7,13 @@ if REQUEST:
...
@@ -7,7 +7,13 @@ if REQUEST:
assert
context
.
getPortalType
()
==
"Test Tool"
,
"bad context"
assert
context
.
getPortalType
()
==
"Test Tool"
,
"bad context"
if
test_id
is
None
or
test_id
==
''
:
if
test_id
is
None
or
test_id
==
''
:
test_id
=
''
.
join
(
list
(
filter
(
lambda
a
:
a
not
in
[
"'"
,
'_'
,
'-'
,
'.'
,
' '
,
'~'
,
':'
,
'/'
,
'?'
,
'#'
,
'['
,
']'
,
'@'
,
'!'
,
'$'
,
'&'
,
'('
,
')'
,
'*'
,
'+'
,
';'
,
'='
],
title
)))
test_id
=
''
.
join
(
list
(
filter
(
# pylint:disable=deprecated-lambda
lambda
a
:
a
not
in
[
"'"
,
'_'
,
'-'
,
'.'
,
' '
,
'~'
,
':'
,
'/'
,
'?'
,
'#'
,
'['
,
']'
,
'@'
,
'!'
,
'$'
,
'&'
,
'('
,
')'
,
'*'
,
'+'
,
';'
,
'='
],
title
)))
if
test_id
not
in
context
.
objectIds
():
if
test_id
not
in
context
.
objectIds
():
factory
=
context
.
manage_addProduct
[
'PageTemplates'
]
factory
=
context
.
manage_addProduct
[
'PageTemplates'
]
...
...
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_runSeleniumTest.py
View file @
c020b284
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_uploadScreenshot.py
View file @
c020b284
"""
"""
Upload a screenshot taken by the test to ERP5
Upload a screenshot taken by the test to ERP5
"""
"""
from
erp5.component.module.Log
import
log
data_uri
=
context
.
REQUEST
.
form
.
get
(
'data_uri'
,
'default'
)
data_uri
=
context
.
REQUEST
.
form
.
get
(
'data_uri'
,
'default'
)
image_module
=
getattr
(
context
,
"image_module"
,
None
)
image_module
=
getattr
(
context
,
"image_module"
,
None
)
...
...
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_view
ZeleniumTestLauncher
.xml
→
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_view
RunZeleniumTestDialog
.xml
View file @
c020b284
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
Zuite_view
ZeleniumTestLauncher
</string>
</value>
<value>
<string>
Zuite_view
RunZeleniumTestDialog
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
method
</string>
</key>
<key>
<string>
method
</string>
</key>
...
...
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_view
ZeleniumTestLauncher
/your_description.xml
→
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_view
RunZeleniumTestDialog
/your_description.xml
View file @
c020b284
File moved
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_view
ZeleniumTestLauncher
/your_url_list.xml
→
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_view
RunZeleniumTestDialog
/your_url_list.xml
View file @
c020b284
File moved
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_view
ZeleniumTestLauncher
/your_zuite_id.xml
→
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_view
RunZeleniumTestDialog
/your_zuite_id.xml
View file @
c020b284
File moved
bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_viewZeleniumTestLauncherValidator.py
View file @
c020b284
...
@@ -5,7 +5,7 @@ if web_page_context:
...
@@ -5,7 +5,7 @@ if web_page_context:
form_id
=
'view'
form_id
=
'view'
else
:
else
:
no_web_page
=
not
request
.
has_key
(
'web_page'
)
or
request
[
'web_page'
]
is
None
or
not
request
[
'web_page'
]
no_web_page
=
not
request
.
has_key
(
'web_page'
)
or
request
[
'web_page'
]
is
None
or
not
request
[
'web_page'
]
form_id
=
'Zuite_view
ZeleniumTestLauncher
'
form_id
=
'Zuite_view
RunZeleniumTestDialog
'
no_reference
=
not
request
.
has_key
(
'web_page_reference'
)
or
request
[
'web_page_reference'
]
is
None
or
not
request
[
'web_page_reference'
]
no_reference
=
not
request
.
has_key
(
'web_page_reference'
)
or
request
[
'web_page_reference'
]
is
None
or
not
request
[
'web_page_reference'
]
no_url
=
not
request
.
has_key
(
'url'
)
or
request
[
'url'
]
is
None
or
not
request
[
'url'
]
no_url
=
not
request
.
has_key
(
'url'
)
or
request
[
'url'
]
is
None
or
not
request
[
'url'
]
...
...
bt5/erp5_ui_test_core/bt/skip_coding_style_test
deleted
100644 → 0
View file @
6bcc62ff
1
\ 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