Skip to content
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

Merged
merged 3 commits into from
Jan 28, 2020

Conversation

zhew1118
Copy link
Contributor

Type of change

  • Bugfix
  • Feature
  • New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?
  • Other

Description of change

We add support for mediaTypes banner and video. And test cases related.

  • test parameters for validating bids
{
  bidder: '<bidder name>',
  params: {
    // ...
  }
}

Be sure to test the integration with your adserver using the Hello World sample page.

  • contact email of the adapter’s maintainer
    [email protected]
  • official adapter submission

For any changes that affect user-facing APIs or example code documented on http://prebid.org, please provide:

Other information

@zhew1118 zhew1118 requested a review from jsnellbaker January 16, 2020 00:45
@bretg bretg changed the title enable mediaTypes banner and video with test cases FreewheelSSP - enable mediaTypes banner and video with test cases Jan 16, 2020
@bretg bretg requested review from msm0504 and removed request for msm0504 January 16, 2020 20:23
Copy link
Collaborator

@jsnellbaker jsnellbaker left a 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);
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@zhew1118 zhew1118 requested a review from jsnellbaker January 24, 2020 19:42
Copy link
Collaborator

@jsnellbaker jsnellbaker left a 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.

@jsnellbaker jsnellbaker merged commit 86f7c8c into prebid:master Jan 28, 2020
@zhew1118 zhew1118 deleted the fwssp-banner-video branch January 28, 2020 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants