-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor the TTD usage and add test #40
Conversation
test/spec/modules/userId_spec.js
Outdated
@@ -644,9 +644,9 @@ describe('User ID', function () { | |||
it('pbjs.getUserIdsAsEids should prioritize user ids according to config available to core', () => { | |||
init(config); | |||
setSubmoduleRegistry([ | |||
createMockIdSubmodule('mockId1Module', {id: {uid2: {id: 'uid2_value'}}}), | |||
createMockIdSubmodule('mockId1Module', {id: {uid2: {id: 'uid2_value'}, tdid: {id: 'uid1_value'}}}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here I try to address this comment: https://github.com/prebid/Prebid.js/pull/11119/files#r1496636311
@@ -236,7 +237,9 @@ export const liveIntentIdSubmodule = { | |||
} | |||
|
|||
if (value.thetradedesk) { | |||
result.thetradedesk = { 'id': value.thetradedesk, ext: { provider: getRefererInfo().domain || LI_PROVIDER_DOMAIN } } | |||
result.lipb = {...result.lipb, tdid: value.thetradedesk} | |||
result.tdid = { 'id': value.thetradedesk, ext: { rtiPartner: 'TDID', provider: getRefererInfo().domain || LI_PROVIDER_DOMAIN } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why getRefererInfo().domain
here? Seems like we are not doing this elsewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it was requested by Deepthi, #31 (comment)
test/spec/modules/userId_spec.js
Outdated
@@ -667,6 +667,7 @@ describe('User ID', function () { | |||
|
|||
const ids = { | |||
'uid2': { id: 'uid2_value_from_mockId3Module' }, | |||
'uid1': { id: 'uid1_value_from_mockId3Module' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should add uid1: ['mockId1Module', 'mockId3Module']
in line 657 to have the priorities explicit and this line you then can test if the value from the mockId1Module has won - if I understand the intention of the test correctly.
Maybe it would also be worth putting it into a separate test case?
PR opened: prebid#11174 |
CM-1182