-
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
Rubicon Bid Adapter: Choose video when banner mediaType is not present #8997
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.
Looks good, will you add a unit test covering classifiedAsVideo.
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.
Actually the unit tests are failing, so please fix and add a couple for the new classifiedAsVideo
@@ -1990,6 +1990,19 @@ describe('the rubicon adapter', function () { | |||
expect(spec.isBidRequestValid(bidderRequest.bids[0])).to.equal(false); | |||
}); | |||
|
|||
it('should be invalid if bidRequest.mediaTypes.video.context is instream but size_id is not defined', function () { |
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.
where is the check for this exactly? I do not see size_id
being checked if instream anywhere.
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.
This test used to be under the hasVideoType tests, but it doesn't actually have anything to do with that function. I just moved it to where a bunch of other spec.isBidRequestValid situations were being tested. No idea if it tests what it is supposed to.
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.
yeah seems like a legacy test that does not do what is intended!
It is failing because we require
mediaTypes.video
object to have a couple things.
Which is covered in should enforce the new required mediaTypes.video params
Can you just delete this test please!
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.
Is there a test for when BOTH banner and VIDEO are present
But also params.video object is defined?
Thus, making it classify as video?
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.
LGTM! @ChrisHuie Will you do a non Magnite review on this please?!
prebid#8997) * Choose video when banner mediaType is not present * Define video.params as needed * Refactor unit tests for classifiedAsVideo * Unit test fixes * Add video+banner+params.video test * Remove obsolete test
prebid#8997) * Choose video when banner mediaType is not present * Define video.params as needed * Refactor unit tests for classifiedAsVideo * Unit test fixes * Add video+banner+params.video test * Remove obsolete test
Type of change
Description of change
Rubicon's Adapter only classifies a bid as video when mediaTypes.video and params.video are both defined. This change causes the adapter to only check against params.video when mediaTypes.banner is also present, otherwise mediaTypes.video is enough to classify as video
Other information
@robertrmartinez