Skip to content

Commit

Permalink
OpenWeb: Respond with the correct creativeId (#11574)
Browse files Browse the repository at this point in the history
Co-authored-by: Zdravko Kosanovic <[email protected]>
  • Loading branch information
AvivOpenWeb and zkosanovic committed May 28, 2024
1 parent e093b2c commit a5eaf63
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion modules/openwebBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const spec = {
width: adUnit.width,
height: adUnit.height,
ttl: adUnit.ttl || TTL,
creativeId: adUnit.requestId,
creativeId: adUnit.creativeId,
netRevenue: adUnit.netRevenue || true,
nurl: adUnit.nurl,
mediaType: adUnit.mediaType,
Expand Down
16 changes: 10 additions & 6 deletions test/spec/modules/openwebBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ describe('openwebAdapter', function () {
width: 640,
height: 480,
requestId: '21e12606d47ba7',
creativeId: 'creative-id-1',
nurl: 'http://example.com/win/1234',
adomain: ['abc.com'],
mediaType: VIDEO
},
Expand All @@ -449,6 +451,8 @@ describe('openwebAdapter', function () {
width: 300,
height: 250,
requestId: '21e12606d47ba7',
creativeId: 'creative-id-2',
nurl: 'http://example.com/win/1234',
adomain: ['abc.com'],
mediaType: BANNER
}]
Expand All @@ -461,7 +465,7 @@ describe('openwebAdapter', function () {
width: 640,
height: 480,
ttl: TTL,
creativeId: '21e12606d47ba7',
creativeId: 'creative-id-1',
netRevenue: true,
nurl: 'http://example.com/win/1234',
mediaType: VIDEO,
Expand All @@ -476,10 +480,10 @@ describe('openwebAdapter', function () {
requestId: '21e12606d47ba7',
cpm: 12.5,
currency: 'USD',
width: 640,
height: 480,
width: 300,
height: 250,
ttl: TTL,
creativeId: '21e12606d47ba7',
creativeId: 'creative-id-2',
netRevenue: true,
nurl: 'http://example.com/win/1234',
mediaType: BANNER,
Expand All @@ -492,8 +496,8 @@ describe('openwebAdapter', function () {

it('should get correct bid response', function () {
const result = spec.interpretResponse({ body: response });
expect(Object.keys(result[0])).to.deep.equal(Object.keys(expectedVideoResponse));
expect(Object.keys(result[1])).to.deep.equal(Object.keys(expectedBannerResponse));
expect(result[0]).to.deep.equal(expectedVideoResponse);
expect(result[1]).to.deep.equal(expectedBannerResponse);
});

it('video type should have vastXml key', function () {
Expand Down

0 comments on commit a5eaf63

Please sign in to comment.