prebid.js 9.4.0 → 9.5.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 (363) hide show
  1. package/.eslintrc.js +31 -5
  2. package/.github/workflows/jscpd.yml +2 -2
  3. package/.github/workflows/linter.yml +107 -0
  4. package/creative/crossDomain.js +6 -3
  5. package/dist/33acrossAnalyticsAdapter.js +1 -1
  6. package/dist/33acrossBidAdapter.js +1 -1
  7. package/dist/33acrossIdSystem.js +1 -1
  8. package/dist/BTBidAdapter.js +1 -1
  9. package/dist/adagioAnalyticsAdapter.js +1 -1
  10. package/dist/adagioBidAdapter.js +1 -1
  11. package/dist/adagioRtdProvider.js +1 -1
  12. package/dist/adagioUtils.js +1 -1
  13. package/dist/addefendBidAdapter.js +1 -1
  14. package/dist/adgenerationBidAdapter.js +1 -1
  15. package/dist/adkernelAdnBidAdapter.js +1 -1
  16. package/dist/adkernelBidAdapter.js +1 -1
  17. package/dist/adkernelUtils.js +1 -0
  18. package/dist/adlooxRtdProvider.js +1 -1
  19. package/dist/admixerBidAdapter.js +1 -1
  20. package/dist/adqueryBidAdapter.js +1 -1
  21. package/dist/adrelevantisBidAdapter.js +1 -1
  22. package/dist/adstirBidAdapter.js +1 -1
  23. package/dist/adtrgtmeBidAdapter.js +1 -1
  24. package/dist/advRedAnalyticsAdapter.js +1 -0
  25. package/dist/adxcgAnalyticsAdapter.js +1 -1
  26. package/dist/adxcgBidAdapter.js +1 -1
  27. package/dist/adyoulikeBidAdapter.js +1 -1
  28. package/dist/agmaAnalyticsAdapter.js +1 -1
  29. package/dist/ajaBidAdapter.js +1 -1
  30. package/dist/akamaiDapRtdProvider.js +1 -1
  31. package/dist/amxBidAdapter.js +1 -1
  32. package/dist/amxIdSystem.js +1 -1
  33. package/dist/anonymisedRtdProvider.js +1 -1
  34. package/dist/apacdexBidAdapter.js +1 -1
  35. package/dist/appierAnalyticsAdapter.js +1 -1
  36. package/dist/appnexusBidAdapter.js +1 -1
  37. package/dist/asoBidAdapter.js +1 -1
  38. package/dist/axonixBidAdapter.js +1 -1
  39. package/dist/azerionedgeRtdProvider.js +1 -1
  40. package/dist/bidglassBidAdapter.js +1 -1
  41. package/dist/big-richmediaBidAdapter.js +1 -1
  42. package/dist/bridBidAdapter.js +1 -1
  43. package/dist/bridgewellBidAdapter.js +1 -1
  44. package/dist/brightMountainMediaBidAdapter.js +1 -1
  45. package/dist/carodaBidAdapter.js +1 -1
  46. package/dist/chtnwBidAdapter.js +1 -1
  47. package/dist/chunk-core.js +1 -1
  48. package/dist/concertBidAdapter.js +1 -1
  49. package/dist/connatixBidAdapter.js +1 -1
  50. package/dist/connectadBidAdapter.js +1 -1
  51. package/dist/consumableBidAdapter.js +1 -1
  52. package/dist/contxtfulRtdProvider.js +1 -1
  53. package/dist/conversantAnalyticsAdapter.js +1 -1
  54. package/dist/conversantBidAdapter.js +1 -1
  55. package/dist/craftBidAdapter.js +1 -1
  56. package/dist/criteoBidAdapter.js +1 -1
  57. package/dist/currencyUtils.js +1 -1
  58. package/dist/cwireBidAdapter.js +1 -1
  59. package/dist/dailymotionBidAdapter.js +1 -1
  60. package/dist/debugging-standalone.js +1 -1
  61. package/dist/dependencies.json +43 -7
  62. package/dist/dfpAdServerVideo.js +1 -1
  63. package/dist/dfpAdpod.js +1 -1
  64. package/dist/dfpUtils.js +1 -1
  65. package/dist/discoveryBidAdapter.js +1 -1
  66. package/dist/dspxBidAdapter.js +1 -1
  67. package/dist/dxkultureBidAdapter.js +1 -1
  68. package/dist/eightPodAnalyticsAdapter.js +1 -1
  69. package/dist/eightPodBidAdapter.js +1 -1
  70. package/dist/eplanningBidAdapter.js +1 -1
  71. package/dist/euidIdSystem.js +1 -1
  72. package/dist/exadsBidAdapter.js +1 -1
  73. package/dist/feedadBidAdapter.js +1 -1
  74. package/dist/finativeBidAdapter.js +1 -1
  75. package/dist/fintezaAnalyticsAdapter.js +1 -1
  76. package/dist/fpdUtils.js +1 -0
  77. package/dist/freewheel-sspBidAdapter.js +1 -1
  78. package/dist/gmosspBidAdapter.js +1 -1
  79. package/dist/goldbachBidAdapter.js +1 -1
  80. package/dist/gptPreAuction.js +1 -1
  81. package/dist/gptUtils.js +1 -1
  82. package/dist/greenbidsAnalyticsAdapter.js +1 -1
  83. package/dist/greenbidsRtdProvider.js +1 -1
  84. package/dist/gridBidAdapter.js +1 -1
  85. package/dist/growthCodeAnalyticsAdapter.js +1 -1
  86. package/dist/growthCodeRtdProvider.js +1 -1
  87. package/dist/gumgumBidAdapter.js +1 -1
  88. package/dist/h12mediaBidAdapter.js +1 -1
  89. package/dist/hypelabBidAdapter.js +1 -1
  90. package/dist/id5AnalyticsAdapter.js +1 -1
  91. package/dist/id5IdSystem.js +1 -1
  92. package/dist/imdsBidAdapter.js +1 -1
  93. package/dist/improvedigitalBidAdapter.js +1 -1
  94. package/dist/insticatorBidAdapter.js +1 -1
  95. package/dist/intentIqAnalyticsAdapter.js +1 -0
  96. package/dist/ixBidAdapter.js +1 -1
  97. package/dist/jixieBidAdapter.js +1 -1
  98. package/dist/justpremiumBidAdapter.js +1 -1
  99. package/dist/jwplayerBidAdapter.js +1 -1
  100. package/dist/jwplayerRtdProvider.js +1 -1
  101. package/dist/kargoBidAdapter.js +1 -1
  102. package/dist/kimberliteBidAdapter.js +1 -1
  103. package/dist/konduitAnalyticsAdapter.js +1 -1
  104. package/dist/kueezBidAdapter.js +1 -1
  105. package/dist/lassoBidAdapter.js +1 -1
  106. package/dist/lifestreetBidAdapter.js +1 -1
  107. package/dist/liveIntentIdSystem.js +1 -1
  108. package/dist/logicadBidAdapter.js +1 -1
  109. package/dist/loglyliftBidAdapter.js +1 -1
  110. package/dist/luceadBidAdapter.js +1 -1
  111. package/dist/mabidderBidAdapter.js +1 -1
  112. package/dist/magniteAnalyticsAdapter.js +1 -1
  113. package/dist/malltvAnalyticsAdapter.js +1 -1
  114. package/dist/marsmediaBidAdapter.js +1 -1
  115. package/dist/mediafuseBidAdapter.js +1 -1
  116. package/dist/mediagoBidAdapter.js +1 -1
  117. package/dist/medianetAnalyticsAdapter.js +1 -1
  118. package/dist/medianetBidAdapter.js +1 -1
  119. package/dist/mediasquareBidAdapter.js +1 -1
  120. package/dist/mgidBidAdapter.js +1 -1
  121. package/dist/minutemediaBidAdapter.js +1 -1
  122. package/dist/missenaBidAdapter.js +1 -1
  123. package/dist/mobianRtdProvider.js +1 -1
  124. package/dist/nextMillenniumBidAdapter.js +1 -1
  125. package/dist/nexx360BidAdapter.js +1 -1
  126. package/dist/nobidAnalyticsAdapter.js +1 -1
  127. package/dist/nobidBidAdapter.js +1 -1
  128. package/dist/not-for-prod/prebid.js +201 -193
  129. package/dist/oguryBidAdapter.js +1 -1
  130. package/dist/onetagBidAdapter.js +1 -1
  131. package/dist/ooloAnalyticsAdapter.js +1 -1
  132. package/dist/openwebBidAdapter.js +1 -1
  133. package/dist/openxBidAdapter.js +1 -1
  134. package/dist/optidigitalBidAdapter.js +1 -1
  135. package/dist/optoutBidAdapter.js +1 -1
  136. package/dist/orbidderBidAdapter.js +1 -1
  137. package/dist/outbrainBidAdapter.js +1 -1
  138. package/dist/paapi.js +1 -1
  139. package/dist/permutiveRtdProvider.js +1 -1
  140. package/dist/pixfutureBidAdapter.js +1 -1
  141. package/dist/playdigoBidAdapter.js +1 -1
  142. package/dist/prebidServerBidAdapter.js +1 -1
  143. package/dist/programmaticaBidAdapter.js +1 -1
  144. package/dist/publinkIdSystem.js +1 -1
  145. package/dist/publirBidAdapter.js +1 -1
  146. package/dist/pubmaticAnalyticsAdapter.js +1 -1
  147. package/dist/pubmaticBidAdapter.js +1 -1
  148. package/dist/pubwiseAnalyticsAdapter.js +1 -1
  149. package/dist/pubxaiAnalyticsAdapter.js +1 -1
  150. package/dist/pxyzBidAdapter.js +1 -1
  151. package/dist/quantcastBidAdapter.js +1 -1
  152. package/dist/readpeakBidAdapter.js +1 -1
  153. package/dist/relaidoBidAdapter.js +1 -1
  154. package/dist/relevatehealthBidAdapter.js +1 -1
  155. package/dist/retailspotBidAdapter.js +1 -1
  156. package/dist/rhythmoneBidAdapter.js +1 -1
  157. package/dist/ringieraxelspringerBidAdapter.js +1 -1
  158. package/dist/riseBidAdapter.js +1 -1
  159. package/dist/rubiconBidAdapter.js +1 -1
  160. package/dist/schainSerializer.js +1 -0
  161. package/dist/seedingAllianceBidAdapter.js +1 -1
  162. package/dist/seedtagBidAdapter.js +1 -1
  163. package/dist/sharethroughAnalyticsAdapter.js +1 -1
  164. package/dist/sharethroughBidAdapter.js +1 -1
  165. package/dist/shinezBidAdapter.js +1 -1
  166. package/dist/sizeMapping.js +1 -1
  167. package/dist/sizeUtils.js +1 -1
  168. package/dist/smaatoBidAdapter.js +1 -1
  169. package/dist/smartadserverBidAdapter.js +1 -1
  170. package/dist/smartxBidAdapter.js +1 -1
  171. package/dist/smilewantedBidAdapter.js +1 -1
  172. package/dist/snigelBidAdapter.js +1 -1
  173. package/dist/sonobiBidAdapter.js +1 -1
  174. package/dist/sovrnBidAdapter.js +1 -1
  175. package/dist/sspBCBidAdapter.js +1 -1
  176. package/dist/stnBidAdapter.js +1 -1
  177. package/dist/stvBidAdapter.js +1 -1
  178. package/dist/sublimeBidAdapter.js +1 -1
  179. package/dist/symitriDapRtdProvider.js +1 -0
  180. package/dist/taboolaBidAdapter.js +1 -1
  181. package/dist/tappxBidAdapter.js +1 -1
  182. package/dist/targetVideoBidAdapter.js +1 -1
  183. package/dist/targetVideoUtils.js +1 -0
  184. package/dist/teadsBidAdapter.js +1 -1
  185. package/dist/terceptAnalyticsAdapter.js +1 -1
  186. package/dist/themoneytizerBidAdapter.js +1 -1
  187. package/dist/trionBidAdapter.js +1 -1
  188. package/dist/tripleliftBidAdapter.js +1 -1
  189. package/dist/ttdBidAdapter.js +1 -1
  190. package/dist/ucfunnelAnalyticsAdapter.js +1 -1
  191. package/dist/uid2IdSystem.js +1 -1
  192. package/dist/underdogmediaBidAdapter.js +1 -1
  193. package/dist/undertoneBidAdapter.js +1 -1
  194. package/dist/unrulyBidAdapter.js +1 -1
  195. package/dist/userAgentUtils.js +1 -0
  196. package/dist/utiqIdSystem.js +1 -1
  197. package/dist/vidazooUtils.js +1 -1
  198. package/dist/videobyteBidAdapter.js +1 -1
  199. package/dist/visxBidAdapter.js +1 -1
  200. package/dist/vuukleBidAdapter.js +1 -1
  201. package/dist/widespaceBidAdapter.js +1 -1
  202. package/dist/winrBidAdapter.js +1 -1
  203. package/dist/yahooAdsBidAdapter.js +1 -1
  204. package/dist/yandexIdSystem.js +1 -1
  205. package/dist/yieldmoBidAdapter.js +1 -1
  206. package/dist/yieldoneAnalyticsAdapter.js +1 -1
  207. package/integrationExamples/gpt/x-domain/creative.html +1 -1
  208. package/libraries/adkernelUtils/adkernelUtils.js +11 -0
  209. package/libraries/currencyUtils/floor.js +23 -0
  210. package/libraries/dfpUtils/dfpUtils.js +7 -0
  211. package/libraries/fpdUtils/deviceInfo.js +58 -0
  212. package/libraries/fpdUtils/pageInfo.js +73 -0
  213. package/libraries/gptUtils/gptUtils.js +23 -1
  214. package/libraries/schainSerializer/schainSerializer.js +24 -0
  215. package/libraries/sizeUtils/tranformSize.js +43 -0
  216. package/libraries/targetVideoUtils/bidderUtils.js +178 -0
  217. package/libraries/targetVideoUtils/constants.js +23 -0
  218. package/libraries/userAgentUtils/index.js +58 -0
  219. package/libraries/userAgentUtils/userAgentTypes.enums.js +22 -0
  220. package/modules/.submodules.json +1 -0
  221. package/modules/33acrossAnalyticsAdapter.js +2 -0
  222. package/modules/adagioBidAdapter.js +1 -1
  223. package/modules/adagioRtdProvider.js +18 -4
  224. package/modules/adkernelAdnBidAdapter.js +1 -12
  225. package/modules/adkernelBidAdapter.js +4 -13
  226. package/modules/adlooxAnalyticsAdapter.js +1 -0
  227. package/modules/admixerBidAdapter.js +10 -6
  228. package/modules/admixerBidAdapter.md +7 -10
  229. package/modules/adtrgtmeBidAdapter.js +1 -1
  230. package/modules/advRedAnalyticsAdapter.js +198 -0
  231. package/modules/advRedAnalyticsAdapter.md +30 -0
  232. package/modules/akamaiDapRtdProvider.js +19 -798
  233. package/modules/anonymisedRtdProvider.js +5 -1
  234. package/modules/anonymisedRtdProvider.md +1 -1
  235. package/modules/apacdexBidAdapter.js +1 -1
  236. package/modules/appnexusBidAdapter.js +56 -2
  237. package/modules/automatadAnalyticsAdapter.js +2 -0
  238. package/modules/azerionedgeRtdProvider.js +13 -3
  239. package/modules/azerionedgeRtdProvider.md +0 -17
  240. package/modules/bridBidAdapter.js +47 -47
  241. package/modules/cleanioRtdProvider.js +1 -0
  242. package/modules/concertBidAdapter.js +1 -1
  243. package/modules/connatixBidAdapter.js +36 -8
  244. package/modules/connectIdSystem.js +3 -1
  245. package/modules/contxtfulRtdProvider.js +20 -2
  246. package/modules/contxtfulRtdProvider.md +1 -0
  247. package/modules/craftBidAdapter.js +1 -1
  248. package/modules/criteoBidAdapter.js +1 -1
  249. package/modules/cwireBidAdapter.js +5 -1
  250. package/modules/dailymotionBidAdapter.js +85 -65
  251. package/modules/debugging/debugging.js +3 -0
  252. package/modules/dfpAdServerVideo.js +15 -33
  253. package/modules/dfpAdpod.js +2 -6
  254. package/modules/dgkeywordRtdProvider.js +2 -0
  255. package/modules/discoveryBidAdapter.js +26 -210
  256. package/modules/dspxBidAdapter.js +176 -54
  257. package/modules/eightPodAnalyticsAdapter.js +28 -34
  258. package/modules/eightPodBidAdapter.js +113 -57
  259. package/modules/fintezaAnalyticsAdapter.js +9 -4
  260. package/modules/goldbachBidAdapter.js +1 -1
  261. package/modules/gptPreAuction.js +63 -4
  262. package/modules/growthCodeAnalyticsAdapter.js +1 -1
  263. package/modules/growthCodeRtdProvider.js +1 -1
  264. package/modules/gumgumBidAdapter.js +14 -10
  265. package/modules/improvedigitalBidAdapter.js +1 -1
  266. package/modules/intentIqAnalyticsAdapter.js +234 -0
  267. package/modules/intentIqAnalyticsAdapter.md +27 -0
  268. package/modules/intentIqIdSystem.md +0 -0
  269. package/modules/jwplayerBidAdapter.js +1 -1
  270. package/modules/jwplayerRtdProvider.js +26 -6
  271. package/modules/jwplayerVideoProvider.js +6 -0
  272. package/modules/mediafuseBidAdapter.js +1 -1
  273. package/modules/mediagoBidAdapter.js +7 -176
  274. package/modules/medianetBidAdapter.js +101 -40
  275. package/modules/mgidBidAdapter.js +3 -1
  276. package/modules/mobianRtdProvider.js +16 -2
  277. package/modules/nextMillenniumBidAdapter.js +1 -27
  278. package/modules/nobidBidAdapter.js +1 -1
  279. package/modules/optoutBidAdapter.js +1 -1
  280. package/modules/paapi.js +48 -35
  281. package/modules/permutiveRtdProvider.js +72 -22
  282. package/modules/playdigoBidAdapter.js +4 -2
  283. package/modules/prebidServerBidAdapter/index.js +4 -2
  284. package/modules/prebidServerBidAdapter/ortbConverter.js +1 -0
  285. package/modules/programmaticaBidAdapter.js +1 -1
  286. package/modules/pubmaticBidAdapter.js +12 -0
  287. package/modules/pubxaiAnalyticsAdapter.js +306 -164
  288. package/modules/relevatehealthBidAdapter.js +2 -1
  289. package/modules/richaudienceBidAdapter.js +1 -1
  290. package/modules/rtdModule/index.js +5 -3
  291. package/modules/sirdataRtdProvider.js +2 -0
  292. package/modules/sizeMapping.js +2 -5
  293. package/modules/smaatoBidAdapter.js +18 -1
  294. package/modules/smilewantedBidAdapter.js +26 -22
  295. package/modules/snigelBidAdapter.js +1 -1
  296. package/modules/sonobiBidAdapter.js +5 -10
  297. package/modules/symitriDapRtdProvider.js +812 -0
  298. package/modules/symitriDapRtdProvider.md +49 -0
  299. package/modules/targetVideoBidAdapter.js +120 -152
  300. package/modules/targetVideoBidAdapter.md +20 -3
  301. package/modules/userId/eids.js +3 -0
  302. package/modules/utiqIdSystem.js +12 -10
  303. package/modules/validationFpdModule/index.js +22 -17
  304. package/modules/videojsVideoProvider.js +3 -0
  305. package/modules/visxBidAdapter.js +1 -1
  306. package/modules/winrBidAdapter.js +2 -27
  307. package/modules/yahooAdsBidAdapter.js +1 -1
  308. package/modules/yandexIdSystem.js +1 -1
  309. package/package.json +4 -4
  310. package/plugins/eslint/index.js +73 -45
  311. package/src/adRendering.js +7 -3
  312. package/src/adloader.js +1 -0
  313. package/src/ajax.js +15 -0
  314. package/src/config.js +0 -4
  315. package/src/debugging.js +1 -0
  316. package/src/secureCreatives.js +1 -1
  317. package/src/storageManager.js +62 -73
  318. package/src/targeting.js +26 -20
  319. package/src/utils.js +9 -0
  320. package/test/pages/banner_sync.html +97 -0
  321. package/test/pages/consent_mgt_gdpr.html +1 -1
  322. package/test/spec/ajax_spec.js +11 -0
  323. package/test/spec/creative/crossDomainCreative_spec.js +26 -9
  324. package/test/spec/e2e/banner/basic_banner_ad.spec.js +20 -14
  325. package/test/spec/fpd/gdpr_spec.js +1 -1
  326. package/test/spec/libraries/userAgentUtils_spec.js +109 -0
  327. package/test/spec/modules/adagioRtdProvider_spec.js +72 -0
  328. package/test/spec/modules/admixerBidAdapter_spec.js +21 -17
  329. package/test/spec/modules/advRedAnalyticsAdapter_spec.js +114 -0
  330. package/test/spec/modules/adxcgBidAdapter_spec.js +1 -1
  331. package/test/spec/modules/appnexusBidAdapter_spec.js +36 -0
  332. package/test/spec/modules/azerionedgeRtdProvider_spec.js +36 -21
  333. package/test/spec/modules/connatixBidAdapter_spec.js +55 -2
  334. package/test/spec/modules/consentManagement_spec.js +1 -1
  335. package/test/spec/modules/contxtfulRtdProvider_spec.js +6 -0
  336. package/test/spec/modules/dailymotionBidAdapter_spec.js +497 -4
  337. package/test/spec/modules/discoveryBidAdapter_spec.js +9 -6
  338. package/test/spec/modules/dspxBidAdapter_spec.js +188 -7
  339. package/test/spec/modules/eightPodAnalyticsAdapter_spec.js +22 -13
  340. package/test/spec/modules/gptPreAuction_spec.js +143 -1
  341. package/test/spec/modules/gumgumBidAdapter_spec.js +17 -0
  342. package/test/spec/modules/intentIqAnalyticsAdapter_spec.js +172 -0
  343. package/test/spec/modules/jwplayerRtdProvider_spec.js +61 -0
  344. package/test/spec/modules/mediagoBidAdapter_spec.js +34 -37
  345. package/test/spec/modules/medianetBidAdapter_spec.js +297 -16
  346. package/test/spec/modules/mgidBidAdapter_spec.js +15 -5
  347. package/test/spec/modules/mobianRtdProvider_spec.js +1 -3
  348. package/test/spec/modules/paapi_spec.js +177 -111
  349. package/test/spec/modules/permutiveRtdProvider_spec.js +42 -8
  350. package/test/spec/modules/prebidServerBidAdapter_spec.js +17 -3
  351. package/test/spec/modules/proxistoreBidAdapter_spec.js +1 -1
  352. package/test/spec/modules/pubmaticBidAdapter_spec.js +40 -0
  353. package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +970 -603
  354. package/test/spec/modules/pulsepointBidAdapter_spec.js +4 -4
  355. package/test/spec/modules/smaatoBidAdapter_spec.js +36 -1
  356. package/test/spec/modules/smilewantedBidAdapter_spec.js +57 -1
  357. package/test/spec/modules/symitriDapRtdProvider_spec.js +600 -0
  358. package/test/spec/modules/targetVideoBidAdapter_spec.js +112 -11
  359. package/test/spec/modules/yandexIdSystem_spec.js +6 -1
  360. package/test/spec/schainSerializer/schainSerializer_spec.js +138 -0
  361. package/test/spec/unit/core/storageManager_spec.js +68 -51
  362. package/test/spec/utils_spec.js +19 -0
  363. /package/src/utils/{gpdr.js → gdpr.js} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  spec,
