prebid.js 8.3.0 → 8.4.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 (203) hide show
  1. package/dist/33acrossBidAdapter.js +1 -1
  2. package/dist/33acrossIdSystem.js +1 -1
  3. package/dist/adagioBidAdapter.js +1 -1
  4. package/dist/adbookpspBidAdapter.js +1 -1
  5. package/dist/adgenerationBidAdapter.js +1 -1
  6. package/dist/admanBidAdapter.js +1 -1
  7. package/dist/adqueryBidAdapter.js +1 -1
  8. package/dist/adrelevantisBidAdapter.js +1 -1
  9. package/dist/adtrgtmeBidAdapter.js +1 -1
  10. package/dist/adxcgBidAdapter.js +1 -1
  11. package/dist/adyoulikeBidAdapter.js +1 -1
  12. package/dist/ajaBidAdapter.js +1 -1
  13. package/dist/amxBidAdapter.js +1 -1
  14. package/dist/amxIdSystem.js +1 -1
  15. package/dist/appierAnalyticsAdapter.js +1 -1
  16. package/dist/appnexusBidAdapter.js +1 -1
  17. package/dist/asoBidAdapter.js +1 -1
  18. package/dist/axonixBidAdapter.js +1 -1
  19. package/dist/bidglassBidAdapter.js +1 -1
  20. package/dist/big-richmediaBidAdapter.js +1 -1
  21. package/dist/brandmetricsRtdProvider.js +1 -1
  22. package/dist/bridBidAdapter.js +1 -1
  23. package/dist/bridgewellBidAdapter.js +1 -1
  24. package/dist/brightMountainMediaBidAdapter.js +1 -1
  25. package/dist/carodaBidAdapter.js +1 -1
  26. package/dist/chtnwBidAdapter.js +1 -1
  27. package/dist/concertBidAdapter.js +1 -1
  28. package/dist/connectadBidAdapter.js +1 -1
  29. package/dist/consumableBidAdapter.js +1 -1
  30. package/dist/conversantAnalyticsAdapter.js +1 -1
  31. package/dist/conversantBidAdapter.js +1 -1
  32. package/dist/craftBidAdapter.js +1 -1
  33. package/dist/criteoBidAdapter.js +1 -1
  34. package/dist/cwireBidAdapter.js +1 -1
  35. package/dist/dependencies.json +3 -0
  36. package/dist/dspxBidAdapter.js +1 -1
  37. package/dist/eplanningBidAdapter.js +1 -1
  38. package/dist/euidIdSystem.js +1 -1
  39. package/dist/feedadBidAdapter.js +1 -1
  40. package/dist/finativeBidAdapter.js +1 -1
  41. package/dist/freewheel-sspBidAdapter.js +1 -1
  42. package/dist/gdprEnforcement.js +1 -1
  43. package/dist/gmosspBidAdapter.js +1 -1
  44. package/dist/goldbachBidAdapter.js +1 -1
  45. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  46. package/dist/greenbidsRtdProvider.js +1 -1
  47. package/dist/gridBidAdapter.js +1 -1
  48. package/dist/gumgumBidAdapter.js +1 -1
  49. package/dist/h12mediaBidAdapter.js +1 -1
  50. package/dist/hypelabBidAdapter.js +1 -1
  51. package/dist/id5IdSystem.js +1 -1
  52. package/dist/imdsBidAdapter.js +1 -1
  53. package/dist/improvedigitalBidAdapter.js +1 -1
  54. package/dist/insticatorBidAdapter.js +1 -1
  55. package/dist/ixBidAdapter.js +1 -1
  56. package/dist/justpremiumBidAdapter.js +1 -1
  57. package/dist/kargoBidAdapter.js +1 -1
  58. package/dist/konduitAnalyticsAdapter.js +1 -1
  59. package/dist/kueezBidAdapter.js +1 -1
  60. package/dist/kueezRtbBidAdapter.js +1 -1
  61. package/dist/kulturemediaBidAdapter.js +1 -1
  62. package/dist/lassoBidAdapter.js +1 -1
  63. package/dist/lifestreetBidAdapter.js +1 -1
  64. package/dist/logicadBidAdapter.js +1 -1
  65. package/dist/loglyliftBidAdapter.js +1 -1
  66. package/dist/magniteAnalyticsAdapter.js +1 -1
  67. package/dist/malltvAnalyticsAdapter.js +1 -1
  68. package/dist/marsmediaBidAdapter.js +1 -1
  69. package/dist/mediafuseBidAdapter.js +1 -1
  70. package/dist/mediasquareBidAdapter.js +1 -1
  71. package/dist/mgidBidAdapter.js +1 -1
  72. package/dist/minutemediaBidAdapter.js +1 -1
  73. package/dist/minutemediaplusBidAdapter.js +1 -1
  74. package/dist/nexx360BidAdapter.js +1 -1
  75. package/dist/not-for-prod/prebid.js +135 -135
  76. package/dist/oguryBidAdapter.js +1 -1
  77. package/dist/onetagBidAdapter.js +1 -1
  78. package/dist/ooloAnalyticsAdapter.js +1 -1
  79. package/dist/optidigitalBidAdapter.js +1 -1
  80. package/dist/outbrainBidAdapter.js +1 -1
  81. package/dist/parrableIdSystem.js +1 -1
  82. package/dist/pixfutureBidAdapter.js +1 -1
  83. package/dist/prebid-core.js +2 -2
  84. package/dist/publinkIdSystem.js +1 -1
  85. package/dist/pubmaticBidAdapter.js +1 -1
  86. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  87. package/dist/pulsepointBidAdapter.js +1 -1
  88. package/dist/pxyzBidAdapter.js +1 -1
  89. package/dist/quantcastBidAdapter.js +1 -1
  90. package/dist/readpeakBidAdapter.js +1 -1
  91. package/dist/relaidoBidAdapter.js +1 -1
  92. package/dist/retailspotBidAdapter.js +1 -1
  93. package/dist/rhythmoneBidAdapter.js +1 -1
  94. package/dist/riseBidAdapter.js +1 -1
  95. package/dist/rubiconBidAdapter.js +1 -1
  96. package/dist/seedingAllianceBidAdapter.js +1 -1
  97. package/dist/seedtagBidAdapter.js +1 -1
  98. package/dist/sharedIdSystem.js +1 -1
  99. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  100. package/dist/sharethroughBidAdapter.js +1 -1
  101. package/dist/shinezBidAdapter.js +1 -1
  102. package/dist/smaatoBidAdapter.js +1 -1
  103. package/dist/smartadserverBidAdapter.js +1 -1
  104. package/dist/smartxBidAdapter.js +1 -1
  105. package/dist/smilewantedBidAdapter.js +1 -1
  106. package/dist/sonobiBidAdapter.js +1 -1
  107. package/dist/sovrnAnalyticsAdapter.js +1 -1
  108. package/dist/sovrnBidAdapter.js +1 -1
  109. package/dist/sspBCBidAdapter.js +1 -1
  110. package/dist/stroeerCoreBidAdapter.js +1 -1
  111. package/dist/stvBidAdapter.js +1 -1
  112. package/dist/sublimeBidAdapter.js +1 -1
  113. package/dist/targetVideoBidAdapter.js +1 -1
  114. package/dist/teadsBidAdapter.js +1 -1
  115. package/dist/topicsFpdModule.js +1 -1
  116. package/dist/trionBidAdapter.js +1 -1
  117. package/dist/tripleliftBidAdapter.js +1 -1
  118. package/dist/ttdBidAdapter.js +1 -1
  119. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  120. package/dist/uid2IdSystem.js +1 -1
  121. package/dist/underdogmediaBidAdapter.js +1 -1
  122. package/dist/undertoneBidAdapter.js +1 -1
  123. package/dist/userId.js +1 -1
  124. package/dist/vidazooBidAdapter.js +1 -1
  125. package/dist/videobyteBidAdapter.js +1 -1
  126. package/dist/visxBidAdapter.js +1 -1
  127. package/dist/voxBidAdapter.js +1 -1
  128. package/dist/vuukleBidAdapter.js +1 -1
  129. package/dist/widespaceBidAdapter.js +1 -1
  130. package/dist/winrBidAdapter.js +1 -1
  131. package/dist/yahoosspBidAdapter.js +1 -1
  132. package/dist/yandexBidAdapter.js +1 -1
  133. package/dist/yieldmoBidAdapter.js +1 -1
  134. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  135. package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +1 -1
  136. package/integrationExamples/videoModule/jwplayer/eventListeners.html +2 -2
  137. package/integrationExamples/videoModule/jwplayer/eventsUI.html +1 -1
  138. package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +1 -1
  139. package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +1 -1
  140. package/integrationExamples/videoModule/jwplayer/playlist.html +1 -1
  141. package/integrationExamples/videoModule/videojs/bidMarkedAsUsed.html +1 -1
  142. package/integrationExamples/videoModule/videojs/bidRequestScheduling.html +1 -1
  143. package/integrationExamples/videoModule/videojs/eventListeners.html +1 -1
  144. package/integrationExamples/videoModule/videojs/eventsUI.html +1 -1
  145. package/integrationExamples/videoModule/videojs/gamAdServerMediation.html +1 -1
  146. package/integrationExamples/videoModule/videojs/mediaMetadata.html +1 -1
  147. package/integrationExamples/videoModule/videojs/playlist.html +1 -1
  148. package/modules/33acrossBidAdapter.js +24 -14
  149. package/modules/33acrossIdSystem.js +15 -4
  150. package/modules/adagioBidAdapter.js +0 -1
  151. package/modules/admanBidAdapter.js +4 -0
  152. package/modules/brandmetricsRtdProvider.js +36 -2
  153. package/modules/brandmetricsRtdProvider.md +17 -2
  154. package/modules/gdprEnforcement.js +27 -22
  155. package/modules/gridBidAdapter.js +19 -0
  156. package/modules/ixBidAdapter.js +40 -2
  157. package/modules/kargoBidAdapter.js +4 -0
  158. package/modules/minutemediaBidAdapter.js +17 -2
  159. package/modules/oguryBidAdapter.js +29 -16
  160. package/modules/pubmaticBidAdapter.js +16 -1
  161. package/modules/pulsepointBidAdapter.js +63 -424
  162. package/modules/pulsepointBidAdapter.md +39 -45
  163. package/modules/sharedIdSystem.js +1 -1
  164. package/modules/sovrnBidAdapter.js +5 -1
  165. package/modules/stroeerCoreBidAdapter.js +2 -3
  166. package/modules/teadsBidAdapter.js +2 -0
  167. package/modules/topicsFpdModule.js +4 -1
  168. package/modules/topicsFpdModule.md +4 -0
  169. package/modules/userId/index.js +2 -2
  170. package/modules/vidazooBidAdapter.js +5 -7
  171. package/modules/voxBidAdapter.js +16 -5
  172. package/modules/yahoosspBidAdapter.js +38 -33
  173. package/modules/yahoosspBidAdapter.md +96 -95
  174. package/modules/yandexBidAdapter.js +12 -15
  175. package/package.json +1 -1
  176. package/src/activities/redactor.js +1 -1
  177. package/src/auction.js +24 -2
  178. package/src/constants.json +3 -1
  179. package/src/fpd/sua.js +8 -2
  180. package/test/spec/auctionmanager_spec.js +29 -1
  181. package/test/spec/fpd/enrichment_spec.js +7 -1
  182. package/test/spec/fpd/sua_spec.js +12 -0
  183. package/test/spec/modules/33acrossBidAdapter_spec.js +188 -35
  184. package/test/spec/modules/33acrossIdSystem_spec.js +122 -27
  185. package/test/spec/modules/adagioBidAdapter_spec.js +0 -1
  186. package/test/spec/modules/brandmetricsRtdProvider_spec.js +69 -7
  187. package/test/spec/modules/gdprEnforcement_spec.js +43 -2
  188. package/test/spec/modules/gridBidAdapter_spec.js +42 -0
  189. package/test/spec/modules/ixBidAdapter_spec.js +72 -0
  190. package/test/spec/modules/kargoBidAdapter_spec.js +121 -106
  191. package/test/spec/modules/minutemediaBidAdapter_spec.js +36 -5
  192. package/test/spec/modules/oguryBidAdapter_spec.js +208 -108
  193. package/test/spec/modules/pubmaticBidAdapter_spec.js +119 -0
  194. package/test/spec/modules/pulsepointBidAdapter_spec.js +225 -486
  195. package/test/spec/modules/sovrnBidAdapter_spec.js +24 -4
  196. package/test/spec/modules/stroeerCoreBidAdapter_spec.js +8 -5
  197. package/test/spec/modules/teadsBidAdapter_spec.js +70 -21
  198. package/test/spec/modules/topicsFpdModule_spec.js +10 -4
  199. package/test/spec/modules/vidazooBidAdapter_spec.js +0 -5
  200. package/test/spec/modules/voxBidAdapter_spec.js +93 -0
  201. package/test/spec/modules/yahoosspBidAdapter_spec.js +402 -314
  202. package/test/spec/modules/yandexBidAdapter_spec.js +21 -3
  203. package/integrationExamples/gpt/inskin_example.html +0 -100
