From 79acf2147866613de08cd38b5396492b5093bdb0 Mon Sep 17 00:00:00 2001 From: innay Date: Wed, 28 Dec 2022 12:42:26 +0200 Subject: [PATCH 1/3] addes is_wrapper parameter to documentation --- modules/riseBidAdapter.md | 2 ++ test/spec/modules/riseBidAdapter_spec.js | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/modules/riseBidAdapter.md b/modules/riseBidAdapter.md index 9dab3ec2a30..f0837cb5508 100644 --- a/modules/riseBidAdapter.md +++ b/modules/riseBidAdapter.md @@ -25,6 +25,8 @@ The adapter supports Video(instream). | `placementId` | optional | String | A unique placement identifier | "12345678" | `testMode` | optional | Boolean | This activates the test mode | false | `rtbDomain` | optional | String | Sets the seller end point | "www.test.com" +| `is_wrapper` | private | Boolean | Please don't use unless your account manager asked you to | false + # Test Parameters ```javascript diff --git a/test/spec/modules/riseBidAdapter_spec.js b/test/spec/modules/riseBidAdapter_spec.js index 37100073407..00e7581795b 100644 --- a/test/spec/modules/riseBidAdapter_spec.js +++ b/test/spec/modules/riseBidAdapter_spec.js @@ -109,6 +109,7 @@ describe('riseAdapter', function () { const api = [1, 2]; const mimes = ['application/javascript', 'video/mp4', 'video/quicktime']; const protocols = [2, 3, 5, 6]; + const isWrapper = false; it('sends the placementId to ENDPOINT via POST', function () { bidRequests[0].params.placementId = placementId; @@ -116,6 +117,12 @@ describe('riseAdapter', function () { expect(request.data.bids[0].placementId).to.equal(placementId); }); + it('sends the is_wrapper parameter to ENDPOINT via POST', function() { + bidRequests[0].params.isWrapper = isWrapper; + const request = spec.buildRequests(bidRequests, bidderRequest); + expect(request.data.bids[0].is_wrapper).to.equal(isWrapper); + }); + it('sends bid request to ENDPOINT via POST', function () { const request = spec.buildRequests(bidRequests, bidderRequest); expect(request.url).to.equal(ENDPOINT); From 36d0c50e298fbec0d0ac77f95d847a5369099ce3 Mon Sep 17 00:00:00 2001 From: innay Date: Wed, 28 Dec 2022 13:27:18 +0200 Subject: [PATCH 2/3] added is_wrapper to test --- test/spec/modules/riseBidAdapter_spec.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/spec/modules/riseBidAdapter_spec.js b/test/spec/modules/riseBidAdapter_spec.js index 00e7581795b..bba8c1935ac 100644 --- a/test/spec/modules/riseBidAdapter_spec.js +++ b/test/spec/modules/riseBidAdapter_spec.js @@ -118,9 +118,11 @@ describe('riseAdapter', function () { }); it('sends the is_wrapper parameter to ENDPOINT via POST', function() { - bidRequests[0].params.isWrapper = isWrapper; + const bidderRequestWithIsWrapper = Object.assign({isWrapper}, bidderRequest); const request = spec.buildRequests(bidRequests, bidderRequest); - expect(request.data.bids[0].is_wrapper).to.equal(isWrapper); + expect(request.data.params).to.be.an('object'); + expect(request.data.params).to.have.property('is_wrapper'); + expect(request.data.params.is_wrapper).to.equal(false); }); it('sends bid request to ENDPOINT via POST', function () { From 3b8885e2b0fc53be64d46ddfdf7449e61d110617 Mon Sep 17 00:00:00 2001 From: innay Date: Wed, 28 Dec 2022 13:37:16 +0200 Subject: [PATCH 3/3] removed isWrapper --- test/spec/modules/riseBidAdapter_spec.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/spec/modules/riseBidAdapter_spec.js b/test/spec/modules/riseBidAdapter_spec.js index bba8c1935ac..4fa4ff354ec 100644 --- a/test/spec/modules/riseBidAdapter_spec.js +++ b/test/spec/modules/riseBidAdapter_spec.js @@ -109,7 +109,6 @@ describe('riseAdapter', function () { const api = [1, 2]; const mimes = ['application/javascript', 'video/mp4', 'video/quicktime']; const protocols = [2, 3, 5, 6]; - const isWrapper = false; it('sends the placementId to ENDPOINT via POST', function () { bidRequests[0].params.placementId = placementId; @@ -118,7 +117,6 @@ describe('riseAdapter', function () { }); it('sends the is_wrapper parameter to ENDPOINT via POST', function() { - const bidderRequestWithIsWrapper = Object.assign({isWrapper}, bidderRequest); const request = spec.buildRequests(bidRequests, bidderRequest); expect(request.data.params).to.be.an('object'); expect(request.data.params).to.have.property('is_wrapper');