prebid.js 9.46.0 → 9.48.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/.github/codeql/queries/jsonRequestContentType.ql +18 -0
- package/AGENTS.md +42 -0
- package/CLAUDE.md +1 -0
- package/babelConfig.js +1 -1
- package/dist/33acrossAnalyticsAdapter.js +1 -1
- package/dist/33acrossBidAdapter.js +1 -1
- package/dist/33acrossIdSystem.js +1 -1
- package/dist/BTBidAdapter.js +1 -1
- package/dist/adagioAnalyticsAdapter.js +1 -1
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adagioUtils.js +1 -1
- package/dist/addefendBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/adlooxRtdProvider.js +1 -1
- package/dist/adqueryBidAdapter.js +1 -1
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adstirBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/advangUtils.js +1 -1
- package/dist/adverxoBidAdapter.js +1 -1
- package/dist/adxcgAnalyticsAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/agmaAnalyticsAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/aniviewBidAdapter.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/beopBidAdapter.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bitmediaBidAdapter.js +1 -1
- package/dist/blueBidAdapter.js +1 -1
- package/dist/blueUtils.js +1 -0
- package/dist/bmsBidAdapter.js +1 -1
- package/dist/bridBidAdapter.js +1 -1
- package/dist/bridgeuppBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/browsiUtils.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -1
- package/dist/chunk-core.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/contxtfulBidAdapter.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/cwireBidAdapter.js +1 -1
- package/dist/czechAdIdSystem.js +1 -1
- package/dist/dailymotionBidAdapter.js +1 -1
- package/dist/debugging-standalone.js +1 -1
- package/dist/dependencies.json +16 -2
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/dxkultureBidAdapter.js +1 -1
- package/dist/dynamicAdBoostRtdProvider.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/eskimiBidAdapter.js +1 -1
- package/dist/euidIdSystem.js +1 -1
- package/dist/exadsBidAdapter.js +1 -1
- package/dist/excoBidAdapter.js +1 -1
- package/dist/feedadBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/freewheel-sspBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/gptUtils.js +1 -1
- package/dist/greenbidsAnalyticsAdapter.js +1 -1
- package/dist/greenbidsBidAdapter.js +1 -1
- package/dist/greenbidsRtdProvider.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/hypelabBidAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/imdsBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmobiBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/intentIqAnalyticsAdapter.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/kimberliteBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveIntentId.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/luceadBidAdapter.js +1 -1
- package/dist/luponmediaBidAdapter.js +1 -1
- package/dist/mabidderBidAdapter.js +1 -1
- package/dist/madsenseBidAdapter.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/medianetBidAdapter.js +1 -1
- package/dist/medianetUtils.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/missenaBidAdapter.js +1 -1
- package/dist/mobilefuseBidAdapter.js +1 -1
- package/dist/nativeryBidAdapter.js +1 -0
- package/dist/nextMillenniumBidAdapter.js +1 -1
- package/dist/nexx360Utils.js +1 -1
- package/dist/nobidAnalyticsAdapter.js +1 -1
- package/dist/nobidBidAdapter.js +1 -1
- package/dist/nodalsAiRtdProvider.js +1 -1
- package/dist/not-for-prod/prebid.js +187 -184
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxBidAdapter.js +1 -1
- package/dist/optidigitalBidAdapter.js +1 -1
- package/dist/orbidderBidAdapter.js +1 -1
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/pinkLionBidAdapter.js +1 -0
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/priceFloors.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticAnalyticsAdapter.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubmaticRtdProvider.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pubxaiAnalyticsAdapter.js +1 -1
- package/dist/pubxaiRtdProvider.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/retailspotBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseUtils.js +1 -1
- package/dist/rtbhouseBidAdapter.js +1 -1
- package/dist/rubiconBidAdapter.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/showheroes-bsBidAdapter.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/snigelBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/sparteoBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/stroeerCoreBidAdapter.js +1 -1
- package/dist/stvBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/taboolaBidAdapter.js +1 -1
- package/dist/tappxBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/terceptAnalyticsAdapter.js +1 -1
- package/dist/themoneytizerBidAdapter.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/unrulyBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooUtils.js +1 -1
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/visxBidAdapter.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/xeUtils.js +1 -1
- package/dist/yahooAdsBidAdapter.js +1 -1
- package/dist/yandexBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/eslint.config.js +1 -3
- package/gulpHelpers.js +3 -6
- package/gulpfile.js +25 -24
- package/karma.conf.maker.js +1 -3
- package/libraries/advangUtils/index.js +3 -4
- package/libraries/blueUtils/bidderUtils.js +113 -0
- package/libraries/browsiUtils/browsiUtils.js +1 -2
- package/libraries/gptUtils/gptUtils.js +1 -2
- package/libraries/liveIntentId/shared.js +4 -0
- package/libraries/xeUtils/bidderUtils.js +3 -4
- package/modules/adagioBidAdapter.js +1 -2
- package/modules/addefendBidAdapter.md +1 -1
- package/modules/adtrgtmeBidAdapter.js +6 -8
- package/modules/aduptechBidAdapter.md +1 -1
- package/modules/adverxoBidAdapter.js +3 -3
- package/modules/blueBidAdapter.js +24 -104
- package/modules/bmsBidAdapter.js +25 -105
- package/modules/concertBidAdapter.md +1 -1
- package/modules/contxtfulBidAdapter.js +56 -10
- package/modules/conversantBidAdapter.js +0 -58
- package/modules/cwireBidAdapter.js +8 -0
- package/modules/czechAdIdSystem.js +13 -3
- package/modules/dynamicAdBoostRtdProvider.js +16 -33
- package/modules/dynamicAdBoostRtdProvider.md +1 -6
- package/modules/ixBidAdapter.js +2 -3
- package/modules/luponmediaBidAdapter.js +117 -522
- package/modules/luponmediaBidAdapter.md +2 -3
- package/modules/mediasquareBidAdapter.js +14 -20
- package/modules/microadBidAdapter.js +0 -1
- package/modules/nativeryBidAdapter.js +135 -0
- package/modules/nativeryBidAdapter.md +95 -0
- package/modules/nativoBidAdapter.js +3 -3
- package/modules/onetagBidAdapter.js +0 -1
- package/modules/pinkLionBidAdapter.js +17 -0
- package/modules/pinkLionBidAdapter.md +79 -0
- package/modules/prebidServerBidAdapter/ortbConverter.js +1 -1
- package/modules/priceFloors.js +2 -2
- package/modules/pubmaticBidAdapter.js +4 -1
- package/modules/qortexRtdProvider.md +1 -1
- package/modules/reconciliationRtdProvider.md +4 -4
- package/modules/rtbhouseBidAdapter.js +4 -83
- package/modules/rubiconBidAdapter.js +1 -1
- package/modules/sspBCBidAdapter.js +1 -1
- package/modules/stroeerCoreBidAdapter.js +3 -3
- package/modules/stvBidAdapter.js +19 -14
- package/modules/topicsFpdModule.md +1 -1
- package/modules/unifiedIdSystem.js +8 -1
- package/modules/userId/eids.js +15 -0
- package/modules/videoModule/index.js +0 -1
- package/modules/videoModule/videoImpressionVerifier.js +0 -1
- package/modules/yieldlabBidAdapter.js +1 -2
- package/modules/yieldmoBidAdapter.js +1 -2
- package/package.json +13 -20
- package/src/Renderer.js +1 -2
- package/src/adapterManager.js +14 -4
- package/src/auction.js +2 -3
- package/src/config.js +1 -2
- package/src/cpmBucketManager.js +1 -2
- package/src/secureCreatives.js +2 -3
- package/src/targeting.js +1 -2
- package/test/fake-server/README.md +3 -3
- package/test/helpers/index_adapter_utils.js +2 -2
- package/test/helpers/testing-utils.js +1 -1
- package/test/spec/auctionmanager_spec.js +2 -3
- package/test/spec/fpd/enrichment_spec.js +1 -1
- package/test/spec/libraries/greedy/greedyPromise_spec.js +2 -2
- package/test/spec/modules/adfBidAdapter_spec.js +1 -1
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +25 -9
- package/test/spec/modules/adtrgtmeBidAdapter_spec.js +2 -4
- package/test/spec/modules/adverxoBidAdapter_spec.js +25 -1
- package/test/spec/modules/afpBidAdapter_spec.js +0 -1
- package/test/spec/modules/bliinkBidAdapter_spec.js +15 -7
- package/test/spec/modules/contxtfulBidAdapter_spec.js +606 -82
- package/test/spec/modules/conversantBidAdapter_spec.js +1 -139
- package/test/spec/modules/cwireBidAdapter_spec.js +2 -2
- package/test/spec/modules/czechAdIdSystem_spec.js +4 -4
- package/test/spec/modules/displayioBidAdapter_spec.js +1 -1
- package/test/spec/modules/dynamicAdBoostRtdProvider_spec.js +0 -42
- package/test/spec/modules/enrichmentLiftMeasurement_spec.js +8 -8
- package/test/spec/modules/hypelabBidAdapter_spec.js +17 -11
- package/test/spec/modules/iasRtdProvider_spec.js +2 -2
- package/test/spec/modules/id5IdSystem_spec.js +1 -1
- package/test/spec/modules/idxIdSystem_spec.js +1 -2
- package/test/spec/modules/intentIqAnalyticsAdapter_spec.js +25 -25
- package/test/spec/modules/intentIqIdSystem_spec.js +32 -32
- package/test/spec/modules/kargoBidAdapter_spec.js +11 -5
- package/test/spec/modules/liveIntentIdSystem_spec.js +14 -0
- package/test/spec/modules/lmpIdSystem_spec.js +1 -2
- package/test/spec/modules/lockrAIMIdSystem_spec.js +2 -2
- package/test/spec/modules/luceadBidAdapter_spec.js +1 -1
- package/test/spec/modules/luponmediaBidAdapter_spec.js +186 -324
- package/test/spec/modules/mediaeyesBidAdapter_spec.js +1 -1
- package/test/spec/modules/mediakeysBidAdapter_spec.js +1 -2
- package/test/spec/modules/mediasquareBidAdapter_spec.js +13 -2
- package/test/spec/modules/missenaBidAdapter_spec.js +1 -1
- package/test/spec/modules/nativeryBidAdapter_spec.js +195 -0
- package/test/spec/modules/nexx360BidAdapter_spec.js +6 -6
- package/test/spec/modules/oguryBidAdapter_spec.js +2 -2
- package/test/spec/modules/omsBidAdapter_spec.js +1 -1
- package/test/spec/modules/onetagBidAdapter_spec.js +1 -2
- package/test/spec/modules/onomagicBidAdapter_spec.js +2 -2
- package/test/spec/modules/overtoneRtdProvider_spec.mjs +1 -1
- package/test/spec/modules/permutiveIdentityManagerIdSystem_spec.js +17 -14
- package/test/spec/modules/pinkLionBidAdapter_spec.js +480 -0
- package/test/spec/modules/prebidServerBidAdapter_spec.js +2 -2
- package/test/spec/modules/previousAuctionInfo_spec.js +2 -2
- package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +1 -1
- package/test/spec/modules/pubmaticBidAdapter_spec.js +19 -1
- package/test/spec/modules/pubmaticRtdProvider_spec.js +16 -17
- package/test/spec/modules/pubwiseAnalyticsAdapter_spec.js +2 -2
- package/test/spec/modules/rtbhouseBidAdapter_spec.js +0 -182
- package/test/spec/modules/rubiconBidAdapter_spec.js +3 -4
- package/test/spec/modules/sizeMappingV2_spec.js +1 -1
- package/test/spec/modules/sizeMapping_spec.js +2 -3
- package/test/spec/modules/stroeerCoreBidAdapter_spec.js +36 -26
- package/test/spec/modules/stvBidAdapter_spec.js +108 -40
- package/test/spec/modules/topLevelPaapi_spec.js +1 -1
- package/test/spec/modules/tpmnBidAdapter_spec.js +1 -1
- package/test/spec/modules/ttdBidAdapter_spec.js +1 -1
- package/test/spec/modules/unifiedIdSystem_spec.js +20 -0
- package/test/spec/modules/userId_spec.js +1 -1
- package/test/spec/modules/vibrantmediaBidAdapter_spec.js +1 -1
- package/test/spec/modules/videoModule/submodules/videojsVideoProvider_spec.js +1 -1
- package/test/spec/modules/yieldmoBidAdapter_spec.js +2 -2
- package/test/spec/modules/zeotapIdPlusIdSystem_spec.js +1 -2
- package/test/spec/unit/core/adapterManager_spec.js +29 -17
- package/test/spec/unit/core/targeting_spec.js +1 -1
- package/test/spec/unit/pbjs_api_spec.js +4 -5
- package/test/spec/utils_spec.js +20 -12
- package/test/test_deps.js +1 -1
- package/nightwatch.browserstack.json +0 -46
- package/nightwatch.conf.js +0 -36
- package/nightwatch.json +0 -40
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {expect} from 'chai';
|
|
2
|
-
import {spec
|
|
2
|
+
import {spec} from 'modules/conversantBidAdapter.js';
|
|
3
3
|
import * as utils from 'src/utils.js';
|
|
4
|
-
import {createEidsArray} from 'modules/userId/eids.js';
|
|
5
4
|
import {deepAccess} from 'src/utils';
|
|
6
5
|
// load modules that register ORTB processors
|
|
7
6
|
import 'src/prebid.js'
|
|
@@ -592,35 +591,6 @@ describe('Conversant adapter tests', function() {
|
|
|
592
591
|
}
|
|
593
592
|
})
|
|
594
593
|
|
|
595
|
-
it('Verify publisher commond id support', function() {
|
|
596
|
-
// clone bidRequests
|
|
597
|
-
let requests = utils.deepClone(bidRequests);
|
|
598
|
-
|
|
599
|
-
// add pubcid to every entry
|
|
600
|
-
requests.forEach((unit) => {
|
|
601
|
-
Object.assign(unit, {crumbs: {pubcid: 12345}});
|
|
602
|
-
});
|
|
603
|
-
// construct http post payload
|
|
604
|
-
const payload = spec.buildRequests(requests, {}).data;
|
|
605
|
-
expect(payload).to.have.deep.nested.property('user.ext.fpc', 12345);
|
|
606
|
-
expect(payload).to.not.have.nested.property('user.ext.eids');
|
|
607
|
-
});
|
|
608
|
-
|
|
609
|
-
it('Verify User ID publisher commond id support', function() {
|
|
610
|
-
// clone bidRequests
|
|
611
|
-
let requests = utils.deepClone(bidRequests);
|
|
612
|
-
|
|
613
|
-
// add pubcid to every entry
|
|
614
|
-
requests.forEach((unit) => {
|
|
615
|
-
Object.assign(unit, {userId: {pubcid: 67890}});
|
|
616
|
-
Object.assign(unit, {userIdAsEids: createEidsArray(unit.userId)});
|
|
617
|
-
});
|
|
618
|
-
// construct http post payload
|
|
619
|
-
const payload = spec.buildRequests(requests, {}).data;
|
|
620
|
-
expect(payload).to.have.deep.nested.property('user.ext.fpc', 67890);
|
|
621
|
-
expect(payload).to.not.have.nested.property('user.ext.eids');
|
|
622
|
-
});
|
|
623
|
-
|
|
624
594
|
describe('Extended ID', function() {
|
|
625
595
|
it('Verify unifiedid and liveramp', function() {
|
|
626
596
|
// clone bidRequests
|
|
@@ -637,114 +607,6 @@ describe('Conversant adapter tests', function() {
|
|
|
637
607
|
});
|
|
638
608
|
});
|
|
639
609
|
|
|
640
|
-
describe('direct reading pubcid', function() {
|
|
641
|
-
const ID_NAME = '_pubcid';
|
|
642
|
-
const CUSTOM_ID_NAME = 'myid';
|
|
643
|
-
const EXP = '_exp';
|
|
644
|
-
const TIMEOUT = 2000;
|
|
645
|
-
|
|
646
|
-
function cleanUp(key) {
|
|
647
|
-
window.document.cookie = key + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
|
|
648
|
-
localStorage.removeItem(key);
|
|
649
|
-
localStorage.removeItem(key + EXP);
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
function expStr(timeout) {
|
|
653
|
-
return (new Date(Date.now() + timeout * 60 * 60 * 24 * 1000)).toUTCString();
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
beforeEach(() => {
|
|
657
|
-
$$PREBID_GLOBAL$$.bidderSettings = {
|
|
658
|
-
conversant: {
|
|
659
|
-
storageAllowed: true
|
|
660
|
-
}
|
|
661
|
-
};
|
|
662
|
-
});
|
|
663
|
-
afterEach(() => {
|
|
664
|
-
$$PREBID_GLOBAL$$.bidderSettings = {};
|
|
665
|
-
cleanUp(ID_NAME);
|
|
666
|
-
cleanUp(CUSTOM_ID_NAME);
|
|
667
|
-
});
|
|
668
|
-
|
|
669
|
-
it('reading cookie', function() {
|
|
670
|
-
// clone bidRequests
|
|
671
|
-
const requests = utils.deepClone(bidRequests);
|
|
672
|
-
|
|
673
|
-
// add a pubcid cookie
|
|
674
|
-
storage.setCookie(ID_NAME, '12345', expStr(TIMEOUT));
|
|
675
|
-
|
|
676
|
-
// construct http post payload
|
|
677
|
-
const payload = spec.buildRequests(requests, {}).data;
|
|
678
|
-
expect(payload).to.have.deep.nested.property('user.ext.fpc', '12345');
|
|
679
|
-
});
|
|
680
|
-
|
|
681
|
-
it('reading custom cookie', function() {
|
|
682
|
-
// clone bidRequests
|
|
683
|
-
const requests = utils.deepClone(bidRequests);
|
|
684
|
-
requests[0].params.pubcid_name = CUSTOM_ID_NAME;
|
|
685
|
-
|
|
686
|
-
// add a pubcid cookie
|
|
687
|
-
storage.setCookie(CUSTOM_ID_NAME, '12345', expStr(TIMEOUT));
|
|
688
|
-
|
|
689
|
-
// construct http post payload
|
|
690
|
-
const payload = spec.buildRequests(requests, {}).data;
|
|
691
|
-
expect(payload).to.have.deep.nested.property('user.ext.fpc', '12345');
|
|
692
|
-
});
|
|
693
|
-
|
|
694
|
-
it('reading local storage with empty exp time', function() {
|
|
695
|
-
// clone bidRequests
|
|
696
|
-
const requests = utils.deepClone(bidRequests);
|
|
697
|
-
|
|
698
|
-
// add a pubcid in local storage
|
|
699
|
-
storage.setDataInLocalStorage(ID_NAME + EXP, '');
|
|
700
|
-
storage.setDataInLocalStorage(ID_NAME, 'abcde');
|
|
701
|
-
|
|
702
|
-
// construct http post payload
|
|
703
|
-
const payload = spec.buildRequests(requests, {}).data;
|
|
704
|
-
expect(payload).to.have.deep.nested.property('user.ext.fpc', 'abcde');
|
|
705
|
-
});
|
|
706
|
-
|
|
707
|
-
it('reading local storage with valid exp time', function() {
|
|
708
|
-
// clone bidRequests
|
|
709
|
-
const requests = utils.deepClone(bidRequests);
|
|
710
|
-
|
|
711
|
-
// add a pubcid in local storage
|
|
712
|
-
storage.setDataInLocalStorage(ID_NAME + EXP, expStr(TIMEOUT));
|
|
713
|
-
storage.setDataInLocalStorage(ID_NAME, 'fghijk');
|
|
714
|
-
|
|
715
|
-
// construct http post payload
|
|
716
|
-
const payload = spec.buildRequests(requests, {}).data;
|
|
717
|
-
expect(payload).to.have.deep.nested.property('user.ext.fpc', 'fghijk');
|
|
718
|
-
});
|
|
719
|
-
|
|
720
|
-
it('reading expired local storage', function() {
|
|
721
|
-
// clone bidRequests
|
|
722
|
-
const requests = utils.deepClone(bidRequests);
|
|
723
|
-
|
|
724
|
-
// add a pubcid in local storage
|
|
725
|
-
storage.setDataInLocalStorage(ID_NAME + EXP, expStr(-TIMEOUT));
|
|
726
|
-
storage.setDataInLocalStorage(ID_NAME, 'lmnopq');
|
|
727
|
-
|
|
728
|
-
// construct http post payload
|
|
729
|
-
const payload = spec.buildRequests(requests, {}).data;
|
|
730
|
-
expect(payload).to.not.have.deep.nested.property('user.ext.fpc');
|
|
731
|
-
});
|
|
732
|
-
|
|
733
|
-
it('reading local storage with custom name', function() {
|
|
734
|
-
// clone bidRequests
|
|
735
|
-
const requests = utils.deepClone(bidRequests);
|
|
736
|
-
requests[0].params.pubcid_name = CUSTOM_ID_NAME;
|
|
737
|
-
|
|
738
|
-
// add a pubcid in local storage
|
|
739
|
-
storage.setDataInLocalStorage(CUSTOM_ID_NAME + EXP, expStr(TIMEOUT));
|
|
740
|
-
storage.setDataInLocalStorage(CUSTOM_ID_NAME, 'fghijk');
|
|
741
|
-
|
|
742
|
-
// construct http post payload
|
|
743
|
-
const payload = spec.buildRequests(requests, {}).data;
|
|
744
|
-
expect(payload).to.have.deep.nested.property('user.ext.fpc', 'fghijk');
|
|
745
|
-
});
|
|
746
|
-
});
|
|
747
|
-
|
|
748
610
|
describe('price floor module', function() {
|
|
749
611
|
let bidRequest;
|
|
750
612
|
beforeEach(function() {
|
|
@@ -333,7 +333,7 @@ describe('C-WIRE bid adapter', () => {
|
|
|
333
333
|
const userSyncs = spec.getUserSyncs(synOptions, {}, gdprConsent, {});
|
|
334
334
|
|
|
335
335
|
expect(userSyncs[0].type).to.equal('image');
|
|
336
|
-
expect(userSyncs[0].url).to.equal('https://ib.adnxs.com/getuid?https://prebid.cwi.re/v1/cookiesync?xandrId=$UID&gdpr=0&gdpr_consent=testConsentString');
|
|
336
|
+
expect(userSyncs[0].url).to.equal('https://ib.adnxs.com/getuid?https://prebid.cwi.re/v1/cookiesync?xandrId=$UID&gdpr=0&gdpr_consent=testConsentString');
|
|
337
337
|
})
|
|
338
338
|
|
|
339
339
|
it('user-syncs with enabled iframe option', function () {
|
|
@@ -352,7 +352,7 @@ describe('C-WIRE bid adapter', () => {
|
|
|
352
352
|
const userSyncs = spec.getUserSyncs(synOptions, {}, gdprConsent, {});
|
|
353
353
|
|
|
354
354
|
expect(userSyncs[0].type).to.equal('iframe');
|
|
355
|
-
expect(userSyncs[0].url).to.equal('https://ib.adnxs.com/getuid?https://prebid.cwi.re/v1/cookiesync?xandrId=$UID&gdpr=1&gdpr_consent=abc123');
|
|
355
|
+
expect(userSyncs[0].url).to.equal('https://ib.adnxs.com/getuid?https://prebid.cwi.re/v1/cookiesync?xandrId=$UID&gdpr=1&gdpr_consent=abc123');
|
|
356
356
|
})
|
|
357
357
|
})
|
|
358
358
|
});
|
|
@@ -19,9 +19,9 @@ describe('czechAdId module', function () {
|
|
|
19
19
|
|
|
20
20
|
describe('getId()', function () {
|
|
21
21
|
it('should return the uid when it exists in cookie', function () {
|
|
22
|
-
getCookieStub.withArgs('czaid').returns('
|
|
22
|
+
getCookieStub.withArgs('czaid').returns('00000000-0000-4000-8000-000000000000');
|
|
23
23
|
const id = czechAdIdSubmodule.getId();
|
|
24
|
-
expect(id).to.be.deep.equal({id: '
|
|
24
|
+
expect(id).to.be.deep.equal({id: '00000000-0000-4000-8000-000000000000'});
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
cookieTestCasesForEmpty.forEach(testCase => it('should not return the uid when it doesnt exist in cookie', function () {
|
|
@@ -33,9 +33,9 @@ describe('czechAdId module', function () {
|
|
|
33
33
|
|
|
34
34
|
describe('decode()', function () {
|
|
35
35
|
it('should return the uid when it exists in cookie', function () {
|
|
36
|
-
getCookieStub.withArgs('czaid').returns('
|
|
36
|
+
getCookieStub.withArgs('czaid').returns('00000000-0000-4000-8000-000000000000');
|
|
37
37
|
const decoded = czechAdIdSubmodule.decode();
|
|
38
|
-
expect(decoded).to.be.deep.equal({czechAdId: '
|
|
38
|
+
expect(decoded).to.be.deep.equal({czechAdId: '00000000-0000-4000-8000-000000000000'});
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
41
|
describe('eid', () => {
|
|
@@ -1,48 +1,6 @@
|
|
|
1
1
|
import { subModuleObj as rtdProvider } from 'modules/dynamicAdBoostRtdProvider.js';
|
|
2
|
-
import { loadExternalScript } from '../../../src/adloader.js';
|
|
3
2
|
import { expect } from 'chai';
|
|
4
3
|
|
|
5
|
-
const configWithParams = {
|
|
6
|
-
params: {
|
|
7
|
-
keyId: 'dynamic',
|
|
8
|
-
adUnits: ['gpt-123'],
|
|
9
|
-
threshold: 1
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const configWithoutRequiredParams = {
|
|
14
|
-
params: {
|
|
15
|
-
keyId: ''
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
describe('dynamicAdBoost', function() {
|
|
20
|
-
let clock;
|
|
21
|
-
let sandbox;
|
|
22
|
-
beforeEach(function () {
|
|
23
|
-
sandbox = sinon.sandbox.create();
|
|
24
|
-
clock = sandbox.useFakeTimers(Date.now());
|
|
25
|
-
});
|
|
26
|
-
afterEach(function () {
|
|
27
|
-
sandbox.restore();
|
|
28
|
-
});
|
|
29
|
-
describe('init', function() {
|
|
30
|
-
describe('initialize without expected params', function() {
|
|
31
|
-
it('fails initalize when keyId is not present', function() {
|
|
32
|
-
expect(rtdProvider.init(configWithoutRequiredParams)).to.be.false;
|
|
33
|
-
})
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
describe('initialize with expected params', function() {
|
|
37
|
-
it('successfully initialize with load script', function() {
|
|
38
|
-
expect(rtdProvider.init(configWithParams)).to.be.true;
|
|
39
|
-
clock.tick(1000);
|
|
40
|
-
expect(loadExternalScript.called).to.be.true;
|
|
41
|
-
})
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
})
|
|
45
|
-
|
|
46
4
|
describe('markViewed tests', function() {
|
|
47
5
|
let sandbox;
|
|
48
6
|
const mockObserver = {
|
|
@@ -19,7 +19,7 @@ describe('enrichmentLiftMeasurement', () => {
|
|
|
19
19
|
config.resetConfig();
|
|
20
20
|
reset();
|
|
21
21
|
})
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
it('should properly split traffic basing on percentage', () => {
|
|
24
24
|
const TEST_SAMPLE_SIZE = 1000;
|
|
25
25
|
const MARGIN_OF_ERROR = 0.05;
|
|
@@ -56,13 +56,13 @@ describe('enrichmentLiftMeasurement', () => {
|
|
|
56
56
|
|
|
57
57
|
mathRandomStub.restore();
|
|
58
58
|
});
|
|
59
|
-
|
|
59
|
+
|
|
60
60
|
describe('should register activity based on suppression param', () => {
|
|
61
61
|
Object.entries({
|
|
62
62
|
[suppressionMethod.EIDS]: false,
|
|
63
63
|
[suppressionMethod.SUBMODULES]: true
|
|
64
64
|
}).forEach(([method, value]) => {
|
|
65
|
-
it(method, () => {
|
|
65
|
+
it(method, () => {
|
|
66
66
|
config.setConfig({ enrichmentLiftMeasurement: {
|
|
67
67
|
suppression: method,
|
|
68
68
|
modules: [
|
|
@@ -123,7 +123,7 @@ describe('enrichmentLiftMeasurement', () => {
|
|
|
123
123
|
sessionStorageIsEnabled: () => true,
|
|
124
124
|
getDataFromSessionStorage: sinon.stub().returns(null),
|
|
125
125
|
setDataInSessionStorage: sinon.stub()
|
|
126
|
-
};
|
|
126
|
+
};
|
|
127
127
|
init(fakeStorageManager);
|
|
128
128
|
sinon.assert.calledOnce(fakeStorageManager.setDataInSessionStorage);
|
|
129
129
|
sinon.assert.calledOnce(getCalculatedSubmodulesStub);
|
|
@@ -148,7 +148,7 @@ describe('enrichmentLiftMeasurement', () => {
|
|
|
148
148
|
storeSplits: storeSplitsMethod.SESSION_STORAGE,
|
|
149
149
|
modules: mockConfig.map(module => ({...module, percentage: 0.1}))
|
|
150
150
|
}});
|
|
151
|
-
|
|
151
|
+
|
|
152
152
|
init(fakeStorageManager);
|
|
153
153
|
|
|
154
154
|
sinon.assert.calledOnce(fakeStorageManager.setDataInSessionStorage);
|
|
@@ -168,7 +168,7 @@ describe('enrichmentLiftMeasurement', () => {
|
|
|
168
168
|
testRun: TEST_RUN_ID,
|
|
169
169
|
storeSplits: storeSplitsMethod.PAGE
|
|
170
170
|
}});
|
|
171
|
-
|
|
171
|
+
|
|
172
172
|
init();
|
|
173
173
|
|
|
174
174
|
const eventType = EVENTS.BID_WON;
|
|
@@ -189,7 +189,7 @@ describe('enrichmentLiftMeasurement', () => {
|
|
|
189
189
|
};
|
|
190
190
|
const stringifiedConfig = JSON.stringify(expectedResult);
|
|
191
191
|
|
|
192
|
-
Object.entries({
|
|
192
|
+
Object.entries({
|
|
193
193
|
[LOCAL_STORAGE]: localStorage,
|
|
194
194
|
[SESSION_STORAGE]: sessionStorage,
|
|
195
195
|
}).forEach(([method, storage]) => {
|
|
@@ -206,7 +206,7 @@ describe('enrichmentLiftMeasurement', () => {
|
|
|
206
206
|
const { LOCAL_STORAGE, SESSION_STORAGE } = storeSplitsMethod;
|
|
207
207
|
const TEST_RUN_ID = 'ExperimentA';
|
|
208
208
|
|
|
209
|
-
Object.entries({
|
|
209
|
+
Object.entries({
|
|
210
210
|
[LOCAL_STORAGE]: localStorage,
|
|
211
211
|
[SESSION_STORAGE]: sessionStorage,
|
|
212
212
|
}).forEach(([method, storage]) => {
|
|
@@ -114,11 +114,11 @@ const mockBidRequest = {
|
|
|
114
114
|
|
|
115
115
|
describe('hypelabBidAdapter', function () {
|
|
116
116
|
describe('mediaSize', function () {
|
|
117
|
-
|
|
117
|
+
it('when given an invalid media object', function () {
|
|
118
118
|
expect(mediaSize({})).to.eql({ width: 0, height: 0 });
|
|
119
119
|
});
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
it('when given a valid media object', function () {
|
|
122
122
|
expect(
|
|
123
123
|
mediaSize({ creative_set: { image: { width: 728, height: 90 } } })
|
|
124
124
|
).to.eql({ width: 728, height: 90 });
|
|
@@ -126,29 +126,35 @@ describe('hypelabBidAdapter', function () {
|
|
|
126
126
|
});
|
|
127
127
|
|
|
128
128
|
describe('isBidRequestValid', function () {
|
|
129
|
-
|
|
129
|
+
it('when given an invalid bid request', function () {
|
|
130
130
|
expect(spec.isBidRequestValid({})).to.equal(false);
|
|
131
131
|
});
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
it('when given a valid bid request', function () {
|
|
134
134
|
expect(spec.isBidRequestValid(mockValidBidRequest)).to.equal(true);
|
|
135
135
|
});
|
|
136
136
|
});
|
|
137
137
|
|
|
138
138
|
describe('Bidder code valid', function () {
|
|
139
|
-
|
|
139
|
+
it('should match BIDDER_CODE', function () {
|
|
140
|
+
expect(spec.code).to.equal(BIDDER_CODE);
|
|
141
|
+
});
|
|
140
142
|
});
|
|
141
143
|
|
|
142
144
|
describe('Media types valid', function () {
|
|
143
|
-
|
|
145
|
+
it('should contain BANNER', function () {
|
|
146
|
+
expect(spec.supportedMediaTypes).to.contain(BANNER);
|
|
147
|
+
});
|
|
144
148
|
});
|
|
145
149
|
|
|
146
150
|
describe('Bid request valid', function () {
|
|
147
|
-
|
|
151
|
+
it('should validate correctly', function () {
|
|
152
|
+
expect(spec.isBidRequestValid(mockValidBidRequest)).to.equal(true);
|
|
153
|
+
});
|
|
148
154
|
});
|
|
149
155
|
|
|
150
156
|
describe('buildRequests', () => {
|
|
151
|
-
|
|
157
|
+
it('returns a valid request', function () {
|
|
152
158
|
const result = spec.buildRequests(
|
|
153
159
|
mockValidBidRequests,
|
|
154
160
|
mockBidderRequest
|
|
@@ -200,7 +206,7 @@ describe('hypelabBidAdapter', function () {
|
|
|
200
206
|
expect(data.pp).to.deep.equal(null);
|
|
201
207
|
});
|
|
202
208
|
|
|
203
|
-
|
|
209
|
+
it('should set uuid to the first id in userIdAsEids', () => {
|
|
204
210
|
mockValidBidRequests[0].userIdAsEids = [
|
|
205
211
|
{
|
|
206
212
|
source: 'pubcid.org',
|
|
@@ -231,7 +237,7 @@ describe('hypelabBidAdapter', function () {
|
|
|
231
237
|
});
|
|
232
238
|
|
|
233
239
|
describe('interpretResponse', () => {
|
|
234
|
-
|
|
240
|
+
it('successfully interpret a valid response', function () {
|
|
235
241
|
const result = spec.interpretResponse(mockServerResponse, mockBidRequest);
|
|
236
242
|
|
|
237
243
|
expect(result).to.be.an('array');
|
|
@@ -252,7 +258,7 @@ describe('hypelabBidAdapter', function () {
|
|
|
252
258
|
expect(data.meta.advertiserDomains[0]).to.be.a('string');
|
|
253
259
|
});
|
|
254
260
|
|
|
255
|
-
|
|
261
|
+
it('should return a blank array if cpm is not set', () => {
|
|
256
262
|
mockServerResponse.body.data.cpm = undefined;
|
|
257
263
|
const result = spec.interpretResponse(mockServerResponse, mockBidRequest);
|
|
258
264
|
expect(result).to.eql([]);
|
|
@@ -181,7 +181,7 @@ describe('iasRtdProvider is a RTD provider that', function () {
|
|
|
181
181
|
});
|
|
182
182
|
it('it merges response data', function () {
|
|
183
183
|
const callback = sinon.spy();
|
|
184
|
-
|
|
184
|
+
|
|
185
185
|
iasSubModule.getBidRequestData({
|
|
186
186
|
adUnits: [
|
|
187
187
|
{code: 'adunit-1'},
|
|
@@ -201,7 +201,7 @@ describe('iasRtdProvider is a RTD provider that', function () {
|
|
|
201
201
|
expect(targeting1['adunit-2']['adt']).to.be.eq('veryLow');
|
|
202
202
|
expect(targeting1['adunit-2']['fr']).to.be.eq('false');
|
|
203
203
|
expect(targeting1['adunit-2']['ias_id']).to.be.eq('id2');
|
|
204
|
-
|
|
204
|
+
|
|
205
205
|
iasSubModule.getBidRequestData({
|
|
206
206
|
adUnits: [
|
|
207
207
|
{code: 'adunit-2'},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
|
-
import {find} from 'src/polyfill.js';
|
|
3
2
|
import { config } from 'src/config.js';
|
|
4
3
|
import { init, startAuctionHook, setSubmoduleRegistry } from 'modules/userId/index.js';
|
|
5
4
|
import { storage, idxIdSubmodule } from 'modules/idxIdSystem.js';
|
|
@@ -114,7 +113,7 @@ describe('IDx ID System', () => {
|
|
|
114
113
|
unit.bids.forEach(bid => {
|
|
115
114
|
expect(bid).to.have.deep.nested.property('userId.idx');
|
|
116
115
|
expect(bid.userId.idx).to.equal(IDX_DUMMY_VALUE);
|
|
117
|
-
const idxIdAsEid =
|
|
116
|
+
const idxIdAsEid = bid.userIdAsEids.find(e => e.source == 'idx.lat');
|
|
118
117
|
expect(idxIdAsEid).to.deep.equal({
|
|
119
118
|
source: 'idx.lat',
|
|
120
119
|
uids: [{
|
|
@@ -141,19 +141,19 @@ describe('IntentIQ tests all', function () {
|
|
|
141
141
|
it('should send POST request with payload in request body if reportMethod is POST', function () {
|
|
142
142
|
const [userConfig] = getUserConfig();
|
|
143
143
|
userConfig.params.reportMethod = 'POST';
|
|
144
|
-
|
|
144
|
+
|
|
145
145
|
config.getConfig.restore();
|
|
146
146
|
sinon.stub(config, 'getConfig').withArgs('userSync.userIds').returns([userConfig]);
|
|
147
|
-
|
|
147
|
+
|
|
148
148
|
localStorage.setItem(FIRST_PARTY_KEY, defaultData);
|
|
149
|
-
|
|
149
|
+
|
|
150
150
|
events.emit(EVENTS.BID_WON, wonRequest);
|
|
151
|
-
|
|
151
|
+
|
|
152
152
|
const request = server.requests[0];
|
|
153
|
-
|
|
153
|
+
|
|
154
154
|
const expectedData = preparePayload(wonRequest);
|
|
155
155
|
const expectedPayload = `["${btoa(JSON.stringify(expectedData))}"]`;
|
|
156
|
-
|
|
156
|
+
|
|
157
157
|
expect(request.method).to.equal('POST');
|
|
158
158
|
expect(request.requestBody).to.equal(expectedPayload);
|
|
159
159
|
});
|
|
@@ -162,25 +162,25 @@ describe('IntentIQ tests all', function () {
|
|
|
162
162
|
const [userConfig] = getUserConfig();
|
|
163
163
|
config.getConfig.restore();
|
|
164
164
|
sinon.stub(config, 'getConfig').withArgs('userSync.userIds').returns([userConfig]);
|
|
165
|
-
|
|
165
|
+
|
|
166
166
|
localStorage.setItem(FIRST_PARTY_KEY, defaultData);
|
|
167
167
|
events.emit(EVENTS.BID_WON, wonRequest);
|
|
168
|
-
|
|
168
|
+
|
|
169
169
|
const request = server.requests[0];
|
|
170
|
-
|
|
170
|
+
|
|
171
171
|
expect(request.method).to.equal('GET');
|
|
172
|
-
|
|
172
|
+
|
|
173
173
|
const url = new URL(request.url);
|
|
174
174
|
const payloadEncoded = url.searchParams.get('payload');
|
|
175
175
|
const decoded = JSON.parse(atob(JSON.parse(payloadEncoded)[0]));
|
|
176
|
-
|
|
176
|
+
|
|
177
177
|
const expected = preparePayload(wonRequest);
|
|
178
|
-
|
|
178
|
+
|
|
179
179
|
expect(decoded.partnerId).to.equal(expected.partnerId);
|
|
180
180
|
expect(decoded.adType).to.equal(expected.adType);
|
|
181
181
|
expect(decoded.prebidAuctionId).to.equal(expected.prebidAuctionId);
|
|
182
182
|
});
|
|
183
|
-
|
|
183
|
+
|
|
184
184
|
it('IIQ Analytical Adapter bid win report', function () {
|
|
185
185
|
localStorage.setItem(FIRST_PARTY_KEY, defaultData);
|
|
186
186
|
getWindowLocationStub = sinon.stub(utils, 'getWindowLocation').returns({href: 'http://localhost:9876'});
|
|
@@ -430,8 +430,8 @@ describe('IntentIQ tests all', function () {
|
|
|
430
430
|
});
|
|
431
431
|
|
|
432
432
|
it('should include source parameter in report URL', function () {
|
|
433
|
-
localStorage.setItem(FIRST_PARTY_KEY, JSON.stringify(defaultData));
|
|
434
|
-
|
|
433
|
+
localStorage.setItem(FIRST_PARTY_KEY, JSON.stringify(defaultData));
|
|
434
|
+
|
|
435
435
|
events.emit(EVENTS.BID_WON, wonRequest);
|
|
436
436
|
const request = server.requests[0];
|
|
437
437
|
|
|
@@ -462,17 +462,17 @@ describe('IntentIQ tests all', function () {
|
|
|
462
462
|
parameterValue: 'Lee',
|
|
463
463
|
destination: [0, 0, 1]
|
|
464
464
|
}];
|
|
465
|
-
|
|
465
|
+
|
|
466
466
|
config.getConfig.restore();
|
|
467
467
|
sinon.stub(config, 'getConfig').withArgs('userSync.userIds').returns(userConfig);
|
|
468
|
-
|
|
468
|
+
|
|
469
469
|
localStorage.setItem(FIRST_PARTY_KEY, defaultData);
|
|
470
470
|
events.emit(EVENTS.BID_WON, wonRequest);
|
|
471
|
-
|
|
471
|
+
|
|
472
472
|
const request = server.requests[0];
|
|
473
473
|
expect(request.url).to.include('general=Lee');
|
|
474
474
|
});
|
|
475
|
-
|
|
475
|
+
|
|
476
476
|
it('should not send additionalParams in report if value is too large', function () {
|
|
477
477
|
const longVal = 'x'.repeat(5000000);
|
|
478
478
|
const userConfig = getUserConfig();
|
|
@@ -481,21 +481,21 @@ describe('IntentIQ tests all', function () {
|
|
|
481
481
|
parameterValue: longVal,
|
|
482
482
|
destination: [0, 0, 1]
|
|
483
483
|
}];
|
|
484
|
-
|
|
484
|
+
|
|
485
485
|
config.getConfig.restore();
|
|
486
486
|
sinon.stub(config, 'getConfig').withArgs('userSync.userIds').returns(userConfig);
|
|
487
|
-
|
|
487
|
+
|
|
488
488
|
localStorage.setItem(FIRST_PARTY_KEY, defaultData);
|
|
489
489
|
events.emit(EVENTS.BID_WON, wonRequest);
|
|
490
|
-
|
|
490
|
+
|
|
491
491
|
const request = server.requests[0];
|
|
492
492
|
expect(request.url).not.to.include('general');
|
|
493
|
-
});
|
|
493
|
+
});
|
|
494
494
|
it('should include spd parameter from LS in report URL', function () {
|
|
495
495
|
const spdObject = { foo: 'bar', value: 42 };
|
|
496
496
|
const expectedSpdEncoded = encodeURIComponent(JSON.stringify(spdObject));
|
|
497
497
|
|
|
498
|
-
localStorage.setItem(FIRST_PARTY_KEY, JSON.stringify({...defaultData, spd: spdObject}));
|
|
498
|
+
localStorage.setItem(FIRST_PARTY_KEY, JSON.stringify({...defaultData, spd: spdObject}));
|
|
499
499
|
getWindowLocationStub = sinon.stub(utils, 'getWindowLocation').returns({ href: 'http://localhost:9876/' });
|
|
500
500
|
|
|
501
501
|
events.emit(EVENTS.BID_WON, wonRequest);
|
|
@@ -510,7 +510,7 @@ describe('IntentIQ tests all', function () {
|
|
|
510
510
|
const spdObject = 'server provided data';
|
|
511
511
|
const expectedSpdEncoded = encodeURIComponent(spdObject);
|
|
512
512
|
|
|
513
|
-
localStorage.setItem(FIRST_PARTY_KEY, JSON.stringify({...defaultData, spd: spdObject}));
|
|
513
|
+
localStorage.setItem(FIRST_PARTY_KEY, JSON.stringify({...defaultData, spd: spdObject}));
|
|
514
514
|
getWindowLocationStub = sinon.stub(utils, 'getWindowLocation').returns({ href: 'http://localhost:9876/' });
|
|
515
515
|
|
|
516
516
|
events.emit(EVENTS.BID_WON, wonRequest);
|