-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSTEAM1-1549: Adds click view tracking to Live Header Media #12276
WSTEAM1-1549: Adds click view tracking to Live Header Media #12276
Conversation
); | ||
const playCloseButton = screen.getByTestId('watch-now-close-button'); | ||
fireEvent.click(playCloseButton); | ||
expect(clickTrackerSpy).toHaveBeenCalledWith(undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this expected? Or do we expect the click tracker spy not to have been called at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. For the tests I copied the logic used in src/app/components/Billboard/index.test.tsx
.
Since we're no longer passing in eventTrackingData in as a prop, we expect the click/ view trackers to always be called, so I suppose I can remove these tests.
All that said... I had a bit of trouble with these tests. If I follow the pattern here and call .mockImplementation();
then I get error Error: Uncaught [TypeError: clickTrackerHandler is not a function]
. I haven't been able to work out why.
Co-authored-by: Karina Thomas <[email protected]>
Co-authored-by: Karina Thomas <[email protected]>
Resolves JIRA WSTEAM1-1549
Overall changes
Adds click and view tracking to Live Header Media 'Watch now CTA'
Code changes
Expected behaviour:
Testing
ati: PUB-[live-page]-[live-header-media]-[]-[]-[live_coverage.c7dkx155e626t.page]-[]-[]-[]
atc: PUB-[live-page]-[live-header-media]-[]-[]-[live_coverage.c7dkx155e626t.page]-[]-[]-[]
Helpful Links
Add Links to useful resources related to this PR if applicable.
Coding Standards
Repository use guidelines