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 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(),

View File

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