File tree 3 files changed +55
-2
lines changed
cypress/e2e/specialFeatures/atiAnalytics
3 files changed +55
-2
lines changed Original file line number Diff line number Diff line change @@ -74,11 +74,29 @@ export const assertPageView = ({
74
74
cy . url ( ) . then ( url => {
75
75
interceptATIAnalyticsBeacons ( ) ;
76
76
cy . visit ( url ) ;
77
+
78
+ console . log (
79
+ 'url in assertPageView just after cy.visit in assertPageView' ,
80
+ url ,
81
+ ) ;
82
+ cy . log ( 'url in assertPageView just after cy.visit assertPageView' , url ) ;
77
83
const atiPageViewAlias = useReverb ? ATI_PAGE_VIEW_REVERB : ATI_PAGE_VIEW ;
78
84
79
85
cy . wait ( `@${ atiPageViewAlias } ` ) . then ( ( { request } ) => {
80
86
const params = getATIParamsFromURL ( request . url ) ;
87
+ console . log (
88
+ 'p param from getATIParamsFromUrl assertPageView' ,
89
+ params . p ,
90
+ 'for URL' ,
91
+ request . url ,
92
+ ) ;
81
93
94
+ cy . log (
95
+ 'p param from getATIParamsFromUrl assertPageView' ,
96
+ params . p ,
97
+ 'for URL' ,
98
+ request . url ,
99
+ ) ;
82
100
assertATIPageViewEventParamsExist ( {
83
101
params,
84
102
contentType,
Original file line number Diff line number Diff line change @@ -36,6 +36,14 @@ export const assertRecentAudioEpisodesComponentClick = ({
36
36
cy . url ( ) . then ( url => {
37
37
interceptATIAnalyticsBeacons ( ) ;
38
38
cy . visit ( url ) ;
39
+ console . log (
40
+ 'the url in assertRecentAudioEpisodesComponentClick before the click is' ,
41
+ url ,
42
+ ) ;
43
+ cy . log (
44
+ 'the url in assertRecentAudioEpisodesComponentClick before the click is' ,
45
+ url ,
46
+ ) ;
39
47
40
48
cy . get ( '[data-e2e="recent-episodes-list"]' ) . scrollIntoView ( {
41
49
duration : 1000 ,
@@ -50,9 +58,27 @@ export const assertRecentAudioEpisodesComponentClick = ({
50
58
contentType,
51
59
useReverb,
52
60
} ) ;
53
-
61
+ cy . url ( ) . then ( url2 => {
62
+ console . log (
63
+ 'the url in assertRecentAudioEpisodesComponentClick after the click is' ,
64
+ url2 ,
65
+ ) ;
66
+ cy . log (
67
+ 'the url in assertRecentAudioEpisodesComponentClick after the click is' ,
68
+ url2 ,
69
+ ) ;
70
+ } ) ;
54
71
// return to previous page
55
72
cy . visit ( url ) ;
73
+
74
+ console . log (
75
+ 'the url in assertRecentAudioEpisodesComponentClick after the revisiting of the previous page is' ,
76
+ url ,
77
+ ) ;
78
+ cy . log (
79
+ 'the url in assertRecentAudioEpisodesComponentClick after the revisiting of the previous page is' ,
80
+ url ,
81
+ ) ;
56
82
} ) ;
57
83
} ) ;
58
84
} ;
Original file line number Diff line number Diff line change @@ -3,7 +3,16 @@ import envs from '../../../../support/config/envs';
3
3
export const getATIParamsFromURL = atiAnalyticsURL => {
4
4
const url = new URL ( atiAnalyticsURL ) ;
5
5
6
- return Object . fromEntries ( new URLSearchParams ( url . search ) ) ;
6
+ const objectFromEntries = Object . fromEntries ( new URLSearchParams ( url . search ) ) ;
7
+ console . log (
8
+ 'objectFromEntries p value in getATIParamsFromURL' ,
9
+ objectFromEntries . p ,
10
+ ) ;
11
+ cy . log (
12
+ 'objectFromEntries p value in getATIParamsFromURL' ,
13
+ objectFromEntries . p ,
14
+ ) ;
15
+ return objectFromEntries ;
7
16
} ;
8
17
9
18
export const ATI_PAGE_VIEW = 'ati-page-view' ;
You can’t perform that action at this time.
0 commit comments