@@ -150,11 +150,13 @@ describe('adpod.js', function () {
150
150
expect ( auctionBids [ 0 ] . customCacheKey ) . to . exist . and . to . match ( / ^ 5 \. 0 0 _ t e s t _ 1 5 s _ .* / ) ;
151
151
expect ( auctionBids [ 0 ] . adserverTargeting . hb_pb_cat_dur ) . to . equal ( '5.00_test_15s' ) ;
152
152
expect ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id ) . to . exist ;
153
+ expect ( auctionBids [ 0 ] . videoCacheKey ) . to . exist . and . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id )
153
154
expect ( auctionBids [ 1 ] . adId ) . to . equal ( bidResponse2 . adId ) ;
154
155
expect ( auctionBids [ 1 ] . customCacheKey ) . to . exist . and . to . match ( / ^ 1 2 \. 0 0 _ v a l u e _ 1 5 s _ .* / ) ;
155
156
expect ( auctionBids [ 1 ] . adserverTargeting . hb_pb_cat_dur ) . to . equal ( '12.00_value_15s' ) ;
156
157
expect ( auctionBids [ 1 ] . adserverTargeting . hb_cache_id ) . to . exist ;
157
158
expect ( auctionBids [ 1 ] . adserverTargeting . hb_cache_id ) . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id ) ;
159
+ expect ( auctionBids [ 1 ] . videoCacheKey ) . to . exist . and . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id ) ;
158
160
} ) ;
159
161
160
162
it ( 'should send prebid cache call once bid queue is full' , function ( ) {
@@ -220,10 +222,12 @@ describe('adpod.js', function () {
220
222
expect ( auctionBids [ 0 ] . customCacheKey ) . to . exist . and . to . match ( / ^ 1 0 \. 0 0 _ a i r l i n e _ 3 0 s _ .* / ) ;
221
223
expect ( auctionBids [ 0 ] . adserverTargeting . hb_pb_cat_dur ) . to . equal ( '10.00_airline_30s' ) ;
222
224
expect ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id ) . to . exist ;
225
+ expect ( auctionBids [ 0 ] . videoCacheKey ) . to . exist . and . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id )
223
226
expect ( auctionBids [ 1 ] . adId ) . to . equal ( 'adId234' ) ;
224
227
expect ( auctionBids [ 1 ] . customCacheKey ) . to . exist . and . to . match ( / ^ 1 5 \. 0 0 _ a i r l i n e _ 3 0 s _ .* / ) ;
225
228
expect ( auctionBids [ 1 ] . adserverTargeting . hb_pb_cat_dur ) . to . equal ( '15.00_airline_30s' ) ;
226
229
expect ( auctionBids [ 1 ] . adserverTargeting . hb_cache_id ) . to . exist ;
230
+ expect ( auctionBids [ 1 ] . videoCacheKey ) . to . exist . and . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id )
227
231
} ) ;
228
232
229
233
it ( 'should send prebid cache call after set period of time (even if queue is not full)' , function ( ) {
@@ -276,6 +280,7 @@ describe('adpod.js', function () {
276
280
expect ( auctionBids [ 0 ] . customCacheKey ) . to . exist . and . to . match ( / ^ 1 5 \. 0 0 _ a i r l i n e _ 3 0 s _ .* / ) ;
277
281
expect ( auctionBids [ 0 ] . adserverTargeting . hb_pb_cat_dur ) . to . equal ( '15.00_airline_30s' ) ;
278
282
expect ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id ) . to . exist ;
283
+ expect ( auctionBids [ 0 ] . videoCacheKey ) . to . exist . and . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id )
279
284
} ) ;
280
285
281
286
it ( 'should execute multiple prebid cache calls when number of bids exceeds queue size' , function ( ) {
@@ -360,14 +365,17 @@ describe('adpod.js', function () {
360
365
expect ( auctionBids [ 0 ] . customCacheKey ) . to . exist . and . to . match ( / ^ 1 5 \. 0 0 _ a i r l i n e _ 1 5 s _ .* / ) ;
361
366
expect ( auctionBids [ 0 ] . adserverTargeting . hb_pb_cat_dur ) . to . equal ( '15.00_airline_15s' ) ;
362
367
expect ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id ) . to . exist ;
368
+ expect ( auctionBids [ 0 ] . videoCacheKey ) . to . exist . and . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id )
363
369
expect ( auctionBids [ 1 ] . adId ) . to . equal ( 'multi_ad2' ) ;
364
370
expect ( auctionBids [ 1 ] . customCacheKey ) . to . exist . and . to . match ( / ^ 1 5 \. 0 0 _ n e w s _ 1 5 s _ .* / ) ;
365
371
expect ( auctionBids [ 1 ] . adserverTargeting . hb_pb_cat_dur ) . to . equal ( '15.00_news_15s' ) ;
366
372
expect ( auctionBids [ 1 ] . adserverTargeting . hb_cache_id ) . to . exist . and . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id ) ;
373
+ expect ( auctionBids [ 1 ] . videoCacheKey ) . to . exist . and . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id )
367
374
expect ( auctionBids [ 2 ] . adId ) . to . equal ( 'multi_ad3' ) ;
368
375
expect ( auctionBids [ 2 ] . customCacheKey ) . to . exist . and . to . match ( / ^ 1 0 \. 0 0 _ s p o r t s _ 1 5 s _ .* / ) ;
369
376
expect ( auctionBids [ 2 ] . adserverTargeting . hb_pb_cat_dur ) . to . equal ( '10.00_sports_15s' ) ;
370
377
expect ( auctionBids [ 2 ] . adserverTargeting . hb_cache_id ) . to . exist . and . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id ) ;
378
+ expect ( auctionBids [ 2 ] . videoCacheKey ) . to . exist . and . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id )
371
379
} ) ;
372
380
373
381
it ( 'should cache the bids with a shortened custom key when adpod.brandCategoryExclusion is false' , function ( ) {
@@ -436,10 +444,12 @@ describe('adpod.js', function () {
436
444
expect ( auctionBids [ 0 ] . customCacheKey ) . to . exist . and . to . match ( / ^ 1 0 \. 0 0 _ 1 5 s _ .* / ) ;
437
445
expect ( auctionBids [ 0 ] . adserverTargeting . hb_pb_cat_dur ) . to . equal ( '10.00_15s' ) ;
438
446
expect ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id ) . to . exist ;
447
+ expect ( auctionBids [ 0 ] . videoCacheKey ) . to . exist . and . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id )
439
448
expect ( auctionBids [ 1 ] . adId ) . to . equal ( 'nocat_ad2' ) ;
440
449
expect ( auctionBids [ 1 ] . customCacheKey ) . to . exist . and . to . match ( / ^ 1 5 \. 0 0 _ 1 5 s _ .* / ) ;
441
450
expect ( auctionBids [ 1 ] . adserverTargeting . hb_pb_cat_dur ) . to . equal ( '15.00_15s' ) ;
442
451
expect ( auctionBids [ 1 ] . adserverTargeting . hb_cache_id ) . to . exist . and . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id ) ;
452
+ expect ( auctionBids [ 1 ] . videoCacheKey ) . to . exist . and . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id )
443
453
} ) ;
444
454
445
455
it ( 'should not add bid to auction when config adpod.brandCategoryExclusion is true but bid is missing adServerCatId' , function ( ) {
@@ -564,6 +574,7 @@ describe('adpod.js', function () {
564
574
expect ( auctionBids [ 0 ] . customCacheKey ) . to . exist . and . to . match ( / ^ 5 \. 0 0 _ t e c h _ 4 5 s _ .* / ) ;
565
575
expect ( auctionBids [ 0 ] . adserverTargeting . hb_pb_cat_dur ) . to . equal ( '5.00_tech_45s' ) ;
566
576
expect ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id ) . to . exist ;
577
+ expect ( auctionBids [ 0 ] . videoCacheKey ) . to . exist . and . to . equal ( auctionBids [ 0 ] . adserverTargeting . hb_cache_id )
567
578
} ) ;
568
579
569
580
it ( 'should not add bids to auction if PBC returns an error' , function ( ) {
0 commit comments