vets-api
vets-api copied to clipboard
Add VeteranOnboardings controller and specs
Summary
This PR concludes the first pass at creating logic to implement "Veteran Onboarding" functionality on VA.gov.
When a veteran first signs in to VA.gov after verifying their identity, we will show them a helpful onboarding screen in order to guide them through the process of understanding what resources are available to them, what benefits they can apply for, etc.
Currently the logic here is very sparse: We only store a boolean value, "display the onboarding page?". This will be reflected in a UI element - when the user toggles that element, the front-end client will fire off a request to the new rails controller created in this PR. The next time they log in, the behavior of the Onboarding component will be altered.
In the future, additional functionality will be added, and this controller will be used to record that. For example a user may start on their phone and then switch to a desktop computer. Their progress would be saved and the user could pick back up where they left off.
-
This work is behind a feature toggle (flipper): YES/NO
Yes, this work is behind the feature toggle implemented in PR 16573 (
veteran_onboarding_beta_flow
). This feature toggle will initially be enabled for a subset of beta users and stakeholders - (Summarize the changes that have been made to the platform) This PR adds a new controller and route, exposing an API to the front-end client so we can record information about the user's onboarding preferences/state
- (If bug, how to reproduce) Not a bug
- (What is the solution, why is this the solution?)
- (Which team do you work for, does your team own the maintenance of this component?) I work for the VA-IIR team, and we own this component
-
(If introducing a flipper, what is the success criteria being targeted?)
veteran_onboarding_beta_flow
will be a long-running feature toggle, and will exist until we are ready to deploy the new onboarding experiences to all new veterans. "Success" will be a yet-to-be-defined MVP
Related issue(s)
Testing done
- [x] New code is covered by unit tests
- Describe what the old behavior was prior to the change Functionality did not exist
- 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 or Grafana (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?
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file:
Error: A file (or its parent directories) was deleted but its reference still exists in CODEOWNERS. Please update the .github/CODEOWNERS file and delete the entry for the Offending file:
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file:
Error: A file (or its parent directories) was deleted but its reference still exists in CODEOWNERS. Please update the .github/CODEOWNERS file and delete the entry for the Offending file:
Ugh the CODEOWNERS warnings bug me :D
Wondering if this all should go inside the modules/
directory instead of the app/
directory with this being new functionality? Am I remembering correctly that modules/
is supposed to hold the new code?
Wondering if this all should go inside the
modules/
directory instead of theapp/
directory with this being new functionality? Am I remembering correctly thatmodules/
is supposed to hold the new code?
Hmm that's an interesting question. I will ask Trevor Bosaw, as he has reviewed my previous PRs in this project.
Wondering if this all should go inside the
modules/
directory instead of theapp/
directory with this being new functionality? Am I remembering correctly thatmodules/
is supposed to hold the new code?Hmm that's an interesting question. I will ask Trevor Bosaw, as he has reviewed my previous PRs in this project.
So after conversation with Trevor, he suggested I do it the "old way" and that if/when the functionality grows to a certain point where it really feels like it's "its own app", we can make the move.
Honestly I'm not sure that this project will actually ever grow to that point. I really appreciate you bringing this to my attention, Kyle!
Error: A file (or its parent directories) was deleted but its reference still exists in CODEOWNERS. Please update the .github/CODEOWNERS file and delete the entry for the Offending file:
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file:
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/controllers/v0/veteran_onboardings_controller.rb
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/controllers/v0/veteran_onboardings_controller.rb
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: app/controllers/v0/veteran_onboardings_controller.rb
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: spec/controllers/v0/veteran_onboardings_controller_spec.rb
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: spec/factories/veteran_onboardings.rb
Error: A file (or its parent directories) does not have a CODEOWNERS entry. Please update the .github/CODEOWNERS file and add the entry for the Offending file: spec/factories/veteran_onboardings.rb