Commit e62148b3 authored by Jérome Perrin's avatar Jérome Perrin

CodingStyleTestCase: ignore duplicate actions for OfficeJS actions

OfficeJS use another mechanism for actions registration, so duplicate
actions defined on the portal type is not necessarly a problem, as long as
all actions are not registered in the same app.
parent 738b7e0c
Pipeline #16750 failed with stage
...@@ -183,6 +183,11 @@ class CodingStyleTestCase(ERP5TypeTestCase): ...@@ -183,6 +183,11 @@ class CodingStyleTestCase(ERP5TypeTestCase):
) )
for action_category, action_list in self.portal.portal_actions.listFilteredActionsFor( for action_category, action_list in self.portal.portal_actions.listFilteredActionsFor(
document).iteritems(): document).iteritems():
# We ignore duplicate actions in action categories used by OfficeJS
# because OfficeJS only display actions referenced in the router
# gadget configuration.
if action_category in ('object_jio_view', 'object_jio_js_script'):
continue
for action_name, action_count in collections.Counter( for action_name, action_count in collections.Counter(
[action['name'] for action in action_list]).iteritems(): [action['name'] for action in action_list]).iteritems():
if action_count > 1: if action_count > 1:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment