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

Merging master into stroeer-bidder #17

Merged
merged 2 commits into from
Apr 22, 2024
Merged
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: 6 additions & 0 deletions modules/stroeerCoreBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ export const spec = {
utils.deepSetValue(commonPayload, DSA_KEY, dsa);
}

const COOKIE_DEPRECATION_LABEL_KEY = 'ortb2.device.ext.cdep';
const cdep = utils.deepAccess(bidderRequest, COOKIE_DEPRECATION_LABEL_KEY);
if (cdep) {
utils.deepSetValue(commonPayload, COOKIE_DEPRECATION_LABEL_KEY, cdep);
}

const serverRequestInfos = [];
const endpointUrl = buildUrl(anyBid.params);

Expand Down
21 changes: 21 additions & 0 deletions test/spec/modules/stroeerCoreBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,27 @@ describe('stroeerCore bid adapter', function () {

assert.deepEqual(sentOrtb2, ortb2);
});

it('should add the Cookie Deprecation Label', () => {
const bidReq = buildBidderRequest();

const cDepObj = {
cdep: 'example_label_1'
};

const ortb2 = {
device: {
ext: cDepObj
}
};

bidReq.ortb2 = utils.deepClone(ortb2);

const serverRequestInfo = spec.buildRequests(bidReq.bids, bidReq)[0];
const sentOrtb2 = serverRequestInfo.data.ortb2;

assert.deepEqual(sentOrtb2, ortb2);
});
});
});

Expand Down