prebid.js 6.24.0 → 6.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/dist/33acrossBidAdapter.js +1 -1
  2. package/dist/adagioBidAdapter.js +1 -1
  3. package/dist/adbookpspBidAdapter.js +1 -1
  4. package/dist/adgenerationBidAdapter.js +1 -1
  5. package/dist/adrelevantisBidAdapter.js +1 -1
  6. package/dist/adtelligentBidAdapter.js +1 -1
  7. package/dist/adxcgBidAdapter.js +1 -1
  8. package/dist/adyoulikeBidAdapter.js +1 -1
  9. package/dist/ajaBidAdapter.js +1 -1
  10. package/dist/amxBidAdapter.js +1 -1
  11. package/dist/amxIdSystem.js +1 -1
  12. package/dist/appierAnalyticsAdapter.js +1 -1
  13. package/dist/appnexusBidAdapter.js +1 -1
  14. package/dist/asoBidAdapter.js +1 -1
  15. package/dist/audiencerunBidAdapter.js +1 -1
  16. package/dist/axonixBidAdapter.js +1 -1
  17. package/dist/beopBidAdapter.js +1 -1
  18. package/dist/bidglassBidAdapter.js +1 -1
  19. package/dist/big-richmediaBidAdapter.js +1 -1
  20. package/dist/bluebillywigBidAdapter.js +1 -1
  21. package/dist/bridgewellBidAdapter.js +1 -1
  22. package/dist/brightMountainMediaBidAdapter.js +1 -1
  23. package/dist/concertBidAdapter.js +1 -1
  24. package/dist/connectadBidAdapter.js +1 -1
  25. package/dist/consumableBidAdapter.js +1 -1
  26. package/dist/conversantBidAdapter.js +1 -1
  27. package/dist/cpexIdSystem.js +1 -1
  28. package/dist/craftBidAdapter.js +1 -1
  29. package/dist/criteoBidAdapter.js +1 -1
  30. package/dist/currency.js +1 -1
  31. package/dist/dfpAdServerVideo.js +1 -1
  32. package/dist/dspxBidAdapter.js +1 -1
  33. package/dist/eplanningBidAdapter.js +1 -1
  34. package/dist/glimpseBidAdapter.js +1 -1
  35. package/dist/gmosspBidAdapter.js +1 -1
  36. package/dist/goldbachBidAdapter.js +1 -1
  37. package/dist/gravitoIdSystem.js +1 -0
  38. package/dist/gridBidAdapter.js +1 -1
  39. package/dist/gridNMBidAdapter.js +1 -1
  40. package/dist/gumgumBidAdapter.js +1 -1
  41. package/dist/h12mediaBidAdapter.js +1 -1
  42. package/dist/id5IdSystem.js +1 -1
  43. package/dist/impactifyBidAdapter.js +1 -1
  44. package/dist/improvedigitalBidAdapter.js +1 -1
  45. package/dist/inmarBidAdapter.js +1 -1
  46. package/dist/insticatorBidAdapter.js +1 -1
  47. package/dist/invibesBidAdapter.js +1 -1
  48. package/dist/ixBidAdapter.js +1 -1
  49. package/dist/jixieBidAdapter.js +1 -1
  50. package/dist/justpremiumBidAdapter.js +1 -1
  51. package/dist/kargoBidAdapter.js +1 -1
  52. package/dist/konduitAnalyticsAdapter.js +1 -1
  53. package/dist/liveIntentIdSystem.js +1 -1
  54. package/dist/liveyieldAnalyticsAdapter.js +1 -1
  55. package/dist/logicadBidAdapter.js +1 -1
  56. package/dist/loglyliftBidAdapter.js +1 -1
  57. package/dist/malltvAnalyticsAdapter.js +1 -1
  58. package/dist/marsmediaBidAdapter.js +1 -1
  59. package/dist/mediafuseBidAdapter.js +1 -1
  60. package/dist/mediakeysBidAdapter.js +1 -1
  61. package/dist/mediasquareBidAdapter.js +1 -1
  62. package/dist/mgidBidAdapter.js +1 -1
  63. package/dist/minutemediaBidAdapter.js +1 -1
  64. package/dist/not-for-prod/prebid.js +123 -121
  65. package/dist/oguryBidAdapter.js +1 -1
  66. package/dist/oneVideoBidAdapter.js +1 -1
  67. package/dist/onetagBidAdapter.js +1 -1
  68. package/dist/ooloAnalyticsAdapter.js +1 -1
  69. package/dist/outbrainBidAdapter.js +1 -1
  70. package/dist/parrableIdSystem.js +1 -1
  71. package/dist/pixfutureBidAdapter.js +1 -1
  72. package/dist/prebid-core.js +3 -3
  73. package/dist/publinkIdSystem.js +1 -1
  74. package/dist/pubmaticBidAdapter.js +1 -1
  75. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  76. package/dist/pxyzBidAdapter.js +1 -1
  77. package/dist/quantcastBidAdapter.js +1 -1
  78. package/dist/readpeakBidAdapter.js +1 -1
  79. package/dist/relaidoBidAdapter.js +1 -1
  80. package/dist/rhythmoneBidAdapter.js +1 -1
  81. package/dist/riseBidAdapter.js +1 -1
  82. package/dist/rubiconAnalyticsAdapter.js +1 -1
  83. package/dist/rubiconBidAdapter.js +1 -1
  84. package/dist/seedingAllianceBidAdapter.js +1 -1
  85. package/dist/seedtagBidAdapter.js +1 -1
  86. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  87. package/dist/sharethroughBidAdapter.js +1 -1
  88. package/dist/smaatoBidAdapter.js +1 -1
  89. package/dist/smartadserverBidAdapter.js +1 -1
  90. package/dist/smartxBidAdapter.js +1 -1
  91. package/dist/smilewantedBidAdapter.js +1 -1
  92. package/dist/sonobiBidAdapter.js +1 -1
  93. package/dist/sortableBidAdapter.js +1 -1
  94. package/dist/sovrnAnalyticsAdapter.js +1 -1
  95. package/dist/sovrnBidAdapter.js +1 -1
  96. package/dist/sspBCBidAdapter.js +1 -1
  97. package/dist/sublimeBidAdapter.js +1 -1
  98. package/dist/synacormediaBidAdapter.js +1 -1
  99. package/dist/targetVideoBidAdapter.js +1 -1
  100. package/dist/teadsBidAdapter.js +1 -1
  101. package/dist/trionBidAdapter.js +1 -1
  102. package/dist/tripleliftBidAdapter.js +1 -1
  103. package/dist/trustpidSystem.js +1 -1
  104. package/dist/trustxBidAdapter.js +1 -1
  105. package/dist/ttdBidAdapter.js +1 -1
  106. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  107. package/dist/underdogmediaBidAdapter.js +1 -1
  108. package/dist/undertoneBidAdapter.js +1 -1
  109. package/dist/userId.js +1 -1
  110. package/dist/vidazooBidAdapter.js +1 -1
  111. package/dist/videobyteBidAdapter.js +1 -1
  112. package/dist/videoheroesBidAdapter.js +1 -0
  113. package/dist/vidoomyBidAdapter.js +1 -1
  114. package/dist/visxBidAdapter.js +1 -1
  115. package/dist/vuukleBidAdapter.js +1 -1
  116. package/dist/weboramaRtdProvider.js +1 -1
  117. package/dist/widespaceBidAdapter.js +1 -1
  118. package/dist/winrBidAdapter.js +1 -1
  119. package/dist/yahoosspBidAdapter.js +1 -1
  120. package/dist/yieldmoBidAdapter.js +1 -1
  121. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  122. package/dist/zeta_global_sspBidAdapter.js +1 -1
  123. package/integrationExamples/gpt/userId_example.html +3 -0
  124. package/integrationExamples/gpt/weboramaRtdProvider_example.html +65 -11
  125. package/modules/.submodules.json +2 -1
  126. package/modules/adagioBidAdapter.js +2 -0
  127. package/modules/adtelligentBidAdapter.js +3 -1
  128. package/modules/alkimiBidAdapter.md +10 -4
  129. package/modules/appnexusBidAdapter.js +13 -2
  130. package/modules/beopBidAdapter.js +51 -6
  131. package/modules/cpexIdSystem.js +1 -2
  132. package/modules/currency.js +4 -13
  133. package/modules/dacIdSystem.md +4 -4
  134. package/modules/dfpAdServerVideo.js +8 -0
  135. package/modules/gravitoIdSystem.js +57 -0
  136. package/modules/gravitoIdSystem.md +28 -0
  137. package/modules/improvedigitalBidAdapter.js +100 -43
  138. package/modules/invibesBidAdapter.js +55 -34
  139. package/modules/ixBidAdapter.js +62 -26
  140. package/modules/ixBidAdapter.md +42 -42
  141. package/modules/jixieBidAdapter.js +2 -0
  142. package/modules/kargoBidAdapter.js +23 -8
  143. package/modules/oguryBidAdapter.js +27 -1
  144. package/modules/trustpidSystem.js +9 -28
  145. package/modules/trustpidSystem.md +11 -34
  146. package/modules/userId/eids.js +6 -0
  147. package/modules/userId/index.js +30 -55
  148. package/modules/userId/userId.md +3 -11
  149. package/modules/videoheroesBidAdapter.js +267 -0
  150. package/modules/videoheroesBidAdapter.md +134 -0
  151. package/modules/vidoomyBidAdapter.js +2 -6
  152. package/modules/weboramaRtdProvider.js +515 -241
  153. package/modules/weboramaRtdProvider.md +488 -51
  154. package/modules/zeta_global_sspBidAdapter.js +1 -1
  155. package/package.json +4 -4
  156. package/src/adserver.js +7 -0
  157. package/src/hook.js +19 -1
  158. package/src/utils/promise.js +36 -0
  159. package/test/spec/modules/adtelligentBidAdapter_spec.js +1 -0
  160. package/test/spec/modules/appnexusBidAdapter_spec.js +37 -10
  161. package/test/spec/modules/beopBidAdapter_spec.js +15 -2
  162. package/test/spec/modules/dfpAdServerVideo_spec.js +45 -0
  163. package/test/spec/modules/gravitoIdSystem_spec.js +51 -0
  164. package/test/spec/modules/improvedigitalBidAdapter_spec.js +289 -72
  165. package/test/spec/modules/invibesBidAdapter_spec.js +98 -7
  166. package/test/spec/modules/ixBidAdapter_spec.js +132 -26
  167. package/test/spec/modules/jixieBidAdapter_spec.js +17 -0
  168. package/test/spec/modules/kargoBidAdapter_spec.js +45 -3
  169. package/test/spec/modules/liveIntentIdSystem_spec.js +2 -2
  170. package/test/spec/modules/loglyliftBidAdapter_spec.js +8 -0
  171. package/test/spec/modules/oguryBidAdapter_spec.js +181 -3
  172. package/test/spec/modules/trustpidSystem_spec.js +42 -19
  173. package/test/spec/modules/userId_spec.js +18 -0
  174. package/test/spec/modules/videoheroesBidAdapter_spec.js +363 -0
  175. package/test/spec/modules/weboramaRtdProvider_spec.js +2333 -266
  176. package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +37 -24
  177. package/test/spec/unit/utils/promise_spec.js +49 -0
  178. package/test/spec/modules/medianetRtdProvider_spec.js +0 -146
