Merge pull request #3719 from Budibase/fix/incoming-webhooks
Fix/incoming webhooks
This commit is contained in:
commit
58f0f337b3
4 changed files with 13 additions and 5 deletions
|
@ -35,19 +35,20 @@ context("Create a automation", () => {
|
||||||
cy.contains("dog").click()
|
cy.contains("dog").click()
|
||||||
cy.get(".spectrum-Textfield-input")
|
cy.get(".spectrum-Textfield-input")
|
||||||
.first()
|
.first()
|
||||||
.type("goodboy")
|
.type("{{ trigger.row.name }}", { parseSpecialCharSequences: false })
|
||||||
cy.get(".spectrum-Textfield-input")
|
cy.get(".spectrum-Textfield-input")
|
||||||
.eq(1)
|
.eq(1)
|
||||||
.type("11")
|
.type("11")
|
||||||
|
cy.contains("Finish and test automation").click()
|
||||||
|
|
||||||
cy.contains("Run test").click()
|
|
||||||
cy.get(".modal-inner-wrapper").within(() => {
|
cy.get(".modal-inner-wrapper").within(() => {
|
||||||
cy.wait(1000)
|
cy.wait(1000)
|
||||||
cy.get(".spectrum-Picker-label").click()
|
cy.get(".spectrum-Picker-label").click()
|
||||||
cy.contains("dog").click()
|
cy.contains("dog").click()
|
||||||
|
cy.wait(1000)
|
||||||
cy.get(".spectrum-Textfield-input")
|
cy.get(".spectrum-Textfield-input")
|
||||||
.first()
|
.first()
|
||||||
.type("goodboy")
|
.type("automationGoodboy")
|
||||||
cy.get(".spectrum-Textfield-input")
|
cy.get(".spectrum-Textfield-input")
|
||||||
.eq(1)
|
.eq(1)
|
||||||
.type("11")
|
.type("11")
|
||||||
|
@ -57,6 +58,9 @@ context("Create a automation", () => {
|
||||||
cy.get(".spectrum-Textfield-input")
|
cy.get(".spectrum-Textfield-input")
|
||||||
.eq(3)
|
.eq(3)
|
||||||
.type("123456")
|
.type("123456")
|
||||||
|
cy.contains("Test").click()
|
||||||
})
|
})
|
||||||
|
cy.contains("Data").click()
|
||||||
|
cy.contains("automationGoodboy")
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
// Check the schema to see if required fields have been entered
|
// Check the schema to see if required fields have been entered
|
||||||
$: isError = !trigger.schema.outputs.required.every(
|
$: isError = !trigger.schema.outputs.required.every(
|
||||||
required => testData[required]
|
required => testData[required] || required !== "row"
|
||||||
)
|
)
|
||||||
|
|
||||||
function parseTestJSON(e) {
|
function parseTestJSON(e) {
|
||||||
|
|
|
@ -244,7 +244,7 @@
|
||||||
value={inputData[key]}
|
value={inputData[key]}
|
||||||
/>
|
/>
|
||||||
</CodeEditorModal>
|
</CodeEditorModal>
|
||||||
{:else if value.type === "string" || value.type === "number"}
|
{:else if value.type === "string" || value.type === "number" || value.type === "integer"}
|
||||||
{#if isTestModal}
|
{#if isTestModal}
|
||||||
<ModalBindableInput
|
<ModalBindableInput
|
||||||
title={value.title}
|
title={value.title}
|
||||||
|
|
|
@ -65,6 +65,10 @@ exports.buildSchema = async ctx => {
|
||||||
let automation = await db.get(webhook.action.target)
|
let automation = await db.get(webhook.action.target)
|
||||||
const autoOutputs = automation.definition.trigger.schema.outputs
|
const autoOutputs = automation.definition.trigger.schema.outputs
|
||||||
let properties = webhook.bodySchema.properties
|
let properties = webhook.bodySchema.properties
|
||||||
|
// reset webhook outputs
|
||||||
|
autoOutputs.properties = {
|
||||||
|
body: autoOutputs.properties.body,
|
||||||
|
}
|
||||||
for (let prop of Object.keys(properties)) {
|
for (let prop of Object.keys(properties)) {
|
||||||
autoOutputs.properties[prop] = {
|
autoOutputs.properties[prop] = {
|
||||||
type: properties[prop].type,
|
type: properties[prop].type,
|
||||||
|
|
Loading…
Reference in a new issue