-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix for REST query string URL encoding #7795
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
Conversation
…caused handlebars statements to break, this rectifies that.
Codecov Report
@@ Coverage Diff @@
## master #7795 +/- ##
=======================================
Coverage 67.77% 67.77%
=======================================
Files 125 125
Lines 4162 4162
Branches 655 655
=======================================
Hits 2821 2821
Misses 941 941
Partials 400 400
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
LGTM - just a few log lines left in - but the actual parsing logic with HBS would be well covered with a test just for safety.
...ges/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte
Outdated
Show resolved
Hide resolved
@@ -46,7 +48,19 @@ export function buildQueryString(obj) { | |||
if (str !== "") { | |||
str += "&" | |||
} | |||
str += `${key}=${encodeURIComponent(value || "")}` | |||
const bindings = findHBSBlocks(value) |
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.
It would be really good to have a test for this, if possible
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.
Did my best to get jest tests working in the builder, had to remove some of the old (disabled) jest tests as they just don't work anymore and probably need re-thought.
This is probably something we need to extend out further - cypress is great but jest tests are nice for little unit test type things. I've made the (limited) builder tests part of CI so that they hopefully offer some value from here forward.
…ts working in builder.
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.
LGTM! Thanks for putting together the jest setup 👌
Description
Fixing issue introduced by fix for #7683 - encoding the query string caused handlebars statements to break, this rectifies that.
Also minor fix for z-index issue with a tooltip.
Addresses: