File tree 3 files changed +52
-8
lines changed 3 files changed +52
-8
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,11 @@ to be used in your tests it should be safe to pull into a project.
42
42
43
43
## Native Plugins
44
44
- 3DTouch
45
+ - GoogleAnalyics
45
46
- Keyboard
46
47
- Network
47
48
- Splashscreen
48
- - Network
49
+ - StatusBar
49
50
50
51
## Installation
51
52
``` bash
Original file line number Diff line number Diff line change
1
+ export class GoogleAnalyticsMock {
2
+
3
+ public static instance ( ) : any {
4
+ let instance = jasmine . createSpyObj ( 'GoogleAnalytics' , [
5
+ 'startTrackerWithId' ,
6
+ 'setAllowIDFACollection' ,
7
+ 'setUserId' ,
8
+ 'setAnonymizeIp' ,
9
+ 'setAppVersion' ,
10
+ 'setOptOut' ,
11
+ 'debugMode' ,
12
+ 'trackMetric' ,
13
+ 'trackView' ,
14
+ 'addCustomDimension' ,
15
+ 'trackEvent' ,
16
+ 'trackException' ,
17
+ 'trackTiming' ,
18
+ 'addTransaction' ,
19
+ 'addTransactionItem' ,
20
+ 'enableUncaughtExceptionReporting'
21
+ ] ) ;
22
+ instance . startTrackerWithId . and . returnValue ( Promise . resolve ( ) ) ;
23
+ instance . setAllowIDFACollection . and . returnValue ( Promise . resolve ( ) ) ;
24
+ instance . setUserId . and . returnValue ( Promise . resolve ( ) ) ;
25
+ instance . setAnonymizeIp . and . returnValue ( Promise . resolve ( ) ) ;
26
+ instance . setAppVersion . and . returnValue ( Promise . resolve ( ) ) ;
27
+ instance . setOptOut . and . returnValue ( Promise . resolve ( ) ) ;
28
+ instance . debugMode . and . returnValue ( Promise . resolve ( ) ) ;
29
+ instance . trackMetric . and . returnValue ( Promise . resolve ( ) ) ;
30
+ instance . trackView . and . returnValue ( Promise . resolve ( ) ) ;
31
+ instance . addCustomDimension . and . returnValue ( Promise . resolve ( ) ) ;
32
+ instance . trackEvent . and . returnValue ( Promise . resolve ( ) ) ;
33
+ instance . trackException . and . returnValue ( Promise . resolve ( ) ) ;
34
+ instance . trackTiming . and . returnValue ( Promise . resolve ( ) ) ;
35
+ instance . addTransaction . and . returnValue ( Promise . resolve ( ) ) ;
36
+ instance . addTransactionItem . and . returnValue ( Promise . resolve ( ) ) ;
37
+ instance . enableUncaughtExceptionReporting . and . returnValue ( Promise . resolve ( ) ) ;
38
+
39
+ return instance ;
40
+ }
41
+ }
Original file line number Diff line number Diff line change 1
- import { SplashScreenMock } from './splash-screen' ;
2
- import { KeyboardMock } from './keyboard' ;
3
- import { StatusBarMock } from './status-bar' ;
4
- import { ThreeDeeTouchMock } from './three-dee-touch'
5
- import { NetworkMock } from './network' ;
1
+ import { SplashScreenMock } from './splash-screen' ;
2
+ import { KeyboardMock } from './keyboard' ;
3
+ import { StatusBarMock } from './status-bar' ;
4
+ import { ThreeDeeTouchMock } from './three-dee-touch' ;
5
+ import { NetworkMock } from './network' ;
6
+ import { GoogleAnalyticsMock } from './google-analytics' ;
6
7
7
8
export {
8
9
KeyboardMock ,
9
10
SplashScreenMock ,
10
11
StatusBarMock ,
11
12
ThreeDeeTouchMock ,
12
- NetworkMock
13
- }
13
+ NetworkMock ,
14
+ GoogleAnalyticsMock
15
+ } ;
You can’t perform that action at this time.
0 commit comments