Allow running api prod tests
This commit is contained in:
parent
610621823c
commit
e93934111f
|
@ -40,6 +40,7 @@ export interface RequestOpts {
|
|||
>
|
||||
expectations?: Expectations
|
||||
publicUser?: boolean
|
||||
useProdApp?: boolean
|
||||
}
|
||||
|
||||
export abstract class TestAPI {
|
||||
|
@ -108,7 +109,8 @@ export abstract class TestAPI {
|
|||
|
||||
const headersFn = publicUser
|
||||
? this.config.publicHeaders.bind(this.config)
|
||||
: this.config.defaultHeaders.bind(this.config)
|
||||
: (extras = {}) =>
|
||||
this.config.defaultHeaders.bind(this.config)(extras, opts?.useProdApp)
|
||||
|
||||
const app = getServer()
|
||||
let req = request(app)[method](url)
|
||||
|
|
|
@ -109,7 +109,7 @@ export class RowActionAPI extends TestAPI {
|
|||
rowActionId: string,
|
||||
body: RowActionTriggerRequest,
|
||||
expectations?: Expectations,
|
||||
config?: { publicUser?: boolean }
|
||||
config?: { publicUser?: boolean; useProdApp?: boolean }
|
||||
) => {
|
||||
return await this._post<RowActionResponse>(
|
||||
`/api/tables/${tableId}/actions/${rowActionId}/trigger`,
|
||||
|
|
Loading…
Reference in New Issue