From d2d1c7ccbc62f7e360b6e62c65b0aaa35bc87a8c Mon Sep 17 00:00:00 2001 From: Jonathan Mullins Date: Fri, 31 Aug 2018 08:46:57 +1000 Subject: [PATCH 1/3] corrected user sync type --- modules/playgroundxyzBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/playgroundxyzBidAdapter.js b/modules/playgroundxyzBidAdapter.js index e521f7f98d6..e54f93ab8ca 100644 --- a/modules/playgroundxyzBidAdapter.js +++ b/modules/playgroundxyzBidAdapter.js @@ -102,7 +102,7 @@ export const spec = { } if (syncOptions.pixelEnabled) { return [{ - type: 'pixel', + type: 'image', url: '//ib.adnxs.com/getuidnb?https://ads.playground.xyz/usersync?partner=appnexus&uid=$UID' }]; } From 19d0939c157afc15003550685063496f77a54aa2 Mon Sep 17 00:00:00 2001 From: Jonathan Mullins Date: Tue, 3 Sep 2019 12:18:44 +1000 Subject: [PATCH 2/3] removed support for iframe usersync --- modules/playgroundxyzBidAdapter.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/modules/playgroundxyzBidAdapter.js b/modules/playgroundxyzBidAdapter.js index f6a85b6522e..65bd879a2fc 100644 --- a/modules/playgroundxyzBidAdapter.js +++ b/modules/playgroundxyzBidAdapter.js @@ -100,18 +100,10 @@ export const spec = { }, getUserSyncs: function (syncOptions) { - if (syncOptions.iframeEnabled) { - return [{ - type: 'iframe', - url: '//acdn.adnxs.com/ib/static/usersync/v3/async_usersync.html' - }]; - } - if (syncOptions.pixelEnabled) { - return [{ - type: 'image', - url: '//ib.adnxs.com/getuidnb?https://ads.playground.xyz/usersync?partner=appnexus&uid=$UID' - }]; - } + return [{ + type: 'image', + url: '//ib.adnxs.com/getuidnb?https://ads.playground.xyz/usersync?partner=appnexus&uid=$UID' + }]; } } From 81fc430c9caf995c37cbf3ffb283722ffdbe1cf2 Mon Sep 17 00:00:00 2001 From: Jonathan Mullins Date: Wed, 4 Sep 2019 07:40:23 +1000 Subject: [PATCH 3/3] added unit tests for getUserSyncs --- .../modules/playgroundxyzBidAdapter_spec.js | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/spec/modules/playgroundxyzBidAdapter_spec.js b/test/spec/modules/playgroundxyzBidAdapter_spec.js index 92f88092e5d..07f80a8aa99 100644 --- a/test/spec/modules/playgroundxyzBidAdapter_spec.js +++ b/test/spec/modules/playgroundxyzBidAdapter_spec.js @@ -182,4 +182,32 @@ describe('playgroundxyzBidAdapter', function () { expect(data.user.ext.consent).to.equal('XYZ-CONSENT'); }); }); + + describe('getUserSyncs', function () { + const syncUrl = '//ib.adnxs.com/getuidnb?https://ads.playground.xyz/usersync?partner=appnexus&uid=$UID'; + + describe('when iframeEnabled is true', function () { + const syncOptions = { + 'iframeEnabled': true + } + it('should return one image type user sync pixel', function () { + let result = spec.getUserSyncs(syncOptions); + expect(result.length).to.equal(1); + expect(result[0].type).to.equal('image') + expect(result[0].url).to.equal(syncUrl); + }); + }); + + describe('when iframeEnabled is false', function () { + const syncOptions = { + 'iframeEnabled': false + } + it('should return one image type user sync pixel', function () { + let result = spec.getUserSyncs(syncOptions); + expect(result.length).to.equal(1); + expect(result[0].type).to.equal('image') + expect(result[0].url).to.equal(syncUrl); + }); + }); + }) });