Check automation creation
This commit is contained in:
parent
eaa38c5c2d
commit
292c87350a
|
@ -110,8 +110,8 @@ describe("/rowsActions", () => {
|
||||||
|
|
||||||
expect(res).toEqual(
|
expect(res).toEqual(
|
||||||
expect.objectContaining({
|
expect.objectContaining({
|
||||||
name: "action name",
|
name: "action name",
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(await config.api.rowAction.find(tableId)).toEqual({
|
expect(await config.api.rowAction.find(tableId)).toEqual({
|
||||||
|
@ -233,6 +233,17 @@ describe("/rowsActions", () => {
|
||||||
|
|
||||||
await createRowAction(otherTable._id!, { name: action.name })
|
await createRowAction(otherTable._id!, { name: action.name })
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it("an automation is created when creating a new row action", async () => {
|
||||||
|
const action1 = await createRowAction(tableId, createRowActionRequest())
|
||||||
|
const action2 = await createRowAction(tableId, createRowActionRequest())
|
||||||
|
|
||||||
|
for (const automationId of [action1.automationId, action2.automationId]) {
|
||||||
|
expect(
|
||||||
|
await config.api.automation.get(automationId, { status: 200 })
|
||||||
|
).toEqual(expect.objectContaining({ _id: automationId }))
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("find", () => {
|
describe("find", () => {
|
||||||
|
|
Loading…
Reference in New Issue