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

NJ 193 - Add none of the above option to property tax #5295

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jachan
Copy link
Contributor

@jachan jachan commented Dec 26, 2024

Link to pivotal/JIRA issue

Is PM acceptance required? (delete one)

  • Yes - don't merge until JIRA issue is accepted!

Reminder: merge main into this branch and get green tests before merging to main

What was done?

  • Add None of the Above checkbox to tenant and homeowner property tax eligibility
  • None of the Above unchecks all other checkboxes when selected
  • If none of the above is checked, and user checks another checkbox, none of the above becomes unchecked
  • Moved NJ End to End tests to its own file, as it was getting very large (~400 lines out of a 1000 line test)

How to test?

  • Describe the testing approach taken to verify the changes, including:
    • Local Tests
      • Select "Lauryn MFS" (this allows an additional checkbox to appear for spouse)
        • Navigate to Property Tax, select Tenant or Homeowner
        • Validate that None of the Above behavior is as expected
    • Added end-to-end tests

Screenshots (for visual changes)

  • Before
image
  • After
NJ.203.After.mov

Copy link
Contributor Author

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")
Copy link
Contributor Author

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")
Copy link
Contributor Author

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

Copy link
Contributor Author

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.

Copy link
Contributor

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!

Copy link
Contributor

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

Copy link

Heroku app: https://gyr-review-app-5295-9b59a84ef4f5.herokuapp.com/
View logs: heroku logs --app gyr-review-app-5295 (optionally add --tail)

continue
end

def select_homeowner_eligibility(checkboxes, continue_to_next: true)
Copy link
Contributor Author

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

Copy link
Contributor

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!

Copy link
Contributor

@mmazanec22 mmazanec22 left a 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() {
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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)
Copy link
Contributor

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!

Copy link
Contributor

@mluedke2 mluedke2 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! thanks for sorting tests too

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