Skip to content

Commit

Permalink
FIX: Update adUnit attachment to use adUnitCode selector in rubiconBi…
Browse files Browse the repository at this point in the history
…dAdapter (prebid#12462)
  • Loading branch information
harrykingriches authored Nov 20, 2024
1 parent de49e52 commit 24cf886
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ function renderBid(bid) {
height: bid.height,
vastUrl: bid.vastUrl,
placement: {
attachTo: adUnitElement,
attachTo: `#${bid.adUnitCode}`,
align: config.align,
position: config.position
},
Expand Down
6 changes: 4 additions & 2 deletions test/spec/modules/rubiconBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4197,6 +4197,7 @@ describe('the rubicon adapter', function () {
const bid = bids[0];
bid.adUnitCode = 'outstream_video1_placement';
const adUnit = document.createElement('div');
const adUnitSelector = `#${bid.adUnitCode}`
adUnit.id = bid.adUnitCode;
document.body.appendChild(adUnit);

Expand All @@ -4210,7 +4211,7 @@ describe('the rubicon adapter', function () {
label: undefined,
placement: {
align: 'left',
attachTo: adUnit,
attachTo: adUnitSelector,
position: 'append',
},
vastUrl: 'https://test.com/vast.xml',
Expand Down Expand Up @@ -4266,6 +4267,7 @@ describe('the rubicon adapter', function () {
const bid = bids[0];
bid.adUnitCode = 'outstream_video1_placement';
const adUnit = document.createElement('div');
const adUnitSelector = `#${bid.adUnitCode}`
adUnit.id = bid.adUnitCode;
document.body.appendChild(adUnit);

Expand All @@ -4279,7 +4281,7 @@ describe('the rubicon adapter', function () {
label: undefined,
placement: {
align: 'left',
attachTo: adUnit,
attachTo: adUnitSelector,
position: 'append',
},
vastUrl: 'https://test.com/vast.xml',
Expand Down

0 comments on commit 24cf886

Please sign in to comment.