-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FreewheelSSP - enable mediaTypes banner and video with test cases #4739
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @zhew1118
The changes overall look okay. There was one area I had a question, please see comment below.
Additionally - though I can see you added a few new unit tests, it seems the coverage percentage is still below the accepted range of 80%. On master your adapter is at 87.23%, whereas this PR branch is at 79.23%. I think there are few sections of code that aren't being used now that were before (eg getBiggerSizeWithLimit()
) as a result of the new logic/tests.
Can you please take a look at this and try to improve the coverage? If needed, you can gulp test-coverage
and gulp view-coverage
in your local copy of Prebid.js to see the details on the coverage.
Please let me know if you have any questions. Thanks!
playerSize = bidrequest.mediaTypes.video.playerSize; | ||
} else if (bidrequest.mediaTypes.banner.sizes) { | ||
// If mediaTypes is banner, get size from mediaTypes.banner.sizes per http://prebid.org/blog/pbjs-3 | ||
playerSize = getBiggerSizeWithLimit(bidrequest.mediaTypes.banner.sizes, bidrequest.mediaTypes.banner.minSizeLimit, bidrequest.mediaTypes.banner.maxSizeLimit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify where the mediaTypes.banner.minSizeLimit
and mediaTypes.banner.maxSizeLimit
fields get populated? Are those extra fields meant to be added within the adUnit setup or something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. These two fields could be added within the adUnit set up together with the banner.sizes array. The idea is if any of the two limits (or both) is set, then only valid size within the [minSize -> maxSize] range could be used. If none of the limits are set, the default value of minSize [0, 0] and maxSize [Number.MAX_VALUE, Number.MAX_VALUE] will be set so that all the sizes in the array are treated as potentially valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhew1118 Thanks for the clarification and the update. The unit test coverage looks better now.
Type of change
Description of change
We add support for mediaTypes banner and video. And test cases related.
Be sure to test the integration with your adserver using the Hello World sample page.
[email protected]
For any changes that affect user-facing APIs or example code documented on http://prebid.org, please provide:
Other information