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
95b5ff34
Commit
95b5ff34
authored
Jul 12, 2021
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_corporate_identity_test: add WebPage_createImageOverview test
parent
042b607a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
bt5/erp5_corporate_identity_test/TestTemplateItem/portal_components/test.erp5.testCorporateIdentityMethod.py
...ortal_components/test.erp5.testCorporateIdentityMethod.py
+14
-0
No files found.
bt5/erp5_corporate_identity_test/TestTemplateItem/portal_components/test.erp5.testCorporateIdentityMethod.py
View file @
95b5ff34
...
@@ -111,6 +111,20 @@ class TestCorporateIdentityMethod(ERP5TypeTestCase):
...
@@ -111,6 +111,20 @@ class TestCorporateIdentityMethod(ERP5TypeTestCase):
self
.
portal
.
portal_preferences
.
default_site_preference
.
enable
()
self
.
portal
.
portal_preferences
.
default_site_preference
.
enable
()
self
.
tic
()
self
.
tic
()
def
test_WebPage_createImageOverview
(
self
):
web_page
=
self
.
portal
.
web_page_module
.
template_test_slideshow_input_001_en_html
document_content
=
'<div><img src="http://test.png" /></div>'
expected_dict
=
{
'figure_list'
:
[]}
output_dict
=
web_page
.
WebPage_createImageOverview
(
document_content
)
self
.
assertEquals
(
output_dict
,
expected_dict
)
document_content
=
'<div><img src="http://test.png" alt="test" /></div>'
expected_dict
=
{
'figure_list'
:
[{
'input'
:
'<img src="http://test.png" alt="test" />'
,
'item'
:
{
'id'
:
'Figure-1'
,
'title'
:
'test'
},
'output'
:
'<a href="#Figure-1"></a><img src="http://test.png" alt="test" /><span>Figure-1 - test</span>'
}]}
output_dict
=
web_page
.
WebPage_createImageOverview
(
document_content
)
self
.
assertEquals
(
output_dict
,
expected_dict
)
def
test_validateImage
(
self
):
def
test_validateImage
(
self
):
web_page
=
self
.
portal
.
web_page_module
.
template_test_slideshow_input_001_en_html
web_page
=
self
.
portal
.
web_page_module
.
template_test_slideshow_input_001_en_html
img_string
=
''
img_string
=
''
...
...
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