prebid.js 8.7.0 → 8.9.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/1plusXRtdProvider.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/a1MediaRtdProvider.js +1 -1
- package/dist/adWMGAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adkernelAdnAnalyticsAdapter.js +1 -1
- package/dist/adlooxAdServerVideo.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/admaticBidAdapter.js +1 -1
- package/dist/admixerIdSystem.js +1 -1
- package/dist/adnuntiusRtdProvider.js +1 -1
- package/dist/adpartnerBidAdapter.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adqueryIdSystem.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adriverIdSystem.js +1 -1
- package/dist/adtelligentIdSystem.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adxpremiumAnalyticsAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/aidemBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/akamaiDapRtdProvider.js +1 -1
- package/dist/alkimiBidAdapter.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/atsAnalyticsAdapter.js +1 -1
- package/dist/automatadBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidViewability.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/bidwatchAnalyticsAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/brandmetricsRtdProvider.js +1 -1
- package/dist/bridBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/brightcomSSPBidAdapter.js +1 -1
- package/dist/britepoolIdSystem.js +1 -1
- package/dist/browsiRtdProvider.js +1 -1
- package/dist/byDataAnalyticsAdapter.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/categoryTranslation.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/colossussspBidAdapter.js +1 -1
- package/dist/concertAnalyticsAdapter.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectIdSystem.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantAnalyticsAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/criteoIdSystem.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/cwireBidAdapter.js +1 -1
- package/dist/dacIdSystem.js +1 -1
- package/dist/dailyhuntBidAdapter.js +1 -1
- package/dist/datablocksBidAdapter.js +1 -1
- package/dist/dependencies.json +4 -1
- package/dist/dgkeywordRtdProvider.js +1 -1
- package/dist/dmdIdSystem.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningAnalyticsAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -1
- package/dist/fabrickIdSystem.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/fintezaAnalyticsAdapter.js +1 -1
- package/dist/fledgeForGpt.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/genericAnalyticsAdapter.js +1 -1
- package/dist/geoedgeRtdProvider.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/gnetBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/growthCodeAnalyticsAdapter.js +1 -1
- package/dist/growthCodeIdSystem.js +1 -1
- package/dist/growthCodeRtdProvider.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hadronAnalyticsAdapter.js +1 -1
- package/dist/hadronIdSystem.js +1 -1
- package/dist/hadronRtdProvider.js +1 -1
- package/dist/hypelabBidAdapter.js +1 -1
- package/dist/iasRtdProvider.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/idImportLibrary.js +1 -1
- package/dist/identityLinkIdSystem.js +1 -1
- package/dist/imRtdProvider.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/impactifyBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/imuIdSystem.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/intentIqIdSystem.js +1 -1
- package/dist/invisiblyAnalyticsAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/jwplayerRtdProvider.js +1 -1
- package/dist/kargoAnalyticsAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/kinessoIdSystem.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/konduitWrapper.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -1
- package/dist/kulturemediaBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/limelightDigitalBidAdapter.js +1 -1
- package/dist/liveIntentAnalyticsAdapter.js +1 -1
- package/dist/liveIntentIdSystem.js +1 -1
- package/dist/livewrappedAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/lotamePanoramaIdSystem.js +1 -1
- package/dist/luponmediaBidAdapter.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/mantisBidAdapter.js +1 -1
- package/dist/marsmediaAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/medianetAnalyticsAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/merkleIdSystem.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/mgidRtdProvider.js +1 -1
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/minutemediaplusBidAdapter.js +1 -1
- package/dist/mspa.js +1 -1
- package/dist/mwOpenLinkIdSystem.js +1 -1
- package/dist/nativoBidAdapter.js +1 -1
- package/dist/naveggIdSystem.js +1 -1
- package/dist/neuwoRtdProvider.js +1 -1
- package/dist/nexx360BidAdapter.js +1 -1
- package/dist/not-for-prod/prebid.js +248 -247
- package/dist/novatiqIdSystem.js +1 -1
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/open8BidAdapter.js +1 -1
- package/dist/operaadsBidAdapter.js +1 -1
- package/dist/operaadsIdSystem.js +1 -0
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/optimeraRtdProvider.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/oxxionAnalyticsAdapter.js +1 -1
- package/dist/oxxionRtdProvider.js +1 -1
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +2 -2
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/prebidmanagerAnalyticsAdapter.js +1 -1
- package/dist/priceFloors.js +1 -1
- package/dist/prismaBidAdapter.js +1 -1
- package/dist/pubgeniusBidAdapter.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubxaiAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/qwarryBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/reconciliationRtdProvider.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/relevadRtdProvider.js +1 -1
- package/dist/retailspotBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rivrAnalyticsAdapter.js +1 -1
- package/dist/roxotAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/scaleableAnalyticsAdapter.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/silverpushBidAdapter.js +1 -1
- package/dist/sirdataRtdProvider.js +1 -1
- package/dist/slimcutBidAdapter.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smartyadsBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/snigelBidAdapter.js +1 -1
- package/dist/sonobiAnalyticsAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/staqAnalyticsAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/talkadsBidAdapter.js +1 -1
- package/dist/tapadIdSystem.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/teadsIdSystem.js +1 -1
- package/dist/terceptAnalyticsAdapter.js +1 -1
- package/dist/timeoutRtdProvider.js +1 -1
- package/dist/topicsFpdModule.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/uid2IdSystem.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/unifiedIdSystem.js +1 -1
- package/dist/verizonMediaIdSystem.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vrtcalBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/weboramaRtdProvider.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/dist/yuktamediaAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspAnalyticsAdapter.js +1 -1
- package/dist/zeta_global_sspBidAdapter.js +1 -1
- package/integrationExamples/gpt/growthcode.html +3 -12
- package/integrationExamples/topics/topics-server.js +72 -0
- package/libraries/mspa/activityControls.js +3 -1
- package/modules/.submodules.json +2 -1
- package/modules/a1MediaRtdProvider.js +1 -1
- package/modules/adagioBidAdapter.js +11 -3
- package/modules/admaticBidAdapter.js +5 -0
- package/modules/adqueryBidAdapter.js +23 -21
- package/modules/adqueryIdSystem.js +45 -30
- package/modules/adrelevantisBidAdapter.js +2 -0
- package/modules/bidViewability.js +7 -0
- package/modules/bidViewability.md +9 -8
- package/modules/brandmetricsRtdProvider.js +30 -27
- package/modules/concertBidAdapter.js +1 -0
- package/modules/criteoBidAdapter.js +66 -43
- package/modules/fledgeForGpt.js +17 -4
- package/modules/fledgeForGpt.md +17 -10
- package/modules/geoedgeRtdProvider.js +44 -18
- package/modules/geoedgeRtdProvider.md +2 -1
- package/modules/growthCodeAnalyticsAdapter.js +7 -4
- package/modules/growthCodeAnalyticsAdapter.md +1 -7
- package/modules/liveIntentIdSystem.js +16 -1
- package/modules/nativoBidAdapter.js +21 -3
- package/modules/nexx360BidAdapter.js +7 -1
- package/modules/onetagBidAdapter.js +3 -0
- package/modules/operaadsBidAdapter.js +5 -0
- package/modules/operaadsBidAdapter.md +5 -5
- package/modules/operaadsIdSystem.js +106 -0
- package/modules/operaadsIdSystem.md +52 -0
- package/modules/oxxionAnalyticsAdapter.js +22 -5
- package/modules/prebidServerBidAdapter/index.js +8 -2
- package/modules/pubmaticAnalyticsAdapter.js +16 -3
- package/modules/rubiconBidAdapter.js +2 -2
- package/modules/smartyadsBidAdapter.js +18 -1
- package/modules/snigelBidAdapter.js +69 -16
- package/modules/snigelBidAdapter.md +9 -3
- package/modules/topicsFpdModule.js +35 -9
- package/modules/visxBidAdapter.js +51 -1
- package/package.json +2 -2
- package/src/adapters/bidderFactory.js +14 -5
- package/src/adloader.js +1 -0
- package/src/ajax.js +126 -87
- package/src/constants.json +8 -2
- package/src/native.js +14 -3
- package/test/mocks/xhr.js +256 -9
- package/test/spec/libraries/mspa/activityControls_spec.js +6 -0
- package/test/spec/modules/adagioBidAdapter_spec.js +15 -0
- package/test/spec/modules/adlooxAdServerVideo_spec.js +1 -5
- package/test/spec/modules/adlooxRtdProvider_spec.js +1 -5
- package/test/spec/modules/admaticBidAdapter_spec.js +5 -0
- package/test/spec/modules/adqueryIdSystem_spec.js +13 -24
- package/test/spec/modules/bidViewability_spec.js +32 -1
- package/test/spec/modules/brandmetricsRtdProvider_spec.js +6 -0
- package/test/spec/modules/categoryTranslation_spec.js +7 -9
- package/test/spec/modules/concertBidAdapter_spec.js +1 -1
- package/test/spec/modules/conversantAnalyticsAdapter_spec.js +3 -5
- package/test/spec/modules/criteoBidAdapter_spec.js +228 -0
- package/test/spec/modules/currency_spec.js +2 -2
- package/test/spec/modules/dmdIdSystem_spec.js +2 -2
- package/test/spec/modules/eids_spec.js +48 -0
- package/test/spec/modules/euidIdSystem_spec.js +10 -9
- package/test/spec/modules/feedadBidAdapter_spec.js +1 -1
- package/test/spec/modules/fledge_spec.js +117 -43
- package/test/spec/modules/geoedgeRtdProvider_spec.js +52 -39
- package/test/spec/modules/greenbidsRtdProvider_spec.js +3 -12
- package/test/spec/modules/growthCodeAnalyticsAdapter_spec.js +0 -1
- package/test/spec/modules/hadronIdSystem_spec.js +1 -1
- package/test/spec/modules/id5AnalyticsAdapter_spec.js +1 -7
- package/test/spec/modules/id5IdSystem_spec.js +25 -25
- package/test/spec/modules/identityLinkIdSystem_spec.js +0 -2
- package/test/spec/modules/intentIqIdSystem_spec.js +0 -2
- package/test/spec/modules/invisiblyAnalyticsAdapter_spec.js +2 -6
- package/test/spec/modules/jwplayerRtdProvider_spec.js +26 -28
- package/test/spec/modules/liveIntentIdMinimalSystem_spec.js +5 -0
- package/test/spec/modules/liveIntentIdSystem_spec.js +5 -0
- package/test/spec/modules/magniteAnalyticsAdapter_spec.js +2 -2
- package/test/spec/modules/mgidRtdProvider_spec.js +1 -5
- package/test/spec/modules/nativoBidAdapter_spec.js +6 -1
- package/test/spec/modules/nexx360BidAdapter_spec.js +48 -1
- package/test/spec/modules/oguryBidAdapter_spec.js +5 -19
- package/test/spec/modules/onetagBidAdapter_spec.js +69 -0
- package/test/spec/modules/ooloAnalyticsAdapter_spec.js +1 -1
- package/test/spec/modules/operaadsIdSystem_spec.js +53 -0
- package/test/spec/modules/oxxionAnalyticsAdapter_spec.js +6 -1
- package/test/spec/modules/prebidServerBidAdapter_spec.js +33 -2
- package/test/spec/modules/priceFloors_spec.js +33 -37
- package/test/spec/modules/publinkIdSystem_spec.js +1 -1
- package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +102 -18
- package/test/spec/modules/pubwiseAnalyticsAdapter_spec.js +2 -8
- package/test/spec/modules/rubiconBidAdapter_spec.js +24 -0
- package/test/spec/modules/smartyadsBidAdapter_spec.js +49 -0
- package/test/spec/modules/snigelBidAdapter_spec.js +57 -6
- package/test/spec/modules/teadsIdSystem_spec.js +1 -1
- package/test/spec/modules/topicsFpdModule_spec.js +102 -1
- package/test/spec/modules/uid2IdSystem_helpers.js +5 -5
- package/test/spec/modules/uid2IdSystem_spec.js +24 -24
- package/test/spec/modules/userId_spec.js +1 -1
- package/test/spec/modules/visxBidAdapter_spec.js +151 -1
- package/test/spec/modules/zeta_global_sspAnalyticsAdapter_spec.js +2 -5
- package/test/spec/native_spec.js +20 -5
- package/test/spec/unit/core/ajax_spec.js +403 -0
- package/test/spec/unit/core/bidderFactory_spec.js +80 -8
- package/test/spec/videoCache_spec.js +4 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import invisiblyAdapter from 'modules/invisiblyAnalyticsAdapter.js';
|
|
2
2
|
import { expect } from 'chai';
|
|
3
3
|
import {expectEvents} from '../../helpers/analytics.js';
|
|
4
|
+
import {server} from '../../mocks/xhr.js';
|
|
4
5
|
let events = require('src/events');
|
|
5
6
|
let constants = require('src/constants.json');
|
|
6
7
|
|
|
@@ -169,11 +170,7 @@ describe('Invisibly Analytics Adapter test suite', function () {
|
|
|
169
170
|
|
|
170
171
|
describe('Invisibly Analytic tests specs', function () {
|
|
171
172
|
beforeEach(function () {
|
|
172
|
-
|
|
173
|
-
requests = [];
|
|
174
|
-
xhr.onCreate = (xhr) => {
|
|
175
|
-
requests.push(xhr);
|
|
176
|
-
};
|
|
173
|
+
requests = server.requests;
|
|
177
174
|
sinon.stub(events, 'getEvents').returns([]);
|
|
178
175
|
sinon.spy(invisiblyAdapter, 'track');
|
|
179
176
|
});
|
|
@@ -182,7 +179,6 @@ describe('Invisibly Analytics Adapter test suite', function () {
|
|
|
182
179
|
invisiblyAdapter.disableAnalytics();
|
|
183
180
|
events.getEvents.restore();
|
|
184
181
|
invisiblyAdapter.track.restore();
|
|
185
|
-
xhr.restore();
|
|
186
182
|
});
|
|
187
183
|
|
|
188
184
|
describe('Send all events as & when they are captured', function () {
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import {
|
|
2
|
+
addOrtbSiteContent,
|
|
3
|
+
addTargetingToBid,
|
|
4
|
+
enrichAdUnits,
|
|
5
|
+
extractPublisherParams,
|
|
6
|
+
fetchTargetingForMediaId,
|
|
7
|
+
fetchTargetingInformation,
|
|
8
|
+
formatTargetingResponse,
|
|
9
|
+
getContentData,
|
|
10
|
+
getContentId,
|
|
11
|
+
getContentSegments,
|
|
12
|
+
getVatFromCache,
|
|
13
|
+
getVatFromPlayer,
|
|
14
|
+
jwplayerSubmodule
|
|
15
|
+
} from 'modules/jwplayerRtdProvider.js';
|
|
16
|
+
import {server} from 'test/mocks/xhr.js';
|
|
6
17
|
import {deepClone} from '../../../src/utils.js';
|
|
7
18
|
|
|
8
19
|
describe('jwplayerRtdProvider', function() {
|
|
@@ -223,9 +234,6 @@ describe('jwplayerRtdProvider', function() {
|
|
|
223
234
|
describe('Get Bid Request Data', function () {
|
|
224
235
|
it('executes immediately while request is active if player has item', function () {
|
|
225
236
|
const bidRequestSpy = sinon.spy();
|
|
226
|
-
const fakeServer = sinon.createFakeServer();
|
|
227
|
-
fakeServer.respondImmediately = false;
|
|
228
|
-
fakeServer.autoRespond = false;
|
|
229
237
|
|
|
230
238
|
fetchTargetingForMediaId(mediaIdWithSegment);
|
|
231
239
|
|
|
@@ -255,7 +263,7 @@ describe('jwplayerRtdProvider', function() {
|
|
|
255
263
|
jwplayerSubmodule.getBidRequestData({ adUnits: [adUnit] }, bidRequestSpy);
|
|
256
264
|
expect(bidRequestSpy.calledOnce).to.be.true;
|
|
257
265
|
expect(bid.rtd.jwplayer).to.have.deep.property('targeting', expectedTargeting);
|
|
258
|
-
|
|
266
|
+
server.respond();
|
|
259
267
|
expect(bidRequestSpy.calledOnce).to.be.true;
|
|
260
268
|
});
|
|
261
269
|
});
|
|
@@ -271,22 +279,17 @@ describe('jwplayerRtdProvider', function() {
|
|
|
271
279
|
}
|
|
272
280
|
};
|
|
273
281
|
let bidRequestSpy;
|
|
274
|
-
let fakeServer;
|
|
275
282
|
let clock;
|
|
276
283
|
|
|
277
284
|
beforeEach(function () {
|
|
278
285
|
bidRequestSpy = sinon.spy();
|
|
279
286
|
|
|
280
|
-
fakeServer = sinon.createFakeServer();
|
|
281
|
-
fakeServer.respondImmediately = false;
|
|
282
|
-
fakeServer.autoRespond = false;
|
|
283
|
-
|
|
284
287
|
clock = sinon.useFakeTimers();
|
|
285
288
|
});
|
|
286
289
|
|
|
287
290
|
afterEach(function () {
|
|
288
291
|
clock.restore();
|
|
289
|
-
|
|
292
|
+
server.respond();
|
|
290
293
|
});
|
|
291
294
|
|
|
292
295
|
it('adds targeting when pending request succeeds', function () {
|
|
@@ -318,7 +321,7 @@ describe('jwplayerRtdProvider', function() {
|
|
|
318
321
|
expect(bid1).to.not.have.property('rtd');
|
|
319
322
|
expect(bid2).to.not.have.property('rtd');
|
|
320
323
|
|
|
321
|
-
const request =
|
|
324
|
+
const request = server.requests[0];
|
|
322
325
|
request.respond(
|
|
323
326
|
200,
|
|
324
327
|
responseHeader,
|
|
@@ -358,7 +361,7 @@ describe('jwplayerRtdProvider', function() {
|
|
|
358
361
|
},
|
|
359
362
|
bids
|
|
360
363
|
};
|
|
361
|
-
const request =
|
|
364
|
+
const request = server.requests[0];
|
|
362
365
|
request.respond(
|
|
363
366
|
200,
|
|
364
367
|
responseHeader,
|
|
@@ -443,7 +446,7 @@ describe('jwplayerRtdProvider', function() {
|
|
|
443
446
|
expect(bid1).to.not.have.property('rtd');
|
|
444
447
|
expect(bid2).to.not.have.property('rtd');
|
|
445
448
|
|
|
446
|
-
const request =
|
|
449
|
+
const request = server.requests[0];
|
|
447
450
|
request.respond(
|
|
448
451
|
200,
|
|
449
452
|
responseHeader,
|
|
@@ -518,7 +521,7 @@ describe('jwplayerRtdProvider', function() {
|
|
|
518
521
|
const bid1 = bids[0];
|
|
519
522
|
expect(bid1).to.not.have.property('rtd');
|
|
520
523
|
|
|
521
|
-
const request =
|
|
524
|
+
const request = server.requests[0];
|
|
522
525
|
request.respond(
|
|
523
526
|
200,
|
|
524
527
|
responseHeader,
|
|
@@ -931,7 +934,6 @@ describe('jwplayerRtdProvider', function() {
|
|
|
931
934
|
describe('Get Bid Request Data', function () {
|
|
932
935
|
const validMediaIDs = ['media_ID_1', 'media_ID_2', 'media_ID_3'];
|
|
933
936
|
let bidRequestSpy;
|
|
934
|
-
let fakeServer;
|
|
935
937
|
let clock;
|
|
936
938
|
let bidReqConfig;
|
|
937
939
|
|
|
@@ -971,16 +973,12 @@ describe('jwplayerRtdProvider', function() {
|
|
|
971
973
|
|
|
972
974
|
bidRequestSpy = sinon.spy();
|
|
973
975
|
|
|
974
|
-
fakeServer = sinon.createFakeServer();
|
|
975
|
-
fakeServer.respondImmediately = false;
|
|
976
|
-
fakeServer.autoRespond = false;
|
|
977
|
-
|
|
978
976
|
clock = sinon.useFakeTimers();
|
|
979
977
|
});
|
|
980
978
|
|
|
981
979
|
afterEach(function () {
|
|
982
980
|
clock.restore();
|
|
983
|
-
|
|
981
|
+
server.respond();
|
|
984
982
|
});
|
|
985
983
|
|
|
986
984
|
it('executes callback immediately when ad units are missing', function () {
|
|
@@ -1003,9 +1001,9 @@ describe('jwplayerRtdProvider', function() {
|
|
|
1003
1001
|
jwplayerSubmodule.getBidRequestData(bidReqConfig, bidRequestSpy);
|
|
1004
1002
|
expect(bidRequestSpy.notCalled).to.be.true;
|
|
1005
1003
|
|
|
1006
|
-
const req1 =
|
|
1007
|
-
const req2 =
|
|
1008
|
-
const req3 =
|
|
1004
|
+
const req1 = server.requests[0];
|
|
1005
|
+
const req2 = server.requests[1];
|
|
1006
|
+
const req3 = server.requests[2];
|
|
1009
1007
|
|
|
1010
1008
|
req1.respond();
|
|
1011
1009
|
expect(bidRequestSpy.notCalled).to.be.true;
|
|
@@ -266,6 +266,11 @@ describe('LiveIntentMinimalId', function() {
|
|
|
266
266
|
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'magnite': 'bar'}, 'magnite': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
267
267
|
});
|
|
268
268
|
|
|
269
|
+
it('should decode an index id to a seperate object when present', function() {
|
|
270
|
+
const result = liveIntentIdSubmodule.decode({ nonId: 'foo', index: 'bar' });
|
|
271
|
+
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'index': 'bar'}, 'index': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
272
|
+
});
|
|
273
|
+
|
|
269
274
|
it('should allow disabling nonId resolution', function() {
|
|
270
275
|
let callBackSpy = sinon.spy();
|
|
271
276
|
let submoduleCallback = liveIntentIdSubmodule.getId({ params: {
|
|
@@ -378,6 +378,11 @@ describe('LiveIntentId', function() {
|
|
|
378
378
|
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'magnite': 'bar'}, 'magnite': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
379
379
|
});
|
|
380
380
|
|
|
381
|
+
it('should decode an index id to a seperate object when present', function() {
|
|
382
|
+
const result = liveIntentIdSubmodule.decode({ nonId: 'foo', index: 'bar' });
|
|
383
|
+
expect(result).to.eql({'lipb': {'lipbid': 'foo', 'nonId': 'foo', 'index': 'bar'}, 'index': {'id': 'bar', 'ext': {'provider': 'liveintent.com'}}});
|
|
384
|
+
});
|
|
385
|
+
|
|
381
386
|
it('should allow disabling nonId resolution', function() {
|
|
382
387
|
let callBackSpy = sinon.spy();
|
|
383
388
|
let submoduleCallback = liveIntentIdSubmodule.getId({ params: {
|
|
@@ -550,7 +550,7 @@ describe('magnite analytics adapter', function () {
|
|
|
550
550
|
expect(server.requests.length).to.equal(1);
|
|
551
551
|
let request = server.requests[0];
|
|
552
552
|
|
|
553
|
-
expect(request.url).to.
|
|
553
|
+
expect(request.url).to.match(/\/\/localhost:9999\/event/);
|
|
554
554
|
|
|
555
555
|
let message = JSON.parse(request.requestBody);
|
|
556
556
|
|
|
@@ -724,7 +724,7 @@ describe('magnite analytics adapter', function () {
|
|
|
724
724
|
expect(server.requests.length).to.equal(1);
|
|
725
725
|
let request = server.requests[0];
|
|
726
726
|
|
|
727
|
-
expect(request.url).to.
|
|
727
|
+
expect(request.url).to.match(/\/\/localhost:9999\/event/);
|
|
728
728
|
|
|
729
729
|
let message = JSON.parse(request.requestBody);
|
|
730
730
|
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { mgidSubmodule, storage } from '../../../modules/mgidRtdProvider.js';
|
|
2
2
|
import {expect} from 'chai';
|
|
3
3
|
import * as refererDetection from '../../../src/refererDetection';
|
|
4
|
+
import {server} from '../../mocks/xhr.js';
|
|
4
5
|
|
|
5
6
|
describe('Mgid RTD submodule', () => {
|
|
6
|
-
let server;
|
|
7
7
|
let clock;
|
|
8
8
|
let getRefererInfoStub;
|
|
9
9
|
let getDataFromLocalStorageStub;
|
|
10
10
|
|
|
11
11
|
beforeEach(() => {
|
|
12
|
-
server = sinon.fakeServer.create();
|
|
13
|
-
|
|
14
12
|
clock = sinon.useFakeTimers();
|
|
15
13
|
|
|
16
14
|
getRefererInfoStub = sinon.stub(refererDetection, 'getRefererInfo');
|
|
@@ -22,7 +20,6 @@ describe('Mgid RTD submodule', () => {
|
|
|
22
20
|
});
|
|
23
21
|
|
|
24
22
|
afterEach(() => {
|
|
25
|
-
server.restore();
|
|
26
23
|
clock.restore();
|
|
27
24
|
getRefererInfoStub.restore();
|
|
28
25
|
getDataFromLocalStorageStub.restore();
|
|
@@ -309,7 +306,6 @@ describe('Mgid RTD submodule', () => {
|
|
|
309
306
|
server.requests[0].respond(
|
|
310
307
|
204,
|
|
311
308
|
{'Content-Type': 'application/json'},
|
|
312
|
-
'{}'
|
|
313
309
|
);
|
|
314
310
|
|
|
315
311
|
assert.deepEqual(reqBidsConfigObj.ortb2Fragments.global, {});
|
|
@@ -112,7 +112,7 @@ describe('nativoBidAdapterTests', function () {
|
|
|
112
112
|
bidRequests = [JSON.parse(bidRequestString)]
|
|
113
113
|
})
|
|
114
114
|
|
|
115
|
-
it('
|
|
115
|
+
it('Request should be POST, with JSON string payload and QS params should be added to the url', function () {
|
|
116
116
|
const request = spec.buildRequests(bidRequests, {
|
|
117
117
|
bidderRequestId: 123456,
|
|
118
118
|
refererInfo: {
|
|
@@ -120,6 +120,11 @@ describe('nativoBidAdapterTests', function () {
|
|
|
120
120
|
},
|
|
121
121
|
})
|
|
122
122
|
|
|
123
|
+
expect(request.method).to.equal('POST')
|
|
124
|
+
|
|
125
|
+
expect(request.data).to.exist
|
|
126
|
+
expect(request.data).to.be.a('string')
|
|
127
|
+
|
|
123
128
|
expect(request.url).to.exist
|
|
124
129
|
expect(request.url).to.be.a('string')
|
|
125
130
|
|
|
@@ -434,7 +434,7 @@ describe('Nexx360 bid adapter tests', function () {
|
|
|
434
434
|
const output = spec.interpretResponse(response);
|
|
435
435
|
expect(output.length).to.be.eql(0);
|
|
436
436
|
});
|
|
437
|
-
it('banner responses', function() {
|
|
437
|
+
it('banner responses with adUrl only', function() {
|
|
438
438
|
const response = {
|
|
439
439
|
body: {
|
|
440
440
|
'id': 'a8d3a675-a4ba-4d26-807f-c8f2fad821e0',
|
|
@@ -479,6 +479,53 @@ describe('Nexx360 bid adapter tests', function () {
|
|
|
479
479
|
expect(output[0].currency).to.be.eql(response.body.cur);
|
|
480
480
|
expect(output[0].cpm).to.be.eql(response.body.seatbid[0].bid[0].price);
|
|
481
481
|
});
|
|
482
|
+
it('banner responses with adm', function() {
|
|
483
|
+
const response = {
|
|
484
|
+
body: {
|
|
485
|
+
'id': 'a8d3a675-a4ba-4d26-807f-c8f2fad821e0',
|
|
486
|
+
'cur': 'USD',
|
|
487
|
+
'seatbid': [
|
|
488
|
+
{
|
|
489
|
+
'bid': [
|
|
490
|
+
{
|
|
491
|
+
'id': '4427551302944024629',
|
|
492
|
+
'impid': '226175918ebeda',
|
|
493
|
+
'price': 1.5,
|
|
494
|
+
'adomain': [
|
|
495
|
+
'http://prebid.org'
|
|
496
|
+
],
|
|
497
|
+
'crid': '98493581',
|
|
498
|
+
'ssp': 'appnexus',
|
|
499
|
+
'h': 600,
|
|
500
|
+
'w': 300,
|
|
501
|
+
'adm': '<div>TestAd</div>',
|
|
502
|
+
'cat': [
|
|
503
|
+
'IAB3-1'
|
|
504
|
+
],
|
|
505
|
+
'ext': {
|
|
506
|
+
'adUnitCode': 'div-1',
|
|
507
|
+
'mediaType': 'banner',
|
|
508
|
+
'adUrl': 'https://fast.nexx360.io/cache?uuid=fdddcebc-1edf-489d-880d-1418d8bdc493',
|
|
509
|
+
'ssp': 'appnexus',
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
'seat': 'appnexus'
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
'ext': {
|
|
517
|
+
'id': 'de3de7c7-e1cf-4712-80a9-94eb26bfc718',
|
|
518
|
+
'cookies': []
|
|
519
|
+
},
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
const output = spec.interpretResponse(response);
|
|
523
|
+
expect(output[0].ad).to.be.eql(response.body.seatbid[0].bid[0].adm);
|
|
524
|
+
expect(output[0].adUrl).to.be.eql(undefined);
|
|
525
|
+
expect(output[0].mediaType).to.be.eql(response.body.seatbid[0].bid[0].ext.mediaType);
|
|
526
|
+
expect(output[0].currency).to.be.eql(response.body.cur);
|
|
527
|
+
expect(output[0].cpm).to.be.eql(response.body.seatbid[0].bid[0].price);
|
|
528
|
+
});
|
|
482
529
|
it('instream responses', function() {
|
|
483
530
|
const response = {
|
|
484
531
|
body: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
2
|
import { spec } from 'modules/oguryBidAdapter';
|
|
3
3
|
import * as utils from 'src/utils.js';
|
|
4
|
+
import {server} from '../../mocks/xhr.js';
|
|
4
5
|
|
|
5
6
|
const BID_URL = 'https://mweb-hb.presage.io/api/header-bidding-request';
|
|
6
7
|
const TIMEOUT_URL = 'https://ms-ads-monitoring-events.presage.io/bid_timeout'
|
|
@@ -851,20 +852,11 @@ describe('OguryBidAdapter', function () {
|
|
|
851
852
|
});
|
|
852
853
|
|
|
853
854
|
describe('onBidWon', function() {
|
|
854
|
-
const nurl = 'https://fakewinurl.test';
|
|
855
|
-
let xhr;
|
|
855
|
+
const nurl = 'https://fakewinurl.test/';
|
|
856
856
|
let requests;
|
|
857
857
|
|
|
858
858
|
beforeEach(function() {
|
|
859
|
-
|
|
860
|
-
requests = [];
|
|
861
|
-
xhr.onCreate = (xhr) => {
|
|
862
|
-
requests.push(xhr);
|
|
863
|
-
};
|
|
864
|
-
})
|
|
865
|
-
|
|
866
|
-
afterEach(function() {
|
|
867
|
-
xhr.restore()
|
|
859
|
+
requests = server.requests;
|
|
868
860
|
})
|
|
869
861
|
|
|
870
862
|
it('Should not create nurl request if bid is undefined', function() {
|
|
@@ -932,21 +924,15 @@ describe('OguryBidAdapter', function () {
|
|
|
932
924
|
})
|
|
933
925
|
|
|
934
926
|
describe('onTimeout', function () {
|
|
935
|
-
let xhr;
|
|
936
927
|
let requests;
|
|
937
928
|
|
|
938
929
|
beforeEach(function() {
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
xhr.onCreate = (xhr) => {
|
|
930
|
+
requests = server.requests;
|
|
931
|
+
server.onCreate = (xhr) => {
|
|
942
932
|
requests.push(xhr);
|
|
943
933
|
};
|
|
944
934
|
})
|
|
945
935
|
|
|
946
|
-
afterEach(function() {
|
|
947
|
-
xhr.restore()
|
|
948
|
-
})
|
|
949
|
-
|
|
950
936
|
it('should send on bid timeout notification', function() {
|
|
951
937
|
const bid = {
|
|
952
938
|
ad: '<img style="width: 300px; height: 250px;" src="https://assets.afcdn.com/recipe/20190529/93153_w1024h768c1cx2220cy1728cxt0cyt0cxb4441cyb3456.jpg" alt="cookies" />',
|
|
@@ -312,6 +312,75 @@ describe('onetag', function () {
|
|
|
312
312
|
expect(payload.usPrivacy).to.exist;
|
|
313
313
|
expect(payload.usPrivacy).to.exist.and.to.equal(consentString);
|
|
314
314
|
});
|
|
315
|
+
it('Should send FPD (ortb2 field)', function () {
|
|
316
|
+
const firtPartyData = {
|
|
317
|
+
// this is where the contextual data is placed
|
|
318
|
+
site: {
|
|
319
|
+
name: 'example',
|
|
320
|
+
domain: 'page.example.com',
|
|
321
|
+
// OpenRTB 2.5 spec / Content Taxonomy
|
|
322
|
+
cat: ['IAB2'],
|
|
323
|
+
sectioncat: ['IAB2-2'],
|
|
324
|
+
pagecat: ['IAB2-2'],
|
|
325
|
+
page: 'https://page.example.com/here.html',
|
|
326
|
+
ref: 'https://ref.example.com',
|
|
327
|
+
keywords: 'power tools, drills',
|
|
328
|
+
search: 'drill',
|
|
329
|
+
content: {
|
|
330
|
+
userrating: '4',
|
|
331
|
+
data: [{
|
|
332
|
+
name: 'www.dataprovider1.com', // who resolved the segments
|
|
333
|
+
ext: {
|
|
334
|
+
segtax: 7, // taxonomy used to encode the segments
|
|
335
|
+
cids: ['iris_c73g5jq96mwso4d8']
|
|
336
|
+
},
|
|
337
|
+
// the bare minimum are the IDs. These IDs are the ones from the new IAB Content Taxonomy v3
|
|
338
|
+
segment: [ { id: '687' }, { id: '123' } ]
|
|
339
|
+
}]
|
|
340
|
+
},
|
|
341
|
+
ext: {
|
|
342
|
+
data: { // fields that aren't part of openrtb 2.6
|
|
343
|
+
pageType: 'article',
|
|
344
|
+
category: 'repair'
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
// this is where the user data is placed
|
|
349
|
+
user: {
|
|
350
|
+
keywords: 'a,b',
|
|
351
|
+
data: [{
|
|
352
|
+
name: 'dataprovider.com',
|
|
353
|
+
ext: {
|
|
354
|
+
segtax: 4
|
|
355
|
+
},
|
|
356
|
+
segment: [{
|
|
357
|
+
id: '1'
|
|
358
|
+
}]
|
|
359
|
+
}],
|
|
360
|
+
ext: {
|
|
361
|
+
data: {
|
|
362
|
+
registered: true,
|
|
363
|
+
interests: ['cars']
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
regs: {
|
|
368
|
+
gpp: 'abc1234',
|
|
369
|
+
gpp_sid: [7]
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
let bidderRequest = {
|
|
373
|
+
'bidderCode': 'onetag',
|
|
374
|
+
'auctionId': '1d1a030790a475',
|
|
375
|
+
'bidderRequestId': '22edbae2733bf6',
|
|
376
|
+
'timeout': 3000,
|
|
377
|
+
'ortb2': firtPartyData
|
|
378
|
+
}
|
|
379
|
+
let serverRequest = spec.buildRequests([bannerBid], bidderRequest);
|
|
380
|
+
const payload = JSON.parse(serverRequest.data);
|
|
381
|
+
expect(payload.ortb2).to.exist;
|
|
382
|
+
expect(payload.ortb2).to.exist.and.to.deep.equal(firtPartyData);
|
|
383
|
+
});
|
|
315
384
|
});
|
|
316
385
|
describe('interpretResponse', function () {
|
|
317
386
|
const request = getBannerVideoRequest();
|
|
@@ -663,7 +663,7 @@ describe('oolo Prebid Analytic', () => {
|
|
|
663
663
|
|
|
664
664
|
events.emit(constants.EVENTS.AUCTION_INIT, { ...auctionInit });
|
|
665
665
|
|
|
666
|
-
expect(server.requests[3].url).to.equal('https://pbjs.com')
|
|
666
|
+
expect(server.requests[3].url).to.equal('https://pbjs.com/')
|
|
667
667
|
})
|
|
668
668
|
|
|
669
669
|
it('should send raw events based on server configuration', () => {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { operaIdSubmodule } from 'modules/operaadsIdSystem'
|
|
2
|
+
import * as ajaxLib from 'src/ajax.js'
|
|
3
|
+
|
|
4
|
+
const TEST_ID = 'opera-test-id';
|
|
5
|
+
const operaIdRemoteResponse = { uid: TEST_ID };
|
|
6
|
+
|
|
7
|
+
describe('operaId submodule properties', () => {
|
|
8
|
+
it('should expose a "name" property equal to "operaId"', () => {
|
|
9
|
+
expect(operaIdSubmodule.name).to.equal('operaId');
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
function fakeRequest(fn) {
|
|
14
|
+
const ajaxBuilderStub = sinon.stub(ajaxLib, 'ajaxBuilder').callsFake(() => {
|
|
15
|
+
return (url, cbObj) => {
|
|
16
|
+
cbObj.success(JSON.stringify(operaIdRemoteResponse));
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
fn();
|
|
20
|
+
ajaxBuilderStub.restore();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
describe('operaId submodule getId', function() {
|
|
24
|
+
it('request to the fake server to correctly extract test ID', function() {
|
|
25
|
+
fakeRequest(() => {
|
|
26
|
+
const moduleIdCallbackResponse = operaIdSubmodule.getId({ params: { pid: 'pub123' } });
|
|
27
|
+
moduleIdCallbackResponse.callback((id) => {
|
|
28
|
+
expect(id).to.equal(operaIdRemoteResponse.operaId);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('request to the fake server without publiser ID', function() {
|
|
34
|
+
fakeRequest(() => {
|
|
35
|
+
const moduleIdCallbackResponse = operaIdSubmodule.getId({ params: {} });
|
|
36
|
+
expect(moduleIdCallbackResponse).to.equal(undefined);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
describe('operaId submodule decode', function() {
|
|
42
|
+
it('should respond with an object containing "operaId" as key with the value', () => {
|
|
43
|
+
expect(operaIdSubmodule.decode(TEST_ID)).to.deep.equal({
|
|
44
|
+
operaId: TEST_ID
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('should respond with undefined if the value is not a string or an empty string', () => {
|
|
49
|
+
[1, 2.0, null, undefined, NaN, [], {}].forEach((value) => {
|
|
50
|
+
expect(operaIdSubmodule.decode(value)).to.equal(undefined);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
});
|
|
@@ -167,7 +167,8 @@ describe('Oxxion Analytics', function () {
|
|
|
167
167
|
'meta': {
|
|
168
168
|
'advertiserDomains': [
|
|
169
169
|
'example.com'
|
|
170
|
-
]
|
|
170
|
+
],
|
|
171
|
+
'demandSource': 'something'
|
|
171
172
|
},
|
|
172
173
|
'renderer': 'something',
|
|
173
174
|
'originalCpm': 25.02521,
|
|
@@ -313,13 +314,16 @@ describe('Oxxion Analytics', function () {
|
|
|
313
314
|
expect(message.auctionEnd[0].bidsReceived[0]).not.to.have.property('ad');
|
|
314
315
|
expect(message.auctionEnd[0].bidsReceived[0]).to.have.property('meta');
|
|
315
316
|
expect(message.auctionEnd[0].bidsReceived[0].meta).to.have.property('advertiserDomains');
|
|
317
|
+
expect(message.auctionEnd[0].bidsReceived[0].meta).to.have.property('demandSource');
|
|
316
318
|
expect(message.auctionEnd[0].bidsReceived[0]).to.have.property('adId');
|
|
317
319
|
expect(message.auctionEnd[0]).to.have.property('bidderRequests').and.to.have.lengthOf(1);
|
|
318
320
|
expect(message.auctionEnd[0].bidderRequests[0]).to.have.property('gdprConsent');
|
|
319
321
|
expect(message.auctionEnd[0].bidderRequests[0].gdprConsent).not.to.have.property('vendorData');
|
|
322
|
+
expect(message.auctionEnd[0].bidderRequests[0]).to.have.property('oxxionMode');
|
|
320
323
|
});
|
|
321
324
|
|
|
322
325
|
it('test bidWon', function() {
|
|
326
|
+
window.OXXION_MODE = {'abtest': true};
|
|
323
327
|
adapterManager.registerAnalyticsAdapter({
|
|
324
328
|
code: 'oxxion',
|
|
325
329
|
adapter: oxxionAnalytics
|
|
@@ -337,6 +341,7 @@ describe('Oxxion Analytics', function () {
|
|
|
337
341
|
expect(message).not.to.have.property('ad');
|
|
338
342
|
expect(message).to.have.property('adId')
|
|
339
343
|
expect(message).to.have.property('cpmIncrement').and.to.equal(27.4276);
|
|
344
|
+
expect(message).to.have.property('oxxionMode').and.to.have.property('abtest').and.to.equal(true);
|
|
340
345
|
// sinon.assert.callCount(oxxionAnalytics.track, 1);
|
|
341
346
|
});
|
|
342
347
|
});
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
resetWurlMap,
|
|
7
7
|
s2sDefaultConfig
|
|
8
8
|
} from 'modules/prebidServerBidAdapter/index.js';
|
|
9
|
-
import adapterManager from 'src/adapterManager.js';
|
|
9
|
+
import adapterManager, {PBS_ADAPTER_NAME} from 'src/adapterManager.js';
|
|
10
10
|
import * as utils from 'src/utils.js';
|
|
11
11
|
import {deepAccess, deepClone, mergeDeep} from 'src/utils.js';
|
|
12
12
|
import {ajax} from 'src/ajax.js';
|
|
@@ -27,6 +27,7 @@ import 'modules/consentManagementUsp.js';
|
|
|
27
27
|
import 'modules/schain.js';
|
|
28
28
|
import 'modules/fledgeForGpt.js';
|
|
29
29
|
import * as redactor from 'src/activities/redactor.js';
|
|
30
|
+
import * as activityRules from 'src/activities/rules.js';
|
|
30
31
|
import {hook} from '../../../src/hook.js';
|
|
31
32
|
import {decorateAdUnitsWithNativeParams} from '../../../src/native.js';
|
|
32
33
|
import {auctionManager} from '../../../src/auctionManager.js';
|
|
@@ -35,6 +36,10 @@ import {addComponentAuction, registerBidder} from 'src/adapters/bidderFactory.js
|
|
|
35
36
|
import {getGlobal} from '../../../src/prebidGlobal.js';
|
|
36
37
|
import {syncAddFPDEnrichments, syncAddFPDToBidderRequest} from '../../helpers/fpd.js';
|
|
37
38
|
import {deepSetValue} from '../../../src/utils.js';
|
|
39
|
+
import {sandbox} from 'sinon';
|
|
40
|
+
import {ACTIVITY_TRANSMIT_UFPD} from '../../../src/activities/activities.js';
|
|
41
|
+
import {activityParams} from '../../../src/activities/activityParams.js';
|
|
42
|
+
import {MODULE_TYPE_PREBID} from '../../../src/activities/modules.js';
|
|
38
43
|
|
|
39
44
|
let CONFIG = {
|
|
40
45
|
accountId: '1',
|
|
@@ -734,13 +739,39 @@ describe('S2S Adapter', function () {
|
|
|
734
739
|
})
|
|
735
740
|
})
|
|
736
741
|
|
|
742
|
+
describe('browsingTopics', () => {
|
|
743
|
+
const sandbox = sinon.createSandbox();
|
|
744
|
+
afterEach(() => {
|
|
745
|
+
sandbox.restore()
|
|
746
|
+
});
|
|
747
|
+
Object.entries({
|
|
748
|
+
'allowed': true,
|
|
749
|
+
'not allowed': false,
|
|
750
|
+
}).forEach(([t, allow]) => {
|
|
751
|
+
it(`should be set to ${allow} when transmitUfpd is ${t}`, () => {
|
|
752
|
+
sandbox.stub(activityRules, 'isActivityAllowed').callsFake((activity, params) => {
|
|
753
|
+
if (activity === ACTIVITY_TRANSMIT_UFPD && params.component === `${MODULE_TYPE_PREBID}.${PBS_ADAPTER_NAME}`) {
|
|
754
|
+
return allow;
|
|
755
|
+
}
|
|
756
|
+
return false;
|
|
757
|
+
});
|
|
758
|
+
config.setConfig({s2sConfig: CONFIG});
|
|
759
|
+
const ajax = sinon.stub();
|
|
760
|
+
adapter.callBids(REQUEST, BID_REQUESTS, addBidResponse, done, ajax);
|
|
761
|
+
sinon.assert.calledWith(ajax, sinon.match.any, sinon.match.any, sinon.match.any, sinon.match({
|
|
762
|
+
browsingTopics: allow
|
|
763
|
+
}));
|
|
764
|
+
});
|
|
765
|
+
});
|
|
766
|
+
})
|
|
767
|
+
|
|
737
768
|
it('should set tmax to s2sConfig.timeout', () => {
|
|
738
769
|
const cfg = {...CONFIG, timeout: 123};
|
|
739
770
|
config.setConfig({s2sConfig: cfg});
|
|
740
771
|
adapter.callBids({...REQUEST, s2sConfig: cfg}, BID_REQUESTS, addBidResponse, done, ajax);
|
|
741
772
|
const req = JSON.parse(server.requests[0].requestBody);
|
|
742
773
|
expect(req.tmax).to.eql(123);
|
|
743
|
-
})
|
|
774
|
+
});
|
|
744
775
|
|
|
745
776
|
it('should block request if config did not define p1Consent URL in endpoint object config', function () {
|
|
746
777
|
let badConfig = utils.deepClone(CONFIG);
|