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
Frederic Thoma
erp5
Commits
74f09af3
Commit
74f09af3
authored
Dec 26, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
Fix broken tests after
!1011
Fix broken tests after
!1011
it was merged too fast. /reviewed-on
!1018
parents
72a2977a
7847b5db
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
11 deletions
+44
-11
bt5/erp5_monaco_editor/SkinTemplateItem/portal_skins/erp5_monaco_editor/monaco-editor.gadget.js.js
...ortal_skins/erp5_monaco_editor/monaco-editor.gadget.js.js
+3
-2
bt5/erp5_monaco_editor_ui_test/PathTemplateItem/portal_tests/monaco_editor_zuite/testTextEditorRenderJSStyle.zpt
...tests/monaco_editor_zuite/testTextEditorRenderJSStyle.zpt
+9
-2
bt5/erp5_monaco_editor_ui_test/PathTemplateItem/portal_tests/monaco_editor_zuite/testTextEditorXHTMLStyle.zpt
...al_tests/monaco_editor_zuite/testTextEditorXHTMLStyle.zpt
+8
-2
product/ERP5/Document/File.py
product/ERP5/Document/File.py
+0
-1
product/ERP5/tests/testERP5Base.py
product/ERP5/tests/testERP5Base.py
+15
-4
product/ERP5Form/Form.py
product/ERP5Form/Form.py
+6
-0
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+2
-0
product/ERP5Type/Core/Folder.py
product/ERP5Type/Core/Folder.py
+1
-0
No files found.
bt5/erp5_monaco_editor/SkinTemplateItem/portal_skins/erp5_monaco_editor/monaco-editor.gadget.js.js
View file @
74f09af3
...
@@ -171,8 +171,9 @@
...
@@ -171,8 +171,9 @@
.
push
(
addExtraLibrary
(
'
./monaco-renderjs.d.ts
'
,
'
renderjs
'
))
.
push
(
addExtraLibrary
(
'
./monaco-renderjs.d.ts
'
,
'
renderjs
'
))
.
push
(
addExtraLibrary
(
'
./monaco-jio.d.ts
'
,
'
jio
'
));
.
push
(
addExtraLibrary
(
'
./monaco-jio.d.ts
'
,
'
jio
'
));
}
}
if
(
modification_dict
.
hasOwnProperty
(
'
editable
'
)){
if
(
modification_dict
.
hasOwnProperty
(
'
editable
'
)){
gadget
.
editor
.
updateOptions
({
readOnly
:
!
this
.
state
.
editable
});
this
.
editor
.
updateOptions
({
readOnly
:
!
this
.
state
.
editable
});
}
}
}
return
queue
;
return
queue
;
})
})
...
...
bt5/erp5_monaco_editor_ui_test/PathTemplateItem/portal_tests/monaco_editor_zuite/testTextEditorRenderJSStyle.zpt
View file @
74f09af3
...
@@ -90,9 +90,16 @@
...
@@ -90,9 +90,16 @@
<td>
//a[@data-i18n="View"]
</td><td></td></tr>
<td>
//a[@data-i18n="View"]
</td><td></td></tr>
<tr><td>
click
</td>
<tr><td>
click
</td>
<td>
//a[@data-i18n="View"]
</td><td></td></tr>
<td>
//a[@data-i18n="View"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="editor"]//iframe
</td><td></td></tr>
<tr><td>
selectFrame
</td>
<td>
//div[@data-gadget-scope="editor"]//iframe
</td><td></td></tr>
<tr><td>
waitForText
</td>
<tr><td>
waitForText
</td>
<td>
//div[@data-gadget-scope="field_my_text_content"]//pre
</td>
<td>
//body
</td>
<td>
Hello
</td></tr>
<!-- we have line number -->
<td>
glob:1*Hello
</td></tr>
<tr><td>
selectFrame
</td>
<td>
relative=top
</td><td></td></tr>
</tbody></table>
</tbody></table>
</body>
</body>
...
...
bt5/erp5_monaco_editor_ui_test/PathTemplateItem/portal_tests/monaco_editor_zuite/testTextEditorXHTMLStyle.zpt
View file @
74f09af3
...
@@ -66,9 +66,15 @@
...
@@ -66,9 +66,15 @@
<tr><td>
click
</td>
<tr><td>
click
</td>
<td>
//div[@class="actions"]//span[text() = "View"]
</td><td></td></tr>
<td>
//div[@class="actions"]//span[text() = "View"]
</td><td></td></tr>
<tr><td>
waitForElementPresent
</td>
<td>
css=.bottom iframe
</td><td></td></tr>
<tr><td>
selectFrame
</td>
<td>
css=.bottom iframe
</td><td></td></tr>
<tr><td>
waitForText
</td>
<tr><td>
waitForText
</td>
<td>
css=.bottom pre
</td>
<td>
//body
</td>
<td>
Hello
</td></tr>
<td>
glob:1*Hello
</td></tr>
<tr><td>
selectFrame
</td>
<td>
relative=top
</td><td></td></tr>
</tbody></table>
</tbody></table>
</body>
</body>
...
...
product/ERP5/Document/File.py
View file @
74f09af3
...
@@ -74,7 +74,6 @@ class File(Document, CMFFile):
...
@@ -74,7 +74,6 @@ class File(Document, CMFFile):
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
# Default global values
# Default global values
content_type
=
''
# Required for WebDAV support (default value)
data
=
''
# A hack required to use OFS.Image.index_html without calling OFS.Image.__init__
data
=
''
# A hack required to use OFS.Image.index_html without calling OFS.Image.__init__
# Default Properties
# Default Properties
...
...
product/ERP5/tests/testERP5Base.py
View file @
74f09af3
...
@@ -1379,10 +1379,7 @@ class TestERP5Base(ERP5TypeTestCase):
...
@@ -1379,10 +1379,7 @@ class TestERP5Base(ERP5TypeTestCase):
self
.
assertEqual
(
'organisation@example.com'
,
self
.
assertEqual
(
'organisation@example.com'
,
organisation
.
getAlternateEmailCoordinateText
())
organisation
.
getAlternateEmailCoordinateText
())
# Marked as expectedFailure as it shall be never possible to use edit method to set
def
test_content_type_local_property
(
self
):
# local property which would override existing method
@
expectedFailure
def
test_content_type_property
(
self
):
portal_type
=
'Person'
portal_type
=
'Person'
person_module
=
self
.
portal
.
getDefaultModule
(
portal_type
)
person_module
=
self
.
portal
.
getDefaultModule
(
portal_type
)
person
=
person_module
.
newContent
(
portal_type
=
portal_type
)
person
=
person_module
.
newContent
(
portal_type
=
portal_type
)
...
@@ -1393,6 +1390,20 @@ class TestERP5Base(ERP5TypeTestCase):
...
@@ -1393,6 +1390,20 @@ class TestERP5Base(ERP5TypeTestCase):
# edit content_type on document which has no content_type property configured
# edit content_type on document which has no content_type property configured
person
.
edit
(
content_type
=
'text/xml'
)
person
.
edit
(
content_type
=
'text/xml'
)
def
test_EmbeddedFile_content_type
(
self
):
embedded_file
=
self
.
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
).
newContent
(
portal_type
=
'Embedded File'
)
self
.
assertFalse
(
embedded_file
.
hasContentType
())
self
.
assertEqual
(
'text/plain'
,
embedded_file
.
getContentType
(
'text/plain'
))
embedded_file
.
edit
(
content_type
=
'text/xml'
)
self
.
assertEqual
(
'text/xml'
,
embedded_file
.
getContentType
())
self
.
assertEqual
(
'text/xml'
,
embedded_file
.
getProperty
(
'content_type'
))
def
test_BankAccount_validateIBAN
(
self
):
def
test_BankAccount_validateIBAN
(
self
):
self
.
assertTrue
(
self
.
assertTrue
(
self
.
portal
.
BankAccount_validateIBAN
(
self
.
portal
.
BankAccount_validateIBAN
(
...
...
product/ERP5Form/Form.py
View file @
74f09af3
...
@@ -637,6 +637,12 @@ class ERP5Form(Base, ZMIForm, ZopePageTemplate):
...
@@ -637,6 +637,12 @@ class ERP5Form(Base, ZMIForm, ZopePageTemplate):
objectItems
=
ZMIForm
.
objectItems
objectItems
=
ZMIForm
.
objectItems
objectValues
=
ZMIForm
.
objectValues
objectValues
=
ZMIForm
.
objectValues
# If content_type is not text/html ZopePageTemplate will check that the
# source is well formed XML, but this does not really applies to Forms,
# they don't have source. By setting content_type here we make sure we
# don't get ERP5Type's Base default content_type.
content_type
=
ZopePageTemplate
.
content_type
def
__init__
(
self
,
id
,
title
,
unicode_mode
=
0
,
encoding
=
'UTF-8'
,
def
__init__
(
self
,
id
,
title
,
unicode_mode
=
0
,
encoding
=
'UTF-8'
,
stored_encoding
=
'UTF-8'
):
stored_encoding
=
'UTF-8'
):
"""Initialize form.
"""Initialize form.
...
...
product/ERP5Type/Base.py
View file @
74f09af3
...
@@ -847,6 +847,8 @@ class Base( CopyContainer,
...
@@ -847,6 +847,8 @@ class Base( CopyContainer,
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getId'
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getId'
)
getId
=
BaseAccessor
.
Getter
(
'getId'
,
'id'
,
'string'
)
getId
=
BaseAccessor
.
Getter
(
'getId'
,
'id'
,
'string'
)
content_type
=
None
# content_type is a property in ERP5, but a method in CMF
# Debug
# Debug
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getOid'
)
'getOid'
)
...
...
product/ERP5Type/Core/Folder.py
View file @
74f09af3
...
@@ -707,6 +707,7 @@ class Folder(OFSFolder2, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn):
...
@@ -707,6 +707,7 @@ class Folder(OFSFolder2, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn):
PUT_factory
=
None
PUT_factory
=
None
# XXX Prevent inheritance from PortalFolderBase
# XXX Prevent inheritance from PortalFolderBase
description
=
None
description
=
None
content_type
=
None
# content_type is a property in ERP5, but a method in CMF
# Per default we use BTree folder
# Per default we use BTree folder
_folder_handler
=
BTREE_HANDLER
_folder_handler
=
BTREE_HANDLER
...
...
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