Skip to content

Commit 0785574

Browse files
prebidtappxmarc_tappxpatmmccannonlsolvincentproxistore
authored andcommitted
tappx Bid Adapter: update isBidRequestValid and fix request url (prebid#6761)
* UPDATE: add initial UID * UPDATE: UID change user ext * UPDATE: UID clean logs * UPDATE: add host info * UPDATE: tappx bid adapter universal id * UPDATE: fix bidder param * UPDATE: tappxBidAdapter tests * tappxBidAdapter - fix spacing * tappxBidAdapter: add test user eids array * tappxBidAdapter: update eids array * FIX: package-lock.json * Conversant adapter: add adomain, remove digitrust (prebid#6495) * Update eids.js * Update eids_spec.js * Update eids.js * Update pubmaticBidAdapter_spec.js * Update eids.js * Update eids_spec.js * Update conversantBidAdapter_spec.js * Update rubiconBidAdapter_spec.js * Update conversantBidAdapter_spec.js * Delete test/spec/adapters directory * Update userId_spec.js * Update conversantBidAdapter.js * Update conversantBidAdapter_spec.js * Update conversantBidAdapter_spec.js * Update conversantBidAdapter_spec.js * Rads Bid Adapter: add GDPR support & user sync support (prebid#6455) * Proxistore Bid Adapter: add cookieless url endpoint & use floor module (prebid#6427) * use floor module * call cookieless endpoint when necessary * test endpoint url * change url endpoint * delete console log * fix tests * add language to url * use ortb interface * unit test * update test unit * create proxistore module * add unit tests and documentation * delete modules * delete module * add proxistore rtd submodule * delete proxistore module * spacing * change url * AdYoulike Bid Adapter: Add an "Insertion" tracking for Native mediatype (prebid#6481) * add insertion event * add missing campaign ID parameter * update unit test with new tracking checked * Dspx Bid Adapter : add user sync support (prebid#6456) * Add sync support for dspx adapter * Dspx Bid Adapter : add user sync support Co-authored-by: Alexander <[email protected]> * Multibid Module: add new module to handle multiple bids from single bidder & update rubicon adapter (prebid#6404) * Multibid module - create new module - Expands the number of key value pairs going to the ad server in the normal Prebid way by establishing the concept of a "dynamic alias" First commit * Continued updates from 1st commit * Adding logWarn for filtered bids * Update to include passing multibid configuration to PBS requests * Update to rubicon bid adapter to pass query param rp_maxbids value taken from bidderRequest.bidLimit * Update to config to look for camelcase property names according to spec. These convert to all lowercase when passed to PBS endpoint * Adjust RP adapter to always include maxbids value - default is 1 * Added support for bidders array in multibid config * Fixed floor comparison to be <= bid cpm as oppossed to just < bid cpm. Updated md file to fix camelCase tpyo * Update to include originalBidderRequest in video call to prebid cache * Update to ignore adpod bids from multibid and allow them to return as normal bids * Adding uid2 to submodules.json (prebid#6508) * NextRoll ID System: add new ID module (prebid#6396) * Add Nextroll ID Module * Add nextroll to eids * Make configuration value names consistent with Adapter Module * Use parnerId instead of sellerId * Add nextroll to userId and eids md files * Remove storage configuration * Rename nextroll -> nextrollId * Add nextrollId to common ID specs * Qwarry Bid Adapter: add GDPR and consent string handling (prebid#6489) * qwarry bid adapter * formatting fixes * fix tests for qwarry * qwarry bid adapter * add header for qwarry bid adapter * bid requests fix * fix tests * response fix * fix tests for Qwarry bid adapter * add pos parameter to qwarry bid adapter * qwarryBidAdapter onBidWon hotfix * Change bidder endpoint url for Qwarry adapter * add referer JS detection * use bidderRequest.refererInfo * fix tests * GDPR consent string support * NPE fix Co-authored-by: Artem Kostritsa <[email protected]> Co-authored-by: Alexander Kascheev <[email protected]> Co-authored-by: pro-nsk <[email protected]> * Zemanta Bid Adapter: add support for new params & consent strings to usersync URL (prebid#6468) * add gvl id to spec * add support for bcat and badv params * add consent strings to usersync url * add bcat and badv params to doc * Automatad Bid Adapter: Add meta.advertiserDomains to bid response (prebid#6509) * added bid meta with advertiserDomains * Adhese Bid Adapter: add support for caching video content (prebid#6501) * adpod category support test * Revert "adpod category support test" This reverts commit 70a3cf2. * adpod category support test * Revert "adpod category support test" This reverts commit 70a3cf2. * Adhese Bid Adapter: cache video content Co-authored-by: Tim Sturtewagen <[email protected]> Co-authored-by: Mateusz <[email protected]> * update apacdex unit test to disable debug mode (prebid#6511) * Telaria: not setting adid (prebid#6507) * Prebid 4.33.0 Release * increment pre version * rubicon: removing maxduration as a required bidder parameter (prebid#6513) * Zemanta adapter: add advertiserDomains (prebid#6517) * Lemma Bid Adapter: accepting the floor to use the getFloor function (prebid#6497) * lemmaBidAdapter.js Added lemma bid adapter file * lemmaBidAdapter.md Added lemma bid adapter md file * lemmaBidAdapter_spec.js Added lemma bid adapter test spec file * Update lemmaBidAdapter.js Fixed automated code review alert comparison between inconvertible types * Update lemmaBidAdapter.js Fixed review changes * Update lemmaBidAdapter.md Correct parameter value. * Update lemmaBidAdapter.js Lemma Bid Adapter - v3.0 compliance * Update lemmaBidAdapter_spec.js Lemma Bid Adapter - v3.0 compliance * Update lemmaBidAdapter.md Lemma Bid Adapter - v3.0 compliance * Update lemmaBidAdapter.js Added user sync support into bid adapter. * updated include modules file extension. updated include modules js file extension. * Update lemmaBidAdapter_spec.js Added unit test for user sync feature. * Update lemmaBidAdapter.js Fixed format error. * Update lemmaBidAdapter_spec.js Fixed format error and typo error. * Set mediaType key value into bid object Set mediaType key value into the bid object. * Update lemmaBidAdapter.js remove duplicate function * Update lemmaBidAdapter.js Remove non supported code. * Update lemmaBidAdapter_spec.js Remove GDPR test cases. * Update lemmaBidAdapter.js Made changes for accepting the floor to use the getFloor function * Update lemmaBidAdapter.js correct undefined keyword name. * Update lemmaBidAdapter_spec.js Added test coverage floor value * Update lemmaBidAdapter.js Remove trailing spaces on lines 379 and 381. * Update lemmaBidAdapter_spec.js Added getFloor function test case changes, Please review it. * Update lemmaBidAdapter_spec.js * Update lemmaBidAdapter.js * Update lemmaBidAdapter.js Fixed lint issue. * Update lemmaBidAdapter_spec.js Fixed test cases. * Update lemmaBidAdapter_spec.js Made suggested changes. Please review it. Co-authored-by: Abhijit Mane <[email protected]> * Mediasquare Bid Adapter: fix getUserSyncs issue with empty bids + add metrics to onBidWon Event (prebid#6480) * Mediasquare bidder: fix getUserSyncs issue with empty bids + add metrics to onBidWon Event * Mediasquare bidder: fix getUserSyncs issue with empty bids + add metrics to onBidWon Event * removing status as it does not seem populated when called * add tests * Update nextroll ID variable name to match published ID module (prebid#6519) * Merkle User ID Module: updates to user id submodule (prebid#6503) * AdKernel Bid/Analytics Adapters: user privacy related changes (prebid#6488) * SynacorMedia: remove adId from the bid response (prebid#6520) * Rubicon: making doc data types consistent (prebid#6526) * Synacormedia Bid Adapter: add meta.advertiserDomains (prebid#6527) * Adloox Analytics Adapter: add new analytics adapter (prebid#6308) * gulp: fix supplying list of browsers to test against The following now works: gulp test --browserstack --nolint --nolintfix --browsers=bs_ie_11_windows_10 --file 'test/spec/modules/adloox{AnalyticsAdapter,AdServerVideo,RtdProvider}_spec.js' * instreamTracking: unit test tidy From @robertrmartinez in prebid#6308 (comment) * adloaderStub: expose stub for other unit tests to use From @robertrmartinez in prebid#6308 (comment) * Adloox analytic module * Seedtag adapter: Fixing bug preventing to receive the right params onTimeout. (prebid#6525) * adot bid adapter: add publisher path from bidder config to endpoint url (prebid#6476) * Admixer ID System: add userId submodule (prebid#6238) * Migrating to Prebid 1.0 * Migrating to Prebid 1.0 * Fix spec * add gdpr and usp * remove changes in gdpr_hello_world.html * Update gdpr_hello_world.html add spaces * add user syncs * remove comments * tests * admixer id system * admixer id system * admixer id system eids.md userId.md * admixer id system .submodules.json * admixer id system Co-authored-by: atkachov <[email protected]> * PBJS Core: call custom render func after loadscript if provided (prebid#6422) * Pubxai Analytics Adapter: bug fixes and code revamp (prebid#6474) * Updated PubxAiAnalytics adapter - Bug fixes and Code restructuring * Updated endpoint URLs * Changed array.includes to array.indexOf to fix IE issue * Code cleanup and changes as suggested. * Updated browser testing order and edge browser token * PBJS Core: canBidderRegisterSync ignoring iframe sync disabled by default (prebid#6535) * Update eids.js * Update eids_spec.js * Update eids.js * Update pubmaticBidAdapter_spec.js * Update eids.js * Update eids_spec.js * Update conversantBidAdapter_spec.js * Update rubiconBidAdapter_spec.js * Update conversantBidAdapter_spec.js * Delete test/spec/adapters directory * Update userId_spec.js * Update userSync.js * Update userSync_spec.js * Added automatic tzo and targetId to adserver request. (prebid#6534) * Impactify Bid Adapter: add new bid adapter (prebid#6518) * Add impactify adapter with MD file * Add impactify adapter * Prebid 4.34.0 Release * Increment pre version * Prebid server adapter: add config for openx hosting (prebid#6530) * Yieldmo adapter: add meta data to bids (prebid#6550) * Smartx Bid Adapter: Add meta.advertiserDomains support (prebid#6547) * Onevideo / Adap.tv Adapter: updated example configuration (prebid#6546) * Mass Deal Rendering Module: support multiple custom configs for dealId and rendering (prebid#6500) * ZetaSsp Bid Adapter: add new bid adapter (prebid#6432) * Adnuntius Bid Adapter: Fix for bid too low. (prebid#6557) * Added automatic tzo and targetId to adserver request. * Fixing issues with bid price being too low. * Fixing issues with bid price being too low. * ReadPeak Bid Adapter: fix api issues, add gdpr consent, & getfloor module support (prebid#6548) * BetweenBidAdatper: added sharedid support (prebid#6531) * adWMG Bid Adapter: update endpoints for cookie sync (prebid#6544) * Support floorCPM parameter, fix some minor bugs * fix space-in-parens circleci error * example fix * clean usersync URL * spaces * spaces * add new unit tests, compatibility with IE11 * remove logInfo * Check for floorCPM value * Check params before sending * New endpoints * code format * new endpoint for cookie sync * update tests Co-authored-by: Mikhail Dykun <[email protected]> * Yieldmo Bid Adapter: add support for the floors module (prebid#6541) * Sortable Bid Adapter: add eids support (prebid#6565) * Add Sortable adapter for Prebid 3.x Update tests to reflect changes. * Add .js in imports * hostname not host: don't include port * Trivial change to trigger build: failure wasn't our adapter * More failures in other adapters * PR Feedback - use https for URL - fix examples in markdown - request to endpoint should work now * Feedback: add native and video examples * Update unit tests Co-authored-by: Shannon Broekhoven <[email protected]> * Outbrain Bid Adapter: replacing Zemanta (prebid#6558) * Sirdata Real-time Data Module: add new RTD module (prebid#6515) * Logicad Bid Adapter: add support for userid modules (prebid#6529) * ATS-identityLinkIdSystem - add use3P config property to control firing of 3P envelope endpoint (prebid#6568) * Proxistore Bid Adapter: add support for tcf v2 consent (prebid#6543) * use tcf v2 consent * set cosentGiven to false and test Gdpr api v2 * BlueBillyWig Bid Adapter: add renderer customization options (prebid#6540) * add Blue Billywig adapter * Blue Billywig Adapter - update according to review feedback * Blue Billywig Adapter - update to try and pass CircleCI * Remove the last for .. of in bluebillywigBidAdapter.js, hopefully... * Update bluebillywigBidAdapter test parameters to match renderer to rendererCode rename * Blue Billywig - Also pass through site config with OpenRTB request * add Blue Billywig adapter * Blue Billywig Adapter - update according to review feedback * Blue Billywig Adapter - update to try and pass CircleCI * Remove the last for .. of in bluebillywigBidAdapter.js, hopefully... * Code quality update, always hit user syncs, improved video params * Remove unnecessary export * Add rendererSettings param to bluebillywig adapter * Kick off CircleCi tests manually Co-authored-by: Klaas-Jan Boon <[email protected]> Co-authored-by: Chris Huie <[email protected]> * OpenX Bid Adapter: Set Deal ID for video requests (prebid#6573) * 33Across Bid Adapter: add support for User ID modules (prebid#6554) * pubGENIUS bid adapter: support floor module (prebid#6555) * Welect Bid Adapter: update url of API (prebid#6570) * update api url * update api url in tests * Bright Mountain Media Bid Adapter: change bidder code to bmtm; alias old name (prebid#6574) * Adtelligent Bid Adapter: add adUrl support & new alias (prebid#6559) * add adUrl support * add adUrl test * Bright Mountain Media Bid Adapter: Change Endpoint URL (prebid#6576) * tappxBidAdapter: update * tasppxBidAdapter: add video * tappxBidAdapter: update video * tappxBidAdapter: update name interpret banner * tappxBidAdapter: add tests for video * tappxBidAdapter: add adomain * tappxBidAdapter: update adapter version * tappxBidAdapter: update interpretBid adomain and dealid * tappxBidAdapter: update isBidRequestValid * tappxBidAdapter: update tests. Adding video to isBidRequestValid * tappxBidAdapter: update doc .md file * tappxBidAdapter: update isBidRequestValid * tappxBidAdapter: update ads sizes available * tappxBidAdapter: update isBidRequestValid * tappxBidAdapter: update host depending tappx endpoint * tappxBidAdapter: update tappx adapter version * tappxBidAdapter: add EOL * revert outbrain cahnges to untrack in this pr * tappxBidAdapter: update isBidRequestValid tests * tappxBidAdapter: fix circleci error Co-authored-by: marc_tappx <[email protected]> Co-authored-by: Patrick McCann <[email protected]> Co-authored-by: onlsol <[email protected]> Co-authored-by: vincentproxistore <[email protected]> Co-authored-by: guiann <[email protected]> Co-authored-by: Alexander <[email protected]> Co-authored-by: mmoschovas <[email protected]> Co-authored-by: SKOCHERI <[email protected]> Co-authored-by: Abimael Martinez <[email protected]> Co-authored-by: artemiokost <[email protected]> Co-authored-by: Artem Kostritsa <[email protected]> Co-authored-by: Alexander Kascheev <[email protected]> Co-authored-by: pro-nsk <[email protected]> Co-authored-by: Rok Sušnik <[email protected]> Co-authored-by: Kanchika - Automatad <[email protected]> Co-authored-by: Paweł L <[email protected]> Co-authored-by: Tim Sturtewagen <[email protected]> Co-authored-by: Mateusz <[email protected]> Co-authored-by: jsnellbaker <[email protected]> Co-authored-by: bretg <[email protected]> Co-authored-by: Jason Snellbaker <[email protected]> Co-authored-by: Lemma Dev <[email protected]> Co-authored-by: Abhijit Mane <[email protected]> Co-authored-by: matthieularere-msq <[email protected]> Co-authored-by: Denis Logachov <[email protected]> Co-authored-by: RAJKUMAR NATARAJAN <[email protected]> Co-authored-by: Alexander Clouter <[email protected]> Co-authored-by: Laura Morillo-Velarde <[email protected]> Co-authored-by: Giudici-a <[email protected]> Co-authored-by: Galphimbl <[email protected]> Co-authored-by: atkachov <[email protected]> Co-authored-by: Jérémie Girault <[email protected]> Co-authored-by: Phaneendra Hegde <[email protected]> Co-authored-by: Mikael Lundin <[email protected]> Co-authored-by: Thomas <[email protected]> Co-authored-by: Mike Chowla <[email protected]> Co-authored-by: Deivydas Šabaras <[email protected]> Co-authored-by: ym-atsymuk <[email protected]> Co-authored-by: Skylinar <[email protected]> Co-authored-by: Adam Browning <[email protected]> Co-authored-by: Catalin Ciocov <[email protected]> Co-authored-by: asurovenko-zeta <[email protected]> Co-authored-by: readpeaktuomo <[email protected]> Co-authored-by: Ignat Khaylov <[email protected]> Co-authored-by: nyakove <[email protected]> Co-authored-by: Mikhail Dykun <[email protected]> Co-authored-by: ym-dlabuzov <[email protected]> Co-authored-by: karentnarvaez <[email protected]> Co-authored-by: Shannon Broekhoven <[email protected]> Co-authored-by: nouchy <[email protected]> Co-authored-by: logicad <[email protected]> Co-authored-by: mamatic <[email protected]> Co-authored-by: Klaas-Jan Boon <[email protected]> Co-authored-by: Klaas-Jan Boon <[email protected]> Co-authored-by: Chris Huie <[email protected]> Co-authored-by: Kenan Gillet <[email protected]> Co-authored-by: Aparna Rao <[email protected]> Co-authored-by: Meng <[email protected]> Co-authored-by: Nick Duitz <[email protected]> Co-authored-by: BrightMountainMedia <[email protected]> Co-authored-by: Gena <[email protected]> Co-authored-by: Chris Huie <[email protected]>
1 parent 331c703 commit 0785574

File tree

3 files changed

+67
-26
lines changed

3 files changed

+67
-26
lines changed

modules/tappxBidAdapter.js

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ import { config } from '../src/config.js';
88
const BIDDER_CODE = 'tappx';
99
const TTL = 360;
1010
const CUR = 'USD';
11-
const TAPPX_BIDDER_VERSION = '0.1.10420';
11+
const TAPPX_BIDDER_VERSION = '0.1.10514';
1212
const TYPE_CNN = 'prebidjs';
1313
const VIDEO_SUPPORT = ['instream'];
1414

15-
var HOST;
1615
var hostDomain;
1716

1817
export const spec = {
@@ -105,13 +104,31 @@ export const spec = {
105104
}
106105

107106
function validBasic(bid) {
108-
if (
109-
(bid.params == null) ||
110-
(bid.params.endpoint == null) ||
111-
(bid.params.tappxkey == null)) {
107+
if (bid.params == null) {
112108
utils.logWarn(`[TAPPX]: Please review the mandatory Tappx parameters.`);
113109
return false;
114110
}
111+
112+
if (bid.params.tappxkey == null) {
113+
utils.logWarn(`[TAPPX]: Please review the mandatory Tappxkey parameter.`);
114+
return false;
115+
}
116+
117+
if (bid.params.host == null) {
118+
utils.logWarn(`[TAPPX]: Please review the mandatory Host parameter.`);
119+
return false;
120+
}
121+
122+
let classicEndpoint = true
123+
if ((new RegExp(`^(vz.*|zz.*)\.*$`, 'i')).test(bid.params.host)) {
124+
classicEndpoint = false
125+
}
126+
127+
if (classicEndpoint && bid.params.endpoint == null) {
128+
utils.logWarn(`[TAPPX]: Please review the mandatory endpoint Tappx parameters.`);
129+
return false;
130+
}
131+
115132
return true;
116133
}
117134

@@ -174,11 +191,10 @@ function interpretBid(serverBid, request) {
174191
* @return response ad
175192
*/
176193
function buildOneRequest(validBidRequests, bidderRequest) {
177-
HOST = utils.deepAccess(validBidRequests, 'params.host');
178-
let hostInfo = getHostInfo(HOST);
194+
let hostInfo = getHostInfo(validBidRequests);
195+
const ENDPOINT = hostInfo.endpoint;
179196
hostDomain = hostInfo.domain;
180197

181-
const ENDPOINT = utils.deepAccess(validBidRequests, 'params.endpoint');
182198
const TAPPXKEY = utils.deepAccess(validBidRequests, 'params.tappxkey');
183199
const BIDFLOOR = utils.deepAccess(validBidRequests, 'params.bidfloor');
184200
const BIDEXTRA = utils.deepAccess(validBidRequests, 'params.ext');
@@ -359,7 +375,7 @@ function buildOneRequest(validBidRequests, bidderRequest) {
359375

360376
return {
361377
method: 'POST',
362-
url: `https://${HOST}/${ENDPOINT}?type_cnn=${TYPE_CNN}&v=${TAPPX_BIDDER_VERSION}`,
378+
url: `${hostInfo.url}?type_cnn=${TYPE_CNN}&v=${TAPPX_BIDDER_VERSION}`,
363379
data: JSON.stringify(payload),
364380
bids: validBidRequests
365381
};
@@ -375,23 +391,24 @@ function getOs() {
375391
if (ua == null) { return 'unknown'; } else if (ua.match(/(iPhone|iPod|iPad)/)) { return 'ios'; } else if (ua.match(/Android/)) { return 'android'; } else if (ua.match(/Window/)) { return 'windows'; } else { return 'unknown'; }
376392
}
377393

378-
function getHostInfo(hostParam) {
394+
function getHostInfo(validBidRequests) {
379395
let domainInfo = {};
396+
let endpoint = utils.deepAccess(validBidRequests, 'params.endpoint');
397+
let hostParam = utils.deepAccess(validBidRequests, 'params.host');
380398

381399
domainInfo.domain = hostParam.split('/', 1)[0];
382-
domainInfo.url = hostParam;
383400

384-
let regexNewEndpoints = new RegExp(`^(vz.*|zz.*|testing)\.ssp\.tappx\.com$`, 'i');
385-
let regexClassicEndpoints = new RegExp(`^[a-z]{3}\.[a-z]{3}\.tappx\.com$`, 'i');
401+
let regexNewEndpoints = new RegExp(`^(vz.*|zz.*)\.pub\.tappx\.com$`, 'i');
402+
let regexClassicEndpoints = new RegExp(`^([a-z]{3}|testing)\.[a-z]{3}\.tappx\.com$`, 'i');
386403

387404
if (regexNewEndpoints.test(domainInfo.domain)) {
388-
let endpoint = domainInfo.domain.split('.', 1)[0]
389-
if (endpoint.toUpperCase().indexOf('TESTING') === -1) {
390-
domainInfo.endpoint = endpoint
391-
domainInfo.new_endpoint = true;
392-
}
405+
domainInfo.newEndpoint = true;
406+
domainInfo.endpoint = domainInfo.domain.split('.', 1)[0]
407+
domainInfo.url = `https://${hostParam}`
393408
} else if (regexClassicEndpoints.test(domainInfo.domain)) {
394-
domainInfo.new_endpoint = false;
409+
domainInfo.newEndpoint = false;
410+
domainInfo.endpoint = endpoint
411+
domainInfo.url = `https://${hostParam}${endpoint}`
395412
}
396413

397414
return domainInfo;

modules/tappxBidAdapter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Maintainer: [email protected]
99
Module that connects to :tappx demand sources.
1010
Suppots Banner and Instream Video.
1111
Please use ```tappx``` as the bidder code.
12-
Ads sizes available: [320,50], [300,250], [320,480], [1024,768], [728,90]
12+
Ads sizes available: [300,250], [320,50], [320,480], [480,320], [728,90], [768,1024], [1024,768]
1313

1414
# Banner Test Parameters
1515
```

test/spec/modules/tappxBidAdapter_spec.js

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,35 @@ describe('Tappx bid adapter', function () {
126126
assert.isTrue(spec.isBidRequestValid(c_BIDREQUEST.bids[0]), JSON.stringify(c_BIDREQUEST));
127127
});
128128

129-
it('should return false when required params are missing', function () {
130-
let badBidRequest = c_BIDREQUEST;
131-
delete badBidRequest.bids[0].params.tappxkey;
132-
delete badBidRequest.bids[0].params.endpoint;
133-
assert.isFalse(spec.isBidRequestValid(badBidRequest.bids[0]));
129+
it('should return false when params are missing', function () {
130+
let badBidRequestParam = JSON.parse(JSON.stringify(c_BIDREQUEST));
131+
delete badBidRequestParam.bids[0].params;
132+
assert.isFalse(spec.isBidRequestValid(badBidRequestParam.bids[0]));
133+
});
134+
135+
it('should return false when tappxkey is missing', function () {
136+
let badBidRequestTpxkey = JSON.parse(JSON.stringify(c_BIDREQUEST)); ;
137+
delete badBidRequestTpxkey.bids[0].params.tappxkey;
138+
assert.isFalse(spec.isBidRequestValid(badBidRequestTpxkey.bids[0]));
139+
});
140+
141+
it('should return false when host is missing', function () {
142+
let badBidRequestHost = JSON.parse(JSON.stringify(c_BIDREQUEST)); ;
143+
delete badBidRequestHost.bids[0].params.host;
144+
assert.isFalse(spec.isBidRequestValid(badBidRequestHost.bids[0]));
145+
});
146+
147+
it('should return false when classic endpoint is missing', function () {
148+
let badBidRequestClEp = JSON.parse(JSON.stringify(c_BIDREQUEST)); ;
149+
delete badBidRequestClEp.bids[0].params.endpoint;
150+
assert.isFalse(spec.isBidRequestValid(badBidRequestClEp.bids[0]));
151+
});
152+
153+
it('should return true when endpoint is not set for new endpoints', function () {
154+
let badBidRequestNwEp = JSON.parse(JSON.stringify(c_BIDREQUEST)); ;
155+
delete badBidRequestNwEp.bids[0].params.endpoint;
156+
badBidRequestNwEp.bids[0].params.host = 'zztesting.ssp.tappx.com/rtb/v2/';
157+
assert.isTrue(spec.isBidRequestValid(badBidRequestNwEp.bids[0]));
134158
});
135159

136160
it('should return false for not instream requests', function () {

0 commit comments

Comments
 (0)