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

Add new param for getting chat data #307

Merged
merged 2 commits into from
Feb 3, 2022
Merged

Conversation

ciremusyoka
Copy link
Contributor

Part of https://github.com/onaio/zebra/issues/6675

Add an option of using field_xpath param to get single chart data.

(parse-http :get url) => :some-chart)))
(parse-http :get url) => :some-chart))

(facts "About get chart data"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The get function was not tested. Added tests for all the three possible scenarios

Copy link
Member

Choose a reason for hiding this comment

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

small change that might be needed though: the assertions should be inside the fact statements

Copy link
Member

Choose a reason for hiding this comment

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

For example (from the documentation here)

(fact "one plus one is two" (+ 1 1) => 2)

Comment on lines 43 to 45
url (if field-xpath
(make-url (format url-template id field-xpath group-by))
(make-url (format url-template id field-name group-by)))]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
url (if field-xpath
(make-url (format url-template id field-xpath group-by))
(make-url (format url-template id field-name group-by)))]
url (make-url (format url-template id (or field-xpath field-name) group-by))]

Copy link
Member

@FrankApiyo FrankApiyo left a comment

Choose a reason for hiding this comment

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

looks good

@FrankApiyo FrankApiyo requested review from FrankApiyo and removed request for KipSigei February 2, 2022 10:29
@ciremusyoka ciremusyoka merged commit e6a5b34 into master Feb 3, 2022
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.

3 participants