@@ -226,6 +226,15 @@ describe('OguryBidAdapter', function () {
226
226
  });
227
227
 
228
228
  describe('buildRequests', function () {
229
+ const stubbedWidth = 200
230
+ const stubbedHeight = 600
231
+ const stubbedWidthMethod = sinon.stub(window.top.document.documentElement, 'clientWidth').get(function() {
232
+ return stubbedWidth;
233
+ });
234
+ const stubbedHeightMethod = sinon.stub(window.top.document.documentElement, 'clientHeight').get(function() {
235
+ return stubbedHeight;
236
+ });
237
+
229
238
  const defaultTimeout = 1000;
230
239
  const expectedRequestObject = {
231
240
  id: bidRequests[0].auctionId,
@@ -270,10 +279,19 @@ describe('OguryBidAdapter', function () {
270
279
  },
271
280
  ext: {
272
281
  prebidversion: '$prebid.version$',
273
- adapterversion: '1.2.11'
282
+ adapterversion: '1.2.12'
283
+ },
284
+ device: {
285
+ w: stubbedWidth,
286
+ h: stubbedHeight
274
287
  }
275
288
  };
276
289
 
290
+ after(function() {
291
+ stubbedWidthMethod.restore();
292
+ stubbedHeightMethod.restore();
293
+ });
294
+
277
295
  it('sends bid request to ENDPOINT via POST', function () {
278
296
  const validBidRequests = utils.deepClone(bidRequests)
279
297
 
@@ -290,6 +308,166 @@ describe('OguryBidAdapter', function () {
290
308
  expect(request.data.regs.ext.gdpr).to.be.a('number');
291
309
  });
292
310
 
311
+ describe('getClientWidth', () => {
312
+ function testGetClientWidth(testGetClientSizeParams) {
313
+ const stubbedClientWidth = sinon.stub(window.top.document.documentElement, 'clientWidth').get(function() {
314
+ return testGetClientSizeParams.docClientSize
315
+ })
316
+
317
+ const stubbedInnerWidth = sinon.stub(window.top, 'innerWidth').get(function() {
318
+ return testGetClientSizeParams.innerSize
319
+ })
320
+
321
+ const stubbedOuterWidth = sinon.stub(window.top, 'outerWidth').get(function() {
322
+ return testGetClientSizeParams.outerSize
323
+ })
324
+
325
+ const stubbedWidth = sinon.stub(window.top.screen, 'width').get(function() {
326
+ return testGetClientSizeParams.screenSize
327
+ })
328
+
329
+ const validBidRequests = utils.deepClone(bidRequests)
330
+
331
+ const request = spec.buildRequests(validBidRequests, bidderRequest);
332
+ expect(request.data.device.w).to.equal(testGetClientSizeParams.expectedSize);
333
+
334
+ stubbedClientWidth.restore();
335
+ stubbedInnerWidth.restore();
336
+ stubbedOuterWidth.restore();
337
+ stubbedWidth.restore();
338
+ }
339
+
340
+ it('should get documentElementClientWidth by default', () => {
341
+ testGetClientWidth({
342
+ docClientSize: 22,
343
+ innerSize: 50,
344
+ outerSize: 45,
345
+ screenSize: 10,
346
+ expectedSize: 22,
347
+ })
348
+ })
349
+
350
+ it('should get innerWidth as first fallback', () => {
351
+ testGetClientWidth({
352
+ docClientSize: undefined,
353
+ innerSize: 700,
354
+ outerSize: 650,
355
+ screenSize: 10,
356
+ expectedSize: 700,
357
+ })
358
+ })
359
+
360
+ it('should get outerWidth as second fallback', () => {
361
+ testGetClientWidth({
362
+ docClientSize: undefined,
363
+ innerSize: undefined,
364
+ outerSize: 650,
365
+ screenSize: 10,
366
+ expectedSize: 650,
367
+ })
368
+ })
369
+
370
+ it('should get screenWidth as last fallback', () => {
371
+ testGetClientWidth({
372
+ docClientSize: undefined,
373
+ innerSize: undefined,
374
+ outerSize: undefined,
375
+ screenSize: 10,
376
+ expectedSize: 10,
377
+ });
378
+ });
379
+
380
+ it('should return 0 if all window width values are undefined', () => {
381
+ testGetClientWidth({
382
+ docClientSize: undefined,
383
+ innerSize: undefined,
384
+ outerSize: undefined,
385
+ screenSize: undefined,
386
+ expectedSize: 0,
387
+ });
388
+ });
389
+ });
390
+
391
+ describe('getClientHeight', () => {
392
+ function testGetClientHeight(testGetClientSizeParams) {
393
+ const stubbedClientHeight = sinon.stub(window.top.document.documentElement, 'clientHeight').get(function() {
394
+ return testGetClientSizeParams.docClientSize
395
+ })
396
+
397
+ const stubbedInnerHeight = sinon.stub(window.top, 'innerHeight').get(function() {
398
+ return testGetClientSizeParams.innerSize
399
+ })
400
+
401
+ const stubbedOuterHeight = sinon.stub(window.top, 'outerHeight').get(function() {
402
+ return testGetClientSizeParams.outerSize
403
+ })
404
+
405
+ const stubbedHeight = sinon.stub(window.top.screen, 'height').get(function() {
406
+ return testGetClientSizeParams.screenSize
407
+ })
408
+
409
+ const validBidRequests = utils.deepClone(bidRequests)
410
+
411
+ const request = spec.buildRequests(validBidRequests, bidderRequest);
412
+ expect(request.data.device.h).to.equal(testGetClientSizeParams.expectedSize);
413
+
414
+ stubbedClientHeight.restore();
415
+ stubbedInnerHeight.restore();
416
+ stubbedOuterHeight.restore();
417
+ stubbedHeight.restore();
418
+ }
419
+
420
+ it('should get documentElementClientHeight by default', () => {
421
+ testGetClientHeight({
422
+ docClientSize: 420,
423
+ innerSize: 500,
424
+ outerSize: 480,
425
+ screenSize: 230,
426
+ expectedSize: 420,
427
+ });
428
+ });
429
+
430
+ it('should get innerHeight as first fallback', () => {
431
+ testGetClientHeight({
432
+ docClientSize: undefined,
433
+ innerSize: 500,
434
+ outerSize: 480,
435
+ screenSize: 230,
436
+ expectedSize: 500,
437
+ });
438
+ });
439
+
440
+ it('should get outerHeight as second fallback', () => {
441
+ testGetClientHeight({
442
+ docClientSize: undefined,
443
+ innerSize: undefined,
444
+ outerSize: 480,
445
+ screenSize: 230,
446
+ expectedSize: 480,
447
+ });
448
+ });
449
+
450
+ it('should get screenHeight as last fallback', () => {
451
+ testGetClientHeight({
452
+ docClientSize: undefined,
453
+ innerSize: undefined,
454
+ outerSize: undefined,
455
+ screenSize: 230,
456
+ expectedSize: 230,
457
+ });
458
+ });
459
+
460
+ it('should return 0 if all window height values are undefined', () => {
461
+ testGetClientHeight({
462
+ docClientSize: undefined,
463
+ innerSize: undefined,
464
+ outerSize: undefined,
465
+ screenSize: undefined,
466
+ expectedSize: 0,
467
+ });
468
+ });
469
+ });
470
+
293
471
  it('should not add gdpr infos if not present', () => {
294
472
  const bidderRequestWithoutGdpr = {
295
473
  ...bidderRequest,
@@ -481,7 +659,7 @@ describe('OguryBidAdapter', function () {
481
659
  advertiserDomains: openRtbBidResponse.body.seatbid[0].bid[0].adomain
482
660
  },
483
661
  nurl: openRtbBidResponse.body.seatbid[0].bid[0].nurl,
484
- adapterVersion: '1.2.11',
662
+ adapterVersion: '1.2.12',
485
663
  prebidVersion: '$prebid.version$'
486
664
  }, {
487
665
  requestId: openRtbBidResponse.body.seatbid[0].bid[1].impid,
@@ -498,7 +676,7 @@ describe('OguryBidAdapter', function () {
498
676
  advertiserDomains: openRtbBidResponse.body.seatbid[0].bid[1].adomain
499
677
  },
500
678
  nurl: openRtbBidResponse.body.seatbid[0].bid[1].nurl,
501
- adapterVersion: '1.2.11',
679
+ adapterVersion: '1.2.12',
502
680
  prebidVersion: '$prebid.version$'
503
681
  }]
504
682
 
@@ -22,11 +22,23 @@ describe('trustpid System', () => {
22
22
  });
23
23
 
24
24
  describe('trustpid getId()', () => {
25
+ before(() => {
26
+ window.FC_CONF = {
27
+ TELCO_ACRONYM: {
28
+ 'domain.with.acronym': 'acronymValue',
29
+ }
30
+ };
31
+ });
32
+
25
33
  afterEach(() => {
26
34
  storage.removeDataFromLocalStorage(connectDataKey);
27
35
  storage.removeDataFromLocalStorage(connectDomainKey);
28
36
  });
29
37
 
38
+ after(() => {
39
+ window.FC_CONF = {};
40
+ })
41
+
30
42
  it('it should return object with key callback', () => {
31
43
  expect(trustpidSubmodule.getId()).to.have.property('callback');
32
44
  });
@@ -58,20 +70,20 @@ describe('trustpid System', () => {
58
70
 
59
71
  it('returns {id: {trustpid: data.trustpid}} if we have the right data stored in the localstorage ', () => {
60
72
  const idGraph = {
61
- 'domain': 'uat.mno.link',
73
+ 'domain': 'domain.with.acronym',
62
74
  'umid': 'umidValue',
63
75
  };
64
- storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('uat.mno.link'));
76
+ storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('domain.with.acronym'));
65
77
  storage.setDataInLocalStorage(connectDataKey, JSON.stringify(getStorageData(idGraph)));
66
78
  const response = trustpidSubmodule.getId();
67
79
  expect(response).to.have.property('id');
68
80
  expect(response.id).to.have.property('trustpid');
69
- expect(response.id.trustpid).to.be.equal('umidValue-xxxx');
81
+ expect(response.id.trustpid).to.be.equal('umidValue-acronymValue');
70
82
  });
71
83
 
72
84
  it('returns {trustpid: data.trustpid} if we have the right data stored in the localstorage right after the callback is called', (done) => {
73
85
  const idGraph = {
74
- 'domain': 'uat.mno.link',
86
+ 'domain': 'domain.with.acronym',
75
87
  'umid': 'umidValue',
76
88
  };
77
89
  const response = trustpidSubmodule.getId();
@@ -79,12 +91,12 @@ describe('trustpid System', () => {
79
91
  expect(response.callback.toString()).contain('result(callback)');
80
92
 
81
93
  if (typeof response.callback === 'function') {
82
- storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('uat.mno.link'));
94
+ storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('domain.with.acronym'));
83
95
  storage.setDataInLocalStorage(connectDataKey, JSON.stringify(getStorageData(idGraph)));
84
96
  response.callback(function (result) {
85
97
  expect(result).to.not.be.null;
86
98
  expect(result).to.have.property('trustpid');
87
- expect(result.trustpid).to.be.equal('umidValue-xxxx');
99
+ expect(result.trustpid).to.be.equal('umidValue-acronymValue');
88
100
  done()
89
101
  })
90
102
  }
@@ -92,7 +104,7 @@ describe('trustpid System', () => {
92
104
 
93
105
  it('returns null if domains don\'t match', (done) => {
94
106
  const idGraph = {
95
- 'domain': 'uat.mno.link',
107
+ 'domain': 'domain.with.acronym',
96
108
  'umid': 'umidValue',
97
109
  };
98
110
  storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('differentDomainValue'));
@@ -115,7 +127,7 @@ describe('trustpid System', () => {
115
127
 
116
128
  it('returns {trustpid: data.trustpid} if we have the right data stored in the localstorage right after 500ms delay', (done) => {
117
129
  const idGraph = {
118
- 'domain': 'uat.mno.link',
130
+ 'domain': 'domain.with.acronym',
119
131
  'umid': 'umidValue',
120
132
  };
121
133
 
@@ -125,13 +137,13 @@ describe('trustpid System', () => {
125
137
 
126
138
  if (typeof response.callback === 'function') {
127
139
  setTimeout(() => {
128
- storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('uat.mno.link'));
140
+ storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('domain.with.acronym'));
129
141
  storage.setDataInLocalStorage(connectDataKey, JSON.stringify(getStorageData(idGraph)));
130
142
  }, 500);
131
143
  response.callback(function (result) {
132
144
  expect(result).to.not.be.null;
133
145
  expect(result).to.have.property('trustpid');
134
- expect(result.trustpid).to.be.equal('umidValue-xxxx');
146
+ expect(result.trustpid).to.be.equal('umidValue-acronymValue');
135
147
  done()
136
148
  })
137
149
  }
@@ -139,7 +151,7 @@ describe('trustpid System', () => {
139
151
 
140
152
  it('returns null if we have the data stored in the localstorage after 500ms delay and the max (waiting) delay is only 200ms ', (done) => {
141
153
  const idGraph = {
142
- 'domain': 'uat.mno.link',
154
+ 'domain': 'domain.with.acronym',
143
155
  'umid': 'umidValue',
144
156
  };
145
157
 
@@ -149,7 +161,7 @@ describe('trustpid System', () => {
149
161
 
150
162
  if (typeof response.callback === 'function') {
151
163
  setTimeout(() => {
152
- storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('uat.mno.link'));
164
+ storage.setDataInLocalStorage(connectDomainKey, JSON.stringify('domain.with.acronym'));
153
165
  storage.setDataInLocalStorage(connectDataKey, JSON.stringify(getStorageData(idGraph)));
154
166
  }, 500);
155
167
  response.callback(function (result) {
@@ -191,22 +203,33 @@ describe('trustpid System', () => {
191
203
  });
192
204
 
193
205
  describe('trustpid messageHandler for acronyms', () => {
206
+ before(() => {
207
+ window.FC_CONF = {
208
+ TELCO_ACRONYM: {
209
+ 'domain1': 'abcd',
210
+ 'domain2': 'efgh',
211
+ 'domain3': 'ijkl',
212
+ }
213
+ };
214
+ });
215
+
194
216
  afterEach(() => {
195
217
  storage.removeDataFromLocalStorage(connectDataKey);
196
218
  storage.removeDataFromLocalStorage(connectDomainKey);
197
219
  });
198
220
 
221
+ after(() => {
222
+ window.FC_CONF = {};
223
+ })
224
+
199
225
  const domains = [
200
- {domain: 'tmi.mno.link', acronym: 'ndye'},
201
- {domain: 'tmi.vodafone.de', acronym: 'pqnx'},
202
- {domain: 'tmi.telekom.de', acronym: 'avgw'},
203
- {domain: 'tmi.tmid.es', acronym: 'kjws'},
204
- {domain: 'uat.mno.link', acronym: 'xxxx'},
205
- {domain: 'es.tmiservice.orange.com', acronym: 'aplw'},
226
+ {domain: 'domain1', acronym: 'abcd'},
227
+ {domain: 'domain2', acronym: 'efgh'},
228
+ {domain: 'domain3', acronym: 'ijkl'},
206
229
  ];
207
230
 
208
231
  domains.forEach(({domain, acronym}) => {
209
- it(`correctly sets trustpid value and acronym to ${acronym} for ${domain} domain`, (done) => {
232
+ it(`correctly sets trustpid value and acronym to ${acronym} for ${domain}`, (done) => {
210
233
  const idGraph = {
211
234
  'domain': domain,
212
235
  'umid': 'umidValue',
@@ -52,6 +52,7 @@ import * as mockGpt from '../integration/faker/googletag.js';
52
52
  import 'src/prebid.js';
53
53
  import {hook} from '../../../src/hook.js';
54
54
  import {mockGdprConsent} from '../../helpers/consentData.js';
55
+ import {getPPID} from '../../../src/adserver.js';
55
56
 
56
57
  let assert = require('chai').assert;
57
58
  let expect = require('chai').expect;
@@ -445,6 +446,23 @@ describe('User ID', function () {
445
446
  });
446
447
  });
447
448
 
449
+ it('should make PPID available to core', () => {
450
+ init(config);
451
+ setSubmoduleRegistry([sharedIdSystemSubmodule]);
452
+ const id = 'thishastobelongerthan32characters';
453
+ config.setConfig({
454
+ userSync: {
455
+ ppid: 'pubcid.org',
456
+ userIds: [
457
+ { name: 'pubCommonId', value: {'pubcid': id} },
458
+ ]
459
+ }
460
+ });
461
+ return getGlobal().refreshUserIds().then(() => {
462
+ expect(getPPID()).to.eql(id);
463
+ })
464
+ });
465
+
448
466
  describe('refreshing before init is complete', () => {
449
467
  const MOCK_ID = {'MOCKID': '1111'};
450
468
  let mockIdCallback;