fix bug with test results
This commit is contained in:
parent
f237cd891e
commit
b902e017dd
|
@ -87,13 +87,15 @@ const automationActions = store => ({
|
||||||
const response = await api.post(`/api/automations/${_id}/test`, testData)
|
const response = await api.post(`/api/automations/${_id}/test`, testData)
|
||||||
const json = await response.json()
|
const json = await response.json()
|
||||||
store.update(state => {
|
store.update(state => {
|
||||||
state.selectedAutomation.automation.testResults = json
|
state.selectedAutomation.testResults = json
|
||||||
return state
|
return state
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
select: automation => {
|
select: automation => {
|
||||||
store.update(state => {
|
store.update(state => {
|
||||||
|
let testResults = state.selectedAutomation?.testResults
|
||||||
state.selectedAutomation = new Automation(cloneDeep(automation))
|
state.selectedAutomation = new Automation(cloneDeep(automation))
|
||||||
|
state.selectedAutomation.testResults = testResults
|
||||||
state.selectedBlock = null
|
state.selectedBlock = null
|
||||||
return state
|
return state
|
||||||
})
|
})
|
||||||
|
|
|
@ -25,11 +25,10 @@
|
||||||
let resultsModal
|
let resultsModal
|
||||||
let setupToggled
|
let setupToggled
|
||||||
let blockComplete
|
let blockComplete
|
||||||
$: testResult =
|
|
||||||
$automationStore.selectedAutomation.automation.testResults?.steps.filter(
|
|
||||||
step => step.stepId === block.stepId
|
|
||||||
)
|
|
||||||
|
|
||||||
|
$: testResult = $automationStore.selectedAutomation.testResults?.steps.filter(
|
||||||
|
step => step.stepId === block.stepId
|
||||||
|
)
|
||||||
$: isTrigger = block.type === "TRIGGER"
|
$: isTrigger = block.type === "TRIGGER"
|
||||||
|
|
||||||
$: selected = $automationStore.selectedBlock?.id === block.id
|
$: selected = $automationStore.selectedBlock?.id === block.id
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
automationStore.actions.fetch()
|
automationStore.actions.fetch()
|
||||||
})
|
})
|
||||||
|
|
||||||
function selectAutomation(automation) {
|
function selectAutomation(automation) {
|
||||||
automationStore.actions.select(automation)
|
automationStore.actions.select(automation)
|
||||||
$goto(`./${automation._id}`)
|
$goto(`./${automation._id}`)
|
||||||
|
|
Loading…
Reference in New Issue