tests: add check adding an external trigger to a workflow global action
This commit is contained in:
parent
71277ae10f
commit
83f7941808
|
@ -1544,6 +1544,34 @@ def test_workflows_global_actions_timeout_triggers(pub):
|
|||
assert Workflow.get(workflow.id).global_actions[0].triggers[0].timeout == '-2'
|
||||
|
||||
|
||||
def test_workflows_global_actions_webservice_trigger(pub):
|
||||
create_superuser(pub)
|
||||
create_role()
|
||||
|
||||
Workflow.wipe()
|
||||
workflow = Workflow(name='foo')
|
||||
workflow.store()
|
||||
|
||||
app = login(get_app(pub))
|
||||
resp = app.get('/backoffice/workflows/%s/' % workflow.id)
|
||||
resp = resp.click('add global action')
|
||||
resp.forms[0]['name'] = 'Global Action'
|
||||
resp = resp.forms[0].submit('submit')
|
||||
resp = resp.follow()
|
||||
|
||||
# test adding a timeout trigger
|
||||
resp.forms[1]['type'] = 'External call'
|
||||
resp = resp.forms[1].submit()
|
||||
resp = resp.follow()
|
||||
|
||||
assert 'External call (not configured)' in resp
|
||||
|
||||
resp = resp.click(href='triggers/%s/' % Workflow.get(workflow.id).global_actions[0].triggers[-1].id, index=0)
|
||||
resp.form['identifier'] = 'foobar'
|
||||
resp = resp.form.submit('submit').follow()
|
||||
assert 'External call (foobar)' in resp
|
||||
|
||||
|
||||
def test_workflows_global_actions_external_workflow_action(pub):
|
||||
create_superuser(pub)
|
||||
Workflow.wipe()
|
||||
|
|
Loading…
Reference in New Issue