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

Enable NAAAR creation on backend #11911

Merged
merged 6 commits into from
Nov 6, 2024
Merged

Enable NAAAR creation on backend #11911

merged 6 commits into from
Nov 6, 2024

Conversation

gmrabian
Copy link
Contributor

@gmrabian gmrabian commented Nov 4, 2024

Description

NAAAR infrastructure is already in place. We just need to remove some code-level checks that were blocking creation.

  • Add simplified version of first page so we have fields to validate (will error without anything to validate)
  • Add check in create flow to disallow creation if flag is disabled and test
  • Remove error throw from NAAAR flow and instead import template
  • Add NAAAR as a payload option for frontend create preparation
  • Update NAAAR creation modal to have field that is part of report (temporary)

The NAAAR dashboard page is behind a flag so you can only get to this flow when it is enabled

Related ticket(s)

CMDCT-4095


How to test

  • Run app or open deployed branch
  • Log in as a state user
  • Navigate to NAAAR dashboard
  • Click button to create NAAAR, fill out modal, submit
  • Verify it created a NAAAR!

To test case when feature flag is disabled:

  • Change naaarReport variable from useFlags to false and verify the creation flow errors with a 400

Notes

I had to make some updates to the frontend flow and add fields to the naaar report json. It makes testing this more logical but still leaves the remainder of the work open for other teammates :)


Pre-review checklist

  • I have added thorough tests, if necessary
  • I have updated relevant documentation, if necessary
  • I have performed a self-review of my code
  • I have manually tested this PR in the deployed cloud environment

Pre-merge checklist

Review

  • Design: This work has been reviewed and approved by design, if necessary
  • Product: This work has been reviewed and approved by product owner, if necessary

@gmrabian gmrabian changed the title Cmdct 4095 newnaaar Enable NAAAR creation on backend Nov 4, 2024
@gmrabian gmrabian marked this pull request as ready for review November 4, 2024 16:03
@gmrabian gmrabian added ready for review Ready for all the reviews! design review Waiting for design review product review Waiting for product review labels Nov 4, 2024
karla-vm
karla-vm previously approved these changes Nov 4, 2024
@gmrabian gmrabian removed design review Waiting for design review product review Waiting for product review labels Nov 4, 2024
jessabean
jessabean previously approved these changes Nov 4, 2024
Copy link
Contributor

@jessabean jessabean left a comment

Choose a reason for hiding this comment

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

🙌🏻

Copy link
Contributor

@bangbay-bluetiger bangbay-bluetiger left a comment

Choose a reason for hiding this comment

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

Suggested change related to update made in my PR, but I can also make the change in my PR after merge.

services/app-api/forms/naaar.json Outdated Show resolved Hide resolved
Co-authored-by: Bangbay Siboliban <[email protected]>
Copy link

codeclimate bot commented Nov 6, 2024

Code Climate has analyzed commit 8df61dc and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (90% is the threshold).

This pull request will bring the total coverage in the repository to 96.7% (0.0% change).

View more on Code Climate.

@gmrabian gmrabian merged commit 657eaf1 into main Nov 6, 2024
17 checks passed
@gmrabian gmrabian deleted the cmdct-4095-newnaaar branch November 6, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Ready for all the reviews!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants