Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "EPlanning Bid Adapter : adding support for schain" #12669

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions modules/eplanningBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {registerBidder} from '../src/adapters/bidderFactory.js';
import {getStorageManager} from '../src/storageManager.js';
import {BANNER, VIDEO} from '../src/mediaTypes.js';
import {isSlotMatchingAdUnitCode} from '../libraries/gptUtils/gptUtils.js';
import {serializeSupplyChain} from '../libraries/schainSerializer/schainSerializer.js';

const BIDDER_CODE = 'eplanning';
export const storage = getStorageManager({bidderCode: BIDDER_CODE});
Expand Down Expand Up @@ -40,7 +39,6 @@ export const spec = {
const method = 'GET';
const dfpClientId = '1';
const sec = 'ROS';
const schain = bidRequests[0].schain;
let url;
let params;
const urlConfig = getUrlConfig(bidRequests);
Expand Down Expand Up @@ -72,9 +70,7 @@ export const spec = {
if (pcrs) {
params.crs = pcrs;
}
if (schain && schain.nodes.length > 2) {
params.sch = serializeSupplyChain(schain, ['asi', 'sid', 'hp', 'rid', 'name', 'domain']);
}

if (referrerUrl) {
params.fr = cutUrl(referrerUrl);
}
Expand Down
75 changes: 1 addition & 74 deletions test/spec/modules/eplanningBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,68 +53,6 @@ describe('E-Planning Adapter', function () {
'adUnitCode': ADUNIT_CODE2,
'sizes': [[300, 250], [300, 600]],
};
const validBidWithSchain = {
'bidder': 'eplanning',
'bidId': BID_ID2,
'params': {
'ci': CI,
},
'adUnitCode': ADUNIT_CODE2,
'sizes': [[300, 250], [300, 600]],
'schain': {
ver: '1.0',
complete: 1,
nodes: [
{
asi: 'directseller.com',
sid: '00001',
rid: 'BidRequest1',
hp: 1,
name: 'publisher',
domain: 'publisher.com'
},
{
asi: 'reseller.com',
sid: 'aaaaa',
rid: 'BidRequest2',
hp: 1,
name: 'publisher2',
domain: 'publisher2.com'
},
{
asi: 'reseller3.com',
sid: 'aaaaab',
rid: 'BidRequest3',
hp: 1,
name: 'publisher3',
domain: 'publisher3.com'
}
]
}
};
const validBidWithSchainNodes = {
'bidder': 'eplanning',
'bidId': BID_ID2,
'params': {
'ci': CI,
},
'adUnitCode': ADUNIT_CODE2,
'sizes': [[300, 250], [300, 600]],
'schain': {
ver: '1.0',
complete: 1,
nodes: [
{
asi: 'directseller.com',
sid: '00001',
rid: 'BidRequest1',
hp: 1,
name: 'publisher',
domain: 'publisher.com'
}
]
}
};
const ML = '1';
const validBidMappingLinear = {
'bidder': 'eplanning',
Expand Down Expand Up @@ -789,18 +727,7 @@ describe('E-Planning Adapter', function () {
expect(data.vctx).to.equal(2);
expect(data.vv).to.equal(3);
});
it('should return sch parameter', function () {
let bidRequests = [validBidWithSchain], schainExpected, schain;
schain = validBidWithSchain.schain;
schainExpected = schain.ver + ',' + schain.complete + '!' + schain.nodes.map(node => node.asi + ',' + node.sid + ',' + node.hp + ',' + node.rid + ',' + node.name + ',' + node.domain).join('!');
const data = spec.buildRequests(bidRequests, bidderRequest).data;
expect(data.sch).to.deep.equal(schainExpected);
});
it('should not return sch parameter', function () {
let bidRequests = [validBidWithSchainNodes];
const data = spec.buildRequests(bidRequests, bidderRequest).data;
expect(data.sch).to.equal(undefined);
});

it('should return correct e parameter with linear mapping attribute with more than one adunit', function () {
let bidRequestsML = [validBidMappingLinear];
const NEW_CODE = ADUNIT_CODE + '2';
Expand Down
Loading