File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 65
65
@" Starship_Type" : @" Death Star"
66
66
}];
67
67
});
68
-
68
+
69
69
it (@" track with event name and parmas separated by periods" , ^{
70
70
SEGTrackPayload *payload = [[SEGTrackPayload alloc ] initWithEvent: @" Starship.Ordered"
71
71
properties: @{
72
72
@" Starship.Type" : @" Death Star"
73
73
}
74
74
context: @{}
75
75
integrations: @{}];
76
-
76
+
77
77
[integration track: payload];
78
78
[verify (mockFirebase) logEventWithName: @" Starship_Ordered" parameters: @{
79
79
@" Starship_Type" : @" Death Star"
80
80
}];
81
81
});
82
-
82
+
83
83
it (@" track with leading and trailing spacing for event name" , ^{
84
84
SEGTrackPayload *payload = [[SEGTrackPayload alloc ] initWithEvent: @" Starship Ordered "
85
85
properties: @{
86
86
@" Starship.Type" : @" Death Star"
87
87
}
88
88
context: @{}
89
89
integrations: @{}];
90
-
90
+
91
91
[integration track: payload];
92
92
[verify (mockFirebase) logEventWithName: @" Starship_Ordered" parameters: @{
93
93
@" Starship_Type" : @" Death Star"
555
555
}];
556
556
});
557
557
558
+ it (@" track screen with name" , ^{
559
+ SEGScreenPayload *payload = [[SEGScreenPayload alloc ] initWithName: @" Home screen"
560
+ properties: @{}
561
+ context: @{}
562
+ integrations: @{}];
563
+ [integration screen: payload];
564
+ [verify (mockFirebase) setScreenName: @" Home screen" screenClass: nil ];
565
+ });
566
+
558
567
});
559
568
560
569
SpecEnd
Original file line number Diff line number Diff line change @@ -64,6 +64,13 @@ - (void)track:(SEGTrackPayload *)payload
64
64
}
65
65
66
66
67
+ - (void )screen : (SEGScreenPayload *)payload
68
+ {
69
+ [self .firebaseClass setScreenName: payload.name screenClass: nil ];
70
+ SEGLog (@" [FIRAnalytics setScreenName:%@ ]" , payload.name );
71
+ }
72
+
73
+
67
74
#pragma mark - Utilities
68
75
69
76
// Event names can be up to 32 characters long, may only contain alphanumeric
You can’t perform that action at this time.
0 commit comments