-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docereeAdManager Bid Adapter : updated bid adapter (#12333)
* Updated docereeAdManager bid adapter * Updated docereeAdManager bid adapter * Updated docereeAdManager bid adapter * Updated docereeAdManager bid adapter * Updated docereeAdManager bid adapter * Updated docereeAdManager bid adapter * Update docereeAdManagerBidAdapter.js * added test cases for payload formation in DocereeAdManager * Added support for publisherUrl * added some parameters * Added support for TCF 2.2 * Update docereeAdManagerBidAdapter.js * Update docereeAdManagerBidAdapter.js * Update docereeAdManagerBidAdapter.js * Written test cases for new method implemented. * indentation issues resolved * Update docereeAdManagerBidAdapter_spec.js * Update docereeAdManagerBidAdapter_spec.js * Update docereeAdManagerBidAdapter_spec.js --------- Co-authored-by: lokesh-doceree <[email protected]> Co-authored-by: Patrick McCann <[email protected]>
- Loading branch information
1 parent
fa44eac
commit c90f9b3
Showing
2 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { expect } from 'chai'; | ||
import { spec, getPayload } from '../../../modules/docereeAdManagerBidAdapter.js'; | ||
import { spec, getPayload, getPageUrl } from '../../../modules/docereeAdManagerBidAdapter.js'; | ||
import { config } from '../../../src/config.js'; | ||
import * as utils from '../../../src/utils.js'; | ||
|
||
describe('docereeadmanager', function () { | ||
config.setConfig({ | ||
|
@@ -125,8 +126,15 @@ describe('docereeadmanager', function () { | |
}); | ||
}); | ||
|
||
describe('payload', function() { | ||
it('should return payload with the correct data', function() { | ||
describe('getPageUrl', function () { | ||
it('should return an url string', function () { | ||
const result = getPageUrl(); | ||
expect(result).to.equal(utils.getWindowSelf().location.href); | ||
}); | ||
}); | ||
|
||
describe('payload', function () { | ||
it('should return payload with the correct data', function () { | ||
const data = { | ||
userId: 'xxxxx', | ||
email: '[email protected]', | ||
|
@@ -148,14 +156,15 @@ describe('docereeadmanager', function () { | |
platformUid: 'Xx.xxx.xxxxxx', | ||
mobile: 'XXXXXXXXXX', | ||
} | ||
bid = {...bid, params: {...bid.params, placementId: 'DOC-19-1'}} | ||
bid = { ...bid, params: { ...bid.params, placementId: 'DOC-19-1' } } | ||
const buildRequests = { | ||
gdprConsent: { | ||
consentString: 'COwK6gaOwK6gaFmAAAENAPCAAAAAAAAAAAAAAAAAAAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw', | ||
gdprApplies: false | ||
} | ||
} | ||
const payload = getPayload(bid, data, buildRequests); | ||
|
||
const payloadData = payload.data; | ||
expect(payloadData).to.have.all.keys( | ||
'userid', | ||
|