-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
FI-1644: Input filtering #226
Conversation
Codecov Report
@@ Coverage Diff @@
## main #226 +/- ##
==========================================
+ Coverage 76.38% 76.44% +0.05%
==========================================
Files 184 184
Lines 4269 4279 +10
Branches 407 407
==========================================
+ Hits 3261 3271 +10
Misses 1005 1005
Partials 3 3
Continue to review full report at Codecov.
|
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.
Looks good !
submitted_inputs = [] if submitted_inputs.nil? | ||
|
||
required_inputs.map(&:to_s) - submitted_inputs.map { |input| input[:name] } | ||
required_inputs(selected_suite_options).map(&:to_s) - submitted_inputs.map { |input| input[:name] } |
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.
I'm assuming the result of required_inputs
can be a mix of strings and symbols -- if so, should we move the .to_s
to line 96 to standardize what the method returns?
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.
I'm pretty sure it doesn't matter if symbols or strings are returned. We know that the inputs from the JSON api will be strings, though, so we need to symbolize our internal input ids for comparison.
Co-authored-by: Jack Fraser <37051655+Jack-Fraser16@users.noreply.github.com>
5968eb7
to
600c769
Compare
This branch filters inputs based on selected suite options. This is needed to support multiple version of the SMART IG where different input behaviors are required for the different versions. For example, PKCE is optional in SMART v1, but required in SMART v2, so the input needs to be handled differently depending on which version is being used.
Also includes the tiny fix for #228