@@ -1,10 +1,21 @@
1
- import {expect, assert} from 'chai';
2
- import {spec} from 'modules/kargoBidAdapter.js';
3
- import {config} from 'src/config.js';
1
+ import { expect, assert } from 'chai';
2
+ import { spec } from 'modules/kargoBidAdapter.js';
3
+ import { config } from 'src/config.js';
4
4
  const utils = require('src/utils');
5
5
 
6
6
  describe('kargo adapter tests', function () {
7
7
  var sandbox, clock, frozenNow = new Date();
8
+ const testSchain = {
9
+ complete: 1,
10
+ nodes: [
11
+ {
12
+ 'asi': 'test-page.com',
13
+ 'hp': 1,
14
+ 'rid': '57bdd953-6e57-4d5b-9351-ed67ca238890',
15
+ 'sid': '8190248274'
16
+ }
17
+ ]
18
+ }
8
19
 
9
20
  beforeEach(function () {
10
21
  sandbox = sinon.sandbox.create();
@@ -16,25 +27,25 @@ describe('kargo adapter tests', function () {
16
27
  clock.restore();
17
28
  });
18
29
 
19
- describe('bid request validity', function() {
20
- it('passes when the bid includes a placement ID', function() {
21
- assert(spec.isBidRequestValid({params: {placementId: 'foo'}}) === true);
30
+ describe('bid request validity', function () {
31
+ it('passes when the bid includes a placement ID', function () {
32
+ assert(spec.isBidRequestValid({ params: { placementId: 'foo' } }) === true);
22
33
  });
23
34
 
24
- it('fails when the bid does not include a placement ID', function() {
25
- assert(spec.isBidRequestValid({params: {}}) === false);
35
+ it('fails when the bid does not include a placement ID', function () {
36
+ assert(spec.isBidRequestValid({ params: {} }) === false);
26
37
  });
27
38
 
28
- it('fails when bid is falsey', function() {
39
+ it('fails when bid is falsey', function () {
29
40
  assert(spec.isBidRequestValid() === false);
30
41
  });
31
42
 
32
- it('fails when the bid has no params at all', function() {
43
+ it('fails when the bid has no params at all', function () {
33
44
  assert(spec.isBidRequestValid({}) === false);
34
45
  });
35
46
  });
36
47
 
37
- describe('build request', function() {
48
+ describe('build request', function () {
38
49
  var bids, undefinedCurrency, noAdServerCurrency, nonUSDAdServerCurrency, cookies = [], localStorageItems = [], sessionIds = [], requestCount = 0;
39
50
 
40
51
  beforeEach(function () {
@@ -46,7 +57,7 @@ describe('kargo adapter tests', function () {
46
57
  undefinedCurrency = false;
47
58
  noAdServerCurrency = false;
48
59
  nonUSDAdServerCurrency = false;
49
- sandbox.stub(config, 'getConfig').callsFake(function(key) {
60
+ sandbox.stub(config, 'getConfig').callsFake(function (key) {
50
61
  if (key === 'currency') {
51
62
  if (undefinedCurrency) {
52
63
  return undefined;
@@ -55,9 +66,9 @@ describe('kargo adapter tests', function () {
55
66
  return {};
56
67
  }
57
68
  if (nonUSDAdServerCurrency) {
58
- return {adServerCurrency: 'EUR'};
69
+ return { adServerCurrency: 'EUR' };
59
70
  }
60
- return {adServerCurrency: 'USD'};
71
+ return { adServerCurrency: 'USD' };
61
72
  }
62
73
  if (key === 'debug') return true;
63
74
  if (key === 'deviceAccess') return true;
@@ -85,6 +96,7 @@ describe('kargo adapter tests', function () {
85
96
  bidRequestsCount: 1,
86
97
  bidderRequestsCount: 2,
87
98
  bidderWinsCount: 3,
99
+ schain: testSchain,
88
100
  userId: {
89
101
  tdid: 'ed1562d5-e52b-406f-8e65-e5ab3ed5583c'
90
102
  },
@@ -110,20 +122,20 @@ describe('kargo adapter tests', function () {
110
122
  sua: {
111
123
  platform: {
112
124
  brand: 'macOS',
113
- version: [ '12', '6', '0' ]
125
+ version: ['12', '6', '0']
114
126
  },
115
127
  browsers: [
116
128
  {
117
129
  brand: 'Chromium',
118
- version: [ '106', '0', '5249', '119' ]
130
+ version: ['106', '0', '5249', '119']
119
131
  },
120
132
  {
121
133
  brand: 'Google Chrome',
122
- version: [ '106', '0', '5249', '119' ]
134
+ version: ['106', '0', '5249', '119']
123
135
  },
124
136
  {
125
137
  brand: 'Not;A=Brand',
126
- version: [ '99', '0', '0', '0' ]
138
+ version: ['99', '0', '0', '0']
127
139
  }
128
140
  ],
129
141
  mobile: 1,
@@ -397,6 +409,7 @@ describe('kargo adapter tests', function () {
397
409
  url: 'https://www.prebid.org',
398
410
  timeout: 200,
399
411
  ts: frozenNow.getTime(),
412
+ schain: testSchain,
400
413
  device: {
401
414
  size: [
402
415
  screen.width,
@@ -405,20 +418,20 @@ describe('kargo adapter tests', function () {
405
418
  sua: {
406
419
  platform: {
407
420
  brand: 'macOS',
408
- version: [ '12', '6', '0' ]
421
+ version: ['12', '6', '0']
409
422
  },
410
423
  browsers: [
411
424
  {
412
425
  brand: 'Chromium',
413
- version: [ '106', '0', '5249', '119' ]
426
+ version: ['106', '0', '5249', '119']
414
427
  },
415
428
  {
416
429
  brand: 'Google Chrome',
417
- version: [ '106', '0', '5249', '119' ]
430
+ version: ['106', '0', '5249', '119']
418
431
  },
419
432
  {
420
433
  brand: 'Not;A=Brand',
421
- version: [ '99', '0', '0', '0' ]
434
+ version: ['99', '0', '0', '0']
422
435
  }
423
436
  ],
424
437
  mobile: 1,
@@ -571,84 +584,84 @@ describe('kargo adapter tests', function () {
571
584
  }
572
585
  }
573
586
 
574
- it('works when all params and localstorage and cookies are correctly set', function() {
587
+ it('works when all params and localstorage and cookies are correctly set', function () {
575
588
  initializeKrgCrb();
576
589
  initializePageView();
577
590
  testBuildRequests(getExpectedKrakenParams(generateRawCRB(getKrgCrbOldStyle(), getKrgCrb()), generatePageView()));
578
591
  });
579
592
 
580
- it('works when all params and cookies are correctly set but no localstorage', function() {
593
+ it('works when all params and cookies are correctly set but no localstorage', function () {
581
594
  initializeKrgCrb(true);
582
595
  testBuildRequests(getExpectedKrakenParams(generateRawCRB(getKrgCrbOldStyle())));
583
596
  });
584
597
 
585
- it('gracefully handles nothing being set', function() {
598
+ it('gracefully handles nothing being set', function () {
586
599
  testBuildRequests(getExpectedKrakenParams(undefined, undefined, true));
587
600
  });
588
601
 
589
- it('gracefully handles browsers without localStorage', function() {
602
+ it('gracefully handles browsers without localStorage', function () {
590
603
  simulateNoLocalStorage();
591
604
  testBuildRequests(getExpectedKrakenParams(undefined, undefined, true));
592
605
  });
593
606
 
594
- it('handles empty yet valid Kargo CRB', function() {
607
+ it('handles empty yet valid Kargo CRB', function () {
595
608
  initializeEmptyKrgCrb();
596
609
  initializeEmptyKrgCrbCookie();
597
610
  initializePageView();
598
611
  testBuildRequests(getExpectedKrakenParams(generateRawCRB(getEmptyKrgCrbOldStyle(), getEmptyKrgCrb()), generatePageView(), true));
599
612
  });
600
613
 
601
- it('handles broken Kargo CRBs where base64 encoding is invalid', function() {
614
+ it('handles broken Kargo CRBs where base64 encoding is invalid', function () {
602
615
  initializeInvalidKrgCrbType1();
603
616
  initializePageView();
604
617
  testBuildRequests(getExpectedKrakenParams(generateRawCRB(undefined, getInvalidKrgCrbType1()), generatePageView(), true));
605
618
  });
606
619
 
607
- it('handles broken Kargo CRBs where top level JSON is invalid on cookie', function() {
620
+ it('handles broken Kargo CRBs where top level JSON is invalid on cookie', function () {
608
621
  initializeInvalidKrgCrbType1Cookie();
609
622
  initializePageView();
610
623
  testBuildRequests(getExpectedKrakenParams(generateRawCRB(getInvalidKrgCrbType1()), generatePageView(), true));
611
624
  });
612
625
 
613
- it('handles broken Kargo CRBs where decoded JSON is invalid', function() {
626
+ it('handles broken Kargo CRBs where decoded JSON is invalid', function () {
614
627
  initializeInvalidKrgCrbType2();
615
628
  initializePageView();
616
629
  testBuildRequests(getExpectedKrakenParams(generateRawCRB(undefined, getInvalidKrgCrbType2()), generatePageView(), true));
617
630
  });
618
631
 
619
- it('handles broken Kargo CRBs where inner base 64 is invalid on cookie', function() {
632
+ it('handles broken Kargo CRBs where inner base 64 is invalid on cookie', function () {
620
633
  initializeInvalidKrgCrbType2Cookie();
621
634
  initializePageView();
622
635
  testBuildRequests(getExpectedKrakenParams(generateRawCRB(getInvalidKrgCrbType2OldStyle()), generatePageView(), true));
623
636
  });
624
637
 
625
- it('handles broken Kargo CRBs where inner JSON is invalid on cookie', function() {
638
+ it('handles broken Kargo CRBs where inner JSON is invalid on cookie', function () {
626
639
  initializeInvalidKrgCrbType3Cookie();
627
640
  initializePageView();
628
641
  testBuildRequests(getExpectedKrakenParams(generateRawCRB(getInvalidKrgCrbType3OldStyle()), generatePageView(), true));
629
642
  });
630
643
 
631
- it('handles broken Kargo CRBs where inner JSON is falsey', function() {
644
+ it('handles broken Kargo CRBs where inner JSON is falsey', function () {
632
645
  initializeInvalidKrgCrbType4Cookie();
633
646
  initializePageView();
634
647
  testBuildRequests(getExpectedKrakenParams(generateRawCRB(getInvalidKrgCrbType4OldStyle()), generatePageView(), true));
635
648
  });
636
649
 
637
- it('handles a non-existant currency object on the config', function() {
650
+ it('handles a non-existant currency object on the config', function () {
638
651
  simulateNoCurrencyObject();
639
652
  initializeKrgCrb();
640
653
  initializePageView();
641
654
  testBuildRequests(getExpectedKrakenParams(generateRawCRB(getKrgCrbOldStyle(), getKrgCrb()), generatePageView()));
642
655
  });
643
656
 
644
- it('handles no ad server currency being set on the currency object in the config', function() {
657
+ it('handles no ad server currency being set on the currency object in the config', function () {
645
658
  simulateNoAdServerCurrency();
646
659
  initializeKrgCrb();
647
660
  initializePageView();
648
661
  testBuildRequests(getExpectedKrakenParams(generateRawCRB(getKrgCrbOldStyle(), getKrgCrb()), generatePageView()));
649
662
  });
650
663
 
651
- it('handles non-USD ad server currency being set on the currency object in the config', function() {
664
+ it('handles non-USD ad server currency being set on the currency object in the config', function () {
652
665
  simulateNonUSDAdServerCurrency();
653
666
  initializeKrgCrb();
654
667
  initializePageView();
@@ -663,67 +676,69 @@ describe('kargo adapter tests', function () {
663
676
  });
664
677
  });
665
678
 
666
- describe('response handler', function() {
667
- it('handles bid responses', function() {
668
- var resp = spec.interpretResponse({body: {
669
- 1: {
670
- id: 'foo',
671
- cpm: 3,
672
- adm: '<div id="1"></div>',
673
- width: 320,
674
- height: 50,
675
- metadata: {}
676
- },
677
- 2: {
678
- id: 'bar',
679
- cpm: 2.5,
680
- adm: '<div id="2"></div>',
681
- width: 300,
682
- height: 250,
683
- targetingCustom: 'dmpmptest1234',
684
- metadata: {
685
- landingPageDomain: ['https://foobar.com']
679
+ describe('response handler', function () {
680
+ it('handles bid responses', function () {
681
+ var resp = spec.interpretResponse({
682
+ body: {
683
+ 1: {
684
+ id: 'foo',
685
+ cpm: 3,
686
+ adm: '<div id="1"></div>',
687
+ width: 320,
688
+ height: 50,
689
+ metadata: {}
690
+ },
691
+ 2: {
692
+ id: 'bar',
693
+ cpm: 2.5,
694
+ adm: '<div id="2"></div>',
695
+ width: 300,
696
+ height: 250,
697
+ targetingCustom: 'dmpmptest1234',
698
+ metadata: {
699
+ landingPageDomain: ['https://foobar.com']
700
+ }
701
+ },
702
+ 3: {
703
+ id: 'bar',
704
+ cpm: 2.5,
705
+ adm: '<div id="2"></div>',
706
+ width: 300,
707
+ height: 250
708
+ },
709
+ 4: {
710
+ id: 'bar',
711
+ cpm: 2.5,
712
+ adm: '<div id="4"></div>',
713
+ width: 300,
714
+ height: 250,
715
+ mediaType: 'banner',
716
+ metadata: {},
717
+ currency: 'EUR'
718
+ },
719
+ 5: {
720
+ id: 'bar',
721
+ cpm: 2.5,
722
+ adm: '<VAST></VAST>',
723
+ width: 300,
724
+ height: 250,
725
+ mediaType: 'video',
726
+ metadata: {},
727
+ currency: 'EUR'
728
+ },
729
+ 6: {
730
+ id: 'bar',
731
+ cpm: 2.5,
732
+ adm: '',
733
+ admUrl: 'https://foobar.com/vast_adm',
734
+ width: 300,
735
+ height: 250,
736
+ mediaType: 'video',
737
+ metadata: {},
738
+ currency: 'EUR'
686
739
  }
687
- },
688
- 3: {
689
- id: 'bar',
690
- cpm: 2.5,
691
- adm: '<div id="2"></div>',
692
- width: 300,
693
- height: 250
694
- },
695
- 4: {
696
- id: 'bar',
697
- cpm: 2.5,
698
- adm: '<div id="4"></div>',
699
- width: 300,
700
- height: 250,
701
- mediaType: 'banner',
702
- metadata: {},
703
- currency: 'EUR'
704
- },
705
- 5: {
706
- id: 'bar',
707
- cpm: 2.5,
708
- adm: '<VAST></VAST>',
709
- width: 300,
710
- height: 250,
711
- mediaType: 'video',
712
- metadata: {},
713
- currency: 'EUR'
714
- },
715
- 6: {
716
- id: 'bar',
717
- cpm: 2.5,
718
- adm: '',
719
- admUrl: 'https://foobar.com/vast_adm',
720
- width: 300,
721
- height: 250,
722
- mediaType: 'video',
723
- metadata: {},
724
- currency: 'EUR'
725
740
  }
726
- }}, {
741
+ }, {
727
742
  currency: 'USD',
728
743
  bids: [{
729
744
  bidId: 1,
@@ -854,7 +869,7 @@ describe('kargo adapter tests', function () {
854
869
  });
855
870
  });
856
871
 
857
- describe('user sync handler', function() {
872
+ describe('user sync handler', function () {
858
873
  const clientId = '74c81cbb-7d07-46d9-be9b-68ccb291c949';
859
874
  var shouldSimulateOutdatedBrowser, crb, isActuallyOutdatedBrowser;
860
875
 
@@ -875,7 +890,7 @@ describe('kargo adapter tests', function () {
875
890
  if (!window.crypto) {
876
891
  isActuallyOutdatedBrowser = true;
877
892
  } else {
878
- sandbox.stub(crypto, 'getRandomValues').callsFake(function(buf) {
893
+ sandbox.stub(crypto, 'getRandomValues').callsFake(function (buf) {
879
894
  if (shouldSimulateOutdatedBrowser) {
880
895
  throw new Error('Could not generate random values');
881
896
  }
@@ -887,13 +902,13 @@ describe('kargo adapter tests', function () {
887
902
  });
888
903
  }
889
904
 
890
- sandbox.stub(spec, '_getCrb').callsFake(function() {
905
+ sandbox.stub(spec, '_getCrb').callsFake(function () {
891
906
  return crb;
892
907
  });
893
908
  });
894
909
 
895
910
  function getUserSyncsWhenAllowed(gdprConsent, usPrivacy, gppConsent) {
896
- return spec.getUserSyncs({iframeEnabled: true}, null, gdprConsent, usPrivacy, gppConsent);
911
+ return spec.getUserSyncs({ iframeEnabled: true }, null, gdprConsent, usPrivacy, gppConsent);
897
912
  }
898
913
 
899
914
  function getUserSyncsWhenForbidden() {
@@ -931,26 +946,26 @@ describe('kargo adapter tests', function () {
931
946
  }
932
947
  }
933
948
 
934
- it('handles user syncs when there is a client id', function() {
949
+ it('handles user syncs when there is a client id', function () {
935
950
  turnOnClientId();
936
951
  safelyRun(() => expect(getUserSyncsWhenAllowed()).to.deep.equal(getSyncUrls()));
937
952
  });
938
953
 
939
- it('no user syncs when there is no client id', function() {
954
+ it('no user syncs when there is no client id', function () {
940
955
  safelyRun(() => expect(getUserSyncsWhenAllowed()).to.be.an('array').that.is.empty);
941
956
  });
942
957
 
943
- it('no user syncs when there is no us privacy consent', function() {
958
+ it('no user syncs when there is no us privacy consent', function () {
944
959
  turnOnClientId();
945
960
  safelyRun(() => expect(getUserSyncsWhenAllowed(null, '1YYY')).to.be.an('array').that.is.empty);
946
961
  });
947
962
 
948
- it('pass through us privacy consent', function() {
963
+ it('pass through us privacy consent', function () {
949
964
  turnOnClientId();
950
965
  safelyRun(() => expect(getUserSyncsWhenAllowed(null, '1YNY')).to.deep.equal(getSyncUrls(0, '', '1YNY')));
951
966
  });
952
967
 
953
- it('pass through gdpr consent', function() {
968
+ it('pass through gdpr consent', function () {
954
969
  turnOnClientId();
955
970
  safelyRun(() => expect(getUserSyncsWhenAllowed({ gdprApplies: true, consentString: 'consentstring' })).to.deep.equal(getSyncUrls(1, 'consentstring', '')));
956
971
  });
@@ -960,13 +975,13 @@ describe('kargo adapter tests', function () {
960
975
  safelyRun(() => expect(getUserSyncsWhenAllowed(null, null, { consentString: 'gppString', applicableSections: [-1] })).to.deep.equal(getSyncUrls('', '', '', 'gppString', '-1')));
961
976
  });
962
977
 
963
- it('no user syncs when there is outdated browser', function() {
978
+ it('no user syncs when there is outdated browser', function () {
964
979
  turnOnClientId();
965
980
  simulateOutdatedBrowser();
966
981
  safelyRun(() => expect(getUserSyncsWhenAllowed()).to.be.an('array').that.is.empty);
967
982
  });
968
983
 
969
- it('no user syncs when no iframe syncing allowed', function() {
984
+ it('no user syncs when no iframe syncing allowed', function () {
970
985
  turnOnClientId();
971
986
  safelyRun(() => expect(getUserSyncsWhenForbidden()).to.be.an('array').that.is.empty);
972
987
  });
@@ -104,6 +104,9 @@ describe('minutemediaAdapter', function () {
104
104
  bidderCode: 'minutemedia',
105
105
  }
106
106
  const placementId = '12345678';
107
+ const api = [1, 2];
108
+ const mimes = ['application/javascript', 'video/mp4', 'video/quicktime'];
109
+ const protocols = [2, 3, 5, 6];
107
110
 
108
111
  it('sends the placementId to ENDPOINT via POST', function () {
109
112
  bidRequests[0].params.placementId = placementId;
@@ -111,15 +114,22 @@ describe('minutemediaAdapter', function () {
111
114
  expect(request.data.bids[0].placementId).to.equal(placementId);
112
115
  });
113
116
 
114
- it('sends bid request to ENDPOINT via POST', function () {
117
+ it('sends the plcmt to ENDPOINT via POST', function () {
115
118
  const request = spec.buildRequests(bidRequests, bidderRequest);
116
- expect(request.url).to.equal(ENDPOINT);
117
- expect(request.method).to.equal('POST');
119
+ expect(request.data.bids[0].plcmt).to.equal(1);
118
120
  });
119
121
 
120
- it('sends the plcmt to ENDPOINT via POST', function () {
122
+ it('sends the is_wrapper parameter to ENDPOINT via POST', function() {
121
123
  const request = spec.buildRequests(bidRequests, bidderRequest);
122
- expect(request.data.bids[0].plcmt).to.equal(1);
124
+ expect(request.data.params).to.be.an('object');
125
+ expect(request.data.params).to.have.property('is_wrapper');
126
+ expect(request.data.params.is_wrapper).to.equal(false);
127
+ });
128
+
129
+ it('sends bid request to ENDPOINT via POST', function () {
130
+ const request = spec.buildRequests(bidRequests, bidderRequest);
131
+ expect(request.url).to.equal(ENDPOINT);
132
+ expect(request.method).to.equal('POST');
123
133
  });
124
134
 
125
135
  it('sends bid request to TEST ENDPOINT via POST', function () {
@@ -133,6 +143,27 @@ describe('minutemediaAdapter', function () {
133
143
  expect(request.data.bids[0].bidId).to.equal('299ffc8cca0b87');
134
144
  });
135
145
 
146
+ it('should send the correct supported api array', function () {
147
+ bidRequests[0].mediaTypes.video.api = api;
148
+ const request = spec.buildRequests(bidRequests, bidderRequest);
149
+ expect(request.data.bids[0].api).to.be.an('array');
150
+ expect(request.data.bids[0].api).to.eql([1, 2]);
151
+ });
152
+
153
+ it('should send the correct mimes array', function () {
154
+ bidRequests[1].mediaTypes.banner.mimes = mimes;
155
+ const request = spec.buildRequests(bidRequests, bidderRequest);
156
+ expect(request.data.bids[1].mimes).to.be.an('array');
157
+ expect(request.data.bids[1].mimes).to.eql(['application/javascript', 'video/mp4', 'video/quicktime']);
158
+ });
159
+
160
+ it('should send the correct protocols array', function () {
161
+ bidRequests[0].mediaTypes.video.protocols = protocols;
162
+ const request = spec.buildRequests(bidRequests, bidderRequest);
163
+ expect(request.data.bids[0].protocols).to.be.an('array');
164
+ expect(request.data.bids[0].protocols).to.eql([2, 3, 5, 6]);
165
+ });
166
+
136
167
  it('should send the correct sizes array', function () {
137
168
  const request = spec.buildRequests(bidRequests, bidderRequest);
138
169
  expect(request.data.bids[0].sizes).to.be.an('array');