Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
PulsePoint Adapter: Fix on multi-format support (prebid#5857)
Browse files Browse the repository at this point in the history
* ET-1691: Pulsepoint Analytics adapter for Prebid. (#1)

* ET-1691: Adding pulsepoint analytics and tests for pulsepoint adapter

* ET-1691: Adding pulsepoint analytics and tests for pulsepoint adapter

* ET-1691: cleanup

* ET-1691: minor

* ET-1691: revert package.json change

* Adding bidRequest to bidFactory.createBid method as per prebid#509

* ET-1765: Adding support for additional params in PulsePoint adapter (#2)

* ET-1850: Fixing prebid#866

* Minor fix

* Adding mandatory parameters to Bid

* APPS-3774
  • Loading branch information
anand-venkatraman authored Oct 22, 2020
1 parent d3c0ded commit 05606c6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/pulsepointBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ function impression(slot) {
function banner(slot) {
const sizes = parseSizes(slot);
const size = adSize(slot, sizes);
return (slot.nativeParams || slot.params.video) ? null : {
return (slot.mediaTypes && slot.mediaTypes.banner) ? {
w: size[0],
h: size[1],
battr: slot.params.battr,
format: sizes
};
} : null;
}

/**
Expand Down
25 changes: 24 additions & 1 deletion test/spec/modules/pulsepointBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ describe('PulsePoint Adapter Tests', function () {
}
}, {
placementCode: '/DfpAccount2/slot2',
mediaTypes: {
banner: {
sizes: [[728, 90]]
}
},
bidId: 'bid23456',
params: {
cp: 'p10000',
Expand Down Expand Up @@ -72,6 +77,11 @@ describe('PulsePoint Adapter Tests', function () {
}];
const additionalParamsConfig = [{
placementCode: '/DfpAccount1/slot1',
mediaTypes: {
banner: {
sizes: [[1, 1]]
}
},
bidId: 'bid12345',
params: {
cp: 'p10000',
Expand All @@ -89,6 +99,11 @@ describe('PulsePoint Adapter Tests', function () {

const ortbParamsSlotConfig = [{
placementCode: '/DfpAccount1/slot1',
mediaTypes: {
banner: {
sizes: [[1, 1]]
}
},
bidId: 'bid12345',
params: {
cp: 'p10000',
Expand Down Expand Up @@ -146,6 +161,11 @@ describe('PulsePoint Adapter Tests', function () {

const schainParamsSlotConfig = [{
placementCode: '/DfpAccount1/slot1',
mediaTypes: {
banner: {
sizes: [[1, 1]]
}
},
bidId: 'bid12345',
params: {
cp: 'p10000',
Expand Down Expand Up @@ -681,7 +701,10 @@ describe('PulsePoint Adapter Tests', function () {
expect(ortbRequest.imp[1].banner).to.not.be.null;
expect(ortbRequest.imp[1].banner.w).to.equal(728);
expect(ortbRequest.imp[1].banner.h).to.equal(90);
expect(ortbRequest.imp[1].banner.format).to.be.null;
expect(ortbRequest.imp[1].banner.format).to.not.be.null;
expect(ortbRequest.imp[1].banner.format).to.have.lengthOf(1);
expect(ortbRequest.imp[1].banner.format[0].w).to.equal(728);
expect(ortbRequest.imp[1].banner.format[0].h).to.equal(90);
// adsize on response
const ortbResponse = {
seatbid: [{
Expand Down

0 comments on commit 05606c6

Please sign in to comment.