Commit 8f28e774 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch '215359-fix-security-discovery-carousel-slider-event-value-3' into 'master'

Fix security discovery carousel slider event value

See merge request gitlab-org/gitlab!30192
parents afea8524 4651e2c9
......@@ -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