-
Notifications
You must be signed in to change notification settings - Fork 13
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
NJ 193 - Add none of the above option to property tax #5295
base: main
Are you sure you want to change the base?
Conversation
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.
Removed what appeared to be an empty test file.
def advance_to_property_tax_page(df_persona_name) | ||
advance_to_start_of_intake(df_persona_name) | ||
advance_county_and_municipality | ||
if has_text? I18n.t("state_file.questions.nj_disabled_exemption.edit.title") |
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.
Made these conditional, as not all personas are asked about Disability (e.g. if Federal XML claims blindness, we take this exemption for them)
advance_disabled_exemption | ||
end | ||
advance_veterans_exemption | ||
if has_text? I18n.t("state_file.questions.nj_college_dependents_exemption.edit.title") |
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.
Similarly, only personas with dependents are shown this controller, so made this conditional as well
expect_estimated_tax_page | ||
end | ||
|
||
it "handles homeowner none of the above checkbox", required_schema: "nj" do |
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.
New test added here for homeowner none of the above
expect_estimated_tax_page | ||
end | ||
|
||
it "handles tenant none of the above checkbox", required_schema: "nj" do |
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.
New test added here for tenant none of the above
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.
Commented on changes, as moving all NJ tests out to a separate file makes it difficult to see what was modified.
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.
Separating this out is a big improvement!
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 agree! i think over future PRs it would be useful to separate out even more, so that this file really is just the minimal steps for a "complete intake" and then we can get into the weeds on edge cases in other places... but that can be done later
Heroku app: https://gyr-review-app-5295-9b59a84ef4f5.herokuapp.com/ |
continue | ||
end | ||
|
||
def select_homeowner_eligibility(checkboxes, continue_to_next: true) |
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.
Updated this helper function and the one below by adding continue_to_next
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.
This pattern will be useful for a11y testing too!
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 great! Non-blocking refactor suggestion
@@ -65,4 +70,36 @@ | |||
|
|||
<%= f.continue %> | |||
<% end %> | |||
<% end %> | |||
<script> | |||
document.addEventListener("DOMContentLoaded", function() { |
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.
[pebble] Seeing that we're using the same logic twice, I wonder if it's worth adding the function passed to the event listener to `app/javascript. You could refactor it to work for both cases by passing in the IDs of all not-none checkboxes, for each id adding the checkbox to the checkbox array if they're not null, passing in the noneCheckbox ID, and then optional checkbox ids that should be hidden when none is checked
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 like this suggestion too. we or other states might need this pattern in more places so it would be handy to reuse
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.
Separating this out is a big improvement!
continue | ||
end | ||
|
||
def select_homeowner_eligibility(checkboxes, continue_to_next: true) |
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.
This pattern will be useful for a11y testing too!
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! thanks for sorting tests too
Link to pivotal/JIRA issue
Is PM acceptance required? (delete one)
Reminder: merge main into this branch and get green tests before merging to main
What was done?
How to test?
Screenshots (for visual changes)
NJ.203.After.mov