@@ -8,8 +8,7 @@ let analyticsEventObject;
8
8
9
9
import {
10
10
ANALYTICS_CONFIGURED_STR ,
11
- ANALYTICS_EVENT_INFO ,
12
- ANALYTICS_EVENT_LOG ,
11
+ ANALYTICS_EVENT ,
13
12
ANALYTICS_FOCUS_STR ,
14
13
ANALYTICS_RENDERED_STR ,
15
14
ANALYTICS_SUBMIT_STR ,
@@ -47,7 +46,7 @@ describe('Card: calls that generate "info" analytics should produce objects with
47
46
48
47
// With configData removed inspect what's left
49
48
expect ( analyticsEventObject ) . toEqual ( {
50
- event : ANALYTICS_EVENT_INFO ,
49
+ event : ANALYTICS_EVENT . info ,
51
50
data : { component : card . constructor [ 'type' ] , type : ANALYTICS_RENDERED_STR }
52
51
} ) ;
53
52
} ) ;
@@ -65,7 +64,7 @@ describe('Card: calls that generate "info" analytics should produce objects with
65
64
66
65
// With configData removed inspect what's left
67
66
expect ( analyticsEventObject ) . toEqual ( {
68
- event : ANALYTICS_EVENT_INFO ,
67
+ event : ANALYTICS_EVENT . info ,
69
68
data : { component : card . constructor [ 'type' ] , type : ANALYTICS_RENDERED_STR , isStoredPaymentMethod : true , brand : 'mc' }
70
69
} ) ;
71
70
} ) ;
@@ -76,7 +75,7 @@ describe('Card: calls that generate "info" analytics should produce objects with
76
75
} ) ;
77
76
78
77
expect ( analyticsModule . createAnalyticsEvent ) . toHaveBeenCalledWith ( {
79
- event : ANALYTICS_EVENT_INFO ,
78
+ event : ANALYTICS_EVENT . info ,
80
79
data : { component : card . constructor [ 'type' ] , type : ANALYTICS_CONFIGURED_STR }
81
80
} ) ;
82
81
} ) ;
@@ -89,7 +88,7 @@ describe('Card: calls that generate "info" analytics should produce objects with
89
88
} ) ;
90
89
91
90
expect ( analyticsModule . createAnalyticsEvent ) . toHaveBeenCalledWith ( {
92
- event : ANALYTICS_EVENT_INFO ,
91
+ event : ANALYTICS_EVENT . info ,
93
92
data : { component : card . constructor [ 'type' ] , type : ANALYTICS_CONFIGURED_STR , isStoredPaymentMethod : true , brand : 'mc' }
94
93
} ) ;
95
94
} ) ;
@@ -109,7 +108,7 @@ describe('Card: calls that generate "info" analytics should produce objects with
109
108
} ) ;
110
109
111
110
expect ( analyticsModule . createAnalyticsEvent ) . toHaveBeenCalledWith ( {
112
- event : ANALYTICS_EVENT_INFO ,
111
+ event : ANALYTICS_EVENT . info ,
113
112
data : { component : card . constructor [ 'type' ] , type : ANALYTICS_FOCUS_STR , target : 'card_number' }
114
113
} ) ;
115
114
} ) ;
@@ -129,7 +128,7 @@ describe('Card: calls that generate "info" analytics should produce objects with
129
128
} ) ;
130
129
131
130
expect ( analyticsModule . createAnalyticsEvent ) . toHaveBeenCalledWith ( {
132
- event : ANALYTICS_EVENT_INFO ,
131
+ event : ANALYTICS_EVENT . info ,
133
132
data : { component : card . constructor [ 'type' ] , type : ANALYTICS_UNFOCUS_STR , target : 'card_number' }
134
133
} ) ;
135
134
} ) ;
@@ -141,7 +140,7 @@ describe('Card: calls that generate "info" analytics should produce objects with
141
140
} ) ;
142
141
143
142
expect ( analyticsModule . createAnalyticsEvent ) . toHaveBeenCalledWith ( {
144
- event : ANALYTICS_EVENT_INFO ,
143
+ event : ANALYTICS_EVENT . info ,
145
144
data : {
146
145
component : card . constructor [ 'type' ] ,
147
146
type : ANALYTICS_VALIDATION_ERROR_STR ,
@@ -170,7 +169,7 @@ describe('Card: calls that generate "log" analytics should produce objects with
170
169
card . submitAnalytics ( { type : ANALYTICS_SUBMIT_STR } ) ;
171
170
172
171
expect ( analyticsModule . createAnalyticsEvent ) . toHaveBeenCalledWith ( {
173
- event : ANALYTICS_EVENT_LOG ,
172
+ event : ANALYTICS_EVENT . log ,
174
173
data : {
175
174
component : card . constructor [ 'type' ] ,
176
175
type : ANALYTICS_SUBMIT_STR ,
0 commit comments