diff --git a/packages/server/src/tests/utilities/api/base.ts b/packages/server/src/tests/utilities/api/base.ts index 3a5f6529f8..b38f8eb56f 100644 --- a/packages/server/src/tests/utilities/api/base.ts +++ b/packages/server/src/tests/utilities/api/base.ts @@ -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) diff --git a/packages/server/src/tests/utilities/api/rowAction.ts b/packages/server/src/tests/utilities/api/rowAction.ts index 6bcf661076..0f67205ca5 100644 --- a/packages/server/src/tests/utilities/api/rowAction.ts +++ b/packages/server/src/tests/utilities/api/rowAction.ts @@ -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( `/api/tables/${tableId}/actions/${rowActionId}/trigger`,