From 1ba2785d38c08a9576850f4cb85f5ee0b1d1be2d Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 12 Apr 2023 15:39:44 -0400 Subject: [PATCH 01/13] Update realvuAnalyticsAdapter_spec.js --- test/spec/modules/realvuAnalyticsAdapter_spec.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/spec/modules/realvuAnalyticsAdapter_spec.js b/test/spec/modules/realvuAnalyticsAdapter_spec.js index e51a4e2e3a2..aa17a2c7c75 100644 --- a/test/spec/modules/realvuAnalyticsAdapter_spec.js +++ b/test/spec/modules/realvuAnalyticsAdapter_spec.js @@ -81,11 +81,6 @@ describe('RealVu', function() { result = realvuAnalyticsAdapter.checkIn(bid, ''); // test invalid partnerId '' }); - it.skip('isInView returns "yes"', () => { - let inview = realvuAnalyticsAdapter.isInView('ad1'); - expect(inview).to.equal('yes'); - }); - it('isInView return "NA"', function () { const adUnitCode = '1234'; let result = realvuAnalyticsAdapter.isInView(adUnitCode); From c7ea3b2f052ae5ce18d8da1421f842758d47b13c Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 12 Apr 2023 15:41:39 -0400 Subject: [PATCH 02/13] Update axonixBidAdapter_spec.js --- test/spec/modules/axonixBidAdapter_spec.js | 27 ---------------------- 1 file changed, 27 deletions(-) diff --git a/test/spec/modules/axonixBidAdapter_spec.js b/test/spec/modules/axonixBidAdapter_spec.js index 37f409e5769..c1cc6d46fb2 100644 --- a/test/spec/modules/axonixBidAdapter_spec.js +++ b/test/spec/modules/axonixBidAdapter_spec.js @@ -286,26 +286,6 @@ describe('AxonixBidAdapter', function () { }); }); - describe.skip('buildRequests: can handle native ad requests', function () { - it('creates ServerRequests pointing to the correct region and endpoint if it changes', function () { - // loop: - // set supply id - // set region/endpoint in ssp config - // call buildRequests, validate request (url, method, supply id) - expect.fail('Not implemented'); - }); - - it('creates ServerRequests pointing to default endpoint if missing', function () { - // no endpoint in config means default value openrtb.axonix.com - expect.fail('Not implemented'); - }); - - it('creates ServerRequests pointing to default region if missing', function () { - // no region in config means default value us-east-1 - expect.fail('Not implemented'); - }); - }); - describe('interpretResponse', function () { it('considers corner cases', function() { expect(spec.interpretResponse(null)).to.be.an('array').that.is.empty; @@ -331,13 +311,6 @@ describe('AxonixBidAdapter', function () { expect(response).to.be.an('array').that.is.not.empty; expect(response[0]).to.equal(VIDEO_RESPONSE.body[0]); }); - - it.skip('parses 1 native responses', function () { - // passing 1 valid native in a response generates an array with 1 correct prebid response - // examine mediaType:native, native element - // check nativeBidIsValid from {@link file://./../../../src/native.js} - expect.fail('Not implemented'); - }); }); describe('onBidWon', function () { From 82efd35085cc4c0ec49ad22461d04d57a49aef11 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 12 Apr 2023 15:42:29 -0400 Subject: [PATCH 03/13] Update pubCommonId_spec.js --- test/spec/modules/pubCommonId_spec.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/test/spec/modules/pubCommonId_spec.js b/test/spec/modules/pubCommonId_spec.js index a46ff26c4b8..7c539014cc5 100644 --- a/test/spec/modules/pubCommonId_spec.js +++ b/test/spec/modules/pubCommonId_spec.js @@ -233,23 +233,6 @@ describe('Publisher Common ID', function () { }); }); }); - - it.skip('disable auto create', function() { - setConfig({ - create: false - }); - - const config = getPubcidConfig(); - expect(config.create).to.be.false; - expect(config.typeEnabled).to.equal('html5'); - - let adUnits = getAdUnits(); - let innerAdUnits; - requestBidHook((config) => { innerAdUnits = config.adUnits }, {adUnits}); - - const pubcid = localStorage.getItem(ID_NAME); - expect(pubcid).to.be.null; - }); }); describe('Invoking requestBid', function () { From fdba155890cb0e2272e4f6b42b132fa32510bac7 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 12 Apr 2023 15:44:55 -0400 Subject: [PATCH 04/13] Update test_index.js --- test/test_index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_index.js b/test/test_index.js index 04d1412860b..0e983510af3 100644 --- a/test/test_index.js +++ b/test/test_index.js @@ -8,6 +8,14 @@ ].forEach(l => console.error(l)) throw new Error('do not use .only()') } + ob.skip = function () { + [ + 'describe.skip and it.skip are disabled,', + 'because they pollute break the pipeline test output', + // eslint-disable-next-line no-console + ].forEach(l => console.error(l)) + throw new Error('do not use .only()') + } }) require('./test_deps.js'); From 8d58bf58f4ff260c7a52b27281dfba0532be23f9 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 12 Apr 2023 15:46:18 -0400 Subject: [PATCH 05/13] Update test_index.js --- test/test_index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_index.js b/test/test_index.js index 0e983510af3..ab34c1745e6 100644 --- a/test/test_index.js +++ b/test/test_index.js @@ -11,7 +11,7 @@ ob.skip = function () { [ 'describe.skip and it.skip are disabled,', - 'because they pollute break the pipeline test output', + 'because they pollute the pipeline test output', // eslint-disable-next-line no-console ].forEach(l => console.error(l)) throw new Error('do not use .only()') From c4fd3094d145b79a15fd8f6d042e0dba34aca8fd Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 12 Apr 2023 15:49:16 -0400 Subject: [PATCH 06/13] Update adagioBidAdapter_spec.js --- test/spec/modules/adagioBidAdapter_spec.js | 25 ---------------------- 1 file changed, 25 deletions(-) diff --git a/test/spec/modules/adagioBidAdapter_spec.js b/test/spec/modules/adagioBidAdapter_spec.js index 759b16a81bb..adba79ddc96 100644 --- a/test/spec/modules/adagioBidAdapter_spec.js +++ b/test/spec/modules/adagioBidAdapter_spec.js @@ -1481,31 +1481,6 @@ describe('Adagio bid adapter', () => { }); }); - describe.skip('optional params auto detection', function() { - it('should auto detect adUnitElementId when GPT is used', function() { - sandbox.stub(utils, 'getGptSlotInfoForAdUnitCode').withArgs('banner').returns({divId: 'gpt-banner'}); - expect(adagio.autoDetectAdUnitElementId('banner')).to.eq('gpt-banner'); - }); - }); - - describe.skip('print number handling', function() { - it('should return 1 if no adunit-code found. This means it is the first auction', function() { - sandbox.stub(adagio, 'getPageviewId').returns('abc-def'); - expect(adagio.computePrintNumber('adunit-code')).to.eql(1); - }); - - it('should increment the adunit print number when the adunit-code has already been used for an other auction', function() { - sandbox.stub(adagio, 'getPageviewId').returns('abc-def'); - - window.top.ADAGIO.adUnits['adunit-code'] = { - pageviewId: 'abc-def', - printNumber: 1, - }; - - expect(adagio.computePrintNumber('adunit-code')).to.eql(2); - }); - }); - describe('site information using refererDetection or window.top', function() { it('should returns domain, page and window.referrer in a window.top context', function() { const bidderRequest = new BidderRequestBuilder({ From 7f65aedfaa757901d750c68946894a7fc1e34f51 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 12 Apr 2023 15:51:55 -0400 Subject: [PATCH 07/13] Update test_index.js --- test/test_index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_index.js b/test/test_index.js index ab34c1745e6..5c6e3ee675d 100644 --- a/test/test_index.js +++ b/test/test_index.js @@ -14,7 +14,7 @@ 'because they pollute the pipeline test output', // eslint-disable-next-line no-console ].forEach(l => console.error(l)) - throw new Error('do not use .only()') + throw new Error('do not use .skip()') } }) From b25e970458b7da76a6a03a0c481761715a3751b3 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 12 Apr 2023 15:57:37 -0400 Subject: [PATCH 08/13] Update test_index.js --- test/test_index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test_index.js b/test/test_index.js index 5c6e3ee675d..4651fc7b32f 100644 --- a/test/test_index.js +++ b/test/test_index.js @@ -8,6 +8,8 @@ ].forEach(l => console.error(l)) throw new Error('do not use .only()') } +}) +[it, describe].forEach((ob) => { ob.skip = function () { [ 'describe.skip and it.skip are disabled,', From 52dd0fd2d693b0623ea8aabf4528faceba61a2ce Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 12 Apr 2023 16:49:20 -0400 Subject: [PATCH 09/13] Update test_index.js --- test/test_index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test_index.js b/test/test_index.js index 4651fc7b32f..f84cab46b08 100644 --- a/test/test_index.js +++ b/test/test_index.js @@ -3,17 +3,18 @@ ob.only = function () { [ 'describe.only and it.only are disabled unless you provide a single spec --file,', - 'because they can silently break the pipeline tests', + 'because they can silently break the pipeline tests' // eslint-disable-next-line no-console ].forEach(l => console.error(l)) throw new Error('do not use .only()') } }) + [it, describe].forEach((ob) => { ob.skip = function () { [ 'describe.skip and it.skip are disabled,', - 'because they pollute the pipeline test output', + 'because they pollute the pipeline test output' // eslint-disable-next-line no-console ].forEach(l => console.error(l)) throw new Error('do not use .skip()') From 68a3964eb5fd91d6e3bcf9933ac7aacf1d1d1fd4 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 12 Apr 2023 17:08:28 -0400 Subject: [PATCH 10/13] Update test_index.js --- test/test_index.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/test_index.js b/test/test_index.js index f84cab46b08..ce9b671be89 100644 --- a/test/test_index.js +++ b/test/test_index.js @@ -1,25 +1,24 @@ - [it, describe].forEach((ob) => { ob.only = function () { [ 'describe.only and it.only are disabled unless you provide a single spec --file,', - 'because they can silently break the pipeline tests' + 'because they can silently break the pipeline tests', // eslint-disable-next-line no-console ].forEach(l => console.error(l)) throw new Error('do not use .only()') - } -}) + }; +}); [it, describe].forEach((ob) => { ob.skip = function () { [ 'describe.skip and it.skip are disabled,', - 'because they pollute the pipeline test output' + 'because they pollute the pipeline test output', // eslint-disable-next-line no-console ].forEach(l => console.error(l)) throw new Error('do not use .skip()') - } -}) + }; +}); require('./test_deps.js'); From 989f0b5bf280ed246ac16e25c48b72b3794ceb25 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 12 Apr 2023 17:18:38 -0400 Subject: [PATCH 11/13] Update openxOrtbBidAdapter_spec.js --- test/spec/modules/openxOrtbBidAdapter_spec.js | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/test/spec/modules/openxOrtbBidAdapter_spec.js b/test/spec/modules/openxOrtbBidAdapter_spec.js index 951399457c3..d8ea79ac698 100644 --- a/test/spec/modules/openxOrtbBidAdapter_spec.js +++ b/test/spec/modules/openxOrtbBidAdapter_spec.js @@ -1096,45 +1096,6 @@ describe('OpenxRtbAdapter', function () { }); }); } - - it.skip('should send ad unit ids when any are defined', function () { - const bidRequestsWithUnitIds = [{ - bidder: 'openx', - params: { - delDomain: 'test-del-domain' - }, - adUnitCode: 'adunit-code', - mediaTypes: { - banner: { - sizes: [[300, 250], [300, 600]] - } - }, - bidId: 'test-bid-id-1', - bidderRequestId: 'test-bid-request-1', - auctionId: 'test-auction-1', - transactionId: 'test-transaction-id-1' - }, { - bidder: 'openx', - params: { - unit: '22', - delDomain: 'test-del-domain' - }, - adUnitCode: 'adunit-code', - mediaTypes: { - banner: { - sizes: [[728, 90]] - } - }, - bidId: 'test-bid-id-2', - bidderRequestId: 'test-bid-request-2', - auctionId: 'test-auction-2', - transactionId: 'test-transaction-id-2' - }]; - mockBidderRequest.bids = bidRequestsWithUnitIds; - const request = spec.buildRequests(bidRequestsWithUnitIds, mockBidderRequest); - expect(request[0].data.imp[1].tagid).to.equal(bidRequestsWithUnitIds[1].params.unit); - expect(request[0].data.imp[1].ext.divid).to.equal(bidRequestsWithUnitIds[1].params.adUnitCode); - }); }); describe('interpretResponse()', function () { From 4ddc3153e8464a0245063ac8fa69f09c1b5ee752 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 12 Apr 2023 17:41:47 -0400 Subject: [PATCH 12/13] Update 1plusXRtdProvider_spec.js --- test/spec/modules/1plusXRtdProvider_spec.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/spec/modules/1plusXRtdProvider_spec.js b/test/spec/modules/1plusXRtdProvider_spec.js index 496c005f470..8657c37d7d8 100644 --- a/test/spec/modules/1plusXRtdProvider_spec.js +++ b/test/spec/modules/1plusXRtdProvider_spec.js @@ -332,15 +332,16 @@ describe('1plusXRtdProvider', () => { } it('correctly builds URLs if gdpr parameters are present', () => { - const url1 = getPapiUrl(customer) - const url2 = getPapiUrl(customer, extractConsent(consent)) - expect(['&consent_string=myConsent&gdpr_applies=1', '&gdpr_applies=1&consent_string=myConsent']).to.contain(url2.replace(url1, '')) + const url1 = getPapiUrl(customer); + const url2 = getPapiUrl(customer, extractConsent(consent)); + expect(['&consent_string=myConsent&gdpr_applies=1', '&gdpr_applies=1&consent_string=myConsent']).to.contain(url2.replace(url1, '')); }) - it('correctly builds URLs if fpid parameters are present') - const url1 = getPapiUrl(customer) - const url2 = getPapiUrl(customer, {}, 'my_first_party_id') - expect(url2.replace(url1, '')).to.equal('&fpid=my_first_party_id') + it('correctly builds URLs if fpid parameters are present', () => { + const url1 = getPapiUrl(customer); + const url2 = getPapiUrl(customer, {}, 'my_first_party_id'); + expect(url2.replace(url1, '')).to.equal('&fpid=my_first_party_id'); + }) }) describe('updateBidderConfig', () => { From 050dd844c199d4056a35aca630d65b9977a36ab8 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Wed, 12 Apr 2023 17:45:37 -0400 Subject: [PATCH 13/13] Update pubmaticBidAdapter_spec.js --- test/spec/modules/pubmaticBidAdapter_spec.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/test/spec/modules/pubmaticBidAdapter_spec.js b/test/spec/modules/pubmaticBidAdapter_spec.js index 66bcf42bb0f..06a31460be2 100644 --- a/test/spec/modules/pubmaticBidAdapter_spec.js +++ b/test/spec/modules/pubmaticBidAdapter_spec.js @@ -1116,18 +1116,6 @@ describe('PubMatic adapter', function () { expect(data.test).to.equal(undefined); }); - // disabled this test case as it refreshes the whole suite when in karma watch mode - // todo: needs a fix - xit('test flag set to 1 when pubmaticTest=true is present in page url', function() { - window.location.href += '#pubmaticTest=true'; - // now all the test cases below will have window.location.href with #pubmaticTest=true - let request = spec.buildRequests(bidRequests, { - auctionId: 'new-auction-id' - }); - let data = JSON.parse(request.data); - expect(data.test).to.equal(1); - }); - it('Request params check', function () { let request = spec.buildRequests(bidRequests, { auctionId: 'new-auction-id'