@@ -26,7 +26,7 @@ export const validateEventProperty = async (event: string, property: string, pro
26
26
When ( / ^ I s e t u p r e q u e s t i n t e r c e p t i o n f o r p o s t h o g a n a l y t i c s r e q u e s t \( s \) $ / , async ( ) => {
27
27
await browser . pause ( 1000 ) ;
28
28
await browser . setupInterceptor ( ) ;
29
- await browser . excludeUrls ( [ new RegExp ( '^(?!https://e.lw.iog.io).*' ) ] ) ;
29
+ await browser . excludeUrls ( [ new RegExp ( '^(?!https://e.lw.iog.io).*' ) , new RegExp ( 'https://e.lw.iog.io/decide/' ) ] ) ;
30
30
} ) ;
31
31
32
32
When ( / ^ I v a l i d a t e l a t e s t a n a l y t i c s m u l t i p l e e v e n t s : $ / , async ( eventActionNames : DataTable ) => {
@@ -76,23 +76,26 @@ When(/^I validate that alias event has assigned same user id "([^"]*)" in postho
76
76
Then ( / ^ I v a l i d a t e t h a t e v e n t h a s c o r r e c t p r o p e r t i e s $ / , async ( ) => {
77
77
await browser . pause ( 2000 ) ;
78
78
const actualEventPayload = await getLatestEventPayload ( ) ;
79
+ expect ( actualEventPayload ) . to . haveOwnProperty ( 'timestamp' ) ;
80
+ expect ( actualEventPayload ) . to . haveOwnProperty ( 'uuid' ) ;
81
+ expect ( actualEventPayload ) . to . haveOwnProperty ( 'event' ) ;
79
82
const expectedProperties = [
80
83
'$current_url' ,
81
84
'$window_id' ,
82
85
'$browser' ,
83
86
'$browser_language' ,
84
87
'$browser_version' ,
85
88
'$device_type' ,
89
+ 'distinct_id' ,
86
90
'$host' ,
87
91
'$insert_id' ,
88
92
'$lib' ,
89
93
'$lib_version' ,
90
- '$lib_version' ,
91
94
'$os' ,
92
95
// '$os_version', it is not working for all os right now
93
- '$pageview_id' ,
94
96
'posthog_project_id' ,
95
97
'$pathname' ,
98
+ '$raw_user_agent' ,
96
99
'$referrer' ,
97
100
'$referring_domain' ,
98
101
'$screen_height' ,
@@ -101,12 +104,15 @@ Then(/^I validate that event has correct properties$/, async () => {
101
104
'$viewport_height' ,
102
105
'$viewport_width' ,
103
106
'sent_at_local' ,
104
- 'view'
107
+ 'view' ,
108
+ '$active_feature_flags' ,
109
+ '$initial_person_info' ,
110
+ 'title' ,
111
+ '$prev_pageview_pathname'
105
112
] ;
106
113
for ( const expectedProperty of expectedProperties ) {
107
- expect ( Object . prototype . hasOwnProperty . call ( actualEventPayload . properties , expectedProperty ) ) . to . be . true ;
114
+ expect ( actualEventPayload . properties ) . to . haveOwnProperty ( expectedProperty ) ;
108
115
}
109
- expect ( Object . prototype . hasOwnProperty . call ( actualEventPayload , 'timestamp' ) ) . to . be . true ;
110
116
} ) ;
111
117
112
118
Then ( / ^ I v a l i d a t e t h a t t h e e v e n t i n c l u d e s " ( [ ^ " ] * ) " p r o p e r t y $ / , async ( property : string ) => {
0 commit comments