This commit is contained in:
Adria Navarro 2024-08-26 16:12:39 +02:00
parent 6d1838d907
commit 95d863b4a8
2 changed files with 10 additions and 16 deletions

View File

@ -683,6 +683,13 @@ describe("/rowsActions", () => {
let row: Row
let rowAction: RowActionResponse
beforeEach(async () => {
row = await config.api.row.save(tableId, {})
rowAction = await createRowAction(tableId, createRowActionRequest())
await config.publish()
})
unauthorisedTests((expectations, testConfig) =>
config.api.rowAction.trigger(
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 () => {
await config.api.rowAction.trigger(
tableId,
rowAction.id,
{
await config.api.rowAction.trigger(tableId, rowAction.id, {
rowId: row._id!,
},
undefined,
{ useProdApp: true }
)
})
const { data: automationLogs } = await config.doInContext(
config.getProdAppId(),

View File

@ -116,7 +116,7 @@ export class RowActionAPI extends TestAPI {
{
body,
expectations,
...config,
...{ ...config, useProdApp: config?.useProdApp ?? true },
}
)
}