Add working test workflow button
This commit is contained in:
parent
d13a597ed2
commit
e79d4f11c9
|
@ -68,6 +68,11 @@ const workflowActions = store => ({
|
|||
return state
|
||||
})
|
||||
},
|
||||
trigger: async ({ workflow }) => {
|
||||
const { _id } = workflow
|
||||
const TRIGGER_WORKFLOW_URL = `/api/workflows/${_id}/trigger`
|
||||
return await api.post(TRIGGER_WORKFLOW_URL)
|
||||
},
|
||||
select: workflow => {
|
||||
store.update(state => {
|
||||
state.selectedWorkflow = new Workflow(cloneDeep(workflow))
|
||||
|
|
|
@ -28,7 +28,10 @@
|
|||
notifier.info("Workflow block deleted.")
|
||||
}
|
||||
|
||||
function testWorkflow() {
|
||||
async function testWorkflow() {
|
||||
const result = await workflowStore.actions.trigger({
|
||||
workflow: $workflowStore.selectedWorkflow.workflow,
|
||||
})
|
||||
testResult = "Workflow passed"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue