File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
src/app/components/ATIAnalytics/atiUrl Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,40 @@ describe('atiUrl', () => {
257257 } ) ;
258258 } ) ;
259259
260+ it ( 'should include skip-rate fields when provided on itemTracker' , ( ) => {
261+ const componentSpecificTrack = buildReverbEventModel ( {
262+ ...input ,
263+ itemTracker : {
264+ type : 'portrait-video' ,
265+ text : 'Example title' ,
266+ duration : 9000 ,
267+ totalDuration : 12000 ,
268+ completionRate : 0.75 ,
269+ skipRate : 0.25 ,
270+ navigationMethod : 'swipe' ,
271+ exitReason : 'navigation' ,
272+ versionId : 'p1234567' ,
273+ resourceId : 'urn:bbc:pips:pid:p1234567' ,
274+ } ,
275+ } ) ;
276+
277+ expect ( componentSpecificTrack . eventDetails . item ) . toEqual ( {
278+ attribution : 'advertiserID' ,
279+ duration : 9000 ,
280+ exit_reason : 'navigation' ,
281+ link : 'http://localhost' ,
282+ name : 'top-stories' ,
283+ navigation_method : 'swipe' ,
284+ resource_id : 'urn:bbc:pips:pid:p1234567' ,
285+ skip_rate : 0.25 ,
286+ text : 'Example title' ,
287+ total_duration : 12000 ,
288+ type : 'portrait-video' ,
289+ completion_rate : 0.75 ,
290+ version_id : 'p1234567' ,
291+ } ) ;
292+ } ) ;
293+
260294 it ( 'should return the correct Reverb group event model' , ( ) => {
261295 const blockSpecificTrack = buildReverbEventModel ( {
262296 ...input ,
You can’t perform that action at this time.
0 commit comments