diff --git a/src/main/java/com/iab/openrtb/request/VideoObject.java b/src/main/java/com/iab/openrtb/request/VideoObject.java index 32a5e9f67a5..580554a81c2 100644 --- a/src/main/java/com/iab/openrtb/request/VideoObject.java +++ b/src/main/java/com/iab/openrtb/request/VideoObject.java @@ -18,5 +18,9 @@ public class VideoObject { List protocols; + Integer w; + + Integer h; + ObjectNode ext; } diff --git a/src/main/java/com/iab/openrtb/response/Asset.java b/src/main/java/com/iab/openrtb/response/Asset.java index e09bbf0b9db..cbcdb8c6590 100644 --- a/src/main/java/com/iab/openrtb/response/Asset.java +++ b/src/main/java/com/iab/openrtb/response/Asset.java @@ -1,5 +1,6 @@ package com.iab.openrtb.response; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.databind.node.ObjectNode; import lombok.Builder; import lombok.Value; @@ -23,4 +24,9 @@ public class Asset { Link link; ObjectNode ext; + + @JsonIgnore + public boolean isEmpty() { + return title == null && img == null && video == null && data == null; + } } diff --git a/src/main/java/org/prebid/server/bidder/huaweiads/HuaweiAdSlotBuilder.java b/src/main/java/org/prebid/server/bidder/huaweiads/HuaweiAdSlotBuilder.java index 7b72b702b66..37a108305ae 100644 --- a/src/main/java/org/prebid/server/bidder/huaweiads/HuaweiAdSlotBuilder.java +++ b/src/main/java/org/prebid/server/bidder/huaweiads/HuaweiAdSlotBuilder.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.iab.openrtb.request.Asset; import com.iab.openrtb.request.Banner; +import com.iab.openrtb.request.ImageObject; import com.iab.openrtb.request.Imp; import com.iab.openrtb.request.Native; import com.iab.openrtb.request.Request; @@ -15,18 +16,34 @@ import org.prebid.server.json.JacksonMapper; import org.prebid.server.proto.openrtb.ext.request.huaweiads.ExtImpHuaweiAds; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.HashSet; import java.util.List; import java.util.Objects; import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; import java.util.stream.Stream; public class HuaweiAdSlotBuilder { private static final Integer IMAGE_ASSET_TYPE_MAIN = 3; private static final String TEST_AUTH_ENABLED = "true"; - + private static final BigDecimal FILL_RATIO = BigDecimal.valueOf(0.5); + private static final List POPULAR_FORMATS = List.of( + Format.of(225, 150), + Format.of(300, 250), + Format.of(640, 360), + Format.of(720, 1280), + Format.of(1080, 607), + Format.of(1080, 1620), + Format.of(1080, 1920), + Format.of(1280, 720) + ); private final JacksonMapper mapper; public HuaweiAdSlotBuilder(JacksonMapper mapper) { @@ -98,6 +115,7 @@ private AdSlot30 makeNativeAdSlot(Native xNative) { .count(); return AdSlot30.builder() .detailedCreativeTypeList(makeDetailedCreativeTypeList(numVideo, numImage)) + .format(makeFormatListForNative(assets, numImage)) .build(); } @@ -139,15 +157,75 @@ private List parseNativeRequestAssets(Native xNative) { } private static List makeDetailedCreativeTypeList(long numVideo, long numImage) { + final List detailedCreativeTypeList = new ArrayList<>(); if (numVideo >= 1) { - return List.of("903"); - } else if (numImage > 1) { - return List.of("904"); - } else if (numImage == 1) { - return List.of("901"); - } else { - return List.of("913", "914"); + detailedCreativeTypeList.add("903"); + } + if (numImage >= 1) { + detailedCreativeTypeList.addAll(List.of("901", "904", "905")); + } + return detailedCreativeTypeList; + } + + private static List makeFormatListForNative(List assets, long numImage) { + final Set formats = new HashSet<>(); + formats.addAll(makeFormatListForVideo(assets)); + formats.addAll(makeFormatListForImage(assets, numImage)); + return formats.stream().toList(); + } + + private static Set makeFormatListForVideo(List assets) { + return assets.stream() + .map(Asset::getVideo) + .filter(Objects::nonNull) + .filter(video -> HuaweiUtils.isFormatDefined(video.getW(), video.getH())) + .map(video -> Format.of(video.getW(), video.getH())) + .collect(Collectors.toSet()); + } + + private static Set makeFormatListForImage(List assets, long numImage) { + return assets.stream() + .map(Asset::getImg) + .filter(Objects::nonNull) + .map(image -> getFormats(image, numImage)) + .flatMap(Collection::stream) + .collect(Collectors.toSet()); + } + + private static Set getFormats(ImageObject image, long numImage) { + final boolean formatDefined = HuaweiUtils.isFormatDefined(image.getW(), image.getH()); + final boolean minFormatDefined = HuaweiUtils.isFormatDefined(image.getWmin(), image.getHmin()); + if (numImage > 1 && formatDefined && minFormatDefined) { + return Set.of(Format.of(image.getW(), image.getH())); } + if (numImage == 1 && formatDefined && minFormatDefined) { + return filterPopularSizesByRatio(image.getW(), image.getH()); + } + if (numImage == 1 && !formatDefined && minFormatDefined) { + return filterPopularSizesByRange(image.getWmin(), image.getHmin()); + } + return Collections.emptySet(); } + private static Set filterPopularSizesByRatio(Integer width, Integer height) { + final int precision = 5; + final BigDecimal assetWidth = BigDecimal.valueOf(width, precision); + final BigDecimal assetHeight = BigDecimal.valueOf(height, precision); + final BigDecimal assetRatio = assetWidth.divide(assetHeight, RoundingMode.UP); + return POPULAR_FORMATS.stream() + .filter(format -> { + final BigDecimal formatWidth = BigDecimal.valueOf(format.getW(), precision); + final BigDecimal formatHeight = BigDecimal.valueOf(format.getH(), precision); + final BigDecimal formatRatio = formatWidth.divide(formatHeight, RoundingMode.UP); + return assetRatio.subtract(formatRatio).abs().compareTo(FILL_RATIO) <= 0; + } + ) + .collect(Collectors.toSet()); + } + + private static Set filterPopularSizesByRange(Integer width, Integer height) { + return POPULAR_FORMATS.stream() + .filter(size -> size.getW() > width && size.getH() > height) + .collect(Collectors.toSet()); + } } diff --git a/src/main/java/org/prebid/server/bidder/huaweiads/HuaweiAdmBuilder.java b/src/main/java/org/prebid/server/bidder/huaweiads/HuaweiAdmBuilder.java index f03f01f0370..c1d6e0d2002 100644 --- a/src/main/java/org/prebid/server/bidder/huaweiads/HuaweiAdmBuilder.java +++ b/src/main/java/org/prebid/server/bidder/huaweiads/HuaweiAdmBuilder.java @@ -52,6 +52,7 @@ public class HuaweiAdmBuilder { private static final Integer DATA_ASSET_CTA_TEXT_TYPE = 12; private static final Set DATA_ASSET_DESC_TYPES = Set.of(2, 10); private static final int IMAGE_ASSET_TYPE_ICON = 1; + private static final int IMAGE_ASSET_TYPE_MAIN = 3; private static final int APP_PROMOTION_INTERACTION_TYPE = 3; private static final String DEFAULT_NATIVE_VERSION = "1.1"; private static final String DEFAULT_VIDEO_MIME_TYPE = "video/mp4"; @@ -364,12 +365,13 @@ public HuaweiAdm buildNative(AdsType adType, Content content, Native xNative) { .id(asset.getId()) .build(); - responseAssets.add(responseAsset); - - if (isImageAsset) { - if (!HuaweiUtils.isFormatDefined(adWidth, adHeight)) { - adHeight = responseAsset.getImg().getH(); - adWidth = responseAsset.getImg().getW(); + if (!responseAsset.isEmpty()) { + responseAssets.add(responseAsset); + if (isImageAsset) { + if (!HuaweiUtils.isFormatDefined(adWidth, adHeight)) { + adHeight = responseAsset.getImg().getH(); + adWidth = responseAsset.getImg().getW(); + } } } } @@ -412,27 +414,31 @@ private static TitleObject buildTitleObject(MetaData metaData) { private static ImageObject buildImageObject(Integer assetImageType, Iterator iconsIterators, Iterator imageIterator) { - final ImageObject.ImageObjectBuilder imgObjectBuilder = ImageObject.builder() - .url(StringUtils.EMPTY) - .type(assetImageType); if (Objects.equals(assetImageType, IMAGE_ASSET_TYPE_ICON)) { if (iconsIterators.hasNext()) { final Icon icon = iconsIterators.next(); - imgObjectBuilder.url(icon.getUrl()); - imgObjectBuilder.w(icon.getWidth()); - imgObjectBuilder.h(icon.getHeight()); + return ImageObject.builder() + .url(icon.getUrl()) + .w(icon.getWidth()) + .h(icon.getHeight()) + .type(assetImageType) + .build(); } } else { if (imageIterator.hasNext()) { final ImageInfo image = imageIterator.next(); - imgObjectBuilder.url(image.getUrl()); - imgObjectBuilder.w(image.getWidth()); - imgObjectBuilder.h(image.getHeight()); + if (Objects.equals(assetImageType, IMAGE_ASSET_TYPE_MAIN)) { + return ImageObject.builder() + .url(image.getUrl()) + .w(image.getWidth()) + .h(image.getHeight()) + .type(assetImageType) + .build(); + } } } - - return imgObjectBuilder.build(); + return null; } private static DataObject buildDataObject(MetaData metaData, Integer assetDataType) { @@ -513,5 +519,4 @@ private static String decode(String value) { .map(str -> URLDecoder.decode(str, StandardCharsets.UTF_8)) .orElse(StringUtils.EMPTY); } - } diff --git a/src/test/java/org/prebid/server/bidder/huaweiads/HuaweiAdSlotBuilderTest.java b/src/test/java/org/prebid/server/bidder/huaweiads/HuaweiAdSlotBuilderTest.java index 1778da86064..db52a350e0b 100644 --- a/src/test/java/org/prebid/server/bidder/huaweiads/HuaweiAdSlotBuilderTest.java +++ b/src/test/java/org/prebid/server/bidder/huaweiads/HuaweiAdSlotBuilderTest.java @@ -359,7 +359,7 @@ public void buildShouldBuildBannerAdSlotWithoutFormatsWhenImpIsBannerAndHasInter @Test public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasNoImagesAndNoVideos() throws JsonProcessingException { // given - final Request nativeRequest = Request.builder().assets(List.of()).build(); + final Request nativeRequest = Request.builder().assets(Collections.emptyList()).build(); final Imp givenImp = Imp.builder() .xNative(Native.builder().request(mapper.writeValueAsString(nativeRequest)).build()) .build(); @@ -375,7 +375,8 @@ public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasNoImagesAndNoVideos final AdSlot30 expected = AdSlot30.builder() .adType(3) .slotId("slotId") - .detailedCreativeTypeList(List.of("913", "914")) + .detailedCreativeTypeList(Collections.emptyList()) + .format(Collections.emptyList()) .test(0) .build(); @@ -410,7 +411,8 @@ public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasOneNonMainImageWith final AdSlot30 expected = AdSlot30.builder() .adType(3) .slotId("slotId") - .detailedCreativeTypeList(List.of("913", "914")) + .detailedCreativeTypeList(Collections.emptyList()) + .format(Collections.emptyList()) .test(0) .build(); @@ -445,7 +447,55 @@ public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasOneMainImageWithFor final AdSlot30 expected = AdSlot30.builder() .adType(3) .slotId("slotId") - .detailedCreativeTypeList(List.of("901")) + .detailedCreativeTypeList(List.of("901", "904", "905")) + .format(List.of( + org.prebid.server.bidder.huaweiads.model.request.Format.of(1080, 1920), + org.prebid.server.bidder.huaweiads.model.request.Format.of(1080, 1620), + org.prebid.server.bidder.huaweiads.model.request.Format.of(300, 250), + org.prebid.server.bidder.huaweiads.model.request.Format.of(720, 1280), + org.prebid.server.bidder.huaweiads.model.request.Format.of(225, 150) + )) + .test(0) + .build(); + + assertThat(actual).isEqualTo(expected); + } + + @Test + public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasTwoMainImagesWithFormat() + throws JsonProcessingException { + // given + final Request nativeRequest = Request.builder() + .assets(List.of( + Asset.builder() + .img(ImageObject.builder().w(200).h(200).wmin(300).hmin(300).type(3).build()) + .build(), + Asset.builder() + .img(ImageObject.builder().w(1080).h(1920).wmin(1080).hmin(1620).type(3).build()) + .build() + ) + ) + .build(); + final Imp givenImp = Imp.builder() + .xNative(Native.builder().request(mapper.writeValueAsString(nativeRequest)).build()) + .build(); + final ExtImpHuaweiAds givenImpExt = ExtImpHuaweiAds.builder() + .slotId("slotId") + .adType("native") + .build(); + + // when + final AdSlot30 actual = target.build(givenImp, givenImpExt); + + // then + final AdSlot30 expected = AdSlot30.builder() + .adType(3) + .slotId("slotId") + .detailedCreativeTypeList(List.of("901", "904", "905")) + .format(List.of( + org.prebid.server.bidder.huaweiads.model.request.Format.of(1080, 1920), + org.prebid.server.bidder.huaweiads.model.request.Format.of(200, 200) + )) .test(0) .build(); @@ -479,7 +529,15 @@ public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasOneMainImageWithMin final AdSlot30 expected = AdSlot30.builder() .adType(3) .slotId("slotId") - .detailedCreativeTypeList(List.of("901")) + .detailedCreativeTypeList(List.of("901", "904", "905")) + .format(List.of( + org.prebid.server.bidder.huaweiads.model.request.Format.of(1080, 1920), + org.prebid.server.bidder.huaweiads.model.request.Format.of(640, 360), + org.prebid.server.bidder.huaweiads.model.request.Format.of(1080, 607), + org.prebid.server.bidder.huaweiads.model.request.Format.of(1080, 1620), + org.prebid.server.bidder.huaweiads.model.request.Format.of(1280, 720), + org.prebid.server.bidder.huaweiads.model.request.Format.of(720, 1280) + )) .test(0) .build(); @@ -508,7 +566,8 @@ public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasOneMainImageWithout final AdSlot30 expected = AdSlot30.builder() .adType(3) .slotId("slotId") - .detailedCreativeTypeList(List.of("901")) + .detailedCreativeTypeList(List.of("901", "904", "905")) + .format(Collections.emptyList()) .test(0) .build(); @@ -539,7 +598,8 @@ public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasTwoMainImages() final AdSlot30 expected = AdSlot30.builder() .adType(3) .slotId("slotId") - .detailedCreativeTypeList(List.of("904")) + .detailedCreativeTypeList(List.of("901", "904", "905")) + .format(Collections.emptyList()) .test(0) .build(); @@ -570,7 +630,8 @@ public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasOneMainAndOneNonMai final AdSlot30 expected = AdSlot30.builder() .adType(3) .slotId("slotId") - .detailedCreativeTypeList(List.of("901")) + .detailedCreativeTypeList(List.of("901", "904", "905")) + .format(Collections.emptyList()) .test(0) .build(); @@ -578,11 +639,12 @@ public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasOneMainAndOneNonMai } @Test - public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasOneMainImageAndOneVideo() + public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasTwoMainImagesAndOneVideo() throws JsonProcessingException { // given final Request nativeRequest = Request.builder() .assets(List.of( + Asset.builder().img(ImageObject.builder().type(3).build()).build(), Asset.builder().img(ImageObject.builder().type(3).build()).build(), Asset.builder().video(VideoObject.builder().build()).build())) .build(); @@ -601,7 +663,8 @@ public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasOneMainImageAndOneV final AdSlot30 expected = AdSlot30.builder() .adType(3) .slotId("slotId") - .detailedCreativeTypeList(List.of("903")) + .detailedCreativeTypeList(List.of("903", "901", "904", "905")) + .format(Collections.emptyList()) .test(0) .build(); @@ -609,14 +672,11 @@ public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasOneMainImageAndOneV } @Test - public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasTwoMainImagesAndOneVideo() + public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasOneVideo() throws JsonProcessingException { // given final Request nativeRequest = Request.builder() - .assets(List.of( - Asset.builder().img(ImageObject.builder().type(3).build()).build(), - Asset.builder().img(ImageObject.builder().type(3).build()).build(), - Asset.builder().video(VideoObject.builder().build()).build())) + .assets(List.of(Asset.builder().video(VideoObject.builder().build()).build())) .build(); final Imp givenImp = Imp.builder() .xNative(Native.builder().request(mapper.writeValueAsString(nativeRequest)).build()) @@ -634,6 +694,7 @@ public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasTwoMainImagesAndOne .adType(3) .slotId("slotId") .detailedCreativeTypeList(List.of("903")) + .format(Collections.emptyList()) .test(0) .build(); @@ -665,6 +726,7 @@ public void buildShouldBuildNativeAdSlotWhenImpIsNativeAndHasTwoVideos() .adType(3) .slotId("slotId") .detailedCreativeTypeList(List.of("903")) + .format(Collections.emptyList()) .test(0) .build(); diff --git a/src/test/java/org/prebid/server/bidder/huaweiads/HuaweiAdmBuilderTest.java b/src/test/java/org/prebid/server/bidder/huaweiads/HuaweiAdmBuilderTest.java index 748a62dfded..7fbb613fba8 100644 --- a/src/test/java/org/prebid/server/bidder/huaweiads/HuaweiAdmBuilderTest.java +++ b/src/test/java/org/prebid/server/bidder/huaweiads/HuaweiAdmBuilderTest.java @@ -22,6 +22,7 @@ import org.prebid.server.bidder.huaweiads.model.response.VideoInfo; import org.prebid.server.exception.PreBidException; +import java.util.Collections; import java.util.List; import static org.assertj.core.api.Assertions.assertThat; @@ -390,7 +391,7 @@ public void buildBannerShouldFailBuildingBigPictureCreativeWhenImageInfoListIsNu @Test public void buildBannerShouldFailBuildingBigPicture2CreativeWhenImageInfoListIsEmpty() { // given - final MetaData metadata = MetaData.builder().imageInfoList(List.of()).build(); + final MetaData metadata = MetaData.builder().imageInfoList(Collections.emptyList()).build(); final Content content = Content.builder().metaData(metadata).creativeType(3).build(); // when & then @@ -1092,7 +1093,7 @@ public void buildBannerShouldBuildRewardedVideoWithImageInfoListAndSoundOnEvent( final MetaData metadata = MetaData.builder() .clickUrl("clickUrl") .videoInfo(videoInfo) - .iconList(List.of()) + .iconList(Collections.emptyList()) .imageInfoList(List.of(ImageInfo.builder().url("imageInfoUrl").width(400).height(400).build())) .duration(2000L) .build(); @@ -1555,7 +1556,6 @@ public void buildNativeShouldBuildNativeWithImagesWhenImageAreFromIconAndImageIn + "\"assets\":[" + "{\"id\":12,\"img\":{\"type\":1,\"url\":\"iconUrl\"}}," + "{\"id\":13,\"img\":{\"type\":1,\"url\":\"\",\"w\":100,\"h\":100}}," - + "{\"id\":24,\"img\":{\"type\":2,\"url\":\"imageInfoUrl\",\"w\":200,\"h\":0}}," + "{\"id\":25,\"img\":{\"type\":3,\"w\":200,\"h\":200}}" + "]," + "\"link\":{\"url\":\"clickUrl\",\"clicktrackers\":[]}," @@ -1705,15 +1705,13 @@ public void buildNativeShouldBuildNativeWithTitleVideoImagesAndDataAssetsWhenMon + "\"assets\":[" + "{\"id\":11,\"img\":{\"type\":1,\"url\":\"iconUrl\"}}," + "{\"id\":12,\"img\":{\"type\":1,\"url\":\"\",\"w\":100,\"h\":100}}," - + "{\"id\":13,\"img\":{\"type\":2,\"url\":\"imageInfoUrl\",\"w\":200,\"h\":0}}," + "{\"id\":14,\"img\":{\"type\":3,\"w\":200,\"h\":200}}," + "{\"id\":21,\"data\":{\"value\":\"description description\"}}," + "{\"id\":22,\"data\":{\"value\":\"description description\"}}," + "{\"id\":23,\"data\":{\"value\":\"\"}}," + "{\"id\":24,\"data\":{\"type\":12,\"value\":\"cta cta\"}}," + "{\"id\":31,\"title\":{\"text\":\"title title\",\"len\":11}}," - + "{\"id\":41,\"video\":{\"vasttag\":\"" + expectedVideoAssetAdm + "\"}}," - + "{\"id\":51}" + + "{\"id\":41,\"video\":{\"vasttag\":\"" + expectedVideoAssetAdm + "\"}}" + "]," + "\"link\":{\"url\":\"clickUrl\",\"clicktrackers\":[\"clickUrl1\",\"clickUrl2\",\"clickUrl3\"]}," + "\"eventtrackers\":[" diff --git a/src/test/java/org/prebid/server/bidder/huaweiads/HuaweiAdsBidderTest.java b/src/test/java/org/prebid/server/bidder/huaweiads/HuaweiAdsBidderTest.java index 20b31753b67..575e8dda7a6 100644 --- a/src/test/java/org/prebid/server/bidder/huaweiads/HuaweiAdsBidderTest.java +++ b/src/test/java/org/prebid/server/bidder/huaweiads/HuaweiAdsBidderTest.java @@ -973,7 +973,7 @@ public void makeBidsShouldReturnBidWithFirstNoticeUrlOfWinMonitor() { .contentId("contentId") .price(BigDecimal.TEN) .monitorList(List.of( - Monitor.of("win", List.of()), + Monitor.of("win", Collections.emptyList()), Monitor.of("playStart", List.of("url1")), Monitor.of("win", List.of("url2", "url3")), Monitor.of("win", List.of("url4")))) diff --git a/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_include_video/test-huaweiads-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_include_video/test-huaweiads-bid-request.json index 4ffde69b387..1802084f31e 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_include_video/test-huaweiads-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_include_video/test-huaweiads-bid-request.json @@ -11,7 +11,40 @@ "adtype": 3, "slotid": "u42ohmaufh", "detailedCreativeTypeList": [ - "903" + "903", + "901", + "904", + "905" + ], + "format": [ + { + "w": 1080, + "h": 1920 + }, + { + "w": 640, + "h": 360 + }, + { + "w": 1080, + "h": 607 + }, + { + "w": 1080, + "h": 1620 + }, + { + "w": 300, + "h": 250 + }, + { + "w": 1280, + "h": 720 + }, + { + "w": 720, + "h": 1280 + } ], "test": 1 } @@ -35,7 +68,7 @@ "belongCountry": "ZA" }, "network": { - "cellInfo" : [ ], + "cellInfo": [], "type": 0 }, "regs": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_single_image/test-huaweiads-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_single_image/test-huaweiads-bid-request.json index 969ab3ee097..8a1b02bdad6 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_single_image/test-huaweiads-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_single_image/test-huaweiads-bid-request.json @@ -11,7 +11,39 @@ "adtype": 3, "slotid": "u42ohmaufh", "detailedCreativeTypeList": [ - "901" + "901", + "904", + "905" + ], + "format": [ + { + "w": 1080, + "h": 1920 + }, + { + "w": 640, + "h": 360 + }, + { + "w": 1080, + "h": 607 + }, + { + "w": 1080, + "h": 1620 + }, + { + "w": 300, + "h": 250 + }, + { + "w": 1280, + "h": 720 + }, + { + "w": 720, + "h": 1280 + } ], "test": 1 } @@ -40,7 +72,7 @@ }, "network": { "type": 0, - "cellInfo" : [ ] + "cellInfo": [] }, "regs": { }, diff --git a/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_three_image/test-huaweiads-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_three_image/test-huaweiads-bid-request.json index d39746c72d4..ffb014ca884 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_three_image/test-huaweiads-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_three_image/test-huaweiads-bid-request.json @@ -11,8 +11,9 @@ "adtype": 3, "slotid": "u42ohmaufh", "detailedCreativeTypeList": [ - "904" + "901", "904", "905" ], + "format": [], "test": 1 } ], diff --git a/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_three_image_include_icon/test-huaweiads-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_three_image_include_icon/test-huaweiads-bid-request.json index ceecbe314b3..9255eb91202 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_three_image_include_icon/test-huaweiads-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/huaweiads/native_three_image_include_icon/test-huaweiads-bid-request.json @@ -11,8 +11,11 @@ "adtype": 3, "slotid": "u42ohmaufh", "detailedCreativeTypeList": [ - "904" + "901", + "904", + "905" ], + "format": [], "test": 1 } ],