diff --git a/modules/relaidoBidAdapter.js b/modules/relaidoBidAdapter.js index a3b83e73ae3..4df13b52a39 100644 --- a/modules/relaidoBidAdapter.js +++ b/modules/relaidoBidAdapter.js @@ -6,7 +6,7 @@ import { getStorageManager } from '../src/storageManager.js'; const BIDDER_CODE = 'relaido'; const BIDDER_DOMAIN = 'api.relaido.jp'; -const ADAPTER_VERSION = '1.0.6'; +const ADAPTER_VERSION = '1.0.5'; const DEFAULT_TTL = 300; const UUID_KEY = 'relaido_uuid'; @@ -68,15 +68,9 @@ function buildRequests(validBidRequests, bidderRequest) { media_type: mediaType, uuid: uuid, width: width, - height: height, - pv: '$prebid.version$' + height: height }; - const imuid = utils.deepAccess(bidRequest, 'userId.imuid'); - if (imuid) { - payload.imuid = imuid; - } - // It may not be encoded, so add it at the end of the payload payload.ref = bidderRequest.refererInfo.referer; diff --git a/test/spec/modules/relaidoBidAdapter_spec.js b/test/spec/modules/relaidoBidAdapter_spec.js index c6e2a9ae5d5..e372c67bb4e 100644 --- a/test/spec/modules/relaidoBidAdapter_spec.js +++ b/test/spec/modules/relaidoBidAdapter_spec.js @@ -20,12 +20,8 @@ describe('RelaidoAdapter', function () { let bidderRequest; let serverResponse; let serverRequest; - let generateUUIDStub; - let triggerPixelStub; beforeEach(function () { - generateUUIDStub = sinon.stub(utils, 'generateUUID').returns(relaido_uuid); - triggerPixelStub = sinon.stub(utils, 'triggerPixel'); bidRequest = { bidder: 'relaido', params: { @@ -76,10 +72,6 @@ describe('RelaidoAdapter', function () { mediaType: 'video', }; }); - afterEach(() => { - generateUUIDStub.restore(); - triggerPixelStub.restore(); - }); describe('spec.isBidRequestValid', function () { it('should return true when the required params are passed by video', function () { @@ -215,7 +207,6 @@ describe('RelaidoAdapter', function () { expect(request.data.uuid).to.equal(relaido_uuid); expect(request.data.width).to.equal(bidRequest.mediaTypes.video.playerSize[0][0]); expect(request.data.height).to.equal(bidRequest.mediaTypes.video.playerSize[0][1]); - expect(request.data.pv).to.equal('$prebid.version$'); }); it('should build bid requests by banner', function () { @@ -260,6 +251,8 @@ describe('RelaidoAdapter', function () { expect(bidRequests).to.have.lengthOf(1); const request = bidRequests[0]; + // eslint-disable-next-line no-console + console.log(bidRequests); expect(request.width).to.equal(1); }); @@ -271,15 +264,6 @@ describe('RelaidoAdapter', function () { expect(keys[0]).to.equal('version'); expect(keys[keys.length - 1]).to.equal('ref'); }); - - it('should get imuid', function () { - bidRequest.userId = {} - bidRequest.userId.imuid = 'i.tjHcK_7fTcqnbrS_YA2vaw'; - const bidRequests = spec.buildRequests([bidRequest], bidderRequest); - expect(bidRequests).to.have.lengthOf(1); - const request = bidRequests[0]; - expect(request.data.imuid).to.equal('i.tjHcK_7fTcqnbrS_YA2vaw'); - }); }); describe('spec.interpretResponse', function () { @@ -366,6 +350,14 @@ describe('RelaidoAdapter', function () { }); describe('spec.onBidWon', function () { + let stub; + beforeEach(() => { + stub = sinon.stub(utils, 'triggerPixel'); + }); + afterEach(() => { + stub.restore(); + }); + it('Should create nurl pixel if bid nurl', function () { let bid = { bidder: bidRequest.bidder, @@ -379,7 +371,7 @@ describe('RelaidoAdapter', function () { ref: window.location.href, } spec.onBidWon(bid); - const parser = utils.parseUrl(triggerPixelStub.getCall(0).args[0]); + const parser = utils.parseUrl(stub.getCall(0).args[0]); const query = parser.search; expect(parser.hostname).to.equal('api.relaido.jp'); expect(parser.pathname).to.equal('/tr/v1/prebid/win.gif'); @@ -395,6 +387,14 @@ describe('RelaidoAdapter', function () { }); describe('spec.onTimeout', function () { + let stub; + beforeEach(() => { + stub = sinon.stub(utils, 'triggerPixel'); + }); + afterEach(() => { + stub.restore(); + }); + it('Should create nurl pixel if bid nurl', function () { const data = [{ bidder: bidRequest.bidder, @@ -405,7 +405,7 @@ describe('RelaidoAdapter', function () { timeout: bidderRequest.timeout, }]; spec.onTimeout(data); - const parser = utils.parseUrl(triggerPixelStub.getCall(0).args[0]); + const parser = utils.parseUrl(stub.getCall(0).args[0]); const query = parser.search; expect(parser.hostname).to.equal('api.relaido.jp'); expect(parser.pathname).to.equal('/tr/v1/prebid/timeout.gif');