From 15204c509aae861369807ca6b5d2d98bd29cd7f1 Mon Sep 17 00:00:00 2001 From: DeepthiNeeladri Date: Fri, 17 Jan 2020 02:01:18 +0530 Subject: [PATCH] Sync pixel redirect fix and Test cases (#4741) * outstream changes * removing global filtet * reverting page * message * adapter change * remove space * testcases * testpage * spaces for test page * renderer exist case * reverting package-lock.json * adding schain object * adding tagid * syntaxx error fix * video.html * space trailing * space * tagid * inventoryId and placement * rewarded video * added unit test case * Remove pbs depracated legacy url (#4226) * remove deprecated legacy url from pbs adapter * fix eslint errors * add and update tests for openRtb2 endpoint * sync with master * Revert "sync with master" This reverts commit 8c2b1969e4ec796fa8d23ca0a571ddbd77048a30. * removed targeting set filter and moved where render status is set to work with safeframe creatives (#4236) * Depracate adloader loadscript fn (#4228) * test commit * add callback support to loadExternalScript() * pass moduleCode for renderers * test cases for loadExternalScript() * store callbacks for cached url * fully remove adloader() * call callback() from stub * remove and update function name * getHighestCpmBids only returns non-rendered bids (#4247) * Make all adapters https (#4294) * update all adapters to https * convert all adapters to https * update unit tests * remove files confilicting with other PR * Removed pub common and unified id submodules as defaults in user id module (#4445) * Deprecate user sync (#4241) * deprecate some properties of userSync object * change bid adapter to Appnexus * fix 3 failing test cases * make all unit test cases pass * remove debugger * deprecate support for adUnit.sizes for pubs (#4458) * deprecate support for adUnit.sizes for pubs * remove commented code * ccpa cahnges * ccpa change * test page * test page change * test page change 2 * change the variable * Deprecations utils.js (#4249) * deprecate domain/referer type functions * delete modules that are using deprecated methods from utils.js * remove reference to getTopWindowLocation * sync with prebid-3.0 branch * remove test suite for getTopWindowLocation * add back md files of all deleted adapters * add md files of deleted analytics adapters * add adapters that are 3.0 compliant * add back the rubicon skipped test * remove min field from priceGranularity feature (#4574) * ccpa support for v3.0 * Update oneVideoBidAdapter_spec.js * Update oneVideoBidAdapter.js * sync pixel chnge * fix * sync * fix * sync * sync * adding gdpr * test cases * test cases * test case Co-authored-by: sumit sharma Co-authored-by: Neelanjan Sen <14229985+Fawke@users.noreply.github.com> Co-authored-by: r-schweitzer <50628828+r-schweitzer@users.noreply.github.com> Co-authored-by: coryhammon1 Co-authored-by: jsnellbaker <31102355+jsnellbaker@users.noreply.github.com> --- modules/oneVideoBidAdapter.js | 3 ++- test/spec/modules/oneVideoBidAdapter_spec.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/oneVideoBidAdapter.js b/modules/oneVideoBidAdapter.js index d2c42b042af..8228427c369 100644 --- a/modules/oneVideoBidAdapter.js +++ b/modules/oneVideoBidAdapter.js @@ -104,6 +104,7 @@ export const spec = { */ getUserSyncs: function(syncOptions, responses, consentData) { let { gdprApplies, consentString = '' } = consentData; + if (syncOptions.pixelEnabled) { return [{ type: 'image', @@ -115,7 +116,7 @@ export const spec = { }, { type: 'image', - url: `https://sync-tm.everesttech.net/upi/pid/m7y5t93k?gdpr_qparam=${gdprApplies ? 1 : 0}&gdpr_consent_qparam=${consentString}&redir=https%3A%2F%2Fpixel.advertising.com%2Fups%2F55986%2Fsync%3Fuid%3D%24%7BUSER_ID%7D%26_origin%3D0%26gdpr%3D{gdpr}%26gdpr_consent%3D{gdpr_consent}` + url: `https://sync-tm.everesttech.net/upi/pid/m7y5t93k?gdpr=${gdprApplies ? 1 : 0}&gdpr_consent=${consentString}&redir=https%3A%2F%2Fpixel.advertising.com%2Fups%2F55986%2Fsync%3Fuid%3D%24%7BUSER_ID%7D%26_origin%3D0` + encodeURI(`&gdpr=${gdprApplies ? 1 : 0}&gdpr_consent=${consentString}`) }, { type: 'image', diff --git a/test/spec/modules/oneVideoBidAdapter_spec.js b/test/spec/modules/oneVideoBidAdapter_spec.js index b21eb69b3cf..82f7ca91091 100644 --- a/test/spec/modules/oneVideoBidAdapter_spec.js +++ b/test/spec/modules/oneVideoBidAdapter_spec.js @@ -408,7 +408,7 @@ describe('OneVideoBidAdapter', function () { it('should get correct user sync when iframeEnabled', function () { let pixel = spec.getUserSyncs({pixelEnabled: true}, {}, {gdprApplies: true, consentString: GDPR_CONSENT_STRING}) expect(pixel[2].type).to.equal('image'); - expect(pixel[2].url).to.equal('https://sync-tm.everesttech.net/upi/pid/m7y5t93k?gdpr_qparam=1&gdpr_consent_qparam=' + GDPR_CONSENT_STRING + '&redir=https%3A%2F%2Fpixel.advertising.com%2Fups%2F55986%2Fsync%3Fuid%3D%24%7BUSER_ID%7D%26_origin%3D0%26gdpr%3D{gdpr}%26gdpr_consent%3D{gdpr_consent}'); + expect(pixel[2].url).to.equal('https://sync-tm.everesttech.net/upi/pid/m7y5t93k?gdpr=1&gdpr_consent=' + GDPR_CONSENT_STRING + '&redir=https%3A%2F%2Fpixel.advertising.com%2Fups%2F55986%2Fsync%3Fuid%3D%24%7BUSER_ID%7D%26_origin%3D0&gdpr=1&gdpr_consent=' + encodeURI(GDPR_CONSENT_STRING)); }); }); });