diff --git a/modules/zeta_global_sspBidAdapter.js b/modules/zeta_global_sspBidAdapter.js index 4689683fbc7..6c5b9783782 100644 --- a/modules/zeta_global_sspBidAdapter.js +++ b/modules/zeta_global_sspBidAdapter.js @@ -129,6 +129,10 @@ export const spec = { deepSetValue(payload, 'regs.ext.us_privacy', bidderRequest.uspConsent); } + if (bidderRequest?.timeout) { + payload.tmax = bidderRequest.timeout; + } + provideEids(validBidRequests[0], payload); const url = params.shortname ? ENDPOINT_URL.concat('?shortname=', params.shortname) : ENDPOINT_URL; return { diff --git a/test/spec/modules/zeta_global_sspBidAdapter_spec.js b/test/spec/modules/zeta_global_sspBidAdapter_spec.js index 3bd17697f2d..d6befa0fc78 100644 --- a/test/spec/modules/zeta_global_sspBidAdapter_spec.js +++ b/test/spec/modules/zeta_global_sspBidAdapter_spec.js @@ -104,7 +104,8 @@ describe('Zeta Ssp Bid Adapter', function () { }, uspConsent: 'someCCPAString', params: params, - userIdAsEids: eids + userIdAsEids: eids, + timeout: 500 }]; const videoRequest = [{ @@ -344,4 +345,18 @@ describe('Zeta Ssp Bid Adapter', function () { expect(payload.imp[1].banner.w).to.eql(600); expect(payload.imp[1].banner.h).to.eql(400); }); + + it('Test provide tmax', function () { + const request = spec.buildRequests(bannerRequest, bannerRequest[0]); + const payload = JSON.parse(request.data); + + expect(payload.tmax).to.eql(500); + }); + + it('Test provide tmax without value', function () { + const request = spec.buildRequests(videoRequest, videoRequest[0]); + const payload = JSON.parse(request.data); + + expect(payload.tmax).to.be.undefined; + }); });