Skip to content

Commit

Permalink
STN: Respond with the correct creativeId (prebid#11566)
Browse files Browse the repository at this point in the history
  • Loading branch information
zkosanovic committed May 28, 2024
1 parent 53a9e1e commit a5577d1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion modules/stnBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,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
20 changes: 12 additions & 8 deletions test/spec/modules/stnBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,17 +440,21 @@ describe('stnAdapter', function () {
width: 640,
height: 480,
requestId: '21e12606d47ba7',
creativeId: 'creative-id-1',
adomain: ['abc.com'],
mediaType: VIDEO
mediaType: VIDEO,
nurl: 'http://example.com/win/1234',
},
{
cpm: 12.5,
ad: '"<img src=\"https://...\"/>"',
width: 300,
height: 250,
requestId: '21e12606d47ba7',
creativeId: 'creative-id-2',
adomain: ['abc.com'],
mediaType: BANNER
mediaType: BANNER,
nurl: 'http://example.com/win/1234',
}]
};

Expand All @@ -461,7 +465,7 @@ describe('stnAdapter', 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('stnAdapter', 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('stnAdapter', 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 a5577d1

Please sign in to comment.