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

[WIP] Benefits disability migrate 0781 to lighthouse #18923

Closed

Conversation

ajones446
Copy link
Contributor

Note: Delete the description statements, complete each step. None are optional, but can be justified as to why they cannot be completed as written. Provide known gaps to testing that may raise the risk of merging to production.

Summary

  • This work is behind a feature toggle (flipper): YES/NO
  • (Summarize the changes that have been made to the platform)
  • (If bug, how to reproduce)
  • (What is the solution, why is this the solution?)
  • (Which team do you work for, does your team own the maintenance of this component?)
  • (If introducing a flipper, what is the success criteria being targeted?)

Related issue(s)

  • Link to ticket created in va.gov-team repo OR screenshot of Jira ticket if your team uses Jira
  • Link to previous change of the code/bug (if applicable)
  • Link to epic if not included in ticket

Testing done

  • New code is covered by unit tests
  • Describe what the old behavior was prior to the change
  • Describe the steps required to verify your changes are working as expected. Exclusively stating 'Specs run' is NOT acceptable as appropriate testing
  • If this work is behind a flipper:
    • Tests need to be written for both the flipper on and flipper off scenarios. Docs.
    • What is the testing plan for rolling out the feature?

Screenshots

Note: Optional

What areas of the site does it impact?

(Describe what parts of the site are impacted andifcode touched other areas)

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

Requested Feedback

(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

Copy link

github-actions bot commented Oct 17, 2024

1 Warning
⚠️ This PR changes 361 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, we recommend not exceeding
200. Expect some delays getting reviews.

File Summary

Files

  • app/sidekiq/evss/disability_compensation_form/submit_form0781.rb (+22/-9)

  • config/features.yml (+6/-0)

  • lib/disability_compensation/factories/api_provider_factory.rb (+2/-0)

  • lib/disability_compensation/providers/document_upload/lighthouse_supplemental_document_upload_provider.rb (+4/-5)

  • spec/lib/disability_compensation/factories/api_provider_factory_spec.rb (+23/-2)

  • spec/sidekiq/evss/disability_compensation_form/submit_form0781_spec.rb (+286/-2)

    Note: We exclude files matching the following when considering PR size:

    *.csv, *.json, *.tsv, *.txt, *.md, Gemfile.lock, app/swagger, modules/mobile/docs, spec/fixtures/, spec/support/vcr_cassettes/, modules/mobile/spec/support/vcr_cassettes/, db/seeds, modules/vaos/app/docs, modules/meb_api/app/docs, modules/appeals_api/app/swagger/, *.bru, *.pdf
    

Big PRs are difficult to review, often become stale, and cause delays.

Generated by 🚫 Danger

@va-vfs-bot va-vfs-bot temporarily deployed to benefits-disability-migrate-0781-to-lighthouse/main/main October 17, 2024 16:25 Inactive
@ajones446 ajones446 force-pushed the benefits-disability-migrate-0781-to-lighthouse branch from 48174aa to 259865f Compare October 18, 2024 22:00
@va-vfs-bot va-vfs-bot temporarily deployed to benefits-disability-migrate-0781-to-lighthouse/main/main October 18, 2024 22:03 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to benefits-disability-migrate-0781-to-lighthouse/main/main October 21, 2024 15:12 Inactive
@ajones446 ajones446 force-pushed the benefits-disability-migrate-0781-to-lighthouse branch from e90d846 to d050e9c Compare October 21, 2024 20:38
@va-vfs-bot va-vfs-bot temporarily deployed to benefits-disability-migrate-0781-to-lighthouse/main/main October 21, 2024 21:00 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to benefits-disability-migrate-0781-to-lighthouse/main/main October 21, 2024 21:48 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to benefits-disability-migrate-0781-to-lighthouse/main/main October 24, 2024 22:39 Inactive
@ajones446 ajones446 force-pushed the benefits-disability-migrate-0781-to-lighthouse branch from 326ae14 to 3362eab Compare October 25, 2024 15:47
@va-vfs-bot va-vfs-bot temporarily deployed to benefits-disability-migrate-0781-to-lighthouse/main/main October 25, 2024 16:04 Inactive
@ajones446 ajones446 force-pushed the benefits-disability-migrate-0781-to-lighthouse branch from 3362eab to 1360169 Compare October 28, 2024 16:11
@va-vfs-bot va-vfs-bot temporarily deployed to benefits-disability-migrate-0781-to-lighthouse/main/main October 28, 2024 16:28 Inactive
@ajones446 ajones446 force-pushed the benefits-disability-migrate-0781-to-lighthouse branch from 1360169 to 77f0ae9 Compare October 28, 2024 16:32
@va-vfs-bot va-vfs-bot temporarily deployed to benefits-disability-migrate-0781-to-lighthouse/main/main October 28, 2024 17:03 Inactive
@@ -184,6 +199,7 @@ def get_evss_claim_metadata(pdf_path, form_id)
end

def create_document_data(evss_claim_id, upload_data)
# AJ todo - should this be a LH doc?
Copy link
Contributor

Choose a reason for hiding this comment

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

The ApiProvider takes care of this under the hood but for BDD I left the original code outside of the killswitch toggle which does create an EVSSClaimDocument still

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, thanks! I'll leave it as is.

let(:path_to_0781a_fixture) { 'spec/fixtures/pdf_fill/21-0781a/simple.pdf' }
let(:sample_0781a_file_read) { File.read(path_to_0781a_fixture) }
let(:parsed_0781_form) { JSON.parse(submission.form_to_json(Form526Submission::FORM_0781))['form0781'] }
let(:parsed_0781a_form) { JSON.parse(submission.form_to_json(Form526Submission::FORM_0781))['form0781a'] }
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 just a personal opinion but I'd split the test setup and tests into separate context blocks for 0781 and 0781a to keep this a little more organized


allow_any_instance_of(LighthouseSupplementalDocumentUploadProvider).to receive(:generate_upload_document).and_return(lighthouse_0781_document)

allow(File).to receive(:delete).and_return(nil)
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 another one. Yeah I feel like it's such an anti pattern to have the test know all of these internal details/we have to maintain this, but I think it's just a problem with the design of all of the document uploads

@ajones446 ajones446 force-pushed the benefits-disability-migrate-0781-to-lighthouse branch from 77f0ae9 to 84c8363 Compare October 28, 2024 21:48
@va-vfs-bot va-vfs-bot temporarily deployed to benefits-disability-migrate-0781-to-lighthouse/main/main October 28, 2024 22:21 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to benefits-disability-migrate-0781-to-lighthouse/main/main October 29, 2024 20:31 Inactive
@ajones446 ajones446 force-pushed the benefits-disability-migrate-0781-to-lighthouse branch from 6daf82f to ee63b97 Compare October 30, 2024 21:32
@va-vfs-bot va-vfs-bot temporarily deployed to benefits-disability-migrate-0781-to-lighthouse/main/main October 30, 2024 21:38 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to benefits-disability-migrate-0781-to-lighthouse/main/main October 30, 2024 22:17 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants