Skip to content

Commit

Permalink
rename + fix missed files
Browse files Browse the repository at this point in the history
  • Loading branch information
obernadin committed May 26, 2021
1 parent ec41a92 commit 6d4096d
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 115 deletions.
13 changes: 1 addition & 12 deletions modules/betweenBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {registerBidder} from '../src/adapters/bidderFactory.js';
import { getAdUnitSizes, parseSizesInput, deepAccess } from '../src/utils.js';
import { getAdUnitSizes, parseSizesInput } from '../src/utils.js';
import { getRefererInfo } from '../src/refererDetection.js';

const BIDDER_CODE = 'between';
Expand Down Expand Up @@ -37,8 +37,6 @@ export const spec = {
tz: getTz(),
fl: getFl(),
rr: getRr(),
shid: getSharedId(i)('id'),
shid3: getSharedId(i)('third'),
s: i.params.s,
bidid: i.bidId,
transactionid: i.transactionId,
Expand Down Expand Up @@ -149,15 +147,6 @@ export const spec = {
}
}

function getSharedId(bid) {
const id = deepAccess(bid, 'userId.sharedid.id');
const third = deepAccess(bid, 'userId.sharedid.third');
return function(kind) {
if (kind === 'id') return id || '';
return third || '';
}
}

function getRr() {
try {
var td = top.document;
Expand Down
1 change: 0 additions & 1 deletion modules/ixBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const PROVIDERS = [
'merkleId',
'parrableId',
'connectid',
'sharedid',
'tapadId',
'quantcastId',
'pubcid',
Expand Down
1 change: 0 additions & 1 deletion modules/openxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export const USER_ID_CODE_TO_QUERY_ARG = {
parrableId: 'parrableid', // Parrable ID
pubcid: 'pubcid', // PubCommon ID
quantcastId: 'quantcastid', // Quantcast ID
sharedId: 'sharedid', // Shared ID User ID
tapadId: 'tapadid', // Tapad Id
tdid: 'ttduuid', // The Trade Desk Unified ID
verizonMediaId: 'verizonmediaid', // Verizon Media ConnectID
Expand Down
8 changes: 4 additions & 4 deletions modules/sharedIdSystem.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* This module adds PubCommonId to the User ID module
* This module adds SharedId to the User ID module
* The {@link module:modules/userId} module is required
* @module modules/pubCommonIdSystem
* @module modules/sharedIdSystem
* @requires module:modules/userId
*/

Expand All @@ -14,7 +14,7 @@ const PUB_COMMON_ID = 'PublisherCommonId';
const GVLID = 887;

/** @type {Submodule} */
export const pubCommonIdSubmodule = {
export const sharedIdSystemSubmodule = {
/**
* used to link submodule with config
* @type {string}
Expand Down Expand Up @@ -90,4 +90,4 @@ export const pubCommonIdSubmodule = {
},
};

submodule('userId', pubCommonIdSubmodule);
submodule('userId', sharedIdSystemSubmodule);
45 changes: 0 additions & 45 deletions test/spec/modules/betweenBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,51 +222,6 @@ describe('betweenBidAdapterTests', function () {
expect(req_data.sizes).to.deep.equal(['970x250', '240x400', '728x90'])
});

it('check sharedId with id and third', function() {
const bidRequestData = [{
bidId: 'bid123',
bidder: 'between',
mediaTypes: {
banner: {
sizes: [[728, 90]]
}
},
params: {
s: 1112,
},
userId: {
sharedid: {
id: '01EXQE7JKNDRDDVATB0S2GX1NT',
third: '01EXQE7JKNDRDDVATB0S2GX1NT'
}
}
}];
const shid = JSON.parse(spec.buildRequests(bidRequestData).data)[0].data.shid;
const shid3 = JSON.parse(spec.buildRequests(bidRequestData).data)[0].data.shid3;
expect(shid).to.equal('01EXQE7JKNDRDDVATB0S2GX1NT') && expect(shid3).to.equal('01EXQE7JKNDRDDVATB0S2GX1NT');
});
it('check sharedId with only id', function() {
const bidRequestData = [{
bidId: 'bid123',
bidder: 'between',
mediaTypes: {
banner: {
sizes: [[728, 90]]
}
},
params: {
s: 1112,
},
userId: {
sharedid: {
id: '01EXQE7JKNDRDDVATB0S2GX1NT',
}
}
}];
const shid = JSON.parse(spec.buildRequests(bidRequestData).data)[0].data.shid;
const shid3 = JSON.parse(spec.buildRequests(bidRequestData).data)[0].data.shid3;
expect(shid).to.equal('01EXQE7JKNDRDDVATB0S2GX1NT') && expect(shid3).to.equal('');
});
it('check adomain', function() {
const serverResponse = {
body: [{
Expand Down
29 changes: 12 additions & 17 deletions test/spec/modules/logicadBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,14 @@ describe('LogicadAdapter', function () {
}
},
userId: {
sharedid: {
id: 'fakesharedid',
third: 'fakesharedid'
pubcid: {
id: 'fakepubcid'
}
},
userIdAsEids: [{
source: 'sharedid.org',
source: 'pubcid.org',
uids: [{
id: 'fakesharedid',
atype: 1,
ext: {
third: 'fakesharedid'
}
id: 'fakepubcid'
}]
}]
}];
Expand Down Expand Up @@ -63,18 +58,18 @@ describe('LogicadAdapter', function () {
}
},
userId: {
sharedid: {
id: 'fakesharedid',
third: 'fakesharedid'
pubcid: {
id: 'fakepubcid',
third: 'fakepubcid'
}
},
userIdAsEids: [{
source: 'sharedid.org',
source: 'pubcid.org',
uids: [{
id: 'fakesharedid',
id: 'fakepubcid',
atype: 1,
ext: {
third: 'fakesharedid'
third: 'fakepubcid'
}
}]
}]
Expand Down Expand Up @@ -176,8 +171,8 @@ describe('LogicadAdapter', function () {

const data = JSON.parse(request.data);
expect(data.auctionId).to.equal('18fd8b8b0bd757');
expect(data.eids[0].source).to.equal('sharedid.org');
expect(data.eids[0].uids[0].id).to.equal('fakesharedid');
expect(data.eids[0].source).to.equal('pubcid.org');
expect(data.eids[0].uids[0].id).to.equal('fakepubcid');
});
});

Expand Down
1 change: 0 additions & 1 deletion test/spec/modules/openxBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,6 @@ describe('OpenxAdapter', function () {
parrableId: { eid: 'eidVersion.encryptionKeyReference.encryptedValue' },
pubcid: '1111-pubcid',
quantcastId: '1111-quantcastid',
sharedId: '1111-sharedid',
tapadId: '111-tapadid',
tdid: '1111-tdid',
verizonMediaId: '1111-verizonmediaid',
Expand Down
Loading

0 comments on commit 6d4096d

Please sign in to comment.