Test utils
This commit is contained in:
parent
922b746029
commit
568f5719c6
|
@ -2,6 +2,7 @@ import {
|
||||||
CreateRowActionRequest,
|
CreateRowActionRequest,
|
||||||
RowActionResponse,
|
RowActionResponse,
|
||||||
RowActionsResponse,
|
RowActionsResponse,
|
||||||
|
RowActionTriggerRequest,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import { Expectations, TestAPI } from "./base"
|
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<RowActionResponse>(
|
||||||
|
`/api/tables/${tableId}/actions/${rowActionId}/trigger`,
|
||||||
|
{
|
||||||
|
body,
|
||||||
|
expectations,
|
||||||
|
...config,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue