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
|
@@ -175,7 +175,7 @@ describe('videojsProvider', function () {
|
|
|
175
175
|
expect(video.mimes).to.include(VPAID_MIME_TYPE);
|
|
176
176
|
});
|
|
177
177
|
//
|
|
178
|
-
// We can't determine what type of outstream play is
|
|
178
|
+
// We can't determine what type of outstream play is occurring
|
|
179
179
|
// if the src is absent so we should not set placement
|
|
180
180
|
it('should not set placement when src is absent', function() {
|
|
181
181
|
document.body.innerHTML = `<video preload id='test' width="${200}" height="${100}"></video>`
|
|
@@ -332,7 +332,7 @@ describe('YieldmoAdapter', function () {
|
|
|
332
332
|
});
|
|
333
333
|
|
|
334
334
|
it('should not exceed max url length', () => {
|
|
335
|
-
const longString =
|
|
335
|
+
const longString = Array(8000).join('a');
|
|
336
336
|
const localWindow = utils.getWindowTop();
|
|
337
337
|
|
|
338
338
|
const originalTitle = localWindow.document.title;
|
|
@@ -356,7 +356,7 @@ describe('YieldmoAdapter', function () {
|
|
|
356
356
|
});
|
|
357
357
|
|
|
358
358
|
it('should only shortcut properties rather then completely remove it', () => {
|
|
359
|
-
const longString =
|
|
359
|
+
const longString = Array(8000).join('a');
|
|
360
360
|
const localWindow = utils.getWindowTop();
|
|
361
361
|
|
|
362
362
|
const originalTitle = localWindow.document.title;
|
|
@@ -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 {attachIdSystem, init, startAuctionHook, setSubmoduleRegistry} from 'modules/userId/index.js';
|
|
5
4
|
import { storage, getStorage, zeotapIdPlusSubmodule } from 'modules/zeotapIdPlusIdSystem.js';
|
|
@@ -181,7 +180,7 @@ describe('Zeotap ID System', function() {
|
|
|
181
180
|
unit.bids.forEach(bid => {
|
|
182
181
|
expect(bid).to.have.deep.nested.property('userId.IDP');
|
|
183
182
|
expect(bid.userId.IDP).to.equal(ZEOTAP_COOKIE);
|
|
184
|
-
const zeotapIdAsEid =
|
|
183
|
+
const zeotapIdAsEid = bid.userIdAsEids.find(e => e.source == 'zeotap.com');
|
|
185
184
|
expect(zeotapIdAsEid).to.deep.equal({
|
|
186
185
|
source: 'zeotap.com',
|
|
187
186
|
uids: [{
|
|
@@ -18,7 +18,6 @@ import * as utils from 'src/utils.js';
|
|
|
18
18
|
import { config } from 'src/config.js';
|
|
19
19
|
import { registerBidder } from 'src/adapters/bidderFactory.js';
|
|
20
20
|
import { setSizeConfig } from 'modules/sizeMapping.js';
|
|
21
|
-
import {find, includes} from 'src/polyfill.js';
|
|
22
21
|
import s2sTesting from 'modules/s2sTesting.js';
|
|
23
22
|
import {hook} from '../../../../src/hook.js';
|
|
24
23
|
import {auctionManager} from '../../../../src/auctionManager.js';
|
|
@@ -227,7 +226,7 @@ describe('adapterManager tests', function () {
|
|
|
227
226
|
|
|
228
227
|
it('should give bidders access to bidder-specific config', function(done) {
|
|
229
228
|
let mockBidders = ['rubicon', 'appnexus', 'pubmatic'];
|
|
230
|
-
let bidderRequest = getBidRequests().filter(bidRequest => includes(
|
|
229
|
+
let bidderRequest = getBidRequests().filter(bidRequest => mockBidders.includes(bidRequest.bidderCode));
|
|
231
230
|
let adUnits = getAdUnits();
|
|
232
231
|
|
|
233
232
|
let bidders = {};
|
|
@@ -517,7 +516,7 @@ describe('adapterManager tests', function () {
|
|
|
517
516
|
|
|
518
517
|
it('should call spec\'s onBidderError callback when callBidderError is called', function () {
|
|
519
518
|
const bidRequests = getBidRequests();
|
|
520
|
-
const bidderRequest = find(
|
|
519
|
+
const bidderRequest = bidRequests.find(bidRequest => bidRequest.bidderCode === bidder);
|
|
521
520
|
const xhrErrorMock = {
|
|
522
521
|
status: 500,
|
|
523
522
|
statusText: 'Internal Server Error'
|
|
@@ -729,7 +728,7 @@ describe('adapterManager tests', function () {
|
|
|
729
728
|
|
|
730
729
|
it('should fire for s2s requests', function () {
|
|
731
730
|
let adUnits = utils.deepClone(getAdUnits()).map(adUnit => {
|
|
732
|
-
adUnit.bids = adUnit.bids.filter(bid =>
|
|
731
|
+
adUnit.bids = adUnit.bids.filter(bid => ['appnexus'].includes(bid.bidder));
|
|
733
732
|
return adUnit;
|
|
734
733
|
})
|
|
735
734
|
let bidRequests = adapterManager.makeBidRequests(adUnits, 1111, 2222, 1000);
|
|
@@ -741,7 +740,7 @@ describe('adapterManager tests', function () {
|
|
|
741
740
|
it('should fire for simultaneous s2s and client requests', function () {
|
|
742
741
|
adapterManager.bidderRegistry['adequant'] = adequantAdapterMock;
|
|
743
742
|
let adUnits = utils.deepClone(getAdUnits()).map(adUnit => {
|
|
744
|
-
adUnit.bids = adUnit.bids.filter(bid =>
|
|
743
|
+
adUnit.bids = adUnit.bids.filter(bid => ['adequant', 'appnexus'].includes(bid.bidder));
|
|
745
744
|
return adUnit;
|
|
746
745
|
})
|
|
747
746
|
let bidRequests = adapterManager.makeBidRequests(adUnits, 1111, 2222, 1000);
|
|
@@ -1119,7 +1118,7 @@ describe('adapterManager tests', function () {
|
|
|
1119
1118
|
|
|
1120
1119
|
it('should fire for s2s requests', function () {
|
|
1121
1120
|
let adUnits = utils.deepClone(getAdUnits()).map(adUnit => {
|
|
1122
|
-
adUnit.bids = adUnit.bids.filter(bid =>
|
|
1121
|
+
adUnit.bids = adUnit.bids.filter(bid => ['appnexus', 'pubmatic'].includes(bid.bidder));
|
|
1123
1122
|
return adUnit;
|
|
1124
1123
|
})
|
|
1125
1124
|
let bidRequests = adapterManager.makeBidRequests(adUnits, 1111, 2222, 1000);
|
|
@@ -1130,7 +1129,7 @@ describe('adapterManager tests', function () {
|
|
|
1130
1129
|
|
|
1131
1130
|
it('should have one tid for ALL s2s bidRequests', function () {
|
|
1132
1131
|
let adUnits = utils.deepClone(getAdUnits()).map(adUnit => {
|
|
1133
|
-
adUnit.bids = adUnit.bids.filter(bid =>
|
|
1132
|
+
adUnit.bids = adUnit.bids.filter(bid => ['appnexus', 'pubmatic'].includes(bid.bidder));
|
|
1134
1133
|
return adUnit;
|
|
1135
1134
|
})
|
|
1136
1135
|
let bidRequests = adapterManager.makeBidRequests(adUnits, 1111, 2222, 1000);
|
|
@@ -1146,7 +1145,7 @@ describe('adapterManager tests', function () {
|
|
|
1146
1145
|
it('should fire for simultaneous s2s and client requests', function () {
|
|
1147
1146
|
adapterManager.bidderRegistry['adequant'] = adequantAdapterMock;
|
|
1148
1147
|
let adUnits = utils.deepClone(getAdUnits()).map(adUnit => {
|
|
1149
|
-
adUnit.bids = adUnit.bids.filter(bid =>
|
|
1148
|
+
adUnit.bids = adUnit.bids.filter(bid => ['adequant', 'appnexus', 'pubmatic'].includes(bid.bidder));
|
|
1150
1149
|
return adUnit;
|
|
1151
1150
|
})
|
|
1152
1151
|
let bidRequests = adapterManager.makeBidRequests(adUnits, 1111, 2222, 1000);
|
|
@@ -1168,7 +1167,7 @@ describe('adapterManager tests', function () {
|
|
|
1168
1167
|
// copy adUnits
|
|
1169
1168
|
// return JSON.parse(JSON.stringify(getAdUnits()));
|
|
1170
1169
|
return utils.deepClone(getAdUnits()).map(adUnit => {
|
|
1171
|
-
adUnit.bids = adUnit.bids.filter(bid =>
|
|
1170
|
+
adUnit.bids = adUnit.bids.filter(bid => ['adequant', 'appnexus', 'rubicon'].includes(bid.bidder));
|
|
1172
1171
|
return adUnit;
|
|
1173
1172
|
})
|
|
1174
1173
|
}
|
|
@@ -1351,8 +1350,7 @@ describe('adapterManager tests', function () {
|
|
|
1351
1350
|
// copy adUnits
|
|
1352
1351
|
return utils.deepClone(getAdUnits()).map(adUnit => {
|
|
1353
1352
|
adUnit.bids = adUnit.bids.filter(bid => {
|
|
1354
|
-
return
|
|
1355
|
-
bid.bidder);
|
|
1353
|
+
return ['adequant', 'appnexus', 'pubmatic', 'rubicon'].includes(bid.bidder);
|
|
1356
1354
|
});
|
|
1357
1355
|
return adUnit;
|
|
1358
1356
|
})
|
|
@@ -1768,7 +1766,7 @@ describe('adapterManager tests', function () {
|
|
|
1768
1766
|
beforeEach(function () {
|
|
1769
1767
|
resetAdUnitCounters();
|
|
1770
1768
|
adUnits = utils.deepClone(getAdUnits()).map(adUnit => {
|
|
1771
|
-
adUnit.bids = adUnit.bids.filter(bid =>
|
|
1769
|
+
adUnit.bids = adUnit.bids.filter(bid => ['appnexus', 'rubicon'].includes(bid.bidder));
|
|
1772
1770
|
return adUnit;
|
|
1773
1771
|
})
|
|
1774
1772
|
twinAdUnits = getTwinAdUnits();
|
|
@@ -2086,6 +2084,20 @@ describe('adapterManager tests', function () {
|
|
|
2086
2084
|
requests.appnexus.bids.forEach((bid) => expect(bid.ortb2).to.eql(requests.appnexus.ortb2));
|
|
2087
2085
|
});
|
|
2088
2086
|
|
|
2087
|
+
it('should move user.eids into user.ext.eids', () => {
|
|
2088
|
+
const global = {
|
|
2089
|
+
user: {
|
|
2090
|
+
eids: [{source: 'idA'}],
|
|
2091
|
+
ext: {eids: [{source: 'idB'}]}
|
|
2092
|
+
}
|
|
2093
|
+
};
|
|
2094
|
+
const reqs = adapterManager.makeBidRequests(adUnits, 123, 'auction-id', 123, [], {global});
|
|
2095
|
+
reqs.forEach(req => {
|
|
2096
|
+
expect(req.ortb2.user.ext.eids).to.deep.equal([{source: 'idB'}, {source: 'idA'}]);
|
|
2097
|
+
expect(req.ortb2.user.eids).to.not.exist;
|
|
2098
|
+
});
|
|
2099
|
+
});
|
|
2100
|
+
|
|
2089
2101
|
describe('source.tid', () => {
|
|
2090
2102
|
beforeEach(() => {
|
|
2091
2103
|
sinon.stub(dep, 'redact').returns({
|
|
@@ -2333,14 +2345,14 @@ describe('adapterManager tests', function () {
|
|
|
2333
2345
|
);
|
|
2334
2346
|
|
|
2335
2347
|
expect(bidRequests.length).to.equal(2);
|
|
2336
|
-
let rubiconBidRequests = find(
|
|
2348
|
+
let rubiconBidRequests = bidRequests.find(bidRequest => bidRequest.bidderCode === 'rubicon');
|
|
2337
2349
|
expect(rubiconBidRequests.bids.length).to.equal(1);
|
|
2338
|
-
expect(rubiconBidRequests.bids[0].mediaTypes).to.deep.equal(find(
|
|
2350
|
+
expect(rubiconBidRequests.bids[0].mediaTypes).to.deep.equal(adUnits.find(adUnit => adUnit.code === rubiconBidRequests.bids[0].adUnitCode).mediaTypes);
|
|
2339
2351
|
|
|
2340
|
-
let appnexusBidRequests = find(
|
|
2352
|
+
let appnexusBidRequests = bidRequests.find(bidRequest => bidRequest.bidderCode === 'appnexus');
|
|
2341
2353
|
expect(appnexusBidRequests.bids.length).to.equal(2);
|
|
2342
|
-
expect(appnexusBidRequests.bids[0].mediaTypes).to.deep.equal(find(
|
|
2343
|
-
expect(appnexusBidRequests.bids[1].mediaTypes).to.deep.equal(find(
|
|
2354
|
+
expect(appnexusBidRequests.bids[0].mediaTypes).to.deep.equal(adUnits.find(adUnit => adUnit.code === appnexusBidRequests.bids[0].adUnitCode).mediaTypes);
|
|
2355
|
+
expect(appnexusBidRequests.bids[1].mediaTypes).to.deep.equal(adUnits.find(adUnit => adUnit.code === appnexusBidRequests.bids[1].adUnitCode).mediaTypes);
|
|
2344
2356
|
});
|
|
2345
2357
|
|
|
2346
2358
|
it('should not filter native bids', function () {
|
|
@@ -661,7 +661,7 @@ describe('targeting tests', function () {
|
|
|
661
661
|
.filter((bid) => bid.adserverTargeting[key] != null)
|
|
662
662
|
.map((bid) => bid.bidderCode)
|
|
663
663
|
.forEach((code) => keys.add(`${key}_${code}`.substr(0, 20)));
|
|
664
|
-
return
|
|
664
|
+
return [...keys];
|
|
665
665
|
}
|
|
666
666
|
|
|
667
667
|
const targetingResult = function () {
|
|
@@ -15,7 +15,6 @@ import * as ajaxLib from 'src/ajax.js';
|
|
|
15
15
|
import * as auctionModule from 'src/auction.js';
|
|
16
16
|
import {resetAuctionState} from 'src/auction.js';
|
|
17
17
|
import {registerBidder} from 'src/adapters/bidderFactory.js';
|
|
18
|
-
import {find} from 'src/polyfill.js';
|
|
19
18
|
import * as pbjsModule from 'src/prebid.js';
|
|
20
19
|
import $$PREBID_GLOBAL$$, {startAuction} from 'src/prebid.js';
|
|
21
20
|
import {hook} from '../../../src/hook.js';
|
|
@@ -1006,7 +1005,7 @@ describe('Unit: Prebid Module', function () {
|
|
|
1006
1005
|
|
|
1007
1006
|
describe('setTargetingForGPTAsync', function () {
|
|
1008
1007
|
let logErrorSpy;
|
|
1009
|
-
let targeting;
|
|
1008
|
+
let targeting;
|
|
1010
1009
|
|
|
1011
1010
|
beforeEach(function () {
|
|
1012
1011
|
logErrorSpy = sinon.spy(utils, 'logError');
|
|
@@ -1023,7 +1022,7 @@ describe('Unit: Prebid Module', function () {
|
|
|
1023
1022
|
window.googletag.pubads().setSlots(slots);
|
|
1024
1023
|
$$PREBID_GLOBAL$$.setTargetingForGPTAsync([config.adUnitCodes[0]]);
|
|
1025
1024
|
|
|
1026
|
-
|
|
1025
|
+
|
|
1027
1026
|
slots.forEach(function(slot) {
|
|
1028
1027
|
targeting = {};
|
|
1029
1028
|
slot.getTargetingKeys().map(function (key) {
|
|
@@ -3704,7 +3703,7 @@ describe('Unit: Prebid Module', function () {
|
|
|
3704
3703
|
winningBid = targeting.getWinningBids(adUnitCode)[0];
|
|
3705
3704
|
auction.getAuctionId = function() { return winningBid.auctionId };
|
|
3706
3705
|
sandbox.stub(events, 'emit');
|
|
3707
|
-
markedBid =
|
|
3706
|
+
markedBid = $$PREBID_GLOBAL$$.getBidResponsesForAdUnitCode(adUnitCode).bids.find(
|
|
3708
3707
|
bid => bid.adId === winningBid.adId);
|
|
3709
3708
|
})
|
|
3710
3709
|
|
|
@@ -3756,7 +3755,7 @@ describe('Unit: Prebid Module', function () {
|
|
|
3756
3755
|
|
|
3757
3756
|
it('try and mark the bid object, but fail because we supplied the wrong adId', function () {
|
|
3758
3757
|
$$PREBID_GLOBAL$$.markWinningBidAsUsed({ adUnitCode, adId: 'miss' });
|
|
3759
|
-
const markedBid =
|
|
3758
|
+
const markedBid = $$PREBID_GLOBAL$$.getBidResponsesForAdUnitCode(adUnitCode).bids.find(
|
|
3760
3759
|
bid => bid.adId === winningBid.adId);
|
|
3761
3760
|
|
|
3762
3761
|
expect(markedBid.status).to.not.equal(BID_STATUS.RENDERED);
|
package/test/spec/utils_spec.js
CHANGED
|
@@ -882,22 +882,30 @@ describe('Utils', function () {
|
|
|
882
882
|
});
|
|
883
883
|
|
|
884
884
|
describe('insertElement', function () {
|
|
885
|
+
let doc;
|
|
886
|
+
|
|
887
|
+
beforeEach(function () {
|
|
888
|
+
doc = document.implementation.createHTMLDocument('insertElementTest');
|
|
889
|
+
});
|
|
890
|
+
|
|
885
891
|
it('returns a node at the top of the target by default', function () {
|
|
886
|
-
const toInsert =
|
|
887
|
-
const target =
|
|
888
|
-
const inserted = utils.insertElement(toInsert,
|
|
892
|
+
const toInsert = doc.createElement('div');
|
|
893
|
+
const target = doc.getElementsByTagName('body')[0];
|
|
894
|
+
const inserted = utils.insertElement(toInsert, doc, 'body');
|
|
889
895
|
expect(inserted).to.equal(target.firstChild);
|
|
890
896
|
});
|
|
897
|
+
|
|
891
898
|
it('returns a node at bottom of target if 4th argument is true', function () {
|
|
892
|
-
const toInsert =
|
|
893
|
-
const target =
|
|
894
|
-
const inserted = utils.insertElement(toInsert,
|
|
899
|
+
const toInsert = doc.createElement('div');
|
|
900
|
+
const target = doc.getElementsByTagName('html')[0];
|
|
901
|
+
const inserted = utils.insertElement(toInsert, doc, 'html', true);
|
|
895
902
|
expect(inserted).to.equal(target.lastChild);
|
|
896
903
|
});
|
|
904
|
+
|
|
897
905
|
it('returns a node at top of the head if no target is given', function () {
|
|
898
|
-
const toInsert =
|
|
899
|
-
const target =
|
|
900
|
-
const inserted = utils.insertElement(toInsert);
|
|
906
|
+
const toInsert = doc.createElement('div');
|
|
907
|
+
const target = doc.getElementsByTagName('head')[0];
|
|
908
|
+
const inserted = utils.insertElement(toInsert, doc);
|
|
901
909
|
expect(inserted).to.equal(target.firstChild);
|
|
902
910
|
});
|
|
903
911
|
});
|
|
@@ -1325,16 +1333,16 @@ describe('Utils', function () {
|
|
|
1325
1333
|
it('should compress data correctly when CompressionStream is available', async () => {
|
|
1326
1334
|
const data = JSON.stringify({ test: 'data' });
|
|
1327
1335
|
const compressedData = await utils.compressDataWithGZip(data);
|
|
1328
|
-
|
|
1336
|
+
|
|
1329
1337
|
expect(compressedData).to.be.instanceOf(Uint8Array);
|
|
1330
1338
|
expect(compressedData.length).to.be.greaterThan(0);
|
|
1331
1339
|
expect(compressedData).to.deep.equal(new Uint8Array([1, 2, 3, 4]));
|
|
1332
1340
|
});
|
|
1333
|
-
|
|
1341
|
+
|
|
1334
1342
|
it('should handle non-string input by stringifying it', async () => {
|
|
1335
1343
|
const nonStringData = { test: 'data' };
|
|
1336
1344
|
const compressedData = await utils.compressDataWithGZip(nonStringData);
|
|
1337
|
-
|
|
1345
|
+
|
|
1338
1346
|
expect(compressedData).to.be.instanceOf(Uint8Array);
|
|
1339
1347
|
expect(compressedData.length).to.be.greaterThan(0);
|
|
1340
1348
|
expect(compressedData).to.deep.equal(new Uint8Array([1, 2, 3, 4]));
|
package/test/test_deps.js
CHANGED
|
@@ -21,7 +21,7 @@ window.addEventListener('error', function (ev) {
|
|
|
21
21
|
})
|
|
22
22
|
|
|
23
23
|
window.addEventListener('unhandledrejection', function (ev) {
|
|
24
|
-
// this message is used for counting intentional failures created in the tests
|
|
24
|
+
// this message is used for counting intentional failures created in the tests
|
|
25
25
|
if (ev.reason === 'pending failure') return;
|
|
26
26
|
// eslint-disable-next-line no-console
|
|
27
27
|
console.error('Unhandled rejection:', ev.reason);
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"src_folders": ["./test/spec/e2e"],
|
|
3
|
-
"output_folder": "./build/coverage/e2e/reports",
|
|
4
|
-
"custom_commands_path": "",
|
|
5
|
-
"custom_assertions_path": "",
|
|
6
|
-
"page_objects_path": "",
|
|
7
|
-
"globals_path": "",
|
|
8
|
-
|
|
9
|
-
"selenium" : {
|
|
10
|
-
"start_process" : false,
|
|
11
|
-
"host" : "hub.browserstack.com",
|
|
12
|
-
"port" : 80
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
"test_settings": {
|
|
16
|
-
"default": {
|
|
17
|
-
"launch_url" : "http://hub.browserstack.com",
|
|
18
|
-
"selenium_port" : 80,
|
|
19
|
-
"selenium_host" : "hub.browserstack.com",
|
|
20
|
-
"silent": true,
|
|
21
|
-
"exclude":["custom-assertions","custom-commands","common","custom-reporter"],
|
|
22
|
-
"screenshots" : {
|
|
23
|
-
"enabled" : false,
|
|
24
|
-
"path" : ""
|
|
25
|
-
},
|
|
26
|
-
"desiredCapabilities": {
|
|
27
|
-
"browserName": "chrome",
|
|
28
|
-
"browser_version" : "51.0",
|
|
29
|
-
"platform" : "WINDOWS",
|
|
30
|
-
|
|
31
|
-
"javascriptEnabled": true,
|
|
32
|
-
"acceptSslCerts": true,
|
|
33
|
-
|
|
34
|
-
"os" : "WINDOWS",
|
|
35
|
-
"os_version" : "7",
|
|
36
|
-
"browser" : "Chrome",
|
|
37
|
-
"browser_version" : "51.0",
|
|
38
|
-
"browserstack.local": true,
|
|
39
|
-
"browserstack.debug": true,
|
|
40
|
-
"browserstack.selenium_version" : "2.53.0",
|
|
41
|
-
"browserstack.user": "${BROWSERSTACK_USERNAME}",
|
|
42
|
-
"browserstack.key": "${BROWSERSTACK_KEY}"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
package/nightwatch.conf.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
module.exports = (function(settings) {
|
|
2
|
-
var browsers = require('./browsers.json');
|
|
3
|
-
delete browsers['bs_ie_9_windows_7'];
|
|
4
|
-
|
|
5
|
-
for (var browser in browsers) {
|
|
6
|
-
if (browsers[browser].browser === 'iphone') continue;
|
|
7
|
-
|
|
8
|
-
var desiredCapabilities = {
|
|
9
|
-
'browserName': browsers[browser].browser,
|
|
10
|
-
'version': browsers[browser].browser_version,
|
|
11
|
-
'platform': browsers[browser].os,
|
|
12
|
-
'os': browsers[browser].os,
|
|
13
|
-
'os_version': browsers[browser].os_version,
|
|
14
|
-
'browser': browsers[browser].browser,
|
|
15
|
-
'browser_version': browsers[browser].browser_version,
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
settings.test_settings[browser] = {
|
|
19
|
-
'silent': true,
|
|
20
|
-
'exclude': ['custom-assertions', 'custom-commands', 'common', 'custom-reporter'],
|
|
21
|
-
'screenshots': {
|
|
22
|
-
'enabled': false,
|
|
23
|
-
'path': ''
|
|
24
|
-
},
|
|
25
|
-
'javascriptEnabled': true,
|
|
26
|
-
'acceptSslCerts': true,
|
|
27
|
-
'browserstack.local': true,
|
|
28
|
-
'browserstack.debug': true,
|
|
29
|
-
'browserstack.selenium_version': '2.53.0',
|
|
30
|
-
'browserstack.user': `${BROWSERSTACK_USERNAME}`,
|
|
31
|
-
'browserstack.key': `${BROWSERSTACK_KEY}`
|
|
32
|
-
};
|
|
33
|
-
settings.test_settings[browser]['desiredCapabilities'] = desiredCapabilities;
|
|
34
|
-
}
|
|
35
|
-
return settings;
|
|
36
|
-
})(require('./nightwatch.browserstack.json'));
|
package/nightwatch.json
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"src_folders": ["./test/spec/e2e"],
|
|
3
|
-
"output_folder": "./build/coverage/e2e/reports",
|
|
4
|
-
"custom_commands_path" : "",
|
|
5
|
-
"custom_assertions_path" : "./test/spec/e2e/custom-assertions",
|
|
6
|
-
"page_objects_path" : "",
|
|
7
|
-
"globals_path" : "",
|
|
8
|
-
"end_session_on_fail" : true,
|
|
9
|
-
"skip_testcases_on_fail" : false,
|
|
10
|
-
|
|
11
|
-
"selenium" : {
|
|
12
|
-
"start_process" : true,
|
|
13
|
-
"server_path" : "${SELENIUM_JAR_PATH}",
|
|
14
|
-
"log_path" : "",
|
|
15
|
-
"host" : "127.0.0.1",
|
|
16
|
-
"port" : 4444,
|
|
17
|
-
"cli_args" : {
|
|
18
|
-
"webdriver.ie.driver" : ""
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
"test_settings" : {
|
|
23
|
-
"default" : {
|
|
24
|
-
"launch_url" : "http://localhost",
|
|
25
|
-
"selenium_port" : 4444,
|
|
26
|
-
"selenium_host" : "localhost",
|
|
27
|
-
"silent": true,
|
|
28
|
-
"exclude":["custom-assertions","custom-commands","common","custom-reporter"],
|
|
29
|
-
"screenshots" : {
|
|
30
|
-
"enabled" : false,
|
|
31
|
-
"path" : ""
|
|
32
|
-
},
|
|
33
|
-
"desiredCapabilities": {
|
|
34
|
-
"browserName": "firefox",
|
|
35
|
-
"javascriptEnabled": true,
|
|
36
|
-
"acceptSslCerts": true
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|