Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
1e803f8a
Commit
1e803f8a
authored
Oct 28, 2022
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_panel_ui_test: HARDCODED data/user bootstrap
parent
86ce8285
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
203 additions
and
0 deletions
+203
-0
master/bt5/slapos_panel_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSPanelUiTest.py
...tem/portal_components/extension.erp5.SlapOSPanelUiTest.py
+62
-0
master/bt5/slapos_panel_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSPanelUiTest.xml
...em/portal_components/extension.erp5.SlapOSPanelUiTest.xml
+112
-0
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/ERP5Site_bootstrapSlapOSPanelTest.xml
...lapos_panel_ui_test/ERP5Site_bootstrapSlapOSPanelTest.xml
+28
-0
master/bt5/slapos_panel_ui_test/bt/template_extension_id_list
...er/bt5/slapos_panel_ui_test/bt/template_extension_id_list
+1
-0
No files found.
master/bt5/slapos_panel_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSPanelUiTest.py
0 → 100644
View file @
1e803f8a
from
Products.ERP5Security
import
SUPER_USER
from
AccessControl.SecurityManagement
import
getSecurityManager
from
AccessControl.SecurityManagement
import
setSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
def
ERP5Site_bootstrapSlapOSPanelTest
(
self
):
portal
=
self
.
getPortalObject
()
sm
=
getSecurityManager
()
try
:
newSecurityManager
(
None
,
portal
.
acl_users
.
getUser
(
SUPER_USER
))
# Create Project
project
=
portal
.
project_module
.
newContent
(
portal_type
=
"Project"
,
title
=
'Test Project'
)
project
.
validate
()
# Bootstrap one manager user
manager_person
=
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
first_name
=
'Manual test Project Manager'
,
default_email_coordinate_text
=
'romain+manager@nexedi.com'
)
manager_person
.
newContent
(
portal_type
=
'Assignment'
,
title
=
'Production Manager for project %s'
%
project
.
getTitle
(),
destination_project_value
=
project
,
function
=
'production/manager'
).
open
()
manager_person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
'manager#'
,
password
=
'manager#'
).
validate
()
manager_person
.
validate
()
# Bootstrap one customer user
customer_person
=
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
first_name
=
'Manual test Project Customer'
,
default_email_coordinate_text
=
'romain+customer@nexedi.com'
)
customer_person
.
newContent
(
portal_type
=
'Assignment'
,
title
=
'Customer for project %s'
%
project
.
getTitle
(),
destination_project_value
=
project
,
function
=
'customer'
).
open
()
customer_person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
'customer#'
,
password
=
'customer#'
).
validate
()
customer_person
.
validate
()
finally
:
setSecurityManager
(
sm
)
return
"Done."
master/bt5/slapos_panel_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSPanelUiTest.xml
0 → 100644
View file @
1e803f8a
<?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>
default_reference
</string>
</key>
<value>
<string>
SlapOSPanelUiTest
</string>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
extension.erp5.SlapOSPanelUiTest
</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"
>
AAAAAAAAAAI=
</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>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<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>
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/ERP5Site_bootstrapSlapOSPanelTest.xml
0 → 100644
View file @
1e803f8a
<?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>
ERP5Site_bootstrapSlapOSPanelTest
</string>
</value>
</item>
<item>
<key>
<string>
_module
</string>
</key>
<value>
<string>
SlapOSPanelUiTest
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_bootstrapSlapOSPanelTest
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_panel_ui_test/bt/template_extension_id_list
0 → 100644
View file @
1e803f8a
extension.erp5.SlapOSPanelUiTest
\ 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