prebid.js 7.22.0 → 7.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/aaxBlockmeterRtdProvider.js +1 -0
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/admaticBidAdapter.js +1 -0
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/analyticsAdapter.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/audiencerunBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidViewability.js +1 -1
- package/dist/bidViewabilityIO.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bluebillywigBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/browsiRtdProvider.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -0
- package/dist/cleanioRtdProvider.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectIdSystem.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagement.js +1 -1
- package/dist/consentManagementUsp.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/dependencies.json +19 -0
- package/dist/dfpAdServerVideo.js +1 -1
- package/dist/dgkeywordRtdProvider.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/gdprEnforcement.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/googleAnalyticsAdapter.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/growthCodeIdSystem.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/impactifyBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/instreamTracking.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/jwplayerVideoProvider.js +1 -0
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -0
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediakeysBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/mgidRtdProvider.js +1 -0
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/multibid.js +1 -1
- package/dist/not-for-prod/prebid.js +153 -141
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxOrtbBidAdapter.js +1 -1
- package/dist/ortbConverter.js +1 -0
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/oxxionRtdProvider.js +1 -0
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pbsExtensions.js +1 -0
- package/dist/permutiveRtdProvider.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/priceFloors.js +1 -1
- package/dist/pubCommonId.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rtdModule.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/schain.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/spotxBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/teadsIdSystem.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/video.js +1 -0
- package/dist/videoModule.js +1 -0
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/videojsVideoProvider.js +1 -0
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/integrationExamples/gpt/mgidRtdProvider_example.html +143 -0
- package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +98 -0
- package/integrationExamples/videoModule/jwplayer/bidRequestScheduling.html +89 -0
- package/integrationExamples/videoModule/jwplayer/eventListeners.html +244 -0
- package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +122 -0
- package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +80 -0
- package/integrationExamples/videoModule/jwplayer/playlist.html +122 -0
- package/integrationExamples/videoModule/videojs/bidMarkedAsUsed.html +126 -0
- package/integrationExamples/videoModule/videojs/bidRequestScheduling.html +132 -0
- package/integrationExamples/videoModule/videojs/eventListeners.html +238 -0
- package/integrationExamples/videoModule/videojs/gamAdServerMediation.html +138 -0
- package/integrationExamples/videoModule/videojs/mediaMetadata.html +103 -0
- package/integrationExamples/videoModule/videojs/playlist.html +151 -0
- package/libraries/ortbConverter/README.md +378 -0
- package/libraries/ortbConverter/converter.js +135 -0
- package/libraries/ortbConverter/lib/composer.js +43 -0
- package/libraries/ortbConverter/lib/mergeProcessors.js +9 -0
- package/libraries/ortbConverter/lib/sizes.js +14 -0
- package/libraries/ortbConverter/processors/banner.js +40 -0
- package/libraries/ortbConverter/processors/default.js +167 -0
- package/libraries/ortbConverter/processors/mediaType.js +21 -0
- package/libraries/ortbConverter/processors/native.js +37 -0
- package/libraries/ortbConverter/processors/video.js +66 -0
- package/libraries/pbsExtensions/pbsExtensions.js +12 -0
- package/libraries/pbsExtensions/processors/aliases.js +17 -0
- package/libraries/pbsExtensions/processors/mediaType.js +23 -0
- package/libraries/pbsExtensions/processors/params.js +22 -0
- package/libraries/pbsExtensions/processors/pbs.js +99 -0
- package/libraries/pbsExtensions/processors/requestExtPrebid.js +30 -0
- package/libraries/pbsExtensions/processors/video.js +23 -0
- package/libraries/video/constants/enums.js +5 -0
- package/libraries/video/constants/events.js +97 -0
- package/libraries/video/constants/ortb.js +169 -0
- package/libraries/video/constants/vendorCodes.js +6 -0
- package/libraries/video/shared/eventHandler.js +18 -0
- package/libraries/video/shared/parentModule.js +82 -0
- package/libraries/video/shared/state.js +47 -0
- package/libraries/video/shared/vastXmlBuilder.js +77 -0
- package/libraries/video/shared/vastXmlEditor.js +115 -0
- package/modules/.submodules.json +7 -1
- package/modules/aaxBlockmeterRtdProvider.js +59 -0
- package/modules/aaxBlockmeterRtdProvider.md +48 -0
- package/modules/admaticBidAdapter.js +147 -0
- package/modules/admaticBidAdapter.md +48 -0
- package/modules/amxBidAdapter.js +1 -0
- package/modules/appnexusBidAdapter.js +38 -1
- package/modules/chtnwBidAdapter.js +110 -0
- package/modules/chtnwBidAdapter.md +31 -0
- package/modules/concertBidAdapter.js +44 -2
- package/modules/connectIdSystem.js +36 -23
- package/modules/connectIdSystem.md +3 -2
- package/modules/consentManagement.js +22 -1
- package/modules/consentManagementUsp.js +29 -7
- package/modules/criteoBidAdapter.js +25 -5
- package/modules/currency.js +9 -0
- package/modules/dgkeywordRtdProvider.js +3 -3
- package/modules/gridNMBidAdapter.js +10 -14
- package/modules/growthCodeIdSystem.js +9 -5
- package/modules/gumgumBidAdapter.js +4 -0
- package/modules/improvedigitalBidAdapter.js +191 -470
- package/modules/ixBidAdapter.js +54 -71
- package/modules/jwplayerVideoProvider.js +929 -0
- package/modules/jwplayerVideoProvider.md +25 -0
- package/modules/kargoBidAdapter.js +1 -1
- package/modules/kueezRtbBidAdapter.js +278 -0
- package/modules/kueezRtbBidAdapter.md +35 -0
- package/modules/magniteAnalyticsAdapter.js +6 -1
- package/modules/mgidRtdProvider.js +190 -0
- package/modules/mgidRtdProvider.md +51 -0
- package/modules/multibid/index.js +12 -0
- package/modules/openxOrtbBidAdapter.js +120 -275
- package/modules/oxxionRtdProvider.js +119 -0
- package/modules/oxxionRtdProvider.md +48 -0
- package/modules/permutiveRtdProvider.js +2 -1
- package/modules/permutiveRtdProvider.md +36 -1
- package/modules/prebidServerBidAdapter/index.js +19 -716
- package/modules/prebidServerBidAdapter/ortbConverter.js +274 -0
- package/modules/priceFloors.js +73 -1
- package/modules/pubmaticBidAdapter.js +21 -29
- package/modules/rtdModule/index.js +22 -1
- package/modules/schain.js +24 -1
- package/modules/spotxBidAdapter.js +16 -15
- package/modules/synacormediaBidAdapter.js +1 -1
- package/modules/teadsIdSystem.js +5 -0
- package/modules/tripleliftBidAdapter.js +1 -1
- package/modules/userId/eids.js +3 -10
- package/modules/userId/index.js +64 -6
- package/modules/videoModule/addingSubmodule.md +521 -0
- package/modules/videoModule/coreVideo.js +234 -0
- package/modules/videoModule/gamAdServerSubmodule.js +27 -0
- package/modules/videoModule/index.js +244 -0
- package/modules/videoModule/videoImpressionVerifier.js +206 -0
- package/modules/videojsVideoProvider.js +854 -0
- package/modules/videojsVideoProvider.md +17 -0
- package/package.json +12 -8
- package/src/adRendering.js +1 -1
- package/src/adapterManager.js +56 -7
- package/src/adloader.js +3 -1
- package/src/auction.js +6 -1
- package/src/events.js +5 -1
- package/src/pbjsORTB.js +35 -0
- package/src/prebid.js +137 -112
- package/src/targeting.js +10 -2
- package/src/utils/currency.js +16 -0
- package/src/utils.js +21 -0
- package/test/spec/auctionmanager_spec.js +15 -0
- package/test/spec/modules/aaxBlockmeter_spec.js +58 -0
- package/test/spec/modules/admaticBidAdapter_spec.js +46 -0
- package/test/spec/modules/chtnwBidAdapter_spec.js +105 -0
- package/test/spec/modules/concertBidAdapter_spec.js +56 -0
- package/test/spec/modules/connectIdSystem_spec.js +175 -5
- package/test/spec/modules/consentManagementUsp_spec.js +64 -18
- package/test/spec/modules/criteoBidAdapter_spec.js +28 -0
- package/test/spec/modules/dgkeywordRtdProvider_spec.js +3 -3
- package/test/spec/modules/eids_spec.js +10 -7
- package/test/spec/modules/ftrackIdSystem_spec.js +34 -22
- package/test/spec/modules/gumgumBidAdapter_spec.js +15 -0
- package/test/spec/modules/improvedigitalBidAdapter_spec.js +231 -211
- package/test/spec/modules/ixBidAdapter_spec.js +412 -350
- package/test/spec/modules/kueezRtbBidAdapter_spec.js +396 -0
- package/test/spec/modules/magniteAnalyticsAdapter_spec.js +26 -0
- package/test/spec/modules/mgidRtdProvider_spec.js +366 -0
- package/test/spec/modules/openxOrtbBidAdapter_spec.js +77 -49
- package/test/spec/modules/oxxionRtdProvider_spec.js +142 -0
- package/test/spec/modules/permutiveRtdProvider_spec.js +64 -5
- package/test/spec/modules/prebidServerBidAdapter_spec.js +139 -137
- package/test/spec/modules/realTimeDataModule_spec.js +65 -0
- package/test/spec/modules/tripleliftBidAdapter_spec.js +14 -0
- package/test/spec/modules/userId_spec.js +67 -1
- package/test/spec/modules/videoModule/coreVideo_spec.js +98 -0
- package/test/spec/modules/videoModule/pbVideo_spec.js +362 -0
- package/test/spec/modules/videoModule/shared/parentModule_spec.js +73 -0
- package/test/spec/modules/videoModule/shared/state_spec.js +26 -0
- package/test/spec/modules/videoModule/shared/vastXmlBuilder_spec.js +103 -0
- package/test/spec/modules/videoModule/shared/vastXmlEditor_spec.js +209 -0
- package/test/spec/modules/videoModule/submodules/jwplayerVideoProvider_spec.js +846 -0
- package/test/spec/modules/videoModule/submodules/videojsVideoProvider_spec.js +391 -0
- package/test/spec/modules/videoModule/videoImpressionVerifier_spec.js +112 -0
- package/test/spec/ortbConverter/banner_spec.js +203 -0
- package/test/spec/ortbConverter/composer_spec.js +69 -0
- package/test/spec/ortbConverter/converter_spec.js +283 -0
- package/test/spec/ortbConverter/currency_spec.js +40 -0
- package/test/spec/ortbConverter/default_processors_spec.js +61 -0
- package/test/spec/ortbConverter/gdpr_spec.js +38 -0
- package/test/spec/ortbConverter/mediaTypes_spec.js +67 -0
- package/test/spec/ortbConverter/mergeProcessors_spec.js +59 -0
- package/test/spec/ortbConverter/multibid_spec.js +35 -0
- package/test/spec/ortbConverter/native_spec.js +95 -0
- package/test/spec/ortbConverter/pbjsORTB_spec.js +67 -0
- package/test/spec/ortbConverter/pbsExtensions/aliases_spec.js +57 -0
- package/test/spec/ortbConverter/pbsExtensions/params_spec.js +96 -0
- package/test/spec/ortbConverter/pbsExtensions/video_spec.js +52 -0
- package/test/spec/ortbConverter/priceFloors_spec.js +143 -0
- package/test/spec/ortbConverter/schain_spec.js +33 -0
- package/test/spec/ortbConverter/userId_spec.js +21 -0
- package/test/spec/ortbConverter/usp_spec.js +15 -0
- package/test/spec/ortbConverter/video_spec.js +189 -0
- package/test/spec/unit/core/adapterManager_spec.js +102 -0
- package/test/spec/unit/core/targeting_spec.js +34 -0
- package/test/spec/unit/pbjs_api_spec.js +124 -45
- package/test/spec/utils_spec.js +45 -1
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
|
-
import { spec
|
|
2
|
+
import {CONVERTER, spec} from 'modules/improvedigitalBidAdapter.js';
|
|
3
3
|
import { config } from 'src/config.js';
|
|
4
4
|
import { deepClone } from 'src/utils.js';
|
|
5
5
|
import {BANNER, NATIVE, VIDEO} from '../../../src/mediaTypes';
|
|
6
6
|
import { deepSetValue } from '../../../src/utils';
|
|
7
|
+
// load modules that register ORTB processors
|
|
8
|
+
import 'src/prebid.js';
|
|
9
|
+
import 'modules/currency.js';
|
|
10
|
+
import 'modules/userId/index.js';
|
|
11
|
+
import 'modules/multibid/index.js';
|
|
12
|
+
import 'modules/priceFloors.js';
|
|
13
|
+
import 'modules/consentManagement.js';
|
|
14
|
+
import 'modules/consentManagementUsp.js';
|
|
15
|
+
import 'modules/schain.js';
|
|
16
|
+
import {decorateAdUnitsWithNativeParams, toLegacyResponse} from '../../../src/native.js';
|
|
17
|
+
import {createEidsArray} from '../../../modules/userId/eids.js';
|
|
7
18
|
|
|
8
19
|
describe('Improve Digital Adapter Tests', function () {
|
|
9
20
|
const METHOD = 'POST';
|
|
10
|
-
const
|
|
11
|
-
const
|
|
21
|
+
const AD_SERVER_BASE_URL = 'https://ad.360yield.com';
|
|
22
|
+
const BASIC_ADS_BASE_URL = 'https://ad.360yield-basic.com';
|
|
23
|
+
const PB_ENDPOINT = 'pb';
|
|
24
|
+
const AD_SERVER_URL = `${AD_SERVER_BASE_URL}/${PB_ENDPOINT}`;
|
|
25
|
+
const BASIC_ADS_URL = `${BASIC_ADS_BASE_URL}/${PB_ENDPOINT}`;
|
|
12
26
|
const EXTEND_URL = 'https://pbs.360yield.com/openrtb2/auction';
|
|
13
27
|
const IFRAME_SYNC_URL = 'https://hb.360yield.com/prebid-universal-creative/load-cookie.html';
|
|
14
28
|
const INSTREAM_TYPE = 1;
|
|
@@ -93,6 +107,7 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
93
107
|
};
|
|
94
108
|
|
|
95
109
|
const simpleSmartTagBidRequest = {
|
|
110
|
+
mediaTypes: {},
|
|
96
111
|
bidder: 'improvedigital',
|
|
97
112
|
bidId: '1a2b3c',
|
|
98
113
|
placementCode: 'placement1',
|
|
@@ -103,27 +118,27 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
103
118
|
};
|
|
104
119
|
|
|
105
120
|
const bidderRequest = {
|
|
106
|
-
bids: [simpleBidRequest]
|
|
121
|
+
bids: [simpleBidRequest],
|
|
107
122
|
};
|
|
108
123
|
|
|
109
124
|
const extendBidderRequest = {
|
|
110
|
-
bids: [extendBidRequest]
|
|
125
|
+
bids: [extendBidRequest],
|
|
111
126
|
};
|
|
112
127
|
|
|
113
128
|
const instreamBidderRequest = {
|
|
114
|
-
bids: [instreamBidRequest]
|
|
129
|
+
bids: [instreamBidRequest],
|
|
115
130
|
};
|
|
116
131
|
|
|
117
132
|
const outstreamBidderRequest = {
|
|
118
|
-
bids: [outstreamBidRequest]
|
|
133
|
+
bids: [outstreamBidRequest],
|
|
119
134
|
};
|
|
120
135
|
|
|
121
136
|
const multiFormatBidderRequest = {
|
|
122
|
-
bids: [multiFormatBidRequest]
|
|
137
|
+
bids: [multiFormatBidRequest],
|
|
123
138
|
};
|
|
124
139
|
|
|
125
140
|
const nativeBidderRequest = {
|
|
126
|
-
bids: [nativeBidRequest]
|
|
141
|
+
bids: [nativeBidRequest],
|
|
127
142
|
};
|
|
128
143
|
|
|
129
144
|
const gdprConsent = {
|
|
@@ -147,6 +162,12 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
147
162
|
},
|
|
148
163
|
};
|
|
149
164
|
|
|
165
|
+
function updateNativeParams(bidRequests) {
|
|
166
|
+
bidRequests = deepClone(bidRequests);
|
|
167
|
+
decorateAdUnitsWithNativeParams(bidRequests);
|
|
168
|
+
return bidRequests;
|
|
169
|
+
}
|
|
170
|
+
|
|
150
171
|
describe('isBidRequestValid', function () {
|
|
151
172
|
it('should return false when no bid', function () {
|
|
152
173
|
expect(spec.isBidRequestValid()).to.equal(false);
|
|
@@ -203,20 +224,18 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
203
224
|
expect(request).to.be.an('object');
|
|
204
225
|
expect(request.method).to.equal(METHOD);
|
|
205
226
|
expect(request.url).to.equal(AD_SERVER_URL);
|
|
206
|
-
expect(request.bidderRequest).to.deep.equal(bidderRequest);
|
|
207
227
|
|
|
208
228
|
const payload = JSON.parse(request.data);
|
|
209
229
|
expect(payload).to.be.an('object');
|
|
210
230
|
expect(payload.id).to.be.a('string');
|
|
211
231
|
expect(payload.tmax).not.to.exist;
|
|
212
|
-
expect(payload.cur).to.be.an('array');
|
|
213
232
|
expect(payload.regs).to.not.exist;
|
|
214
233
|
expect(payload.schain).to.not.exist;
|
|
215
|
-
|
|
234
|
+
sinon.assert.match(payload.source, {tid: 'f183e871-fbed-45f0-a427-c8a63c4c01eb'})
|
|
216
235
|
expect(payload.device).to.be.an('object');
|
|
217
236
|
expect(payload.user).to.not.exist;
|
|
218
|
-
|
|
219
|
-
{
|
|
237
|
+
sinon.assert.match(payload.imp, [
|
|
238
|
+
sinon.match({
|
|
220
239
|
id: '33e9500b21129f',
|
|
221
240
|
secure: 0,
|
|
222
241
|
ext: {
|
|
@@ -230,28 +249,23 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
230
249
|
{w: 160, h: 600},
|
|
231
250
|
]
|
|
232
251
|
}
|
|
233
|
-
}
|
|
252
|
+
})
|
|
234
253
|
]);
|
|
235
254
|
});
|
|
236
255
|
|
|
237
256
|
it('should make a well-formed request object for multi-format ad unit', function () {
|
|
238
257
|
getConfigStub = sinon.stub(config, 'getConfig');
|
|
239
258
|
getConfigStub.withArgs('improvedigital.usePrebidSizes').returns(true);
|
|
240
|
-
const request = spec.buildRequests([multiFormatBidRequest], multiFormatBidderRequest)[0];
|
|
259
|
+
const request = spec.buildRequests(updateNativeParams([multiFormatBidRequest]), multiFormatBidderRequest)[0];
|
|
241
260
|
expect(request).to.be.an('object');
|
|
242
261
|
expect(request.method).to.equal(METHOD);
|
|
243
262
|
expect(request.url).to.equal(AD_SERVER_URL);
|
|
244
|
-
expect(request.bidderRequest).to.deep.equal(multiFormatBidderRequest);
|
|
245
263
|
|
|
246
264
|
const payload = JSON.parse(request.data);
|
|
247
265
|
expect(payload).to.be.an('object');
|
|
248
|
-
|
|
249
|
-
{
|
|
266
|
+
sinon.assert.match(payload.imp, [
|
|
267
|
+
sinon.match({
|
|
250
268
|
id: '33e9500b21129f',
|
|
251
|
-
native: {
|
|
252
|
-
request: '{"eventtrackers":[{"event":1,"methods":[1,2]}],"assets":[{"id":3,"required":1,"data":{"type":2}}]}',
|
|
253
|
-
ver: '1.2'
|
|
254
|
-
},
|
|
255
269
|
secure: 0,
|
|
256
270
|
ext: {
|
|
257
271
|
bidder: {
|
|
@@ -270,53 +284,54 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
270
284
|
{w: 160, h: 600},
|
|
271
285
|
]
|
|
272
286
|
}
|
|
273
|
-
}
|
|
287
|
+
})
|
|
274
288
|
]);
|
|
289
|
+
if (FEATURES.NATIVE) {
|
|
290
|
+
sinon.assert.match(payload.imp[0], {
|
|
291
|
+
native: {
|
|
292
|
+
ver: '1.2'
|
|
293
|
+
},
|
|
294
|
+
})
|
|
295
|
+
const nativeReq = JSON.parse(payload.imp[0].native.request);
|
|
296
|
+
sinon.assert.match(nativeReq, {
|
|
297
|
+
eventtrackers: [
|
|
298
|
+
{event: 1, methods: [1, 2]},
|
|
299
|
+
],
|
|
300
|
+
'assets': [
|
|
301
|
+
sinon.match({'required': 1, 'data': {'type': 2}})
|
|
302
|
+
]
|
|
303
|
+
});
|
|
304
|
+
}
|
|
275
305
|
});
|
|
276
306
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
307
|
+
if (FEATURES.NATIVE) {
|
|
308
|
+
it('should make a well-formed native request', function () {
|
|
309
|
+
const payload = JSON.parse(spec.buildRequests(updateNativeParams([nativeBidRequest]), {})[0].data);
|
|
310
|
+
const nativeReq = JSON.parse(payload.imp[0].native.request);
|
|
311
|
+
sinon.assert.match(nativeReq, {
|
|
312
|
+
eventtrackers: [
|
|
313
|
+
{event: 1, methods: [1, 2]},
|
|
314
|
+
],
|
|
315
|
+
assets: [
|
|
316
|
+
sinon.match({required: 1, title: {len: 140}}),
|
|
317
|
+
sinon.match({required: 1, data: {type: 2}})
|
|
318
|
+
]
|
|
319
|
+
})
|
|
282
320
|
});
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
it('should not make native request when nativeParams is undefined', function () {
|
|
286
|
-
const request = deepClone(nativeBidRequest);
|
|
287
|
-
delete request.nativeParams;
|
|
288
|
-
const payload = JSON.parse(spec.buildRequests([request], {})[0].data);
|
|
289
|
-
expect(payload.imp[0].native).to.not.exist;
|
|
290
|
-
});
|
|
291
321
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
it('should make a well-formed native request', function () {
|
|
300
|
-
const payload = JSON.parse(spec.buildRequests([nativeBidRequest], {})[0].data);
|
|
301
|
-
expect(payload.imp[0].native).to.deep.equal({
|
|
302
|
-
ver: '1.2',
|
|
303
|
-
request: '{"eventtrackers":[{"event":1,"methods":[1,2]}],"assets":[{"id":0,"required":1,"title":{"len":140}},{"id":3,"required":1,"data":{"type":2}}]}'
|
|
322
|
+
it('should not make native request when nativeOrtbRequest is undefined', function () {
|
|
323
|
+
const requests = updateNativeParams([nativeBidRequest]);
|
|
324
|
+
delete requests[0].nativeOrtbRequest;
|
|
325
|
+
const payload = JSON.parse(spec.buildRequests(requests, {})[0].data);
|
|
326
|
+
expect(payload.imp[0].native).to.not.exist;
|
|
304
327
|
});
|
|
305
|
-
});
|
|
306
328
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
it('should not make native request when no assets', function () {
|
|
315
|
-
const request = deepClone(nativeBidRequest);
|
|
316
|
-
request.nativeParams = {};
|
|
317
|
-
const payload = JSON.parse(spec.buildRequests([request], {})[0].data);
|
|
318
|
-
expect(payload.imp[0].native).to.not.exist;
|
|
319
|
-
});
|
|
329
|
+
it('should not make native request when no assets', function () {
|
|
330
|
+
const requests = updateNativeParams([{...nativeBidRequest, nativeParams: {}}])
|
|
331
|
+
const payload = JSON.parse(spec.buildRequests(requests, {})[0].data);
|
|
332
|
+
expect(payload.imp[0].native).to.not.exist;
|
|
333
|
+
});
|
|
334
|
+
}
|
|
320
335
|
|
|
321
336
|
it('should set placementKey and publisherId for smart tags', function () {
|
|
322
337
|
const payload = JSON.parse(spec.buildRequests([simpleSmartTagBidRequest], bidderRequest)[0].data);
|
|
@@ -337,10 +352,14 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
337
352
|
});
|
|
338
353
|
|
|
339
354
|
it('should add currency', function () {
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
355
|
+
config.setConfig({currency: {adServerCurrency: 'JPY'}});
|
|
356
|
+
try {
|
|
357
|
+
const bidRequest = Object.assign({}, simpleBidRequest);
|
|
358
|
+
const payload = JSON.parse(spec.buildRequests([bidRequest], bidderRequest)[0].data);
|
|
359
|
+
expect(payload.cur).to.deep.equal(['JPY']);
|
|
360
|
+
} finally {
|
|
361
|
+
config.resetConfig();
|
|
362
|
+
}
|
|
344
363
|
});
|
|
345
364
|
|
|
346
365
|
it('should add bid floor', function () {
|
|
@@ -374,6 +393,7 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
374
393
|
const payload = JSON.parse(spec.buildRequests([bidRequest], bidderRequestGdpr)[0].data);
|
|
375
394
|
expect(payload.regs.ext.gdpr).to.exist.and.to.equal(1);
|
|
376
395
|
expect(payload.user.ext.consent).to.equal('CONSENT');
|
|
396
|
+
expect(payload.user.ext.ConsentedProvidersSettings).to.not.exist;
|
|
377
397
|
expect(payload.user.ext.consented_providers_settings.consented_providers).to.exist.and.to.deep.equal([1, 35, 41, 101]);
|
|
378
398
|
});
|
|
379
399
|
|
|
@@ -385,6 +405,15 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
385
405
|
expect(payload.user.ext.consented_providers_settings).to.not.exist;
|
|
386
406
|
});
|
|
387
407
|
|
|
408
|
+
it('should add ConsentedProvidersSettings when extend mode enabled', function () {
|
|
409
|
+
const bidRequest = deepClone(extendBidRequest);
|
|
410
|
+
const payload = JSON.parse(spec.buildRequests([bidRequest], bidderRequestGdpr)[0].data);
|
|
411
|
+
expect(payload.regs.ext.gdpr).to.exist.and.to.equal(1);
|
|
412
|
+
expect(payload.user.ext.consent).to.equal('CONSENT');
|
|
413
|
+
expect(payload.user.ext.ConsentedProvidersSettings.consented_providers).to.exist.and.to.equal('1~1.35.41.101');
|
|
414
|
+
expect(payload.user.ext.consented_providers_settings).to.not.exist;
|
|
415
|
+
});
|
|
416
|
+
|
|
388
417
|
it('should add CCPA consent string', function () {
|
|
389
418
|
const bidRequest = Object.assign({}, simpleBidRequest);
|
|
390
419
|
const request = spec.buildRequests([bidRequest], {...bidderRequest, ...{ uspConsent: '1YYY' }});
|
|
@@ -486,40 +515,6 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
486
515
|
expect(payload.imp[0].video.w).equal(640);
|
|
487
516
|
});
|
|
488
517
|
|
|
489
|
-
it('should set skip params only if skip=1', function() {
|
|
490
|
-
const bidRequest = deepClone(instreamBidRequest);
|
|
491
|
-
// 1
|
|
492
|
-
const videoTest = {
|
|
493
|
-
skip: 1,
|
|
494
|
-
skipmin: 5,
|
|
495
|
-
skipafter: 30
|
|
496
|
-
}
|
|
497
|
-
bidRequest.params.video = videoTest;
|
|
498
|
-
let request = spec.buildRequests([bidRequest], {})[0];
|
|
499
|
-
let payload = JSON.parse(request.data);
|
|
500
|
-
expect(payload.imp[0].video.skip).to.equal(1);
|
|
501
|
-
expect(payload.imp[0].video.skipmin).to.equal(5);
|
|
502
|
-
expect(payload.imp[0].video.skipafter).to.equal(30);
|
|
503
|
-
|
|
504
|
-
// 0 - leave out skipmin and skipafter
|
|
505
|
-
videoTest.skip = 0;
|
|
506
|
-
bidRequest.params.video = videoTest;
|
|
507
|
-
request = spec.buildRequests([bidRequest], {})[0];
|
|
508
|
-
payload = JSON.parse(request.data);
|
|
509
|
-
expect(payload.imp[0].video.skip).to.equal(0);
|
|
510
|
-
expect(payload.imp[0].video.skipmin).to.not.exist;
|
|
511
|
-
expect(payload.imp[0].video.skipafter).to.not.exist;
|
|
512
|
-
|
|
513
|
-
// other
|
|
514
|
-
videoTest.skip = 'blah';
|
|
515
|
-
bidRequest.params.video = videoTest;
|
|
516
|
-
request = spec.buildRequests([bidRequest], {})[0];
|
|
517
|
-
payload = JSON.parse(request.data);
|
|
518
|
-
expect(payload.imp[0].video.skip).to.not.exist;
|
|
519
|
-
expect(payload.imp[0].video.skipmin).to.not.exist;
|
|
520
|
-
expect(payload.imp[0].video.skipafter).to.not.exist;
|
|
521
|
-
});
|
|
522
|
-
|
|
523
518
|
it('should ignore invalid/unexpected video params', function() {
|
|
524
519
|
const bidRequest = deepClone(instreamBidRequest);
|
|
525
520
|
// 1
|
|
@@ -583,7 +578,7 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
583
578
|
}]
|
|
584
579
|
}]}};
|
|
585
580
|
const bidRequest = Object.assign({}, simpleBidRequest);
|
|
586
|
-
bidRequest.
|
|
581
|
+
bidRequest.userIdAsEids = createEidsArray(userId);
|
|
587
582
|
const request = spec.buildRequests([bidRequest], bidderRequestReferrer)[0];
|
|
588
583
|
const payload = JSON.parse(request.data);
|
|
589
584
|
expect(payload.user).to.deep.equal(expectedUserObject);
|
|
@@ -596,8 +591,6 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
596
591
|
], bidderRequest);
|
|
597
592
|
expect(requests).to.be.an('array');
|
|
598
593
|
expect(requests.length).to.equal(2);
|
|
599
|
-
expect(requests[0].bidderRequest).to.deep.equal(bidderRequest);
|
|
600
|
-
expect(requests[1].bidderRequest).to.deep.equal(bidderRequest);
|
|
601
594
|
});
|
|
602
595
|
|
|
603
596
|
it('should return one request in a single request mode', function () {
|
|
@@ -632,7 +625,7 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
632
625
|
getConfigStub.withArgs('improvedigital.usePrebidSizes').returns(true);
|
|
633
626
|
const request = spec.buildRequests([simpleBidRequest], bidderRequest)[0];
|
|
634
627
|
const payload = JSON.parse(request.data);
|
|
635
|
-
|
|
628
|
+
sinon.assert.match(payload.imp[0].banner, {
|
|
636
629
|
format: [
|
|
637
630
|
{ w: 300, h: 250 },
|
|
638
631
|
{ w: 160, h: 600 }
|
|
@@ -651,7 +644,7 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
651
644
|
bidRequest.params.size = size;
|
|
652
645
|
const request = spec.buildRequests([bidRequest], bidderRequest)[0];
|
|
653
646
|
const payload = JSON.parse(request.data);
|
|
654
|
-
|
|
647
|
+
sinon.assert.match(payload.imp[0].banner, {
|
|
655
648
|
format: [
|
|
656
649
|
{ w: 300, h: 250 },
|
|
657
650
|
{ w: 160, h: 600 }
|
|
@@ -659,44 +652,6 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
659
652
|
});
|
|
660
653
|
});
|
|
661
654
|
|
|
662
|
-
it('should set GPID and Instl Signal', function () {
|
|
663
|
-
const bidRequest = Object.assign({
|
|
664
|
-
ortb2Imp: {
|
|
665
|
-
instl: true,
|
|
666
|
-
ext: {
|
|
667
|
-
gpid: '/123/ID-FORMAT',
|
|
668
|
-
data: {
|
|
669
|
-
pbadslot: '/123/ID-FORMAT-PBADSLOT',
|
|
670
|
-
adserver: {
|
|
671
|
-
adslot: '/123/ID-FORMAT-ADSERVER-PB-ADSLOT',
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
},
|
|
675
|
-
}
|
|
676
|
-
}, simpleBidRequest);
|
|
677
|
-
let request = spec.buildRequests([bidRequest], bidderRequest)[0];
|
|
678
|
-
let payload = JSON.parse(request.data);
|
|
679
|
-
expect(payload.imp[0].ext.gpid).to.equal('/123/ID-FORMAT');
|
|
680
|
-
expect(payload.imp[0].instl).to.equal(1);
|
|
681
|
-
|
|
682
|
-
delete bidRequest.ortb2Imp.ext.gpid;
|
|
683
|
-
request = spec.buildRequests([bidRequest], bidderRequest)[0];
|
|
684
|
-
payload = JSON.parse(request.data);
|
|
685
|
-
expect(payload.imp[0].ext.gpid).to.equal('/123/ID-FORMAT-PBADSLOT');
|
|
686
|
-
|
|
687
|
-
delete bidRequest.ortb2Imp.ext.data.pbadslot;
|
|
688
|
-
request = spec.buildRequests([bidRequest], bidderRequest)[0];
|
|
689
|
-
payload = JSON.parse(request.data);
|
|
690
|
-
expect(payload.imp[0].ext.gpid).to.equal('/123/ID-FORMAT-ADSERVER-PB-ADSLOT');
|
|
691
|
-
|
|
692
|
-
delete bidRequest.ortb2Imp.ext.data.adserver;
|
|
693
|
-
delete bidRequest.ortb2Imp.instl;
|
|
694
|
-
request = spec.buildRequests([bidRequest], bidderRequest)[0];
|
|
695
|
-
payload = JSON.parse(request.data);
|
|
696
|
-
expect(payload.imp[0].ext.gpid).to.not.exist;
|
|
697
|
-
expect(payload.imp[0].instl).to.not.exist;
|
|
698
|
-
});
|
|
699
|
-
|
|
700
655
|
it('should not set site when app is defined in FPD', function () {
|
|
701
656
|
const ortb2 = {app: {content: 'XYZ'}};
|
|
702
657
|
let request = spec.buildRequests([simpleBidRequest], {...bidderRequest, ortb2})[0];
|
|
@@ -747,6 +702,7 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
747
702
|
it('should set site when app not available', function () {
|
|
748
703
|
getConfigStub = sinon.stub(config, 'getConfig');
|
|
749
704
|
getConfigStub.withArgs('app').returns(undefined);
|
|
705
|
+
getConfigStub.withArgs('site').returns({});
|
|
750
706
|
let request = spec.buildRequests([simpleBidRequest], bidderRequest)[0];
|
|
751
707
|
let payload = JSON.parse(request.data);
|
|
752
708
|
expect(payload.site).does.exist;
|
|
@@ -810,6 +766,64 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
810
766
|
expect(requests[0].url).to.equal(AD_SERVER_URL);
|
|
811
767
|
expect(requests[1].url).to.equal(EXTEND_URL);
|
|
812
768
|
});
|
|
769
|
+
|
|
770
|
+
it('should add publisherId to request URL when available in request params', function() {
|
|
771
|
+
function formatPublisherUrl(baseUrl, publisherId) {
|
|
772
|
+
return `${baseUrl}/${publisherId}/${PB_ENDPOINT}`;
|
|
773
|
+
}
|
|
774
|
+
const bidRequest = deepClone(simpleBidRequest);
|
|
775
|
+
bidRequest.params.publisherId = 1000;
|
|
776
|
+
let request = spec.buildRequests([bidRequest], bidderRequest)[0];
|
|
777
|
+
expect(request).to.be.an('object');
|
|
778
|
+
sinon.assert.match(request, {
|
|
779
|
+
method: METHOD,
|
|
780
|
+
url: formatPublisherUrl(AD_SERVER_BASE_URL, 1000),
|
|
781
|
+
bidderRequest
|
|
782
|
+
});
|
|
783
|
+
|
|
784
|
+
const bidRequest2 = deepClone(simpleBidRequest)
|
|
785
|
+
bidRequest2.params.publisherId = 1002;
|
|
786
|
+
|
|
787
|
+
const bidRequest3 = deepClone(extendBidRequest)
|
|
788
|
+
bidRequest3.params.publisherId = 1002;
|
|
789
|
+
|
|
790
|
+
const request1 = spec.buildRequests([bidRequest, bidRequest2], bidderRequest)[0];
|
|
791
|
+
expect(request1.url).to.equal(formatPublisherUrl(AD_SERVER_BASE_URL, 1000));
|
|
792
|
+
const request2 = spec.buildRequests([bidRequest, bidRequest2], bidderRequest)[1];
|
|
793
|
+
expect(request2.url).to.equal(formatPublisherUrl(AD_SERVER_BASE_URL, 1002));
|
|
794
|
+
const request3 = spec.buildRequests([bidRequest, bidRequest3], bidderRequest)[1];
|
|
795
|
+
expect(request3.url).to.equal(EXTEND_URL);
|
|
796
|
+
|
|
797
|
+
// Enable single request mode
|
|
798
|
+
getConfigStub = sinon.stub(config, 'getConfig');
|
|
799
|
+
getConfigStub.withArgs('improvedigital.singleRequest').returns(true);
|
|
800
|
+
try {
|
|
801
|
+
spec.buildRequests([bidRequest, bidRequest2], bidderRequest)[0];
|
|
802
|
+
} catch (e) {
|
|
803
|
+
expect(e.name).to.exist.equal('Error')
|
|
804
|
+
expect(e.message).to.exist.equal(`All Improve Digital placements in a single call must have the same publisherId. Please check your 'params.publisherId' or turn off the single request mode.`)
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
bidRequest2.params.publisherId = null;
|
|
808
|
+
request = spec.buildRequests([bidRequest, bidRequest2], bidderRequest)[0];
|
|
809
|
+
expect(request.url).to.equal(formatPublisherUrl(AD_SERVER_BASE_URL, 1000));
|
|
810
|
+
|
|
811
|
+
const consent = deepClone(gdprConsent);
|
|
812
|
+
deepSetValue(consent, 'vendorData.purpose.consents.1', false);
|
|
813
|
+
const bidderRequestWithConsent = deepClone(bidderRequest);
|
|
814
|
+
bidderRequestWithConsent.gdprConsent = consent;
|
|
815
|
+
request = spec.buildRequests([bidRequest], bidderRequestWithConsent)[0];
|
|
816
|
+
expect(request.url).to.equal(formatPublisherUrl(BASIC_ADS_BASE_URL, 1000));
|
|
817
|
+
|
|
818
|
+
deepSetValue(consent, 'vendorData.purpose.consents.1', true);
|
|
819
|
+
bidderRequestWithConsent.gdprConsent = consent;
|
|
820
|
+
request = spec.buildRequests([bidRequest], bidderRequestWithConsent)[0];
|
|
821
|
+
expect(request.url).to.equal(formatPublisherUrl(AD_SERVER_BASE_URL, 1000));
|
|
822
|
+
|
|
823
|
+
delete bidRequest.params.publisherId;
|
|
824
|
+
request = spec.buildRequests([bidRequest], bidderRequestWithConsent)[0];
|
|
825
|
+
expect(request.url).to.equal(AD_SERVER_URL);
|
|
826
|
+
});
|
|
813
827
|
});
|
|
814
828
|
|
|
815
829
|
const serverResponse = {
|
|
@@ -829,7 +843,6 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
829
843
|
'agency_id': '0'
|
|
830
844
|
}
|
|
831
845
|
},
|
|
832
|
-
'exp': 120,
|
|
833
846
|
'crid': '510265',
|
|
834
847
|
'price': 1.9200543539802946,
|
|
835
848
|
'id': '35adfe19-d6e9-46b9-9f7d-20da7026b965',
|
|
@@ -872,7 +885,6 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
872
885
|
'agency_id': '0'
|
|
873
886
|
}
|
|
874
887
|
},
|
|
875
|
-
'exp': 120,
|
|
876
888
|
'crid': '510265',
|
|
877
889
|
'price': 1.9200543539802946,
|
|
878
890
|
'id': '35adfe19-d6e9-46b9-9f7d-20da7026b965',
|
|
@@ -892,7 +904,6 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
892
904
|
'agency_id': '0'
|
|
893
905
|
}
|
|
894
906
|
},
|
|
895
|
-
'exp': 120,
|
|
896
907
|
'crid': '479163',
|
|
897
908
|
'price': 1.9200543539802946,
|
|
898
909
|
'id': '83c8d524-0955-4d0c-b558-4c9f3600e09b',
|
|
@@ -937,10 +948,9 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
937
948
|
}
|
|
938
949
|
},
|
|
939
950
|
'crid': '544456',
|
|
940
|
-
'exp': 120,
|
|
941
951
|
'id': '52098fad-20c1-476b-a4fa-41e275e5a4a5',
|
|
942
952
|
'price': 1.8600000000000003,
|
|
943
|
-
'adm':
|
|
953
|
+
'adm': "{\"ver\":\"1.1\",\"imptrackers\":[\"https://secure.adnxs.com/imptr?id=52311&t=2\",\"https://euw-ice.360yield.com/imp_pixel?ic=hcUBlCANx1FabHBf6FR2gC7UO4xEyXahdZAn0-B5qL-bb3A74BJ1smyWIyW7IWcC0SOjSXzVpevTHXxTqJ.sf.Qhahyy6tSo.0j1QWfXlH8sM4-8vKWjMjw-x.IrJJNlwkQ0s1CdwcwTefcLXm5l2E-W19VhACuV7f3mgrZMNjiSw.SjJAfyPC3SIyAMRjYfj53UmjriQ46T7lhmkqxK8wHmksYCdbZc3PZESk8NWl28sxdjNvnYYCFMcJbeav.LOLabyTXfwy-1cEPbQs.IKMRZIKaqccTDPV3wOtzbNv0jQzatd3Nnv-PGFQcjQ-GW3i27W04Fws4kodpFSn-B6VwZAjzLzoyd5gBncyRnAyCplEbgHU5sZ1IyKHWjgCl3ZtRIK5vqrRD5D-xqgSnOi7-phG.CqZWDZ4bMDSfQg2ZnbvUTyGKcEl0WR59dW5izTMV4Fjizcrvr5T-t.zMbGwz.hGnmLIyhTqh.IcwW.GiDLVExlDlix5S1LXIWVsSyrQ==\"],\"assets\":[{\"id\":1,\"data\":{\"value\":\"ImproveDigital\",\"type\":1}},{\"id\":3,\"data\":{\"value\":\"Test content.\",\"type\":2}},{\"id\":0,\"title\":{\"text\":\"Sample Prebid Test Title\"}}],\"link\":{\"url\":\"https://euw-ice.360yield.com/click/hcUBlHOV7YhVse8RyBa0ajjyPa9Vt17e4g-1m3cRj3E67vq-RYux.SiUeAmBfNBcoOqkUc6A15AWmi4yFu5K-BdkaYjildyyk7fNLyR6hWr411kv4vrFwm5jrIBceuHS6K8oN69f.uCo8zGTdR2TbSlldwcpahQPlufZU.6VaMsu4IC53uEiUT5vb7kAw6TTlxuGBNq6zaGryiWEV2.N3YYJDTyYPh8tv-ZFyeFZFm0Gnjv.xWbC.70JcRUVU9UelQaPsTpTWYTXBhJt84YJUw1-GNtaLNVLSjjZbVoA2fsMti5p6OBmF.7u39on2OPgvseIkSmge7Pqg63pRqdP75hp.DAEk6OkcN1jGnwP2DSbvpaSbin5lVqjfO0B-wnQgfQTCUtM5v4JmkNweLhUf9Q-x.nPKLW5SccEk9ZFXzY2-1wpT3PWm8Tix3NRscLPZub9wHzL..pl6ip8cQ9hp16UjwT4H6RMAxL0R7bl-h2pAicGAzYmuO7ntRESKUoIWA==//http%3A%2F%2Fquantum-advertising.com%2Ffr%2F\"},\"jstracker\":\"<script type=\\\"application/javascript\\\">var js_tracker = ['https://secure.adnxs.com/imptr?id=52312&t=1', 'https://pixel.adsafeprotected.com/rjss/st/291611/36974035/skeleton.js?ias_adpath=[class~=ea_improve_pid_${TAG_ID}]']</script>\"}",
|
|
944
954
|
'impid': '33e9500b21129f',
|
|
945
955
|
'cid': '196108'
|
|
946
956
|
}
|
|
@@ -968,7 +978,6 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
968
978
|
'agency_id': '0'
|
|
969
979
|
}
|
|
970
980
|
},
|
|
971
|
-
'exp': 120,
|
|
972
981
|
'crid': '484367',
|
|
973
982
|
'price': 9.600271769901472,
|
|
974
983
|
'id': 'b131fd7b-5759-4b72-800e-60e69291e7d9',
|
|
@@ -1012,7 +1021,6 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
1012
1021
|
'agency_id': '0'
|
|
1013
1022
|
}
|
|
1014
1023
|
},
|
|
1015
|
-
'exp': 120,
|
|
1016
1024
|
'crid': '544063',
|
|
1017
1025
|
'price': 1.9199364935359489,
|
|
1018
1026
|
'id': '1fcf4dd8-a783-48ed-b59c-8fc8eeccb024',
|
|
@@ -1041,20 +1049,17 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
1041
1049
|
width: 728,
|
|
1042
1050
|
height: 90,
|
|
1043
1051
|
ttl: 300,
|
|
1044
|
-
ad: '<html><body style="margin:0%"
|
|
1052
|
+
ad: '<html><body style="margin:0%">\x3Cscript>window.__razr_config = {"prebid":{"bidRequest":{"bidder":"improvedigital","params":{"placementId":1053688,"keyValues":{"testKey":["testValue"]},"bidFloor":0.05,"bidFloorCur":"eUR","size":{"w":800,"h":600}},"adUnitCode":"div-gpt-ad-1499748733608-0","transactionId":"f183e871-fbed-45f0-a427-c8a63c4c01eb","bidId":"33e9500b21129f","bidderRequestId":"2772c1e566670b","auctionId":"192721e36a0239","mediaTypes":{"banner":{"sizes":[[300,250],[160,600]]}},"sizes":[[300,250],[160,600]]},"bid":{"mediaType":"banner","ad":"<html><body style=\\"margin:0%\\"><a href=\\"https://na-ice.360yield.com/click/wIUgWAXQ-Teg9bFreqmjvvwpXD86tInZbesBQgOtGBHqZatmIY9C1mo-1kWRx32zN2mfOxtmyaaHpr.Qh5pspzJarrsm08TtkRSeTc2mnsRuQ2MKzCTvbospesMJR28YLZ.3g06DwS6c5XOJuesd0eODk7GCqtmJ18c6CTmdWDUdDxiknLAPHVXAfvlDH5AA9utF7TNNGjaxvyMpQD51.Dt5GFjcJLnwWnGSajoSr9JfomoGenbLkabLmzylSXd1p9xyrzTmWU39FvagEOZnMb2ixlc.JDxXA1ZnaR.e7ywkwiJnDtg1Om0EJAYOmUh0oTozbXeo26iwLLZxVxV0owOHY61zhHYyHcpBakqtelYPWZcmBJEXfl5KIekB2CiLQqxCi3TKdg5FztAQY0Tf3mTmiGZev0RkeiX5fnxS8jbWSD-cCgB51PNLn0X5EEkUPkOJh9JV713OOcyDhsgaFPezUcvuD7nNrxB71aWcH6MMfk1BFQ7kSVi9WHQvauaTxrWm//https%3A%2F%2Fazerion.com\\" target=\\"_blank\\"><img style=\\"border: 0;\\" border=\\"0\\" width=728 height=90 src=\\"https://creative.360yield.com/file/241121/728x90.jpg\\" alt=\\" \\"/></a><img src=\\"https://na-ice.360yield.com/imp_pixel?ic=wIUgWDjQ.pQrjtYOEKs44M3pIqNnfojBPkSd3WRdHnRawHiRiER7A-0RowzsOtOLq7MWtEFnWsRXYZZmJcZPGft0cNSs8lNOVZnXWHLDv3Dyqo8VGI4737RieGIK0DrIjlVXzFmuYeXufriRfPHVGiV-hz6VIateQ6I7.xR5O.48..ZoEGfRpIJGzqeqz12cWnFUPhBScQ6sPLlb6B1RiTpNh170OhIVfX80N2g4jn-U.xJ262ND29bBvImQsJjz29o8mmGL3TfbzUHzr.ob-ozfP9.ZHh.B5tD-M5qG9rAlIU6Q7I-zchnhv1W5OzU5mfMYy9yMLKqBemQGJA1KaiZJV79lwnDki-6PIg1v09h86eJqXYHHsUobx4Np5lMT6-5UdHXZPpR8T08b4keLREQw-lpqKum92pwUCVAYPeFdmTeKk1gUKPcaWxN8QfaQeoLJfb.88n3-vp.-aBCkxlZwXjXSd55QV.uwi-bTtFwaZjGHpNkIBG3D19kNl.Yb55Rk\\" alt=\\" \\" style=\\"display:none\\"/><improvedigital_ad_output_information tp_id=\\"\\" buyer_id=\\"0\\" rtb_advertiser=\\"\\" campaign_id=\\"123159\\" line_item_id=\\"320896\\" creative_id=\\"510265\\" crid=\\"0\\" placement_id=\\"22135702\\"></improvedigital_ad_output_information></body></html>","requestId":"33e9500b21129f","seatBidId":"35adfe19-d6e9-46b9-9f7d-20da7026b965","cpm":1.9200543539802946,"currency":"EUR","width":728,"height":90,"creative_id":"510265","creativeId":"510265","ttl":300,"meta":{},"dealId":320896,"netRevenue":false}}};\x3C/script><a href="https://na-ice.360yield.com/click/wIUgWAXQ-Teg9bFreqmjvvwpXD86tInZbesBQgOtGBHqZatmIY9C1mo-1kWRx32zN2mfOxtmyaaHpr.Qh5pspzJarrsm08TtkRSeTc2mnsRuQ2MKzCTvbospesMJR28YLZ.3g06DwS6c5XOJuesd0eODk7GCqtmJ18c6CTmdWDUdDxiknLAPHVXAfvlDH5AA9utF7TNNGjaxvyMpQD51.Dt5GFjcJLnwWnGSajoSr9JfomoGenbLkabLmzylSXd1p9xyrzTmWU39FvagEOZnMb2ixlc.JDxXA1ZnaR.e7ywkwiJnDtg1Om0EJAYOmUh0oTozbXeo26iwLLZxVxV0owOHY61zhHYyHcpBakqtelYPWZcmBJEXfl5KIekB2CiLQqxCi3TKdg5FztAQY0Tf3mTmiGZev0RkeiX5fnxS8jbWSD-cCgB51PNLn0X5EEkUPkOJh9JV713OOcyDhsgaFPezUcvuD7nNrxB71aWcH6MMfk1BFQ7kSVi9WHQvauaTxrWm//https%3A%2F%2Fazerion.com" target="_blank"><img style="border: 0;" border="0" width=728 height=90 src="https://creative.360yield.com/file/241121/728x90.jpg" alt=" "/></a><img src="https://na-ice.360yield.com/imp_pixel?ic=wIUgWDjQ.pQrjtYOEKs44M3pIqNnfojBPkSd3WRdHnRawHiRiER7A-0RowzsOtOLq7MWtEFnWsRXYZZmJcZPGft0cNSs8lNOVZnXWHLDv3Dyqo8VGI4737RieGIK0DrIjlVXzFmuYeXufriRfPHVGiV-hz6VIateQ6I7.xR5O.48..ZoEGfRpIJGzqeqz12cWnFUPhBScQ6sPLlb6B1RiTpNh170OhIVfX80N2g4jn-U.xJ262ND29bBvImQsJjz29o8mmGL3TfbzUHzr.ob-ozfP9.ZHh.B5tD-M5qG9rAlIU6Q7I-zchnhv1W5OzU5mfMYy9yMLKqBemQGJA1KaiZJV79lwnDki-6PIg1v09h86eJqXYHHsUobx4Np5lMT6-5UdHXZPpR8T08b4keLREQw-lpqKum92pwUCVAYPeFdmTeKk1gUKPcaWxN8QfaQeoLJfb.88n3-vp.-aBCkxlZwXjXSd55QV.uwi-bTtFwaZjGHpNkIBG3D19kNl.Yb55Rk" alt=" " style="display:none"/><improvedigital_ad_output_information tp_id="" buyer_id="0" rtb_advertiser="" campaign_id="123159" line_item_id="320896" creative_id="510265" crid="0" placement_id="22135702"></improvedigital_ad_output_information></body></html>',
|
|
1045
1053
|
creativeId: '510265',
|
|
1046
1054
|
dealId: 320896,
|
|
1047
1055
|
netRevenue: false,
|
|
1048
1056
|
mediaType: BANNER,
|
|
1049
|
-
meta: {
|
|
1050
|
-
advertiserDomains: []
|
|
1051
|
-
}
|
|
1052
1057
|
}
|
|
1053
1058
|
];
|
|
1054
1059
|
|
|
1055
1060
|
const multiFormatExpectedBid = [
|
|
1056
1061
|
Object.assign({}, expectedBid[0], {
|
|
1057
|
-
ad: '<html><body style="margin:0%"
|
|
1062
|
+
ad: '<html><body style="margin:0%">\x3Cscript>window.__razr_config = {"prebid":{"bidRequest":{"bidder":"improvedigital","params":{"placementId":1053688},"adUnitCode":"div-gpt-ad-1499748733608-0","transactionId":"f183e871-fbed-45f0-a427-c8a63c4c01eb","bidId":"33e9500b21129f","bidderRequestId":"2772c1e566670b","auctionId":"192721e36a0239","mediaTypes":{"banner":{"sizes":[[300,250],[160,600]]},"native":{},"video":{"context":"outstream","playerSize":[640,480]}},"sizes":[[300,250],[160,600]],"nativeParams":{"body":{"required":true}}},"bid":{"mediaType":"banner","ad":"<html><body style=\\"margin:0%\\"><a href=\\"https://na-ice.360yield.com/click/wIUgWAXQ-Teg9bFreqmjvvwpXD86tInZbesBQgOtGBHqZatmIY9C1mo-1kWRx32zN2mfOxtmyaaHpr.Qh5pspzJarrsm08TtkRSeTc2mnsRuQ2MKzCTvbospesMJR28YLZ.3g06DwS6c5XOJuesd0eODk7GCqtmJ18c6CTmdWDUdDxiknLAPHVXAfvlDH5AA9utF7TNNGjaxvyMpQD51.Dt5GFjcJLnwWnGSajoSr9JfomoGenbLkabLmzylSXd1p9xyrzTmWU39FvagEOZnMb2ixlc.JDxXA1ZnaR.e7ywkwiJnDtg1Om0EJAYOmUh0oTozbXeo26iwLLZxVxV0owOHY61zhHYyHcpBakqtelYPWZcmBJEXfl5KIekB2CiLQqxCi3TKdg5FztAQY0Tf3mTmiGZev0RkeiX5fnxS8jbWSD-cCgB51PNLn0X5EEkUPkOJh9JV713OOcyDhsgaFPezUcvuD7nNrxB71aWcH6MMfk1BFQ7kSVi9WHQvauaTxrWm//https%3A%2F%2Fazerion.com\\" target=\\"_blank\\"><img style=\\"border: 0;\\" border=\\"0\\" width=728 height=90 src=\\"https://creative.360yield.com/file/241121/728x90.jpg\\" alt=\\" \\"/></a><img src=\\"https://na-ice.360yield.com/imp_pixel?ic=wIUgWDjQ.pQrjtYOEKs44M3pIqNnfojBPkSd3WRdHnRawHiRiER7A-0RowzsOtOLq7MWtEFnWsRXYZZmJcZPGft0cNSs8lNOVZnXWHLDv3Dyqo8VGI4737RieGIK0DrIjlVXzFmuYeXufriRfPHVGiV-hz6VIateQ6I7.xR5O.48..ZoEGfRpIJGzqeqz12cWnFUPhBScQ6sPLlb6B1RiTpNh170OhIVfX80N2g4jn-U.xJ262ND29bBvImQsJjz29o8mmGL3TfbzUHzr.ob-ozfP9.ZHh.B5tD-M5qG9rAlIU6Q7I-zchnhv1W5OzU5mfMYy9yMLKqBemQGJA1KaiZJV79lwnDki-6PIg1v09h86eJqXYHHsUobx4Np5lMT6-5UdHXZPpR8T08b4keLREQw-lpqKum92pwUCVAYPeFdmTeKk1gUKPcaWxN8QfaQeoLJfb.88n3-vp.-aBCkxlZwXjXSd55QV.uwi-bTtFwaZjGHpNkIBG3D19kNl.Yb55Rk\\" alt=\\" \\" style=\\"display:none\\"/><improvedigital_ad_output_information tp_id=\\"\\" buyer_id=\\"0\\" rtb_advertiser=\\"\\" campaign_id=\\"123159\\" line_item_id=\\"320896\\" creative_id=\\"510265\\" crid=\\"0\\" placement_id=\\"22135702\\"></improvedigital_ad_output_information></body></html>","requestId":"33e9500b21129f","seatBidId":"35adfe19-d6e9-46b9-9f7d-20da7026b965","cpm":1.9200543539802946,"currency":"EUR","width":728,"height":90,"creative_id":"510265","creativeId":"510265","ttl":300,"meta":{},"dealId":320896,"netRevenue":false}}};\x3C/script><a href="https://na-ice.360yield.com/click/wIUgWAXQ-Teg9bFreqmjvvwpXD86tInZbesBQgOtGBHqZatmIY9C1mo-1kWRx32zN2mfOxtmyaaHpr.Qh5pspzJarrsm08TtkRSeTc2mnsRuQ2MKzCTvbospesMJR28YLZ.3g06DwS6c5XOJuesd0eODk7GCqtmJ18c6CTmdWDUdDxiknLAPHVXAfvlDH5AA9utF7TNNGjaxvyMpQD51.Dt5GFjcJLnwWnGSajoSr9JfomoGenbLkabLmzylSXd1p9xyrzTmWU39FvagEOZnMb2ixlc.JDxXA1ZnaR.e7ywkwiJnDtg1Om0EJAYOmUh0oTozbXeo26iwLLZxVxV0owOHY61zhHYyHcpBakqtelYPWZcmBJEXfl5KIekB2CiLQqxCi3TKdg5FztAQY0Tf3mTmiGZev0RkeiX5fnxS8jbWSD-cCgB51PNLn0X5EEkUPkOJh9JV713OOcyDhsgaFPezUcvuD7nNrxB71aWcH6MMfk1BFQ7kSVi9WHQvauaTxrWm//https%3A%2F%2Fazerion.com" target="_blank"><img style="border: 0;" border="0" width=728 height=90 src="https://creative.360yield.com/file/241121/728x90.jpg" alt=" "/></a><img src="https://na-ice.360yield.com/imp_pixel?ic=wIUgWDjQ.pQrjtYOEKs44M3pIqNnfojBPkSd3WRdHnRawHiRiER7A-0RowzsOtOLq7MWtEFnWsRXYZZmJcZPGft0cNSs8lNOVZnXWHLDv3Dyqo8VGI4737RieGIK0DrIjlVXzFmuYeXufriRfPHVGiV-hz6VIateQ6I7.xR5O.48..ZoEGfRpIJGzqeqz12cWnFUPhBScQ6sPLlb6B1RiTpNh170OhIVfX80N2g4jn-U.xJ262ND29bBvImQsJjz29o8mmGL3TfbzUHzr.ob-ozfP9.ZHh.B5tD-M5qG9rAlIU6Q7I-zchnhv1W5OzU5mfMYy9yMLKqBemQGJA1KaiZJV79lwnDki-6PIg1v09h86eJqXYHHsUobx4Np5lMT6-5UdHXZPpR8T08b4keLREQw-lpqKum92pwUCVAYPeFdmTeKk1gUKPcaWxN8QfaQeoLJfb.88n3-vp.-aBCkxlZwXjXSd55QV.uwi-bTtFwaZjGHpNkIBG3D19kNl.Yb55Rk" alt=" " style="display:none"/><improvedigital_ad_output_information tp_id="" buyer_id="0" rtb_advertiser="" campaign_id="123159" line_item_id="320896" creative_id="510265" crid="0" placement_id="22135702"></improvedigital_ad_output_information></body></html>',
|
|
1058
1063
|
})
|
|
1059
1064
|
];
|
|
1060
1065
|
|
|
@@ -1067,14 +1072,11 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
1067
1072
|
width: 300,
|
|
1068
1073
|
height: 250,
|
|
1069
1074
|
ttl: 300,
|
|
1070
|
-
ad: '<html><body style="margin:0%"
|
|
1075
|
+
ad: '<html><body style="margin:0%">\x3Cscript>window.__razr_config = {"prebid":{"bidRequest":{"bidder":"improvedigital","params":{"placementId":1053688,"keyValues":{"testKey":["testValue"]},"bidFloor":0.05,"bidFloorCur":"eUR","size":{"w":800,"h":600}},"adUnitCode":"div-gpt-ad-1499748733608-0","transactionId":"f183e871-fbed-45f0-a427-c8a63c4c01eb","bidId":"33e9500b21129f","bidderRequestId":"2772c1e566670b","auctionId":"192721e36a0239","mediaTypes":{"banner":{"sizes":[[300,250],[160,600]]}},"sizes":[[300,250],[160,600]]},"bid":{"mediaType":"banner","ad":"<html><body style=\\"margin:0%\\"><a href=\\"https://na-ice.360yield.com/click/.2RC3VhfEsdhtcsRiT8bWksMTmBbkfnj1AaD3C6Bht.Bp85KK5vjzZvJMpigI4ECdhllWuzbk2UhQt8VEGq1tg8m1OEot7Gs94PplWYs2ESdXpGAPFHiqdbZstOOhfiWL4D.k6lXfgNmbRhpL.SktYeEAiRaOZHQAX.22IEQ0swRnEdNyjHXYEkNIgpvMLqkZTv.JYM.iW9NwyJLIqk4Djh8X301iRLxexGBTl7-.n93WbkSCVY6uwdXSzoQrtK1r3fTrS34rdgpqFt6ZIBLKWI2ByLM2.aQqfvev5BCMOeyEKY8CcSg9SoDiPyQsvcz9bTckLtqs3AD3Qu8I.2rGn1NID7ljgg6-dERrorPK9A5XK67Pv34UqUe2xILQ6wvi52dX4p5d3yxsI9BMfnxzkn7MullVJdn-NiSB2rTe2MFozJc5G1nEwtpsMwZpBxl00PCcMsyETtaKbhqa3Gq5nCuce4AEhL6109IrZscUUzBMSKLSX16HlFfmPZ.gDnWCI3lO35UbGdL7lKjbT9mHYQ-//http%3A%2F%2Fblah.com\\" target=\\"_blank\\"><img style=\\"border: 0;\\" border=\\"0\\" width=300 height=250 src=\\"https://creative.360yield.com/file/238052/test_ads-300x250.jpg\\" alt=\\" \\"/></a><img src=\\"https://na-ice.360yield.com/imp_pixel?ic=.2RC3VqxeCtOU3G5i6Wejh69dm5JnKlRXeieMtJA63nfGMyuFoWTTjSU5PfHLg2PtnmDRFgHJgGE19QyjAGj6ZQVy0iUk-HF-.zsAlx.7Fx3m5fPE7RIYw.kjy-BvuprFqfU-qlm03KTks6zVLDSIspuxemNQ1HBhq6QZSm9qqAVY-1XS-KbImfb.fll3VvhJXy7Ru.KstgDfAJwt5vYxVab6efvjAIhOrrv6uXaywFVTtu9-gK5pKgIkdixxuYE2jLUyEh9GiRyRCH0jhhUVUmSfrjE4OuTq-7TmCYXQQ5Vk9AqOV.JybF8d35IeyAbF2aywwdZA2SGGEGeYIoOy.7D8TpuVqXxvnUyeKXlCfmzXcJs27W2sKGUTfpWc-TyhAOHKzwqrxP-QN5D1QRCXFWgAm.rwUBguE-oL1Q7NOaCsaRwINRwvQrastWNFUDEYzrB32NL-wIkILdh9e96JwhKiwGwJ1VqH.6RDDutUi9CLreYQl348exTfqL44Ia5VTLn7e0rA6s9V1tg55V7TX36\\" alt=\\" \\" style=\\"display:none\\"/><improvedigital_ad_output_information tp_id=\\"\\" buyer_id=\\"0\\" rtb_advertiser=\\"\\" campaign_id=\\"123159\\" line_item_id=\\"320896\\" creative_id=\\"479163\\" crid=\\"0\\" placement_id=\\"22135702\\"></improvedigital_ad_output_information></body></html>","requestId":"33e9500b21129f","seatBidId":"83c8d524-0955-4d0c-b558-4c9f3600e09b","cpm":1.9200543539802946,"currency":"EUR","width":300,"height":250,"creative_id":"479163","creativeId":"479163","ttl":300,"meta":{},"dealId":320896,"netRevenue":false}}};\x3C/script><a href="https://na-ice.360yield.com/click/.2RC3VhfEsdhtcsRiT8bWksMTmBbkfnj1AaD3C6Bht.Bp85KK5vjzZvJMpigI4ECdhllWuzbk2UhQt8VEGq1tg8m1OEot7Gs94PplWYs2ESdXpGAPFHiqdbZstOOhfiWL4D.k6lXfgNmbRhpL.SktYeEAiRaOZHQAX.22IEQ0swRnEdNyjHXYEkNIgpvMLqkZTv.JYM.iW9NwyJLIqk4Djh8X301iRLxexGBTl7-.n93WbkSCVY6uwdXSzoQrtK1r3fTrS34rdgpqFt6ZIBLKWI2ByLM2.aQqfvev5BCMOeyEKY8CcSg9SoDiPyQsvcz9bTckLtqs3AD3Qu8I.2rGn1NID7ljgg6-dERrorPK9A5XK67Pv34UqUe2xILQ6wvi52dX4p5d3yxsI9BMfnxzkn7MullVJdn-NiSB2rTe2MFozJc5G1nEwtpsMwZpBxl00PCcMsyETtaKbhqa3Gq5nCuce4AEhL6109IrZscUUzBMSKLSX16HlFfmPZ.gDnWCI3lO35UbGdL7lKjbT9mHYQ-//http%3A%2F%2Fblah.com" target="_blank"><img style="border: 0;" border="0" width=300 height=250 src="https://creative.360yield.com/file/238052/test_ads-300x250.jpg" alt=" "/></a><img src="https://na-ice.360yield.com/imp_pixel?ic=.2RC3VqxeCtOU3G5i6Wejh69dm5JnKlRXeieMtJA63nfGMyuFoWTTjSU5PfHLg2PtnmDRFgHJgGE19QyjAGj6ZQVy0iUk-HF-.zsAlx.7Fx3m5fPE7RIYw.kjy-BvuprFqfU-qlm03KTks6zVLDSIspuxemNQ1HBhq6QZSm9qqAVY-1XS-KbImfb.fll3VvhJXy7Ru.KstgDfAJwt5vYxVab6efvjAIhOrrv6uXaywFVTtu9-gK5pKgIkdixxuYE2jLUyEh9GiRyRCH0jhhUVUmSfrjE4OuTq-7TmCYXQQ5Vk9AqOV.JybF8d35IeyAbF2aywwdZA2SGGEGeYIoOy.7D8TpuVqXxvnUyeKXlCfmzXcJs27W2sKGUTfpWc-TyhAOHKzwqrxP-QN5D1QRCXFWgAm.rwUBguE-oL1Q7NOaCsaRwINRwvQrastWNFUDEYzrB32NL-wIkILdh9e96JwhKiwGwJ1VqH.6RDDutUi9CLreYQl348exTfqL44Ia5VTLn7e0rA6s9V1tg55V7TX36" alt=" " style="display:none"/><improvedigital_ad_output_information tp_id="" buyer_id="0" rtb_advertiser="" campaign_id="123159" line_item_id="320896" creative_id="479163" crid="0" placement_id="22135702"></improvedigital_ad_output_information></body></html>',
|
|
1071
1076
|
creativeId: '479163',
|
|
1072
1077
|
dealId: 320896,
|
|
1073
1078
|
netRevenue: false,
|
|
1074
1079
|
mediaType: BANNER,
|
|
1075
|
-
meta: {
|
|
1076
|
-
advertiserDomains: []
|
|
1077
|
-
}
|
|
1078
1080
|
}
|
|
1079
1081
|
];
|
|
1080
1082
|
|
|
@@ -1100,93 +1102,106 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
1100
1102
|
content: expectedBidOutstreamVideo[0].vastXml
|
|
1101
1103
|
};
|
|
1102
1104
|
|
|
1105
|
+
function makeRequest(bidderRequest) {
|
|
1106
|
+
return {
|
|
1107
|
+
ortbRequest: CONVERTER.toORTB({bidderRequest})
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
function expectMatch(actual, expected) {
|
|
1112
|
+
sinon.assert.match(actual, expected.map(i => sinon.match(i)));
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1103
1115
|
it('should return a well-formed display bid', function () {
|
|
1104
|
-
const bids = spec.interpretResponse(serverResponse,
|
|
1105
|
-
|
|
1116
|
+
const bids = spec.interpretResponse(serverResponse, makeRequest(bidderRequest));
|
|
1117
|
+
expectMatch(bids, expectedBid);
|
|
1106
1118
|
});
|
|
1107
1119
|
|
|
1108
1120
|
it('should return a well-formed display bid for multi-format ad unit', function () {
|
|
1109
|
-
const bids = spec.interpretResponse(serverResponse,
|
|
1110
|
-
|
|
1121
|
+
const bids = spec.interpretResponse(serverResponse, makeRequest(multiFormatBidderRequest));
|
|
1122
|
+
|
|
1123
|
+
expectMatch(bids, multiFormatExpectedBid);
|
|
1111
1124
|
});
|
|
1112
1125
|
|
|
1113
1126
|
it('should return two bids', function () {
|
|
1114
|
-
const bids = spec.interpretResponse(serverResponseTwoBids,
|
|
1115
|
-
|
|
1127
|
+
const bids = spec.interpretResponse(serverResponseTwoBids, makeRequest(bidderRequest));
|
|
1128
|
+
expectMatch(bids, expectedTwoBids);
|
|
1116
1129
|
});
|
|
1117
1130
|
|
|
1118
1131
|
it('should set dealId correctly', function () {
|
|
1132
|
+
const request = makeRequest(bidderRequest);
|
|
1119
1133
|
const response = deepClone(serverResponse);
|
|
1120
1134
|
let bids;
|
|
1121
1135
|
|
|
1122
1136
|
delete response.body.seatbid[0].bid[0].ext.improvedigital.line_item_id;
|
|
1123
1137
|
response.body.seatbid[0].bid[0].ext.improvedigital.buying_type = 'deal_id';
|
|
1124
|
-
bids = spec.interpretResponse(response,
|
|
1138
|
+
bids = spec.interpretResponse(response, request);
|
|
1125
1139
|
expect(bids[0].dealId).to.not.exist;
|
|
1126
1140
|
|
|
1127
1141
|
response.body.seatbid[0].bid[0].ext.improvedigital.line_item_id = 268515;
|
|
1128
1142
|
delete response.body.seatbid[0].bid[0].ext.improvedigital.buying_type;
|
|
1129
|
-
bids = spec.interpretResponse(response,
|
|
1143
|
+
bids = spec.interpretResponse(response, request);
|
|
1130
1144
|
expect(bids[0].dealId).to.not.exist;
|
|
1131
1145
|
|
|
1132
1146
|
response.body.seatbid[0].bid[0].ext.improvedigital.line_item_id = 268515;
|
|
1133
1147
|
response.body.seatbid[0].bid[0].ext.improvedigital.buying_type = 'rtb';
|
|
1134
|
-
bids = spec.interpretResponse(response,
|
|
1148
|
+
bids = spec.interpretResponse(response, request);
|
|
1135
1149
|
expect(bids[0].dealId).to.not.exist;
|
|
1136
1150
|
|
|
1137
1151
|
response.body.seatbid[0].bid[0].ext.improvedigital.line_item_id = 268515;
|
|
1138
1152
|
response.body.seatbid[0].bid[0].ext.improvedigital.buying_type = 'classic';
|
|
1139
|
-
bids = spec.interpretResponse(response,
|
|
1153
|
+
bids = spec.interpretResponse(response, request);
|
|
1140
1154
|
expect(bids[0].dealId).to.equal(268515);
|
|
1141
1155
|
|
|
1142
1156
|
response.body.seatbid[0].bid[0].ext.improvedigital.line_item_id = 268515;
|
|
1143
1157
|
response.body.seatbid[0].bid[0].ext.improvedigital.buying_type = 'deal_id';
|
|
1144
|
-
bids = spec.interpretResponse(response,
|
|
1158
|
+
bids = spec.interpretResponse(response, request);
|
|
1145
1159
|
expect(bids[0].dealId).to.equal(268515);
|
|
1146
1160
|
});
|
|
1147
1161
|
|
|
1148
1162
|
it('should set currency', function () {
|
|
1149
1163
|
const response = deepClone(serverResponse);
|
|
1150
|
-
response.body.cur = '
|
|
1151
|
-
const bids = spec.interpretResponse(response,
|
|
1164
|
+
response.body.cur = 'EUR';
|
|
1165
|
+
const bids = spec.interpretResponse(response, makeRequest(bidderRequest));
|
|
1152
1166
|
expect(bids[0].currency).to.equal('EUR');
|
|
1153
1167
|
});
|
|
1154
1168
|
|
|
1155
1169
|
it('should return empty array for bad response or no price', function () {
|
|
1170
|
+
const request = makeRequest(bidderRequest);
|
|
1156
1171
|
let response = deepClone(serverResponse);
|
|
1157
1172
|
let bids;
|
|
1158
1173
|
|
|
1159
1174
|
// Price missing or 0
|
|
1160
1175
|
response.body.seatbid[0].bid[0].price = 0;
|
|
1161
|
-
bids = spec.interpretResponse(response,
|
|
1176
|
+
bids = spec.interpretResponse(response, request);
|
|
1162
1177
|
expect(bids).to.deep.equal([]);
|
|
1163
1178
|
delete response.body.seatbid[0].bid[0];
|
|
1164
|
-
bids = spec.interpretResponse(response,
|
|
1179
|
+
bids = spec.interpretResponse(response, request);
|
|
1165
1180
|
expect(bids).to.deep.equal([]);
|
|
1166
1181
|
response.body.seatbid[0].bid[0] = [];
|
|
1167
|
-
bids = spec.interpretResponse(response,
|
|
1182
|
+
bids = spec.interpretResponse(response, request);
|
|
1168
1183
|
expect(bids).to.deep.equal([]);
|
|
1169
1184
|
|
|
1170
1185
|
// errorCode present
|
|
1171
1186
|
response = deepClone(serverResponse);
|
|
1172
1187
|
response.body.seatbid[0].bid[0].errorCode = undefined;
|
|
1173
|
-
bids = spec.interpretResponse(response,
|
|
1188
|
+
bids = spec.interpretResponse(response, request);
|
|
1174
1189
|
expect(bids).to.deep.equal([]);
|
|
1175
1190
|
|
|
1176
1191
|
// adm and native missing
|
|
1177
1192
|
response = deepClone(serverResponse);
|
|
1178
1193
|
delete response.body.seatbid[0].bid[0].adm;
|
|
1179
|
-
bids = spec.interpretResponse(response,
|
|
1194
|
+
bids = spec.interpretResponse(response, request);
|
|
1180
1195
|
expect(bids).to.deep.equal([]);
|
|
1181
1196
|
response.body.seatbid[0].bid[0].adm = null;
|
|
1182
|
-
bids = spec.interpretResponse(response,
|
|
1197
|
+
bids = spec.interpretResponse(response, request);
|
|
1183
1198
|
expect(bids).to.deep.equal([]);
|
|
1184
1199
|
});
|
|
1185
1200
|
|
|
1186
1201
|
it('should set netRevenue', function () {
|
|
1187
1202
|
const response = deepClone(serverResponse);
|
|
1188
1203
|
response.body.seatbid[0].bid[0].ext.improvedigital.is_net = true;
|
|
1189
|
-
const bids = spec.interpretResponse(response,
|
|
1204
|
+
const bids = spec.interpretResponse(response, makeRequest(bidderRequest));
|
|
1190
1205
|
expect(bids[0].netRevenue).to.equal(true);
|
|
1191
1206
|
});
|
|
1192
1207
|
|
|
@@ -1194,59 +1209,53 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
1194
1209
|
const adomain = ['domain.com'];
|
|
1195
1210
|
const response = deepClone(serverResponse);
|
|
1196
1211
|
response.body.seatbid[0].bid[0].adomain = adomain;
|
|
1197
|
-
const bids = spec.interpretResponse(response,
|
|
1212
|
+
const bids = spec.interpretResponse(response, makeRequest(bidderRequest));
|
|
1198
1213
|
expect(bids[0].meta.advertiserDomains).to.equal(adomain);
|
|
1199
1214
|
});
|
|
1200
1215
|
//
|
|
1201
1216
|
// Native ads
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
// Verify Assets
|
|
1214
|
-
expect(nativeBid.title).to.exist.and.equal('Sample Prebid Test Title');
|
|
1215
|
-
expect(nativeBid.sponsoredBy).to.exist.and.equal('ImproveDigital');
|
|
1216
|
-
expect(nativeBid.body).to.exist.and.equal('Test content.');
|
|
1217
|
-
});
|
|
1217
|
+
if (FEATURES.NATIVE) {
|
|
1218
|
+
it('should return a well-formed native ad bid', function () {
|
|
1219
|
+
const reqBids = updateNativeParams(nativeBidderRequest.bids);
|
|
1220
|
+
const request = makeRequest({
|
|
1221
|
+
...nativeBidderRequest,
|
|
1222
|
+
reqBids
|
|
1223
|
+
})
|
|
1224
|
+
const bids = spec.interpretResponse(serverResponseNative, request);
|
|
1225
|
+
expect(bids[0].native.ortb).to.eql(JSON.parse(serverResponseNative.body.seatbid[0].bid[0].adm))
|
|
1226
|
+
});
|
|
1218
1227
|
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1228
|
+
it('should return a well-formed native bid for multi-format ad unit', function () {
|
|
1229
|
+
const bids = spec.interpretResponse(serverResponseNative, makeRequest(multiFormatBidderRequest));
|
|
1230
|
+
expect(bids[0].mediaType).to.equal(NATIVE);
|
|
1231
|
+
});
|
|
1232
|
+
}
|
|
1223
1233
|
|
|
1224
1234
|
// Video
|
|
1225
1235
|
it('should return a well-formed instream video bid', function () {
|
|
1226
|
-
const bids = spec.interpretResponse(serverResponseVideo,
|
|
1227
|
-
|
|
1236
|
+
const bids = spec.interpretResponse(serverResponseVideo, makeRequest(instreamBidderRequest));
|
|
1237
|
+
expectMatch(bids, expectedBidInstreamVideo);
|
|
1228
1238
|
});
|
|
1229
1239
|
|
|
1230
1240
|
it('should return a well-formed outstream video bid', function () {
|
|
1231
|
-
const bids = spec.interpretResponse(serverResponseVideo,
|
|
1241
|
+
const bids = spec.interpretResponse(serverResponseVideo, makeRequest(outstreamBidderRequest));
|
|
1232
1242
|
expect(bids[0].renderer).to.exist;
|
|
1233
|
-
|
|
1234
|
-
expect(bids).to.deep.equal(expectedBidOutstreamVideo);
|
|
1243
|
+
expectMatch(bids, expectedBidOutstreamVideo);
|
|
1235
1244
|
});
|
|
1236
1245
|
|
|
1237
1246
|
it('should return a well-formed outstream video bid for multi-format ad unit', function () {
|
|
1247
|
+
const request = makeRequest(multiFormatBidderRequest);
|
|
1238
1248
|
const videoResponse = deepClone(serverResponseVideo);
|
|
1239
|
-
let bids = spec.interpretResponse(videoResponse,
|
|
1249
|
+
let bids = spec.interpretResponse(videoResponse, request);
|
|
1240
1250
|
expect(bids[0].renderer).to.exist;
|
|
1241
|
-
|
|
1242
|
-
expect(bids).to.deep.equal(expectedBidOutstreamVideo);
|
|
1251
|
+
expectMatch(bids, expectedBidOutstreamVideo);
|
|
1243
1252
|
|
|
1244
1253
|
videoResponse.body.seatbid[0].bid[0].adm = '<vAst';
|
|
1245
|
-
bids = spec.interpretResponse(videoResponse,
|
|
1254
|
+
bids = spec.interpretResponse(videoResponse, request);
|
|
1246
1255
|
expect(bids[0].mediaType).to.equal(VIDEO);
|
|
1247
1256
|
|
|
1248
1257
|
videoResponse.body.seatbid[0].bid[0].adm = '<?xml';
|
|
1249
|
-
bids = spec.interpretResponse(videoResponse,
|
|
1258
|
+
bids = spec.interpretResponse(videoResponse, request);
|
|
1250
1259
|
expect(bids[0].mediaType).to.equal(VIDEO);
|
|
1251
1260
|
});
|
|
1252
1261
|
});
|
|
@@ -1347,5 +1356,16 @@ describe('Improve Digital Adapter Tests', function () {
|
|
|
1347
1356
|
const syncs = spec.getUserSyncs({ iframeEnabled: true, pixelEnabled: true }, serverResponses);
|
|
1348
1357
|
expect(syncs).to.deep.equal([{ type: 'iframe', url: basicIframeSyncUrl + '&pbs=1' }]);
|
|
1349
1358
|
});
|
|
1359
|
+
|
|
1360
|
+
it('should add bidders to iframe user sync url', function () {
|
|
1361
|
+
getConfigStub = sinon.stub(config, 'getConfig');
|
|
1362
|
+
getConfigStub.withArgs('improvedigital.extend').returns(true);
|
|
1363
|
+
spec.buildRequests([simpleBidRequest], {});
|
|
1364
|
+
const rawResponse = deepClone(serverResponse)
|
|
1365
|
+
deepSetValue(rawResponse, 'body.ext.responsetimemillis', {a: 1, b: 1, c: 1, d: 1, e: 1})
|
|
1366
|
+
let syncs = spec.getUserSyncs({ iframeEnabled: true, pixelEnabled: true }, [rawResponse]);
|
|
1367
|
+
let url = basicIframeSyncUrl + '&pbs=1' + '&bidders=a,b,c,d,e'
|
|
1368
|
+
expect(syncs).to.deep.equal([{ type: 'iframe', url }]);
|
|
1369
|
+
});
|
|
1350
1370
|
});
|
|
1351
1371
|
});
|