@@ -45,8 +45,8 @@ function AdjustCommand(functionName, params, order) {
45
45
this . order = order ;
46
46
} ;
47
47
48
- export function CommandExecutor ( baseUrl , gdprUrl , subscriptionUrl , purchaseVerificationUrl ) {
49
- this . adjustCommandExecutor = new AdjustCommandExecutor ( baseUrl , gdprUrl , subscriptionUrl , purchaseVerificationUrl ) ;
48
+ export function CommandExecutor ( urlOverwrite ) {
49
+ this . adjustCommandExecutor = new AdjustCommandExecutor ( urlOverwrite ) ;
50
50
} ;
51
51
52
52
CommandExecutor . prototype . scheduleCommand = function ( className , functionName , params , order ) {
@@ -58,16 +58,9 @@ CommandExecutor.prototype.scheduleCommand = function(className, functionName, pa
58
58
}
59
59
} ;
60
60
61
- function AdjustCommandExecutor ( baseUrl , gdprUrl , subscriptionUrl , purchaseVerificationUrl ) {
62
- this . baseUrl = baseUrl ;
63
- this . gdprUrl = gdprUrl ;
64
- this . subscriptionUrl = subscriptionUrl ;
65
- this . purchaseVerificationUrl = purchaseVerificationUrl ;
61
+ function AdjustCommandExecutor ( urlOverwrite ) {
62
+ this . urlOverwrite = urlOverwrite ;
66
63
this . extraPath = null ;
67
- this . basePath = null ;
68
- this . gdprPath = null ;
69
- this . subscriptionPath = null ;
70
- this . purchaseVerificationPath = null ;
71
64
this . savedEvents = { } ;
72
65
this . savedConfigs = { } ;
73
66
this . savedCommands = [ ] ;
@@ -155,17 +148,10 @@ AdjustCommandExecutor.prototype.executeCommand = function(command, idx) {
155
148
156
149
AdjustCommandExecutor . prototype . testOptions = function ( params ) {
157
150
var testOptions = new AdjustTestOptions ( ) ;
158
- testOptions . baseUrl = this . baseUrl ;
159
- testOptions . gdprUrl = this . gdprUrl ;
160
- testOptions . subscriptionUrl = this . subscriptionUrl ;
161
- testOptions . purchaseVerificationUrl = this . purchaseVerificationUrl ;
151
+ testOptions . urlOverwrite = this . urlOverwrite ;
162
152
163
153
if ( 'basePath' in params ) {
164
154
this . extraPath = getFirstParameterValue ( params , 'basePath' ) ;
165
- this . basePath = getFirstParameterValue ( params , 'basePath' ) ;
166
- this . gdprPath = getFirstParameterValue ( params , 'basePath' ) ;
167
- this . subscriptionPath = getFirstParameterValue ( params , 'basePath' ) ;
168
- this . purchaseVerificationPath = getFirstParameterValue ( params , 'basePath' ) ;
169
155
}
170
156
if ( 'timerInterval' in params ) {
171
157
testOptions . timerIntervalInMilliseconds = getFirstParameterValue ( params , 'timerInterval' ) . toString ( ) ;
@@ -185,6 +171,12 @@ AdjustCommandExecutor.prototype.testOptions = function(params) {
185
171
if ( 'adServicesFrameworkEnabled' in params ) {
186
172
testOptions . adServicesFrameworkEnabled = getFirstParameterValue ( params , 'adServicesFrameworkEnabled' ) . toString ( ) === 'true' ;
187
173
}
174
+ if ( 'attStatus' in params ) {
175
+ testOptions . attStatus = getFirstParameterValue ( params , 'attStatus' ) . toString ( ) ;
176
+ }
177
+ if ( 'idfa' in params ) {
178
+ testOptions . idfa = getFirstParameterValue ( params , 'idfa' ) . toString ( ) ;
179
+ }
188
180
var useTestConnectionOptions = false ;
189
181
if ( 'teardown' in params ) {
190
182
var teardownOptions = getValueFromKey ( params , 'teardown' ) ;
@@ -194,10 +186,6 @@ AdjustCommandExecutor.prototype.testOptions = function(params) {
194
186
if ( 'resetSdk' === option ) {
195
187
testOptions . teardown = true ;
196
188
testOptions . extraPath = this . extraPath ;
197
- testOptions . basePath = this . basePath ;
198
- testOptions . gdprPath = this . gdprPath ;
199
- testOptions . subscriptionPath = this . subscriptionPath ;
200
- testOptions . purchaseVerificationPath = this . purchaseVerificationPath ;
201
189
testOptions . useTestConnectionOptions = true ;
202
190
useTestConnectionOptions = true ;
203
191
Adjust . teardown ( 'test' ) ;
@@ -218,10 +206,6 @@ AdjustCommandExecutor.prototype.testOptions = function(params) {
218
206
if ( 'sdk' === option ) {
219
207
testOptions . teardown = true ;
220
208
testOptions . extraPath = null ;
221
- testOptions . basePath = null ;
222
- testOptions . gdprPath = null ;
223
- testOptions . subscriptionPath = null ;
224
- testOptions . purchaseVerificationPath = null ;
225
209
testOptions . useTestConnectionOptions = false ;
226
210
Adjust . teardown ( 'test' ) ;
227
211
}
@@ -398,6 +382,12 @@ AdjustCommandExecutor.prototype.config = function(params) {
398
382
}
399
383
}
400
384
385
+ if ( 'attConsentWaitingSeconds' in params ) {
386
+ var attConsentWaitingSecondsS = getFirstParameterValue ( params , 'attConsentWaitingSeconds' ) ;
387
+ var attConsentWaitingSeconds = parseFloat ( attConsentWaitingSecondsS ) ;
388
+ adjustConfig . setAttConsentWaitingInterval ( attConsentWaitingSeconds ) ;
389
+ }
390
+
401
391
if ( 'userAgent' in params ) {
402
392
var userAgent = getFirstParameterValue ( params , 'userAgent' ) ;
403
393
adjustConfig . setUserAgent ( userAgent ) ;
@@ -419,7 +409,7 @@ AdjustCommandExecutor.prototype.config = function(params) {
419
409
AdjustSdkTest . addInfoToSend ( "costCurrency" , attribution . costCurrency ) ;
420
410
AdjustSdkTest . addInfoToSend ( "fbInstallReferrer" , attribution . fbInstallReferrer ) ;
421
411
422
- AdjustSdkTest . sendInfoToServer ( _this . basePath ) ;
412
+ AdjustSdkTest . sendInfoToServer ( _this . extraPath ) ;
423
413
} ) ;
424
414
}
425
415
@@ -433,7 +423,7 @@ AdjustCommandExecutor.prototype.config = function(params) {
433
423
AdjustSdkTest . addInfoToSend ( "jsonResponse" , sessionSuccess . jsonResponse . toString ( ) ) ;
434
424
}
435
425
436
- AdjustSdkTest . sendInfoToServer ( _this . basePath ) ;
426
+ AdjustSdkTest . sendInfoToServer ( _this . extraPath ) ;
437
427
} ) ;
438
428
}
439
429
@@ -448,7 +438,7 @@ AdjustCommandExecutor.prototype.config = function(params) {
448
438
AdjustSdkTest . addInfoToSend ( "jsonResponse" , sessionFailed . jsonResponse . toString ( ) ) ;
449
439
}
450
440
451
- AdjustSdkTest . sendInfoToServer ( _this . basePath ) ;
441
+ AdjustSdkTest . sendInfoToServer ( _this . extraPath ) ;
452
442
} ) ;
453
443
}
454
444
@@ -464,7 +454,7 @@ AdjustCommandExecutor.prototype.config = function(params) {
464
454
AdjustSdkTest . addInfoToSend ( "jsonResponse" , eventSuccess . jsonResponse . toString ( ) ) ;
465
455
}
466
456
467
- AdjustSdkTest . sendInfoToServer ( _this . basePath ) ;
457
+ AdjustSdkTest . sendInfoToServer ( _this . extraPath ) ;
468
458
} ) ;
469
459
}
470
460
@@ -481,7 +471,7 @@ AdjustCommandExecutor.prototype.config = function(params) {
481
471
AdjustSdkTest . addInfoToSend ( "jsonResponse" , eventFailed . jsonResponse . toString ( ) ) ;
482
472
}
483
473
484
- AdjustSdkTest . sendInfoToServer ( _this . basePath ) ;
474
+ AdjustSdkTest . sendInfoToServer ( _this . extraPath ) ;
485
475
} ) ;
486
476
}
487
477
@@ -492,7 +482,7 @@ AdjustCommandExecutor.prototype.config = function(params) {
492
482
adjustConfig . setShouldLaunchDeeplink ( launchDeferredDeeplink ) ;
493
483
adjustConfig . setDeferredDeeplinkCallbackListener ( function ( deeplink ) {
494
484
AdjustSdkTest . addInfoToSend ( "deeplink" , deeplink . uri ) ;
495
- AdjustSdkTest . sendInfoToServer ( _this . basePath ) ;
485
+ AdjustSdkTest . sendInfoToServer ( _this . extraPath ) ;
496
486
} ) ;
497
487
}
498
488
} ;
@@ -923,7 +913,7 @@ AdjustCommandExecutor.prototype.getLastDeeplink = function(params) {
923
913
var _this = this ;
924
914
Adjust . getLastDeeplink ( function ( lastDeeplink ) {
925
915
AdjustSdkTest . addInfoToSend ( 'last_deeplink' , lastDeeplink ) ;
926
- AdjustSdkTest . sendInfoToServer ( _this . basePath ) ;
916
+ AdjustSdkTest . sendInfoToServer ( _this . extraPath ) ;
927
917
} ) ;
928
918
}
929
919
} ;
@@ -939,7 +929,7 @@ AdjustCommandExecutor.prototype.verifyPurchase = function(params) {
939
929
AdjustSdkTest . addInfoToSend ( 'verification_status' , verificationInfo . verificationStatus ) ;
940
930
AdjustSdkTest . addInfoToSend ( 'code' , verificationInfo . code ) ;
941
931
AdjustSdkTest . addInfoToSend ( 'message' , verificationInfo . message ) ;
942
- AdjustSdkTest . sendInfoToServer ( _this . basePath ) ;
932
+ AdjustSdkTest . sendInfoToServer ( _this . extraPath ) ;
943
933
} ) ;
944
934
} else if ( Platform . OS === "android" ) {
945
935
var productId = getFirstParameterValue ( params , 'productId' ) ;
@@ -950,7 +940,7 @@ AdjustCommandExecutor.prototype.verifyPurchase = function(params) {
950
940
AdjustSdkTest . addInfoToSend ( 'verification_status' , verificationInfo . verificationStatus ) ;
951
941
AdjustSdkTest . addInfoToSend ( 'code' , verificationInfo . code ) ;
952
942
AdjustSdkTest . addInfoToSend ( 'message' , verificationInfo . message ) ;
953
- AdjustSdkTest . sendInfoToServer ( _this . basePath ) ;
943
+ AdjustSdkTest . sendInfoToServer ( _this . extraPath ) ;
954
944
} ) ;
955
945
}
956
946
} ;
@@ -960,7 +950,7 @@ AdjustCommandExecutor.prototype.processDeeplink = function(params) {
960
950
var _this = this ;
961
951
Adjust . processDeeplink ( deeplink , function ( resolvedLink ) {
962
952
AdjustSdkTest . addInfoToSend ( 'resolved_link' , resolvedLink ) ;
963
- AdjustSdkTest . sendInfoToServer ( _this . basePath ) ;
953
+ AdjustSdkTest . sendInfoToServer ( _this . extraPath ) ;
964
954
} ) ;
965
955
} ;
966
956
0 commit comments