Skip to content

Commit

Permalink
tappx Bid Adapter: update isBidRequestValid and fix request url (#6761)
Browse files Browse the repository at this point in the history
* 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 (#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 (#6455)

* Proxistore Bid Adapter: add cookieless url endpoint & use floor module (#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 (#6481)

* add insertion event

* add missing campaign ID parameter

* update unit test with new tracking checked

* Dspx Bid Adapter : add user sync support (#6456)

* Add sync support for dspx adapter

* Dspx Bid Adapter : add user sync support

Co-authored-by: Alexander <avj83@list.ru>

* Multibid Module: add new module to handle multiple bids from single bidder & update rubicon adapter (#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 (#6508)

* NextRoll ID System: add new ID module (#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 (#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 <akostritsa@akostritsa.com>
Co-authored-by: Alexander Kascheev <akascheev@asteriosoft.com>
Co-authored-by: pro-nsk <32703851+pro-nsk@users.noreply.github.com>

* Zemanta Bid Adapter: add support for new params & consent strings to usersync URL (#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 (#6509)


* added bid meta with advertiserDomains

* Adhese Bid Adapter: add support for caching video content (#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 <tim@adhese.com>
Co-authored-by: Mateusz <mateusz@adhese.eu>

* update apacdex unit test to disable debug mode (#6511)

* Telaria: not setting adid (#6507)

* Prebid 4.33.0 Release

* increment pre version

* rubicon: removing maxduration as a required bidder parameter (#6513)

* Zemanta adapter: add advertiserDomains (#6517)

* Lemma Bid Adapter: accepting the floor to use the getFloor function (#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 <abhipucsd.123@gmail.com>

* Mediasquare Bid Adapter: fix getUserSyncs issue with empty bids + add metrics to onBidWon Event (#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 (#6519)

* Merkle User ID Module: updates to user id submodule (#6503)

* AdKernel Bid/Analytics Adapters: user privacy related changes (#6488)

* SynacorMedia: remove adId from the bid response (#6520)

* Rubicon: making doc data types consistent (#6526)

* Synacormedia Bid Adapter: add meta.advertiserDomains (#6527)

* Adloox Analytics Adapter: add new analytics adapter (#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 #6308 (comment)

* adloaderStub: expose stub for other unit tests to use

From @robertrmartinez in #6308 (comment)

* Adloox analytic module

* Seedtag adapter: Fixing bug preventing to receive the right params onTimeout. (#6525)

* adot bid adapter: add publisher path from bidder config to endpoint url (#6476)

* Admixer ID System: add userId submodule  (#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 <atkachov91@admixer.ua>

* PBJS Core: call custom render func after loadscript if provided (#6422)

* Pubxai Analytics Adapter: bug fixes and code revamp (#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 (#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. (#6534)

* Impactify Bid Adapter: add new bid adapter (#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 (#6530)

* Yieldmo adapter: add meta data to bids (#6550)

* Smartx Bid Adapter: Add meta.advertiserDomains support (#6547)

* Onevideo / Adap.tv Adapter: updated example configuration (#6546)

* Mass Deal Rendering Module: support multiple custom configs for dealId and rendering (#6500)

* ZetaSsp Bid Adapter: add new bid adapter (#6432)

* Adnuntius Bid Adapter: Fix for bid too low. (#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 (#6548)

* BetweenBidAdatper: added sharedid support (#6531)

* adWMG Bid Adapter: update endpoints for cookie sync (#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 <m.dykun@wmgroup.us>

* Yieldmo Bid Adapter: add support for the floors module (#6541)

* Sortable Bid Adapter: add eids support (#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 <shannon@sortable.com>

* Outbrain Bid Adapter: replacing Zemanta (#6558)

* Sirdata Real-time Data Module: add new RTD module (#6515)

* Logicad Bid Adapter: add support for userid modules (#6529)

* ATS-identityLinkIdSystem - add use3P config property to control firing of 3P envelope endpoint (#6568)

* Proxistore Bid Adapter: add support for tcf v2 consent (#6543)

* use tcf v2 consent

* set cosentGiven to false and test Gdpr api v2

* BlueBillyWig Bid Adapter: add renderer customization options (#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 <klaas-janboon@ip-172-16-224-85.eu-west-1.compute.internal>
Co-authored-by: Chris Huie <phoenixtechnerd@gmail.com>

* OpenX Bid Adapter: Set Deal ID for video requests (#6573)

* 33Across Bid Adapter: add support for User ID modules (#6554)

* pubGENIUS bid adapter: support floor module (#6555)

* Welect Bid Adapter: update url of API (#6570)

* update api url

* update api url in tests

* Bright Mountain Media Bid Adapter: change bidder code to bmtm; alias old name (#6574)

* Adtelligent Bid Adapter: add adUrl support & new alias (#6559)

* add adUrl support

* add adUrl test

* Bright Mountain Media Bid Adapter: Change Endpoint URL (#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 <marc@tappx.com>
Co-authored-by: Patrick McCann <patmmccann@gmail.com>
Co-authored-by: onlsol <48312668+onlsol@users.noreply.github.com>
Co-authored-by: vincentproxistore <56686565+vincentproxistore@users.noreply.github.com>
Co-authored-by: guiann <guillaume.andouard@adyoulike.com>
Co-authored-by: Alexander <avj83@list.ru>
Co-authored-by: mmoschovas <63253416+mmoschovas@users.noreply.github.com>
Co-authored-by: SKOCHERI <37454420+SKOCHERI@users.noreply.github.com>
Co-authored-by: Abimael Martinez <abijr@users.noreply.github.com>
Co-authored-by: artemiokost <artemiokost@gmail.com>
Co-authored-by: Artem Kostritsa <akostritsa@akostritsa.com>
Co-authored-by: Alexander Kascheev <akascheev@asteriosoft.com>
Co-authored-by: pro-nsk <32703851+pro-nsk@users.noreply.github.com>
Co-authored-by: Rok Sušnik <rsusnik@outbrain.com>
Co-authored-by: Kanchika - Automatad <kanchika@automatad.com>
Co-authored-by: Paweł L <pawel.lankocz@adhese.eu>
Co-authored-by: Tim Sturtewagen <tim@adhese.com>
Co-authored-by: Mateusz <mateusz@adhese.eu>
Co-authored-by: jsnellbaker <31102355+jsnellbaker@users.noreply.github.com>
Co-authored-by: bretg <bgorsline@gmail.com>
Co-authored-by: Jason Snellbaker <jsnellbaker@appnexus.com>
Co-authored-by: Lemma Dev <54662130+lemmadev@users.noreply.github.com>
Co-authored-by: Abhijit Mane <abhipucsd.123@gmail.com>
Co-authored-by: matthieularere-msq <63732822+matthieularere-msq@users.noreply.github.com>
Co-authored-by: Denis Logachov <denis@adkernel.com>
Co-authored-by: RAJKUMAR NATARAJAN <raj.cs.psg@gmail.com>
Co-authored-by: Alexander Clouter <alex+github@digriz.org.uk>
Co-authored-by: Laura Morillo-Velarde <laura.morillovelarde@gmail.com>
Co-authored-by: Giudici-a <34242194+Giudici-a@users.noreply.github.com>
Co-authored-by: Galphimbl <sashatkachov91@gmail.com>
Co-authored-by: atkachov <atkachov91@admixer.ua>
Co-authored-by: Jérémie Girault <jeremie.girault@gmail.com>
Co-authored-by: Phaneendra Hegde <pnhegde@users.noreply.github.com>
Co-authored-by: Mikael Lundin <mikael-lundin@users.noreply.github.com>
Co-authored-by: Thomas <thomas.dseao@gmail.com>
Co-authored-by: Mike Chowla <mike.chowla@pubmatic.com>
Co-authored-by: Deivydas Šabaras <deivydas@users.noreply.github.com>
Co-authored-by: ym-atsymuk <81176595+ym-atsymuk@users.noreply.github.com>
Co-authored-by: Skylinar <53079123+Skylinar@users.noreply.github.com>
Co-authored-by: Adam Browning <19834421+adam-browning@users.noreply.github.com>
Co-authored-by: Catalin Ciocov <catalin.ciocov@gmail.com>
Co-authored-by: asurovenko-zeta <80847074+asurovenko-zeta@users.noreply.github.com>
Co-authored-by: readpeaktuomo <66239046+readpeaktuomo@users.noreply.github.com>
Co-authored-by: Ignat Khaylov <ignat@ignat.one>
Co-authored-by: nyakove <43004249+nyakove@users.noreply.github.com>
Co-authored-by: Mikhail Dykun <m.dykun@wmgroup.us>
Co-authored-by: ym-dlabuzov <81709888+ym-dlabuzov@users.noreply.github.com>
Co-authored-by: karentnarvaez <61426156+karentnarvaez@users.noreply.github.com>
Co-authored-by: Shannon Broekhoven <shannon@sortable.com>
Co-authored-by: nouchy <33549554+nouchy@users.noreply.github.com>
Co-authored-by: logicad <dev-ex-service@so-netmedia.jp>
Co-authored-by: mamatic <52153441+mamatic@users.noreply.github.com>
Co-authored-by: Klaas-Jan Boon <klaas-janboon@live.nl>
Co-authored-by: Klaas-Jan Boon <klaas-janboon@ip-172-16-224-85.eu-west-1.compute.internal>
Co-authored-by: Chris Huie <phoenixtechnerd@gmail.com>
Co-authored-by: Kenan Gillet <1706856+kenan-gillet@users.noreply.github.com>
Co-authored-by: Aparna Rao <aparna.hegde@33across.com>
Co-authored-by: Meng <5110935+edmonl@users.noreply.github.com>
Co-authored-by: Nick Duitz <42961155+nduitz@users.noreply.github.com>
Co-authored-by: BrightMountainMedia <69471268+BrightMountainMediaInc@users.noreply.github.com>
Co-authored-by: Gena <wertixvost@gmail.com>
Co-authored-by: Chris Huie <3444727+ChrisHuie@users.noreply.github.com>
  • Loading branch information
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 26 deletions.
57 changes: 37 additions & 20 deletions modules/tappxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ import { config } from '../src/config.js';
const BIDDER_CODE = 'tappx';
const TTL = 360;
const CUR = 'USD';
const TAPPX_BIDDER_VERSION = '0.1.10420';
const TAPPX_BIDDER_VERSION = '0.1.10514';
const TYPE_CNN = 'prebidjs';
const VIDEO_SUPPORT = ['instream'];

var HOST;
var hostDomain;

export const spec = {
Expand Down Expand Up @@ -105,13 +104,31 @@ export const spec = {
}

function validBasic(bid) {
if (
(bid.params == null) ||
(bid.params.endpoint == null) ||
(bid.params.tappxkey == null)) {
if (bid.params == null) {
utils.logWarn(`[TAPPX]: Please review the mandatory Tappx parameters.`);
return false;
}

if (bid.params.tappxkey == null) {
utils.logWarn(`[TAPPX]: Please review the mandatory Tappxkey parameter.`);
return false;
}

if (bid.params.host == null) {
utils.logWarn(`[TAPPX]: Please review the mandatory Host parameter.`);
return false;
}

let classicEndpoint = true
if ((new RegExp(`^(vz.*|zz.*)\.*$`, 'i')).test(bid.params.host)) {
classicEndpoint = false
}

if (classicEndpoint && bid.params.endpoint == null) {
utils.logWarn(`[TAPPX]: Please review the mandatory endpoint Tappx parameters.`);
return false;
}

return true;
}

Expand Down Expand Up @@ -174,11 +191,10 @@ function interpretBid(serverBid, request) {
* @return response ad
*/
function buildOneRequest(validBidRequests, bidderRequest) {
HOST = utils.deepAccess(validBidRequests, 'params.host');
let hostInfo = getHostInfo(HOST);
let hostInfo = getHostInfo(validBidRequests);
const ENDPOINT = hostInfo.endpoint;
hostDomain = hostInfo.domain;

const ENDPOINT = utils.deepAccess(validBidRequests, 'params.endpoint');
const TAPPXKEY = utils.deepAccess(validBidRequests, 'params.tappxkey');
const BIDFLOOR = utils.deepAccess(validBidRequests, 'params.bidfloor');
const BIDEXTRA = utils.deepAccess(validBidRequests, 'params.ext');
Expand Down Expand Up @@ -359,7 +375,7 @@ function buildOneRequest(validBidRequests, bidderRequest) {

return {
method: 'POST',
url: `https://${HOST}/${ENDPOINT}?type_cnn=${TYPE_CNN}&v=${TAPPX_BIDDER_VERSION}`,
url: `${hostInfo.url}?type_cnn=${TYPE_CNN}&v=${TAPPX_BIDDER_VERSION}`,
data: JSON.stringify(payload),
bids: validBidRequests
};
Expand All @@ -375,23 +391,24 @@ function getOs() {
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'; }
}

function getHostInfo(hostParam) {
function getHostInfo(validBidRequests) {
let domainInfo = {};
let endpoint = utils.deepAccess(validBidRequests, 'params.endpoint');
let hostParam = utils.deepAccess(validBidRequests, 'params.host');

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

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

if (regexNewEndpoints.test(domainInfo.domain)) {
let endpoint = domainInfo.domain.split('.', 1)[0]
if (endpoint.toUpperCase().indexOf('TESTING') === -1) {
domainInfo.endpoint = endpoint
domainInfo.new_endpoint = true;
}
domainInfo.newEndpoint = true;
domainInfo.endpoint = domainInfo.domain.split('.', 1)[0]
domainInfo.url = `https://${hostParam}`
} else if (regexClassicEndpoints.test(domainInfo.domain)) {
domainInfo.new_endpoint = false;
domainInfo.newEndpoint = false;
domainInfo.endpoint = endpoint
domainInfo.url = `https://${hostParam}${endpoint}`
}

return domainInfo;
Expand Down
2 changes: 1 addition & 1 deletion modules/tappxBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Maintainer: prebid@tappx.com
Module that connects to :tappx demand sources.
Suppots Banner and Instream Video.
Please use ```tappx``` as the bidder code.
Ads sizes available: [320,50], [300,250], [320,480], [1024,768], [728,90]
Ads sizes available: [300,250], [320,50], [320,480], [480,320], [728,90], [768,1024], [1024,768]

# Banner Test Parameters
```
Expand Down
34 changes: 29 additions & 5 deletions test/spec/modules/tappxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,35 @@ describe('Tappx bid adapter', function () {
assert.isTrue(spec.isBidRequestValid(c_BIDREQUEST.bids[0]), JSON.stringify(c_BIDREQUEST));
});

it('should return false when required params are missing', function () {
let badBidRequest = c_BIDREQUEST;
delete badBidRequest.bids[0].params.tappxkey;
delete badBidRequest.bids[0].params.endpoint;
assert.isFalse(spec.isBidRequestValid(badBidRequest.bids[0]));
it('should return false when params are missing', function () {
let badBidRequestParam = JSON.parse(JSON.stringify(c_BIDREQUEST));
delete badBidRequestParam.bids[0].params;
assert.isFalse(spec.isBidRequestValid(badBidRequestParam.bids[0]));
});

it('should return false when tappxkey is missing', function () {
let badBidRequestTpxkey = JSON.parse(JSON.stringify(c_BIDREQUEST)); ;
delete badBidRequestTpxkey.bids[0].params.tappxkey;
assert.isFalse(spec.isBidRequestValid(badBidRequestTpxkey.bids[0]));
});

it('should return false when host is missing', function () {
let badBidRequestHost = JSON.parse(JSON.stringify(c_BIDREQUEST)); ;
delete badBidRequestHost.bids[0].params.host;
assert.isFalse(spec.isBidRequestValid(badBidRequestHost.bids[0]));
});

it('should return false when classic endpoint is missing', function () {
let badBidRequestClEp = JSON.parse(JSON.stringify(c_BIDREQUEST)); ;
delete badBidRequestClEp.bids[0].params.endpoint;
assert.isFalse(spec.isBidRequestValid(badBidRequestClEp.bids[0]));
});

it('should return true when endpoint is not set for new endpoints', function () {
let badBidRequestNwEp = JSON.parse(JSON.stringify(c_BIDREQUEST)); ;
delete badBidRequestNwEp.bids[0].params.endpoint;
badBidRequestNwEp.bids[0].params.host = 'zztesting.ssp.tappx.com/rtb/v2/';
assert.isTrue(spec.isBidRequestValid(badBidRequestNwEp.bids[0]));
});

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

0 comments on commit 5fb4041

Please sign in to comment.