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

Fyst [1519&1518] add mailing address validation step to flow #5401

Conversation

DrewProebstel
Copy link
Contributor

@DrewProebstel DrewProebstel commented Jan 21, 2025

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?

  • adds mailing address validation step to get your pdf flow

How to test?

  • in heroku make sure the get_your_pdf flipper tag is enabled and that a statefile archived intake from the seeder file is used the go though the get your pdf flow til this page is hit.

Screenshots (for visual changes)

Screenshot 2025-01-23 at 12 45 26 PM

@DrewProebstel DrewProebstel changed the title Fyst 1519 create library of random az ny addresses selection logic Fyst [1519&1518] add mailing address validation step to flow Jan 23, 2025
@DrewProebstel DrewProebstel reopened this Jan 23, 2025
@anisharamnani
Copy link
Contributor

👋 thanks for doing this work! sorting out how to make the fake addresses seems to be quite complicated!

i've left a bunch of comments. let me know if its easier to pair and walk through them.

Copy link
Member

@mpidcock mpidcock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if you want to talk through any of my comments!

app/models/state_file_archived_intake_request.rb Outdated Show resolved Hide resolved
app/models/state_file_archived_intake_request.rb Outdated Show resolved Hide resolved
app/models/state_file_archived_intake_request.rb Outdated Show resolved Hide resolved
app/models/state_file_archived_intake_request.rb Outdated Show resolved Hide resolved
Copy link

Heroku app: https://gyr-review-app-5401-06e1edd79e30.herokuapp.com/
View logs: heroku logs --app gyr-review-app-5401 (optionally add --tail)

end
end

def download_file_from_s3(bucket, file_key, file_path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the line you're referring to?

i once again must be misunderstanding how do you choose NY or AZ

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's now line 55: "#{state_file_archived_intake.mailing_state.downcase}_addresses.csv"

def create_state_file_access_log(event_type)
StateFileArchivedIntakeAccessLog.create!(
event_type: event_type,
state_file_archived_intake_request: current_request
)
end

def address_challenge_set
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the address_challenge_set defined here? are we trying to hide the method?

🤔 if that's the case, since it's not shared across controllers, how do you feel about putting it at the model level?

@codeforamerica codeforamerica deleted a comment from github-actions bot Jan 24, 2025
@codeforamerica codeforamerica deleted a comment from github-actions bot Jan 24, 2025
end
end

context "without a chosen address" do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain the case when this would happen where a post to update would occur & we wouldn't want to lock them out?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handles the case where the user is hits submit without selecting an addresss


access_log = StateFileArchivedIntakeAccessLog.last
expect(access_log.state_file_archived_intake_request).to eq(current_request)
expect(access_log.event_type).to eq("correct_mailing_address")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a test verifying that the session data has been updated?

Copy link
Contributor

@anisharamnani anisharamnani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @DrewProebstel! this is a monster of a PR, and therefore a difficult challenge. thank you for handling this!

@DrewProebstel DrewProebstel merged commit a2ef1e5 into main Jan 28, 2025
7 checks passed
@DrewProebstel DrewProebstel deleted the FYST-1519-create-library-of-random-az-ny-addresses-selection-logic branch January 28, 2025 19:51
Copy link

sentry-io bot commented Jan 30, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ SignalException: SIGTERM (SignalException) stats:track_metrics View Issue
  • ‼️ SignalException: SIGTERM (SignalException) stats:track_metrics View Issue

Did you find this useful? React with a 👍 or 👎

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.

4 participants