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
  • Loading branch information
harrykingriches committed Nov 18, 2024
1 parent 874c337 commit 76de0ef
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 @@ -840,7 +840,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 @@ -4210,6 +4210,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 @@ -4223,7 +4224,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 @@ -4279,6 +4280,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 @@ -4292,7 +4294,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 76de0ef

Please sign in to comment.