Skip to content

Commit 22c0068

Browse files
authored
Merge pull request #12493 from bbc/FIX-component-tracking-content-type
FIX: Add support for multiple content types
2 parents 0f35d5b + a144141 commit 22c0068

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

cypress/e2e/specialFeatures/atiAnalytics/assertions/navigation.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const { SCROLLABLE_NAVIGATION, DROPDOWN_NAVIGATION } = COMPONENTS;
66
export const assertScrollableNavigationComponentView = ({
77
pageIdentifier,
88
contentType,
9+
componentTrackingContentType,
910
useReverb,
1011
}) => {
1112
it('should send a view event for the Scrollable Navigation component', () => {
@@ -20,7 +21,7 @@ export const assertScrollableNavigationComponentView = ({
2021
assertATIComponentViewEvent({
2122
component: SCROLLABLE_NAVIGATION,
2223
pageIdentifier,
23-
contentType,
24+
contentType: componentTrackingContentType || contentType,
2425
useReverb,
2526
});
2627
});
@@ -30,6 +31,7 @@ export const assertScrollableNavigationComponentView = ({
3031
export const assertScrollableNavigationComponentClick = ({
3132
pageIdentifier,
3233
contentType,
34+
componentTrackingContentType,
3335
useReverb,
3436
}) => {
3537
it('should send a click event for the Scrollable Navigation component', () => {
@@ -47,7 +49,7 @@ export const assertScrollableNavigationComponentClick = ({
4749
assertATIComponentClickEvent({
4850
component: SCROLLABLE_NAVIGATION,
4951
pageIdentifier,
50-
contentType,
52+
contentType: componentTrackingContentType || contentType,
5153
useReverb,
5254
});
5355

@@ -61,6 +63,7 @@ export const assertScrollableNavigationComponentClick = ({
6163
export const assertDropdownNavigationComponentView = ({
6264
pageIdentifier,
6365
contentType,
66+
componentTrackingContentType,
6467
useReverb,
6568
}) => {
6669
it('should send a view event for the Dropdown Navigation component', () => {
@@ -74,7 +77,7 @@ export const assertDropdownNavigationComponentView = ({
7477
assertATIComponentViewEvent({
7578
component: DROPDOWN_NAVIGATION,
7679
pageIdentifier,
77-
contentType,
80+
contentType: componentTrackingContentType || contentType,
7881
useReverb,
7982
});
8083
});
@@ -84,6 +87,7 @@ export const assertDropdownNavigationComponentView = ({
8487
export const assertDropdownNavigationComponentClick = ({
8588
pageIdentifier,
8689
contentType,
90+
componentTrackingContentType,
8791
useReverb,
8892
}) => {
8993
it('should send a click event for the Dropdown Navigation component', () => {
@@ -100,7 +104,7 @@ export const assertDropdownNavigationComponentClick = ({
100104
assertATIComponentClickEvent({
101105
component: DROPDOWN_NAVIGATION,
102106
pageIdentifier,
103-
contentType,
107+
contentType: componentTrackingContentType || contentType,
104108
useReverb,
105109
});
106110

cypress/e2e/specialFeatures/atiAnalytics/index.cy.js

+1
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ const canonicalTestSuites = [
246246
pageIdentifier: 'marathi.topics.c1wmk63rjkvt.page',
247247
applicationType: 'responsive',
248248
contentType: 'index-category',
249+
componentTrackingContentType: 'topic-page',
249250
tests: [assertPageView],
250251
},
251252
// Pages with Reverb

0 commit comments

Comments
 (0)