1
0
Fork 0
mirror of synced 2024-10-01 09:38:55 +13:00

some tidy up

This commit is contained in:
Peter Clement 2021-10-13 09:29:01 +01:00
parent 823038c0a7
commit 194eddbda4
3 changed files with 13 additions and 3 deletions

View file

@ -6,6 +6,7 @@
import AttachmentRenderer from "./AttachmentRenderer.svelte"
import ArrayRenderer from "./ArrayRenderer.svelte"
import InternalRenderer from "./InternalRenderer.svelte"
export let row
export let schema
export let value
@ -31,7 +32,7 @@
// the schema gets overriden on every tables fetch so we can't just set
// these to be a new type unfortunately
if (schema.name === "_id" || schema.name === "_rev") {
renderer = customRenderer?.component ?? typeMap.internal ?? StringRenderer
renderer = typeMap.internal
} else {
renderer = customRenderer?.component ?? typeMap[type] ?? StringRenderer
}

View file

@ -33,7 +33,6 @@
export let testData
export let schemaProperties
export let isTestModal = false
let webhookModal
let drawer
let tempFilters = lookForFilters(schemaProperties) || []
@ -58,7 +57,10 @@
// Special case for webhook, as it requires a body, but the schema already brings back the body's contents
if (stepId === "WEBHOOK") {
automationStore.actions.addTestDataToAutomation({
body: { [key]: e.detail },
body: {
[key]: e.detail,
...$automationStore.selectedAutomation.automation.testData.body,
},
})
}
automationStore.actions.addTestDataToAutomation({

View file

@ -1,5 +1,12 @@
jest.mock("../../utilities/usageQuota")
jest.mock("../thread")
jest.mock("../../utilities/redis", () => ({
init: jest.fn(),
checkTestFlag: () => {
return false
},
}))
jest.spyOn(global.console, "error")
require("../../environment")