From ba1c5abf430c6087d5c75b5136663705f4ab4779 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Wed, 27 Jul 2022 16:47:19 +0100 Subject: [PATCH] Fixing an issue with test panel not updating when new test data comes in. --- .../automation/AutomationBuilder/TestPanel.svelte | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationBuilder/TestPanel.svelte b/packages/builder/src/components/automation/AutomationBuilder/TestPanel.svelte index bdc39b74e1..4f09edf7c2 100644 --- a/packages/builder/src/components/automation/AutomationBuilder/TestPanel.svelte +++ b/packages/builder/src/components/automation/AutomationBuilder/TestPanel.svelte @@ -5,9 +5,8 @@ import { ActionStepID } from "constants/backend/automations" export let automation - export let testResults - let blocks + let blocks, testResults $: { blocks = [] @@ -18,15 +17,11 @@ blocks = blocks .concat(automation.definition.steps || []) .filter(x => x.stepId !== ActionStepID.LOOP) - } else if (testResults) { - blocks = testResults.steps || [] - } - } - $: { - if (!testResults) { - testResults = $automationStore.selectedAutomation?.testResults + } else if ($automationStore.selectedAutomation) { + automation = $automationStore.selectedAutomation } } + $: testResults = $automationStore.selectedAutomation?.testResults