Skip to content
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

feat(cts): add tests for analytics #69

Merged
merged 2 commits into from
Jan 7, 2022
Merged

Conversation

shortcuts
Copy link
Member

🧭 What and Why

🎟 JIRA Ticket: https://algolia.atlassian.net/browse/APIC-241

Changes included:

  • Add tests for the analytics client and methods
  • Fix wrong types in the analytics client
  • Update generateCTS script to provide a new variable: parametersWithDataType

parametersWithDataType:
Provide an array of parameters with their key, value, is* data types, and the -last parameter.

This allow us to provide custom logic in our CTS template, to wrap a startDate parameters in the Date constructor for example.

🧪 Test

CI :D

@shortcuts shortcuts requested a review from a team January 7, 2022 10:00
@shortcuts shortcuts self-assigned this Jan 7, 2022
@shortcuts shortcuts requested review from damcou and removed request for a team January 7, 2022 10:00
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job !

"testName": "get getClickThroughRate with all parameters",
"parameters": {
"index": "index",
"startDate": "1999-19-09",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should also check the query params to see if this is passed correctly

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, that's what I was checking

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR is here #70

tests/generateCTS.ts Outdated Show resolved Hide resolved
@millotp
Copy link
Collaborator

millotp commented Jan 7, 2022

Looks like we have issue with URL encoding in the CTS

@shortcuts
Copy link
Member Author

Looks like we have issue with URL encoding in the CTS

I just realized I forgot to run yarn cts:test :D

@shortcuts
Copy link
Member Author

Waiting for #70 to test search params

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants