Commit 4651e2c9 authored by Alper Akgun's avatar Alper Akgun

Fix security discovery carousel slider event value

It should use the property which accepts non numeric
parent d786db36
...@@ -77,7 +77,7 @@ export default { ...@@ -77,7 +77,7 @@ export default {
onSlideStart(slide) { onSlideStart(slide) {
this.track('click_button', { this.track('click_button', {
label: 'security-discover-carousel', label: 'security-discover-carousel',
value: `sliding${this.slide}-${slide}`, property: `sliding${this.slide}-${slide}`,
}); });
this.textSlide = slide; this.textSlide = slide;
}, },
......
...@@ -78,6 +78,18 @@ describe('Card security discover app', () => { ...@@ -78,6 +78,18 @@ describe('Card security discover app', () => {
}); });
}); });
it('tracks an event when clicked on a slider', () => {
const expectedCategory = undefined;
document.body.dataset.page = '_category_';
wrapper.vm.onSlideStart(1);
expect(spy).toHaveBeenCalledWith(expectedCategory, 'click_button', {
label: 'security-discover-carousel',
property: 'sliding0-1',
});
});
it('tracks an event when clicked on feedback', () => { it('tracks an event when clicked on feedback', () => {
wrapper.find('.discover-feedback-icon').trigger('click'); wrapper.find('.discover-feedback-icon').trigger('click');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment