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
d0a4c42e
Commit
d0a4c42e
authored
Nov 16, 2022
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_panel_ui_test: execute all alarms at the end of the test to detect unexpected side effects
parent
80fd41e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
0 deletions
+80
-0
master/bt5/slapos_panel_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSPanelUiTest.py
...tem/portal_components/extension.erp5.SlapOSPanelUiTest.py
+16
-0
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/ERP5Site_activateAlarmSlapOSPanelTest.xml
...s_panel_ui_test/ERP5Site_activateAlarmSlapOSPanelTest.xml
+28
-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
+36
-0
No files found.
master/bt5/slapos_panel_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSPanelUiTest.py
View file @
d0a4c42e
...
...
@@ -4,6 +4,22 @@ from AccessControl.SecurityManagement import setSecurityManager
from
AccessControl.SecurityManagement
import
newSecurityManager
def
ERP5Site_activateAlarmSlapOSPanelTest
(
self
):
portal
=
self
.
getPortalObject
()
sm
=
getSecurityManager
()
try
:
newSecurityManager
(
None
,
portal
.
acl_users
.
getUser
(
SUPER_USER
))
for
alarm
in
portal
.
portal_alarms
.
contentValues
():
if
alarm
.
isEnabled
():
alarm
.
activeSense
()
finally
:
setSecurityManager
(
sm
)
return
"Alarms activated."
def
ERP5Site_bootstrapSlapOSPanelTest
(
self
,
scenario
,
customer_login
,
manager_login
,
passwd
):
...
...
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/ERP5Site_activateAlarmSlapOSPanelTest.xml
0 → 100644
View file @
d0a4c42e
<?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_activateAlarmSlapOSPanelTest
</string>
</value>
</item>
<item>
<key>
<string>
_module
</string>
</key>
<value>
<string>
SlapOSPanelUiTest
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_activateAlarmSlapOSPanelTest
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></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 @
d0a4c42e
...
...
@@ -100,7 +100,43 @@
</tal:block>
<tal:block metal:define-macro="activate_alarm">
<tr>
<td colspan="3"><b>Activate alarms</b></td>
</tr>
<tr>
<td>open</td>
<td tal:content="python: '${base_url}/ERP5Site_activateAlarmSlapOSPanelTest'">.../ERP5Site_activateAlarmSlapOSPanelTest</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Alarms activated.</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="check_consistency">
<tr>
<td>store</td>
<td>javascript{selenium.browserbot.currentWindow.location.href}</td>
<td>current_location</td>
</tr>
<!-- run alarms multiple times, to detect unexpected side effects -->
<tal:block tal:repeat="step python: range(0, 5)">
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/activate_alarm" />
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
</tal:block>
<tr>
<td>open</td>
<td>${current_location}</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/logout" />
<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" />
...
...
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