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
c83ec8f6
Commit
c83ec8f6
authored
Nov 15, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_panel_ui_test: randomize logins
parent
9fd65714
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
88 additions
and
16 deletions
+88
-16
master/bt5/slapos_panel_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSPanelUiTest.py
...tem/portal_components/extension.erp5.SlapOSPanelUiTest.py
+6
-5
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/testAccountingScenario.zpt
...ortal_tests/slapos_panel_zuite/testAccountingScenario.zpt
+3
-3
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/testCustomerInstanceScenario.zpt
...tests/slapos_panel_zuite/testCustomerInstanceScenario.zpt
+4
-4
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/testCustomerSharedInstanceScenario.zpt
...slapos_panel_zuite/testCustomerSharedInstanceScenario.zpt
+3
-3
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/ERP5Site_generateTestUserConfiguration.py
...s_panel_ui_test/ERP5Site_generateTestUserConfiguration.py
+9
-0
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/ERP5Site_generateTestUserConfiguration.xml
..._panel_ui_test/ERP5Site_generateTestUserConfiguration.xml
+62
-0
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/Zuite_SlapOSPanelTemplate.zpt
..._skins/slapos_panel_ui_test/Zuite_SlapOSPanelTemplate.zpt
+1
-1
No files found.
master/bt5/slapos_panel_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSPanelUiTest.py
View file @
c83ec8f6
...
...
@@ -4,7 +4,8 @@ from AccessControl.SecurityManagement import setSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
def
ERP5Site_bootstrapSlapOSPanelTest
(
self
,
scenario
):
def
ERP5Site_bootstrapSlapOSPanelTest
(
self
,
scenario
,
customer_login
,
manager_login
,
passwd
):
if
scenario
not
in
[
'accounting'
,
'customer'
,
'customer_shared'
]:
raise
ValueError
(
'Unsupported bootstrap scenario: %s'
%
scenario
)
...
...
@@ -53,8 +54,8 @@ def ERP5Site_bootstrapSlapOSPanelTest(self, scenario):
).
open
()
manager_person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
'manager'
,
password
=
'eiChaxo5Eefier9vAek7phie#'
reference
=
manager_login
,
password
=
passwd
).
validate
()
manager_person
.
validate
()
...
...
@@ -72,8 +73,8 @@ def ERP5Site_bootstrapSlapOSPanelTest(self, scenario):
).
open
()
customer_person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
'customer'
,
password
=
'eiChaxo5Eefier9vAek7phie#'
reference
=
customer_login
,
password
=
passwd
).
validate
()
customer_person
.
validate
()
finally
:
...
...
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/testAccountingScenario.zpt
View file @
c83ec8f6
...
...
@@ -12,7 +12,7 @@
<td
rowspan=
"1"
colspan=
"3"
>
Test SlapOS Panel
</td>
</tr>
</thead>
<tbody>
<tbody
tal:define=
"user_configuration python: context.ERP5Site_generateTestUserConfiguration()"
>
<tal:block
tal:define=
"init_configuration python: {'scenario': 'accounting'}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/slapos_init"
/>
...
...
@@ -27,7 +27,7 @@
<tal:block
tal:define=
"login_configuration python: {'user':
'manager', 'password': 'eiChaxo5Eefier9vAek7phie#'
}"
>
<tal:block
tal:define=
"login_configuration python: {'user':
user_configuration['manager_login'], 'password': user_configuration['passwd']
}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/login"
/>
</tal:block>
...
...
@@ -284,7 +284,7 @@
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/logout"
/>
<tal:block
tal:define=
"login_configuration python: {'user':
'customer', 'password': 'eiChaxo5Eefier9vAek7phie#'
}"
>
<tal:block
tal:define=
"login_configuration python: {'user':
user_configuration['customer_login'], 'password': user_configuration['passwd']
}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/login"
/>
</tal:block>
...
...
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/testCustomerInstanceScenario.zpt
View file @
c83ec8f6
...
...
@@ -12,7 +12,7 @@
<td
rowspan=
"1"
colspan=
"3"
>
Test SlapOS Panel
</td>
</tr>
</thead>
<tbody>
<tbody
tal:define=
"user_configuration python: context.ERP5Site_generateTestUserConfiguration()"
>
<tal:block
tal:define=
"init_configuration python: {'scenario': 'customer'}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/slapos_init"
/>
...
...
@@ -27,7 +27,7 @@
<tal:block
tal:define=
"login_configuration python: {'user':
'manager', 'password': 'eiChaxo5Eefier9vAek7phie#'
}"
>
<tal:block
tal:define=
"login_configuration python: {'user':
user_configuration['manager_login'], 'password': user_configuration['passwd']
}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/login"
/>
</tal:block>
...
...
@@ -218,7 +218,7 @@
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/logout"
/>
<tal:block
tal:define=
"login_configuration python: {'user':
'customer', 'password': 'eiChaxo5Eefier9vAek7phie#'
}"
>
<tal:block
tal:define=
"login_configuration python: {'user':
user_configuration['customer_login'], 'password': user_configuration['passwd']
}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/login"
/>
</tal:block>
...
...
@@ -316,7 +316,7 @@
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/logout"
/>
<tal:block
tal:define=
"login_configuration python: {'user':
'manager', 'password': 'eiChaxo5Eefier9vAek7phie#'
}"
>
<tal:block
tal:define=
"login_configuration python: {'user':
user_configuration['manager_login'], 'password': user_configuration['passwd']
}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/login"
/>
</tal:block>
...
...
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/testCustomerSharedInstanceScenario.zpt
View file @
c83ec8f6
...
...
@@ -12,7 +12,7 @@
<td
rowspan=
"1"
colspan=
"3"
>
Test SlapOS Panel
</td>
</tr>
</thead>
<tbody>
<tbody
tal:define=
"user_configuration python: context.ERP5Site_generateTestUserConfiguration()"
>
<tal:block
tal:define=
"init_configuration python: {'scenario': 'customer_shared'}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/slapos_init"
/>
...
...
@@ -27,7 +27,7 @@
<tal:block
tal:define=
"login_configuration python: {'user':
'manager', 'password': 'eiChaxo5Eefier9vAek7phie#'
}"
>
<tal:block
tal:define=
"login_configuration python: {'user':
user_configuration['manager_login'], 'password': user_configuration['passwd']
}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/login"
/>
</tal:block>
...
...
@@ -358,7 +358,7 @@
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/logout"
/>
<tal:block
tal:define=
"login_configuration python: {'user':
'customer', 'password': 'eiChaxo5Eefier9vAek7phie#'
}"
>
<tal:block
tal:define=
"login_configuration python: {'user':
user_configuration['customer_login'], 'password': user_configuration['passwd']
}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSPanelTemplate/macros/login"
/>
</tal:block>
...
...
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/ERP5Site_generateTestUserConfiguration.py
0 → 100644
View file @
c83ec8f6
from
DateTime
import
DateTime
now
=
int
(
DateTime
())
return
{
'customer_login'
:
'testcustomer%s'
%
now
,
'manager_login'
:
'testmanager%s'
%
now
,
'passwd'
:
'eiChaxo5Eefier9vAek7phie$%s'
%
now
}
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/ERP5Site_generateTestUserConfiguration.xml
0 → 100644
View file @
c83ec8f6
<?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>
ERP5Site_generateTestUserConfiguration
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/Zuite_SlapOSPanelTemplate.zpt
View file @
c83ec8f6
...
...
@@ -11,7 +11,7 @@
<tr>
<td>open</td>
<td tal:content="python: '${base_url}/ERP5Site_bootstrapSlapOSPanelTest?scenario=%s
' % init_configuration['scenario']
">.../ERP5Site_bootstrapSlapOSPanelTest</td>
<td tal:content="python: '${base_url}/ERP5Site_bootstrapSlapOSPanelTest?scenario=%s
&manager_login=%s&customer_login=%s&passwd=%s' % (init_configuration['scenario'], user_configuration['manager_login'], user_configuration['customer_login'], user_configuration['passwd'])
">.../ERP5Site_bootstrapSlapOSPanelTest</td>
<td></td>
</tr>
<tr>
...
...
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