@@ -22,7 +22,7 @@ describe('trackLoadingTime', () => {
22
22
let clock : Clock
23
23
let domMutationObservable : Observable < void >
24
24
let windowOpenObservable : Observable < void >
25
- let loadingTimeCallback : jasmine . Spy < ( loadingTime : Duration | undefined , wasHiddenDuringLoading : boolean ) => void >
25
+ let loadingTimeCallback : jasmine . Spy < ( loadingTime ? : Duration ) => void >
26
26
let setLoadEvent : ( loadEvent : Duration ) => void
27
27
let stopLoadingTimeTracking : ( ) => void
28
28
@@ -65,7 +65,7 @@ describe('trackLoadingTime', () => {
65
65
domMutationObservable . notify ( )
66
66
clock . tick ( AFTER_PAGE_ACTIVITY_END_DELAY )
67
67
68
- expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( clock . relative ( BEFORE_PAGE_ACTIVITY_VALIDATION_DELAY ) , false )
68
+ expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( clock . relative ( BEFORE_PAGE_ACTIVITY_VALIDATION_DELAY ) )
69
69
} )
70
70
71
71
it ( 'should use loadEventEnd for initial view when having no activity' , ( ) => {
@@ -77,7 +77,7 @@ describe('trackLoadingTime', () => {
77
77
setLoadEvent ( entry . loadEventEnd )
78
78
clock . tick ( PAGE_ACTIVITY_END_DELAY )
79
79
80
- expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( entry . loadEventEnd , false )
80
+ expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( entry . loadEventEnd )
81
81
} )
82
82
83
83
it ( 'should use loadEventEnd for initial view when load event is bigger than computed loading time' , ( ) => {
@@ -90,7 +90,7 @@ describe('trackLoadingTime', () => {
90
90
domMutationObservable . notify ( )
91
91
clock . tick ( AFTER_PAGE_ACTIVITY_END_DELAY )
92
92
93
- expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( clock . relative ( LOAD_EVENT_AFTER_ACTIVITY_TIMING ) , false )
93
+ expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( clock . relative ( LOAD_EVENT_AFTER_ACTIVITY_TIMING ) )
94
94
} )
95
95
96
96
it ( 'should use computed loading time for initial view when load event is smaller than computed loading time' , ( ) => {
@@ -104,7 +104,7 @@ describe('trackLoadingTime', () => {
104
104
domMutationObservable . notify ( )
105
105
clock . tick ( AFTER_PAGE_ACTIVITY_END_DELAY )
106
106
107
- expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( clock . relative ( BEFORE_PAGE_ACTIVITY_VALIDATION_DELAY ) , false )
107
+ expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( clock . relative ( BEFORE_PAGE_ACTIVITY_VALIDATION_DELAY ) )
108
108
} )
109
109
110
110
it ( 'should use computed loading time from time origin for initial view' , ( ) => {
@@ -127,8 +127,7 @@ describe('trackLoadingTime', () => {
127
127
clock . tick ( AFTER_PAGE_ACTIVITY_END_DELAY )
128
128
129
129
expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith (
130
- clock . relative ( BEFORE_PAGE_ACTIVITY_VALIDATION_DELAY + CLOCK_GAP ) ,
131
- false
130
+ clock . relative ( BEFORE_PAGE_ACTIVITY_VALIDATION_DELAY + CLOCK_GAP )
132
131
)
133
132
} )
134
133
@@ -140,6 +139,6 @@ describe('trackLoadingTime', () => {
140
139
domMutationObservable . notify ( )
141
140
clock . tick ( AFTER_PAGE_ACTIVITY_END_DELAY )
142
141
143
- expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( undefined , true )
142
+ expect ( loadingTimeCallback ) . toHaveBeenCalledOnceWith ( undefined )
144
143
} )
145
144
} )
0 commit comments