1
0
Fork 0
mirror of synced 2024-09-11 06:56:23 +12:00

Merge pull request #8530 from FlaminWrap/Flaminwrap-Enhancement-7138

Automation steps in the automation builder and tester #7138
This commit is contained in:
Michael Drury 2022-11-29 11:53:04 +00:00 committed by GitHub
commit 03a2be6740
5 changed files with 8 additions and 4 deletions

View file

@ -84,7 +84,7 @@
out:fly|local={{ x: 500, duration: 500 }} out:fly|local={{ x: 500, duration: 500 }}
> >
{#if block.stepId !== ActionStepID.LOOP} {#if block.stepId !== ActionStepID.LOOP}
<FlowItem {testDataModal} {block} /> <FlowItem {testDataModal} {block} {idx} />
{/if} {/if}
</div> </div>
{/each} {/each}

View file

@ -22,6 +22,7 @@
export let block export let block
export let testDataModal export let testDataModal
export let idx
let selected let selected
let webhookModal let webhookModal
let actionModal let actionModal
@ -208,7 +209,7 @@
{/if} {/if}
{/if} {/if}
<FlowItemHeader bind:blockComplete {block} {testDataModal} /> <FlowItemHeader bind:blockComplete {block} {testDataModal} {idx} />
{#if !blockComplete} {#if !blockComplete}
<Divider noMargin /> <Divider noMargin />
<div class="blockSection"> <div class="blockSection">

View file

@ -9,6 +9,7 @@
export let showParameters = {} export let showParameters = {}
export let testResult export let testResult
export let isTrigger export let isTrigger
export let idx
$: { $: {
if (!testResult) { if (!testResult) {
@ -72,11 +73,12 @@
{/if} {/if}
<div class="iconAlign"> <div class="iconAlign">
{#if isTrigger} {#if isTrigger}
<Body size="XS"><b>Trigger</b></Body>
<Body size="XS">When this happens:</Body> <Body size="XS">When this happens:</Body>
{:else} {:else}
<Body size="XS"><b>Step {idx}</b></Body>
<Body size="XS">Do this:</Body> <Body size="XS">Do this:</Body>
{/if} {/if}
<Detail size="S">{block?.name?.toUpperCase() || ""}</Detail> <Detail size="S">{block?.name?.toUpperCase() || ""}</Detail>
</div> </div>
</div> </div>

View file

@ -57,7 +57,7 @@
) )
$automationStore.showTestPanel = true $automationStore.showTestPanel = true
} catch (error) { } catch (error) {
notifications.error("Error testing notification") notifications.error("Error testing automation")
} }
} }
</script> </script>

View file

@ -52,6 +52,7 @@
bind:showParameters bind:showParameters
{block} {block}
isTrigger={idx === 0} isTrigger={idx === 0}
{idx}
testResult={filteredResults?.[idx]} testResult={filteredResults?.[idx]}
/> />
{#if showParameters && showParameters[block.id]} {#if showParameters && showParameters[block.id]}