4
4
  getBidFloor as connatixGetBidFloor
5
5
  } from '../../../modules/connatixBidAdapter.js';
6
- import { BANNER } from '../../../src/mediaTypes.js';
6
+ import { ADPOD, BANNER, VIDEO } from '../../../src/mediaTypes.js';
7
7
 
8
8
  describe('connatixBidAdapter', function () {
9
9
  let bid;
@@ -24,6 +24,26 @@ describe('connatixBidAdapter', function () {
24
24
  };
25
25
  };
26
26
 
27
+ function addVideoToBidMock(bid) {
28
+ const mediaTypes = {
29
+ video: {
30
+ context: 'instream',
31
+ w: 1280,
32
+ h: 720,
33
+ playerSize: [1280, 720],
34
+ placement: 1,
35
+ plcmt: 1,
36
+ api: [1, 2],
37
+ mimes: ['video/mp4', 'application/javascript'],
38
+ minduration: 30,
39
+ maxduration: 60,
40
+ startdelay: 0,
41
+ }
42
+ }
43
+
44
+ bid.mediaTypes = mediaTypes;
45
+ }
46
+
27
47
  describe('isBidRequestValid', function () {
28
48
  this.beforeEach(function () {
29
49
  bid = mockBidRequest();
@@ -52,7 +72,7 @@ describe('connatixBidAdapter', function () {
52
72
  delete bid.mediaTypes;
53
73
  expect(spec.isBidRequestValid(bid)).to.be.false;
54
74
  });
55
- it('Should return false if banner is missing from mediaTypes ', function () {
75
+ it('Should return false if both banner and video are missing from mediaTypes', function () {
56
76
  delete bid.mediaTypes.banner;
57
77
  expect(spec.isBidRequestValid(bid)).to.be.false;
58
78
  });
@@ -68,6 +88,15 @@ describe('connatixBidAdapter', function () {
68
88
  bid.mediaTypes.banner.sizes = [];
69
89
  expect(spec.isBidRequestValid(bid)).to.be.false;
70
90
  });
91
+ it('Should return true if video is set correctly', function () {
92
+ addVideoToBidMock(bid);
93
+ expect(spec.isBidRequestValid(bid)).to.be.true;
94
+ });
95
+ it('Should return false if context is set to adpod on video media type', function() {
96
+ addVideoToBidMock(bid);
97
+ bid.mediaTypes.video.context = ADPOD;
98
+ expect(spec.isBidRequestValid(bid)).to.be.false;
99
+ });
71
100
  it('Should return true if add an extra field was added to the bidRequest', function () {
72
101
  bid.params.test = 1;
73
102
  expect(spec.isBidRequestValid(bid)).to.be.true;
@@ -197,6 +226,30 @@ describe('connatixBidAdapter', function () {
197
226
  expect(bidResponses[0].cpm).to.equal(firstBidCpm);
198
227
  expect(bidResponses[1].cpm).to.equal(secondBidCpm);
199
228
  });
229
+
230
+ it('Should contain specific values for banner bids', function () {
231
+ const adHtml = 'ad html'
232
+ serverResponse.body.Bids = [ { ...Bid, Ad: adHtml } ];
233
+
234
+ const bidResponses = spec.interpretResponse(serverResponse);
235
+ const [ bidResponse ] = bidResponses;
236
+
237
+ expect(bidResponse.vastXml).to.be.undefined;
238
+ expect(bidResponse.ad).to.equal(adHtml);
239
+ expect(bidResponse.mediaType).to.equal(BANNER);
240
+ });
241
+
242
+ it('Should contain specific values for video bids', function () {
243
+ const adVastXml = 'ad vast xml'
244
+ serverResponse.body.Bids = [ { ...Bid, VastXml: adVastXml } ];
245
+
246
+ const bidResponses = spec.interpretResponse(serverResponse);
247
+ const [ bidResponse ] = bidResponses;
248
+
249
+ expect(bidResponse.ad).to.be.undefined;
250
+ expect(bidResponse.vastXml).to.equal(adVastXml);
251
+ expect(bidResponse.mediaType).to.equal(VIDEO);
252
+ });
200
253
  });
201
254
 
202
255
  describe('getUserSyncs', function() {
@@ -284,7 +284,7 @@ describe('consentManagement', function () {
284
284
  expect(consent).to.be.null;
285
285
  });
286
286
 
287
- it('should call gpdrDataHandler.setConsentData() when unknown CMP api is used', () => {
287
+ it('should call gdprDataHandler.setConsentData() when unknown CMP api is used', () => {
288
288
  setConsentConfig({gdpr: {cmpApi: 'invalid'}});
289
289
  let hookRan = false;
290
290
  requestBidsHook(() => { hookRan = true; }, {});
@@ -322,6 +322,8 @@ describe('contxtfulRtdProvider', function () {
322
322
  ];
323
323
 
324
324
  theories.forEach(([adUnits, expected, _description]) => {
325
+ // TODO: commented out because of rule violations
326
+ /*
325
327
  it('uses non-expired info from session storage and adds receptivity to the ad units using session storage', function (done) {
326
328
  let config = buildInitConfig(VERSION, CUSTOMER);
327
329
  // Simulate that there was a write to sessionStorage in the past.
@@ -335,6 +337,7 @@ describe('contxtfulRtdProvider', function () {
335
337
  done();
336
338
  }, TIMEOUT);
337
339
  });
340
+ */
338
341
  });
339
342
  });
340
343
 
@@ -453,6 +456,8 @@ describe('contxtfulRtdProvider', function () {
453
456
  });
454
457
 
455
458
  describe('getBidRequestData', function () {
459
+ // TODO: commented out because of rule violations
460
+ /*
456
461
  it('uses non-expired info from session storage and adds receptivity to the reqBidsConfigObj', function (done) {
457
462
  let config = buildInitConfig(VERSION, CUSTOMER);
458
463
  // Simulate that there was a write to sessionStorage in the past.
@@ -493,6 +498,7 @@ describe('contxtfulRtdProvider', function () {
493
498
  done();
494
499
  }, TIMEOUT);
495
500
  });
501
+ */
496
502
  });
497
503
 
498
504
  describe('getBidRequestData', function () {
@@ -165,6 +165,7 @@ describe('dailymotionBidAdapterTests', () => {
165
165
 
166
166
  const { data: reqData } = request;
167
167
 
168
+ expect(request.options.withCredentials).to.eql(false);
168
169
  expect(request.url).to.equal('https://pb.dmxleo.com');
169
170
 
170
171
  expect(reqData.pbv).to.eql('$prebid.version$');
@@ -178,7 +179,6 @@ describe('dailymotionBidAdapterTests', () => {
178
179
  expect(reqData.coppa).to.be.true;
179
180
  expect(reqData.request.auctionId).to.eql(bidRequestData[0].auctionId);
180
181
  expect(reqData.request.bidId).to.eql(bidRequestData[0].bidId);
181
-
182
182
  expect(reqData.request.mediaTypes.video).to.eql(bidRequestData[0].mediaTypes.video);
183
183
  expect(reqData.video_metadata).to.eql({
184
184
  description: bidRequestData[0].params.video.description,
@@ -204,6 +204,499 @@ describe('dailymotionBidAdapterTests', () => {
204
204
  });
205
205
  });
206
206
 
207
+ it('validates buildRequests with global consent', () => {
208
+ const bidRequestData = [{
209
+ auctionId: 'b06c5141-fe8f-4cdf-9d7d-54415490a917',
210
+ bidId: 123456,
211
+ adUnitCode: 'preroll',
212
+ mediaTypes: {
213
+ video: {
214
+ api: [2, 7],
215
+ mimes: ['video/mp4'],
216
+ minduration: 5,
217
+ maxduration: 30,
218
+ playbackmethod: [3],
219
+ plcmt: 1,
220
+ protocols: [1, 2, 3, 4, 5, 6, 7, 8],
221
+ skip: 1,
222
+ skipafter: 5,
223
+ skipmin: 10,
224
+ startdelay: 0,
225
+ w: 1280,
226
+ h: 720,
227
+ },
228
+ },
229
+ sizes: [[1920, 1080]],
230
+ params: {
231
+ apiKey: 'test_api_key',
232
+ video: {
233
+ description: 'this is a test video',
234
+ duration: 556,
235
+ iabcat1: ['IAB-1'],
236
+ iabcat2: ['6', '17'],
237
+ id: '54321',
238
+ lang: 'FR',
239
+ private: false,
240
+ tags: 'tag_1,tag_2,tag_3',
241
+ title: 'test video',
242
+ url: 'https://test.com/test',
243
+ topics: 'topic_1, topic_2',
244
+ xid: 'x123456',
245
+ livestream: 1,
246
+ isCreatedForKids: true,
247
+ videoViewsInSession: 2,
248
+ autoplay: true,
249
+ playerVolume: 8,
250
+ },
251
+ },
252
+ }];
253
+
254
+ const bidderRequestData = {
255
+ refererInfo: {
256
+ page: 'https://publisher.com',
257
+ },
258
+ uspConsent: '1YN-',
259
+ gdprConsent: {
260
+ apiVersion: 2,
261
+ consentString: 'xxx',
262
+ gdprApplies: true,
263
+ vendorData: {
264
+ hasGlobalConsent: true
265
+ }
266
+ },
267
+ gppConsent: {
268
+ gppString: 'xxx',
269
+ applicableSections: [5],
270
+ },
271
+ ortb2: {
272
+ regs: {
273
+ coppa: 1,
274
+ },
275
+ site: {
276
+ content: {
277
+ data: [
278
+ {
279
+ name: 'dataprovider.com',
280
+ ext: { segtax: 5 },
281
+ segment: [{ id: '200' }],
282
+ },
283
+ ],
284
+ },
285
+ },
286
+ },
287
+ };
288
+
289
+ const [request] = config.runWithBidder(
290
+ 'dailymotion',
291
+ () => spec.buildRequests(bidRequestData, bidderRequestData),
292
+ );
293
+
294
+ expect(request.options.withCredentials).to.eql(true);
295
+ });
296
+
297
+ it('validates buildRequests without gdpr applying', () => {
298
+ const bidRequestData = [{
299
+ auctionId: 'b06c5141-fe8f-4cdf-9d7d-54415490a917',
300
+ bidId: 123456,
301
+ adUnitCode: 'preroll',
302
+ mediaTypes: {
303
+ video: {
304
+ api: [2, 7],
305
+ mimes: ['video/mp4'],
306
+ minduration: 5,
307
+ maxduration: 30,
308
+ playbackmethod: [3],
309
+ plcmt: 1,
310
+ protocols: [1, 2, 3, 4, 5, 6, 7, 8],
311
+ skip: 1,
312
+ skipafter: 5,
313
+ skipmin: 10,
314
+ startdelay: 0,
315
+ w: 1280,
316
+ h: 720,
317
+ },
318
+ },
319
+ sizes: [[1920, 1080]],
320
+ params: {
321
+ apiKey: 'test_api_key',
322
+ video: {
323
+ description: 'this is a test video',
324
+ duration: 556,
325
+ iabcat1: ['IAB-1'],
326
+ iabcat2: ['6', '17'],
327
+ id: '54321',
328
+ lang: 'FR',
329
+ private: false,
330
+ tags: 'tag_1,tag_2,tag_3',
331
+ title: 'test video',
332
+ url: 'https://test.com/test',
333
+ topics: 'topic_1, topic_2',
334
+ xid: 'x123456',
335
+ livestream: 1,
336
+ isCreatedForKids: true,
337
+ videoViewsInSession: 2,
338
+ autoplay: true,
339
+ playerVolume: 8,
340
+ },
341
+ },
342
+ }];
343
+
344
+ const bidderRequestData = {
345
+ refererInfo: {
346
+ page: 'https://publisher.com',
347
+ },
348
+ uspConsent: '1YN-',
349
+ gdprConsent: {
350
+ apiVersion: 2,
351
+ consentString: 'xxx',
352
+ gdprApplies: false,
353
+ },
354
+ gppConsent: {
355
+ gppString: 'xxx',
356
+ applicableSections: [5],
357
+ },
358
+ ortb2: {
359
+ regs: {
360
+ coppa: 1,
361
+ },
362
+ site: {
363
+ content: {
364
+ data: [
365
+ {
366
+ name: 'dataprovider.com',
367
+ ext: { segtax: 5 },
368
+ segment: [{ id: '200' }],
369
+ },
370
+ ],
371
+ },
372
+ },
373
+ },
374
+ };
375
+
376
+ const [request] = config.runWithBidder(
377
+ 'dailymotion',
378
+ () => spec.buildRequests(bidRequestData, bidderRequestData),
379
+ );
380
+
381
+ expect(request.options.withCredentials).to.eql(true);
382
+ });
383
+
384
+ it('validates buildRequests with detailed consent, no legitimate interest', () => {
385
+ const bidRequestData = [{
386
+ auctionId: 'b06c5141-fe8f-4cdf-9d7d-54415490a917',
387
+ bidId: 123456,
388
+ adUnitCode: 'preroll',
389
+ mediaTypes: {
390
+ video: {
391
+ api: [2, 7],
392
+ mimes: ['video/mp4'],
393
+ minduration: 5,
394
+ maxduration: 30,
395
+ playbackmethod: [3],
396
+ plcmt: 1,
397
+ protocols: [1, 2, 3, 4, 5, 6, 7, 8],
398
+ skip: 1,
399
+ skipafter: 5,
400
+ skipmin: 10,
401
+ startdelay: 0,
402
+ w: 1280,
403
+ h: 720,
404
+ },
405
+ },
406
+ sizes: [[1920, 1080]],
407
+ params: {
408
+ apiKey: 'test_api_key',
409
+ video: {
410
+ description: 'this is a test video',
411
+ duration: 556,
412
+ iabcat1: ['IAB-1'],
413
+ iabcat2: ['6', '17'],
414
+ id: '54321',
415
+ lang: 'FR',
416
+ private: false,
417
+ tags: 'tag_1,tag_2,tag_3',
418
+ title: 'test video',
419
+ url: 'https://test.com/test',
420
+ topics: 'topic_1, topic_2',
421
+ xid: 'x123456',
422
+ livestream: 1,
423
+ isCreatedForKids: true,
424
+ videoViewsInSession: 2,
425
+ autoplay: true,
426
+ playerVolume: 8,
427
+ },
428
+ },
429
+ }];
430
+
431
+ const bidderRequestData = {
432
+ refererInfo: {
433
+ page: 'https://publisher.com',
434
+ },
435
+ uspConsent: '1YN-',
436
+ gdprConsent: {
437
+ apiVersion: 2,
438
+ consentString: 'xxx',
439
+ gdprApplies: true,
440
+ vendorData: {
441
+ hasGlobalConsent: false,
442
+ purpose: {
443
+ consents: {
444
+ 1: true,
445
+ 2: true,
446
+ 3: true,
447
+ 4: true,
448
+ 7: true,
449
+ 9: true,
450
+ 10: true,
451
+ },
452
+ },
453
+ vendor: {
454
+ consents: {
455
+ 573: true
456
+ }
457
+ },
458
+ },
459
+ },
460
+ gppConsent: {
461
+ gppString: 'xxx',
462
+ applicableSections: [5],
463
+ },
464
+ ortb2: {
465
+ regs: {
466
+ coppa: 1,
467
+ },
468
+ site: {
469
+ content: {
470
+ data: [
471
+ {
472
+ name: 'dataprovider.com',
473
+ ext: { segtax: 5 },
474
+ segment: [{ id: '200' }],
475
+ },
476
+ ],
477
+ },
478
+ },
479
+ },
480
+ };
481
+
482
+ const [request] = config.runWithBidder(
483
+ 'dailymotion',
484
+ () => spec.buildRequests(bidRequestData, bidderRequestData),
485
+ );
486
+
487
+ expect(request.options.withCredentials).to.eql(true);
488
+ });
489
+
490
+ it('validates buildRequests with detailed consent, with legitimate interest', () => {
491
+ const bidRequestData = [{
492
+ auctionId: 'b06c5141-fe8f-4cdf-9d7d-54415490a917',
493
+ bidId: 123456,
494
+ adUnitCode: 'preroll',
495
+ mediaTypes: {
496
+ video: {
497
+ api: [2, 7],
498
+ mimes: ['video/mp4'],
499
+ minduration: 5,
500
+ maxduration: 30,
501
+ playbackmethod: [3],
502
+ plcmt: 1,
503
+ protocols: [1, 2, 3, 4, 5, 6, 7, 8],
504
+ skip: 1,
505
+ skipafter: 5,
506
+ skipmin: 10,
507
+ startdelay: 0,
508
+ w: 1280,
509
+ h: 720,
510
+ },
511
+ },
512
+ sizes: [[1920, 1080]],
513
+ params: {
514
+ apiKey: 'test_api_key',
515
+ video: {
516
+ description: 'this is a test video',
517
+ duration: 556,
518
+ iabcat1: ['IAB-1'],
519
+ iabcat2: ['6', '17'],
520
+ id: '54321',
521
+ lang: 'FR',
522
+ private: false,
523
+ tags: 'tag_1,tag_2,tag_3',
524
+ title: 'test video',
525
+ url: 'https://test.com/test',
526
+ topics: 'topic_1, topic_2',
527
+ xid: 'x123456',
528
+ livestream: 1,
529
+ isCreatedForKids: true,
530
+ videoViewsInSession: 2,
531
+ autoplay: true,
532
+ playerVolume: 8,
533
+ },
534
+ },
535
+ }];
536
+
537
+ const bidderRequestData = {
538
+ refererInfo: {
539
+ page: 'https://publisher.com',
540
+ },
541
+ uspConsent: '1YN-',
542
+ gdprConsent: {
543
+ apiVersion: 2,
544
+ consentString: 'xxx',
545
+ gdprApplies: true,
546
+ vendorData: {
547
+ hasGlobalConsent: false,
548
+ purpose: {
549
+ consents: {
550
+ 1: true,
551
+ 3: true,
552
+ 4: true,
553
+ },
554
+ legitimateInterests: {
555
+ 2: true,
556
+ 7: true,
557
+ 9: true,
558
+ 10: true,
559
+ },
560
+ },
561
+ vendor: {
562
+ consents: {
563
+ 573: true
564
+ }
565
+ },
566
+ },
567
+ },
568
+ gppConsent: {
569
+ gppString: 'xxx',
570
+ applicableSections: [5],
571
+ },
572
+ ortb2: {
573
+ regs: {
574
+ coppa: 1,
575
+ },
576
+ site: {
577
+ content: {
578
+ data: [
579
+ {
580
+ name: 'dataprovider.com',
581
+ ext: { segtax: 5 },
582
+ segment: [{ id: '200' }],
583
+ },
584
+ ],
585
+ },
586
+ },
587
+ },
588
+ };
589
+
590
+ const [request] = config.runWithBidder(
591
+ 'dailymotion',
592
+ () => spec.buildRequests(bidRequestData, bidderRequestData),
593
+ );
594
+
595
+ expect(request.options.withCredentials).to.eql(true);
596
+ });
597
+
598
+ it('validates buildRequests with insufficient consent', () => {
599
+ const bidRequestData = [{
600
+ auctionId: 'b06c5141-fe8f-4cdf-9d7d-54415490a917',
601
+ bidId: 123456,
602
+ adUnitCode: 'preroll',
603
+ mediaTypes: {
604
+ video: {
605
+ api: [2, 7],
606
+ mimes: ['video/mp4'],
607
+ minduration: 5,
608
+ maxduration: 30,
609
+ playbackmethod: [3],
610
+ plcmt: 1,
611
+ protocols: [1, 2, 3, 4, 5, 6, 7, 8],
612
+ skip: 1,
613
+ skipafter: 5,
614
+ skipmin: 10,
615
+ startdelay: 0,
616
+ w: 1280,
617
+ h: 720,
618
+ },
619
+ },
620
+ sizes: [[1920, 1080]],
621
+ params: {
622
+ apiKey: 'test_api_key',
623
+ video: {
624
+ description: 'this is a test video',
625
+ duration: 556,
626
+ iabcat1: ['IAB-1'],
627
+ iabcat2: ['6', '17'],
628
+ id: '54321',
629
+ lang: 'FR',
630
+ private: false,
631
+ tags: 'tag_1,tag_2,tag_3',
632
+ title: 'test video',
633
+ url: 'https://test.com/test',
634
+ topics: 'topic_1, topic_2',
635
+ xid: 'x123456',
636
+ livestream: 1,
637
+ isCreatedForKids: true,
638
+ videoViewsInSession: 2,
639
+ autoplay: true,
640
+ playerVolume: 8,
641
+ },
642
+ },
643
+ }];
644
+
645
+ const bidderRequestData = {
646
+ refererInfo: {
647
+ page: 'https://publisher.com',
648
+ },
649
+ uspConsent: '1YN-',
650
+ gdprConsent: {
651
+ apiVersion: 2,
652
+ consentString: 'xxx',
653
+ gdprApplies: true,
654
+ vendorData: {
655
+ hasGlobalConsent: false,
656
+ purpose: {
657
+ consents: {
658
+ 1: true,
659
+ 3: true,
660
+ 4: true,
661
+ },
662
+ },
663
+ vendor: {
664
+ consents: {
665
+ 573: true
666
+ }
667
+ },
668
+ },
669
+ },
670
+ gppConsent: {
671
+ gppString: 'xxx',
672
+ applicableSections: [5],
673
+ },
674
+ ortb2: {
675
+ regs: {
676
+ coppa: 1,
677
+ },
678
+ site: {
679
+ content: {
680
+ data: [
681
+ {
682
+ name: 'dataprovider.com',
683
+ ext: { segtax: 5 },
684
+ segment: [{ id: '200' }],
685
+ },
686
+ ],
687
+ },
688
+ },
689
+ },
690
+ };
691
+
692
+ const [request] = config.runWithBidder(
693
+ 'dailymotion',
694
+ () => spec.buildRequests(bidRequestData, bidderRequestData),
695
+ );
696
+
697
+ expect(request.options.withCredentials).to.eql(false);
698
+ });
699
+
207
700
  it('validates buildRequests with content values from App', () => {
208
701
  const bidRequestData = [{
209
702
  auctionId: 'b06c5141-fe8f-4cdf-9d7d-54415490a917',
@@ -479,7 +972,7 @@ describe('dailymotionBidAdapterTests', () => {
479
972
  minduration: 0,
480
973
  maxduration: 0,
481
974
  playbackmethod: [],
482
- plcmt: 1,
975
+ plcmt: undefined,
483
976
  protocols: [],
484
977
  skip: 0,
485
978
  skipafter: 0,
@@ -559,12 +1052,12 @@ describe('dailymotionBidAdapterTests', () => {
559
1052
  minduration: 0,
560
1053
  maxduration: 0,
561
1054
  playbackmethod: [],
562
- plcmt: 1,
1055
+ plcmt: undefined,
563
1056
  protocols: [],
564
1057
  skip: 0,
565
1058
  skipafter: 0,
566
1059
  skipmin: 0,
567
- startdelay: 0,
1060
+ startdelay: undefined,
568
1061
  w: 0,
569
1062
  h: 0,
570
1063
  },
@@ -3,15 +3,12 @@ import {
3
3
  spec,
4
4
  getPmgUID,
5
5
  storage,
6
- getPageTitle,
7
- getPageDescription,
8
- getPageKeywords,
9
- getConnectionDownLink,
10
6
  THIRD_PARTY_COOKIE_ORIGIN,
11
7
  COOKIE_KEY_MGUID,
12
- getCurrentTimeToUTCString,
8
+ getCookieTimeToUTCString,
13
9
  buildUTMTagData,
14
10
  } from 'modules/discoveryBidAdapter.js';
11
+ import { getPageTitle, getPageDescription, getPageKeywords, getConnectionDownLink } from '../../../libraries/fpdUtils/pageInfo.js';
15
12
  import * as utils from 'src/utils.js';
16
13
  import { getHLen, getHC, getDM } from '../../../src/fpd/navigator.js';
17
14
 
@@ -22,6 +19,7 @@ describe('discovery:BidAdapterTests', function () {
22
19
  sandbox = sinon.sandbox.create();
23
20
  sandbox.stub(storage, 'getCookie');
24
21
  sandbox.stub(storage, 'setCookie');
22
+ sandbox.stub(storage, 'getDataFromLocalStorage');
25
23
  sandbox.stub(utils, 'generateUUID').returns('new-uuid');
26
24
  sandbox.stub(utils, 'parseUrl').returns({
27
25
  search: {
@@ -258,6 +256,11 @@ describe('discovery:BidAdapterTests', function () {
258
256
  getPmgUID();
259
257
  expect(storage.setCookie.calledOnce).to.be.false;
260
258
  });
259
+ it('should return other ID from storage and cookie', () => {
260
+ spec.buildRequests(bidRequestData.bids, bidRequestData);
261
+ expect(storage.getCookie.called).to.be.true;
262
+ expect(storage.getDataFromLocalStorage.called).to.be.true;
263
+ });
261
264
  })
262
265
  describe('buildUTMTagData function', function() {
263
266
  it('should set UTM cookie', () => {
@@ -591,7 +594,7 @@ describe('discovery Bid Adapter Tests', function () {
591
594
 
592
595
  const response = event.data;
593
596
  if (!response.optout && response.mguid) {
594
- storage.setCookie(COOKIE_KEY_MGUID, response.mguid, getCurrentTimeToUTCString());
597
+ storage.setCookie(COOKIE_KEY_MGUID, response.mguid, getCookieTimeToUTCString());
595
598
  }
596
599
  }
597
600