misc: enable external workflow / modify card actions (#45289)
This commit is contained in:
parent
9d0d9c2a3c
commit
a96e9c769c
|
@ -3731,15 +3731,6 @@ def test_workflows_global_actions_external_workflow_action(pub):
|
|||
workflow.store()
|
||||
|
||||
app = login(get_app(pub))
|
||||
resp = app.get('/backoffice/workflows/%s/status/%s/' % (workflow.id, st.id))
|
||||
assert 'External workflow' not in [o[0] for o in resp.forms[0]['action-formdata-action'].options]
|
||||
|
||||
# activate option
|
||||
if not pub.site_options.has_section('options'):
|
||||
pub.site_options.add_section('options')
|
||||
pub.site_options.set('options', 'external-workflow', 'true')
|
||||
with open(os.path.join(pub.app_dir, 'site-options.cfg'), 'w') as fd:
|
||||
pub.site_options.write(fd)
|
||||
|
||||
resp = app.get('/backoffice/workflows/%s/status/%s/' % (workflow.id, st.id))
|
||||
resp.forms[0]['action-formdata-action'] = 'External workflow'
|
||||
|
@ -3785,15 +3776,6 @@ def test_workflows_edit_carddata_action(pub):
|
|||
wf.store()
|
||||
|
||||
app = login(get_app(pub))
|
||||
resp = app.get('/backoffice/workflows/%s/status/%s/' % (wf.id, st.id))
|
||||
assert 'Edit Card Data' not in [o[0] for o in resp.forms[0]['action-formdata-action'].options]
|
||||
|
||||
# activate option
|
||||
if not pub.site_options.has_section('options'):
|
||||
pub.site_options.add_section('options')
|
||||
pub.site_options.set('options', 'external-workflow', 'true')
|
||||
with open(os.path.join(pub.app_dir, 'site-options.cfg'), 'w') as fd:
|
||||
pub.site_options.write(fd)
|
||||
|
||||
resp = app.get('/backoffice/workflows/%s/status/%s/' % (wf.id, st.id))
|
||||
assert 'Edit Card Data' in [o[0] for o in resp.forms[0]['action-formdata-action'].options]
|
||||
|
|
|
@ -367,6 +367,7 @@ class QommonPublisher(Publisher, object):
|
|||
defaults = {
|
||||
'studio': True,
|
||||
'mail-templates': True,
|
||||
'external-workflow': True,
|
||||
}
|
||||
if self.site_options is None:
|
||||
self.load_site_options()
|
||||
|
|
Loading…
Reference in New Issue