-
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
FYST-526 Update refund taxes owed UI and add financial information to MD pdf/xml #5007
FYST-526 Update refund taxes owed UI and add financial information to MD pdf/xml #5007
Conversation
1a839f1
to
661fa00
Compare
661fa00
to
9ce7a6e
Compare
32f56e1
to
32d75ff
Compare
…es-owed-ui-and-add-financial-information-to-md-pdf-xml
Heroku app: https://gyr-review-app-5007-cef51b37824c.herokuapp.com/ |
…count holder names
|
07fffc4
to
f0e3644
Compare
f0e3644
to
09d242f
Compare
…es-owed-ui-and-add-financial-information-to-md-pdf-xml
… nil/unfilled if payment method changes to mail
validates :account_holder_first_name, presence: true | ||
validates :account_holder_last_name, presence: true | ||
validates :account_holder_first_name, format: { with: /\A[a-zA-Z]{1}([A-Za-z\-\s']{0,15})\z/.freeze, message: ->(_object, _data) { I18n.t('errors.attributes.first_name.invalid_format') }} | ||
validates :account_holder_last_name, format: { with: /\A[a-zA-Z]{1}([A-Za-z\-\s']{0,31})\z/.freeze, message: ->(_object, _data) { I18n.t('errors.attributes.last_name.invalid_format') }} |
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.
ask Tiffany about following schema strictly? (allowing numbers in first/last name)
Tiffany Chang sorry to be super annoying again but on “implement any character-type validations that are present in the schema for this field” for people’s names –
Currently the first and last names have this validation ([A-Za-z0-9'-] ?)*[A-Za-z0-9'-] which means any characters (alphabet, numbers, apostrophes and dash, white space). Do we want the same validation? I’m talking specifically about numbers…do we want to allow numbers here?
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.
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.
answered!
https://codeforamerica.atlassian.net/browse/FYST-526?focusedCommentId=13486
Arin Choi great catch--let’s allow alphabet, apostrophes and dash, and white space only. no numbers
Co-authored-by: Jenny Heath <[email protected]>
…itInd implementation
@@ -0,0 +1,14 @@ | |||
class AddJointAccountHolderNameAndAccountHolderDeconstructedFields < ActiveRecord::Migration[7.1] | |||
def change | |||
add_column :state_file_md_intakes, :has_joint_account_holder, :integer, default: 0 |
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.
ack i'm so sorry but we also usually have null: false
on the enum columns. forgot to mention in the last comment 😓
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 should've caught that! ty
|
||
describe "#calculate_authorize_direct_deposit" do | ||
context "bank authorization was given" do | ||
it "should return X" 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.
minor but it now returns true (same for "nil" below)
|
||
context "AuthToDirectDepositInd" do | ||
before do | ||
intake.bank_authorization_confirmed = "yes" |
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.
sorry if this is a ridiculous question but does this...work? i would usually
intake.update(bank_authorization_confirmed: "yes")
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.
yeahh i'm not sure what's going on but
allow(intake).to receive(:bank_authorization_confirmed_yes?).and_return true
and intake.bank_authorization_confirmed = "yes"
passes this spec, but fails with:
intake.bank_authorization_confirmed_yes!
intake.update(bank_authorization_confirmed: "yes")
Even when I put a binding.pry and try to manually update by using intake.update(bank_authorization_confirmed: "yes")
it returns unfilled
for the value after successful update
I'm super confused...I'm going to go with the mocking of the call bank_authorization_confirmed_yes?
to be more stubbed for this spec
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 needed to set the payment type in the test so that on save (which happens with update
and _yes!
methods), if the payment type is not direct_deposit
, it will run sanitize_bank_details
which was setting it back to "unfilled"
intake.payment_or_deposit_type = 'direct_deposit'
intake.update(bank_authorization_confirmed: "yes")
gonna leave the test as-is but just for posterity...
intake.payment_or_deposit_type = "direct_deposit" | ||
intake.account_holder_first_name = "Jack" | ||
intake.account_holder_middle_initial = "D" | ||
intake.account_holder_last_name = "Hansel" |
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.
same question. idk if i just completely missed this on the first review sorry
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.
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 pretty good! a couple of minor comments but i don't think they require re-review.
the only other thing, which can be a follow-up to this work because it's just adding ignored columns: will we lose historical data when we remove df_data_import_failed_at
altogether? does anyone care?
@jenny-heath I think that's a great question about |
bd8ad7f
to
307d579
Compare
…to allow numbers (boooo)
307d579
to
8461769
Compare
@@ -46,8 +46,8 @@ class MdTaxRefundForm < QuestionsForm | |||
with_options if: -> { has_joint_account_holder == 'yes' } do | |||
validates :joint_account_holder_first_name, presence: true | |||
validates :joint_account_holder_last_name, presence: true | |||
validates :joint_account_holder_first_name, format: { with: /\A[a-zA-Z]{1}([A-Za-z\-\s']{0,15})\z/.freeze, message: ->(_object, _data) { I18n.t('errors.attributes.first_name.invalid_format') }} | |||
validates :joint_account_holder_last_name, format: { with: /\A[a-zA-Z]{1}([A-Za-z\-\s']{0,137})\z/.freeze, message: ->(_object, _data) { I18n.t('errors.attributes.last_name.invalid_format') }} |
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.
rubymine said {1}
after the [a-zA-Z]
was redundant, so I removed it
closing & reopening b/c migrations were changed |
Heroku app: https://gyr-review-app-5007-3938db5fac03.herokuapp.com/ |
…es-owed-ui-and-add-financial-information-to-md-pdf-xml
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?
bank_name
from all intakes!joint_account_holder_name
fields for MDHow to test?
Screenshots (for visual changes)
UI
XML
PDF