@@ -4,7 +4,7 @@ import Utils from './config/utils';
44import fetchMock from 'fetch-mock/esm/client' ;
55import { urls , testMPID , MPConfig , v4LSKey , apiKey } from './config/constants' ;
66import { IMParticleUser } from '../../src/identity-user-interfaces' ;
7- import { IPixelConfiguration } from '../../src/cookieSyncManager' ;
7+ import { IPixelConfiguration , PARTNER_MODULE_IDS } from '../../src/cookieSyncManager' ;
88import { IConsentRules } from '../../src/consent' ;
99import { IMParticleInstanceManager } from '../../src/sdkRuntimeModels' ;
1010const {
@@ -1137,9 +1137,11 @@ describe('cookie syncing', function() {
11371137 } ) ;
11381138
11391139 describe ( 'Rokt privacy flag' , function ( ) {
1140+ const roktModuleId = PARTNER_MODULE_IDS . Rokt . toString ( ) ;
1141+
11401142 const roktPixelSettings : IPixelConfiguration = {
11411143 name : 'Rokt' ,
1142- moduleId : 1277 ,
1144+ moduleId : PARTNER_MODULE_IDS . Rokt ,
11431145 esId : 83009 ,
11441146 isDebug : false ,
11451147 isProduction : true ,
@@ -1201,8 +1203,8 @@ describe('cookie syncing', function() {
12011203 const spy = await initWithSpy ( ) ;
12021204
12031205 expect ( spy . calledOnce ) . to . equal ( true ) ;
1204- expect ( spy . firstCall . args [ 1 ] ) . to . equal ( '1277' ) ;
1205- getLocalStorageData ( ) [ testMPID ] . csd . should . have . property ( '1277' ) ;
1206+ expect ( spy . firstCall . args [ 1 ] ) . to . equal ( roktModuleId ) ;
1207+ getLocalStorageData ( ) [ testMPID ] . csd . should . have . property ( roktModuleId ) ;
12061208 spy . restore ( ) ;
12071209 } ) ;
12081210
@@ -1212,7 +1214,7 @@ describe('cookie syncing', function() {
12121214
12131215 await initAndWait ( ) ;
12141216
1215- getLocalStorageData ( ) [ testMPID ] . csd . should . have . property ( '1277' ) ;
1217+ getLocalStorageData ( ) [ testMPID ] . csd . should . have . property ( roktModuleId ) ;
12161218 } ) ;
12171219
12181220 it ( 'should allow Rokt cookie sync when noTargeting is non-boolean value' , async ( ) => {
@@ -1221,7 +1223,7 @@ describe('cookie syncing', function() {
12211223
12221224 await initAndWait ( ) ;
12231225
1224- getLocalStorageData ( ) [ testMPID ] . csd . should . have . property ( '1277' ) ;
1226+ getLocalStorageData ( ) [ testMPID ] . csd . should . have . property ( roktModuleId ) ;
12251227 } ) ;
12261228
12271229 it ( 'should block only Rokt while allowing other partners when noTargeting is true' , async ( ) => {
@@ -1232,12 +1234,12 @@ describe('cookie syncing', function() {
12321234
12331235 expect ( spy . calledOnce ) . to . equal ( true ) ;
12341236 expect ( spy . firstCall . args [ 1 ] ) . to . equal ( '5' ) ;
1235- expect ( getLocalStorageData ( ) [ testMPID ] . csd ) . to . not . have . property ( '1277' ) ;
1237+ expect ( getLocalStorageData ( ) [ testMPID ] . csd ) . to . not . have . property ( roktModuleId ) ;
12361238 getLocalStorageData ( ) [ testMPID ] . csd . should . have . property ( '5' ) ;
12371239 spy . restore ( ) ;
12381240 } ) ;
12391241
1240- it ( 'should block Rokt when noTargeting is true and if consent rules allow it' , async ( ) => {
1242+ it ( 'should block Rokt when noTargeting is true even if consent rules allow it' , async ( ) => {
12411243 const roktWithConsent = {
12421244 ...roktPixelSettings ,
12431245 filteringConsentRuleValues : createConsentRules ( 'targeting' ) ,
@@ -1302,8 +1304,8 @@ describe('cookie syncing', function() {
13021304 await waitForCondition ( ( ) => mParticle . Identity . getCurrentUser ( ) ?. getMPID ( ) === 'newMPID' ) ;
13031305
13041306 const data = getLocalStorageData ( ) ;
1305- data [ testMPID ] . csd . should . have . property ( '1277' ) ;
1306- data [ 'newMPID' ] . csd . should . have . property ( '1277' ) ;
1307+ data [ testMPID ] . csd . should . have . property ( roktModuleId ) ;
1308+ data [ 'newMPID' ] . csd . should . have . property ( roktModuleId ) ;
13071309 } ) ;
13081310
13091311 it ( 'should not block Rokt cookie sync when only noFunctional is true' , async ( ) => {
@@ -1312,7 +1314,7 @@ describe('cookie syncing', function() {
13121314
13131315 await initAndWait ( ) ;
13141316
1315- getLocalStorageData ( ) [ testMPID ] . csd . should . have . property ( '1277' ) ;
1317+ getLocalStorageData ( ) [ testMPID ] . csd . should . have . property ( roktModuleId ) ;
13161318 } ) ;
13171319 } ) ;
13181320} ) ;
0 commit comments