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 {
onSlideStart(slide) {
this.track('click_button', {
label: 'security-discover-carousel',
value: `sliding${this.slide}-${slide}`,
property: `sliding${this.slide}-${slide}`,
});
this.textSlide = slide;
},
......
......@@ -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', () => {
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