You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constcheckoutAttemptId=getProp(this.props,'modules.analytics.getCheckoutAttemptId')?.()??NO_CHECKOUT_ATTEMPT_ID;// NOTE: we never expect to see this "failed" value, but, just in case...
test('Calls the collectId endpoint by default, adding expected fields, including sanitising the passed analyticsData object',async()=>{
61
-
constapplicationInfo={
62
-
merchantApplication: {
63
-
name: 'merchant_application_name',
64
-
version: 'version'
65
-
},
66
-
externalPlatform: {
67
-
name: 'external_platform_name',
68
-
version: 'external_platform_version',
69
-
integrator: 'getSystemIntegratorName'
70
-
}
71
-
};
72
-
72
+
test('Should still make the setup call even when analytics is disabled, adding expected fields, including sanitising the passed analyticsData object',async()=>{
73
73
constcheckoutAttemptId='my.attempt.id';
74
74
75
75
analytics=Analytics({
76
76
analytics: {
77
+
enabled: false,
77
78
analyticsData: {
78
79
applicationInfo,
79
-
checkoutAttemptId,
80
+
checkoutAttemptId,// checking that we can also pass in a checkoutAttemptId
80
81
// @ts-ignore - this is one of the things we're testing (that this object gets stripped out)
0 commit comments