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

CORE: add bid to winningBids when marking as used #9612

Merged
merged 3 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/videoModule/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ export function PbVideo(videoCore_, getConfig_, pbGlobal_, pbEvents_, videoEvent
return;
}

bid.status = CONSTANTS.BID_STATUS.RENDERED;
pbGlobal.markWinningBidAsUsed(bid);
pbEvents.emit(getExternalVideoEventName(eventName), { bid, adEvent: adEventPayload });
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Header Bidding Management Library",
"main": "src/prebid.js",
"scripts": {
"serve": "gulp serve",
"test": "gulp test",
"lint": "gulp lint"
},
Expand Down
2 changes: 2 additions & 0 deletions test/spec/modules/videoModule/pbVideo_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ describe('Prebid Video', function () {
expect(payload.bid).to.be.equal(expectedBid);
expect(payload.adEvent).to.be.equal(expectedAdEventPayload);
expect(pbGlobal.markWinningBidAsUsed.calledOnce).to.be.true;
expect(payload.bid.status).to.be.equal(CONSTANTS.BID_STATUS.RENDERED);
});

it('should trigger video bid error when the bid matched', function () {
Expand All @@ -349,6 +350,7 @@ describe('Prebid Video', function () {
expect(payload.bid).to.be.equal(expectedBid);
expect(payload.adEvent).to.be.equal(expectedAdEventPayload);
expect(pbGlobal.markWinningBidAsUsed.calledOnce).to.be.true;
expect(payload.bid.status).to.be.equal(CONSTANTS.BID_STATUS.RENDERED);
});

it('should not trigger a bid impression when the bid did not match', function () {
Expand Down