@@ -913,7 +913,7 @@ describe('adapterManager tests', function () {
913
913
setSizeConfig ( [ ] ) ;
914
914
} ) ;
915
915
916
- it ( 'should not filter bids w/ no labels' , function ( ) {
916
+ it ( 'should not filter banner bids w/ no labels' , function ( ) {
917
917
let bidRequests = adapterManager . makeBidRequests (
918
918
adUnits ,
919
919
Date . now ( ) ,
@@ -933,6 +933,85 @@ describe('adapterManager tests', function () {
933
933
expect ( appnexusBidRequests . bids [ 1 ] . sizes ) . to . deep . equal ( find ( adUnits , adUnit => adUnit . code === appnexusBidRequests . bids [ 1 ] . adUnitCode ) . sizes ) ;
934
934
} ) ;
935
935
936
+ it ( 'should not filter video bids' , function ( ) {
937
+ setSizeConfig ( [ {
938
+ 'mediaQuery' : '(min-width: 768px) and (max-width: 1199px)' ,
939
+ 'sizesSupported' : [
940
+ [ 728 , 90 ] ,
941
+ [ 300 , 250 ]
942
+ ] ,
943
+ 'labels' : [ 'tablet' , 'phone' ]
944
+ } ] ) ;
945
+
946
+ let videoAdUnits = [ {
947
+ code : 'test_video' ,
948
+ mediaTypes : {
949
+ video : {
950
+ playerSize : [ 300 , 300 ] ,
951
+ context : 'outstream'
952
+ }
953
+ } ,
954
+ bids : [ {
955
+ bidder : 'appnexus' ,
956
+ params : {
957
+ placementId : 13232385 ,
958
+ video : {
959
+ skippable : true ,
960
+ playback_method : [ 'auto_play_sound_off' ]
961
+ }
962
+ }
963
+ } ]
964
+ } ] ;
965
+ let bidRequests = adapterManager . makeBidRequests (
966
+ videoAdUnits ,
967
+ Date . now ( ) ,
968
+ utils . getUniqueIdentifierStr ( ) ,
969
+ function callback ( ) { } ,
970
+ [ ]
971
+ ) ;
972
+ expect ( bidRequests [ 0 ] . bids [ 0 ] . sizes ) . to . deep . equal ( [ 300 , 300 ] ) ;
973
+ } ) ;
974
+
975
+ it ( 'should not filter native bids' , function ( ) {
976
+ setSizeConfig ( [ {
977
+ 'mediaQuery' : '(min-width: 768px) and (max-width: 1199px)' ,
978
+ 'sizesSupported' : [
979
+ [ 728 , 90 ] ,
980
+ [ 300 , 250 ]
981
+ ] ,
982
+ 'labels' : [ 'tablet' , 'phone' ]
983
+ } ] ) ;
984
+
985
+ let nativeAdUnits = [ {
986
+ code : 'test_native' ,
987
+ sizes : [ [ 1 , 1 ] ] ,
988
+ mediaTypes : {
989
+ native : {
990
+ title : { required : true } ,
991
+ body : { required : false } ,
992
+ image : { required : true } ,
993
+ icon : { required : false } ,
994
+ sponsoredBy : { required : true } ,
995
+ clickUrl : { required : true } ,
996
+ } ,
997
+ } ,
998
+ bids : [
999
+ {
1000
+ bidder : 'appnexus' ,
1001
+ params : { placementId : 13232354 }
1002
+ } ,
1003
+ ]
1004
+ } ] ;
1005
+ let bidRequests = adapterManager . makeBidRequests (
1006
+ nativeAdUnits ,
1007
+ Date . now ( ) ,
1008
+ utils . getUniqueIdentifierStr ( ) ,
1009
+ function callback ( ) { } ,
1010
+ [ ]
1011
+ ) ;
1012
+ expect ( bidRequests [ 0 ] . bids [ 0 ] . sizes ) . to . deep . equal ( [ ] ) ;
1013
+ } ) ;
1014
+
936
1015
it ( 'should filter sizes using size config' , function ( ) {
937
1016
let validSizes = [
938
1017
[ 728 , 90 ] ,
0 commit comments