From 568f5719c662d266399d5ea750f8029f3a9649c9 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 26 Aug 2024 14:37:29 +0200 Subject: [PATCH] Test utils --- .../src/tests/utilities/api/rowAction.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/server/src/tests/utilities/api/rowAction.ts b/packages/server/src/tests/utilities/api/rowAction.ts index b7420fb092..6bcf661076 100644 --- a/packages/server/src/tests/utilities/api/rowAction.ts +++ b/packages/server/src/tests/utilities/api/rowAction.ts @@ -2,6 +2,7 @@ import { CreateRowActionRequest, RowActionResponse, RowActionsResponse, + RowActionTriggerRequest, } from "@budibase/types" import { Expectations, TestAPI } from "./base" @@ -102,4 +103,21 @@ export class RowActionAPI extends TestAPI { } ) } + + trigger = async ( + tableId: string, + rowActionId: string, + body: RowActionTriggerRequest, + expectations?: Expectations, + config?: { publicUser?: boolean } + ) => { + return await this._post( + `/api/tables/${tableId}/actions/${rowActionId}/trigger`, + { + body, + expectations, + ...config, + } + ) + } }