Clean
This commit is contained in:
parent
6d1838d907
commit
95d863b4a8
|
@ -683,6 +683,13 @@ describe("/rowsActions", () => {
|
||||||
let row: Row
|
let row: Row
|
||||||
let rowAction: RowActionResponse
|
let rowAction: RowActionResponse
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
row = await config.api.row.save(tableId, {})
|
||||||
|
rowAction = await createRowAction(tableId, createRowActionRequest())
|
||||||
|
|
||||||
|
await config.publish()
|
||||||
|
})
|
||||||
|
|
||||||
unauthorisedTests((expectations, testConfig) =>
|
unauthorisedTests((expectations, testConfig) =>
|
||||||
config.api.rowAction.trigger(
|
config.api.rowAction.trigger(
|
||||||
tableId,
|
tableId,
|
||||||
|
@ -695,23 +702,10 @@ describe("/rowsActions", () => {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
row = await config.api.row.save(tableId, {})
|
|
||||||
rowAction = await createRowAction(tableId, createRowActionRequest())
|
|
||||||
|
|
||||||
await config.publish()
|
|
||||||
})
|
|
||||||
|
|
||||||
it("can trigger an automation given valid data", async () => {
|
it("can trigger an automation given valid data", async () => {
|
||||||
await config.api.rowAction.trigger(
|
await config.api.rowAction.trigger(tableId, rowAction.id, {
|
||||||
tableId,
|
|
||||||
rowAction.id,
|
|
||||||
{
|
|
||||||
rowId: row._id!,
|
rowId: row._id!,
|
||||||
},
|
})
|
||||||
undefined,
|
|
||||||
{ useProdApp: true }
|
|
||||||
)
|
|
||||||
|
|
||||||
const { data: automationLogs } = await config.doInContext(
|
const { data: automationLogs } = await config.doInContext(
|
||||||
config.getProdAppId(),
|
config.getProdAppId(),
|
||||||
|
|
|
@ -116,7 +116,7 @@ export class RowActionAPI extends TestAPI {
|
||||||
{
|
{
|
||||||
body,
|
body,
|
||||||
expectations,
|
expectations,
|
||||||
...config,
|
...{ ...config, useProdApp: config?.useProdApp ?? true },
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue