-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "none" option to gas_utility param; validate param (#620)
## Description While implementing the Mass Save logic I realized that there's a crucial distinction between a user _not having gas service_, and a user _not specifying who their gas utility is_. (The former case allows us to show more non-Mass Save utility incentives.) My solution is to allow passing a special value of `none` to the `gas_utility` param, meaning you affirmatively do not have gas service. I'm anticipating that the calculator UI will offer options like: - National Grid - Eversource - Other - I don't have gas service "I don't have gas service" will result in the calculator sending the special `none` value of the `gas_utility` param, while "Other" will result in the param being absent. This also adds logic to validate the parameter. ## Test Plan `yarn test` with new tests. Test coverage of this isn't going to be quite comprehensive until we have the actual Mass Save data in here, which requires a couple more changes first.
- Loading branch information
Showing
4 changed files
with
76 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters