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

[#1734] Add Implementation Status to Court Mandates #1908

Conversation

rhian-cs
Copy link
Contributor

@rhian-cs rhian-cs commented Apr 5, 2021

What github issue is this PR for, if any?

Resolves #1734

What changed, and why?

Court mandates now have an "implementation status" field. Only admins and supervisors can add or edit this field from a given court mandate, but volunteers can still see this field.

Acceptance criteria:

  • Only supervisors can edit implementation status.
  • Implementation status should display as a dropdown menu, with the following items in it:
    • not implemented
    • partially implemented
    • implemented
  • When nothing is selected in the dropdown menu, the default (first item) should be: set implementation status
  • On desktop web, implementation status should appear to the right of each court mandate.
  • On mobile web, implementation status should appear underneath each court mandate.

How will this affect user permissions?

  • Volunteer permissions: Can now see (but not add/edit) case mandates implementation status.
  • Supervisor permissions: Can now add and edit implementation status of case mandates
  • Admin permissions: Can now add and edit implementation status of case mandates

How is this tested? (please write tests!) 💖💪

Automated specs:

I basically expanded on the specs I've created in #1802.
I tested whether or not admins, supervisors and volunteers could see, add, or edit the implementation status of court mandates.

Manual testing

Admin/Supervisor:
  1. Login as admin/supervisor
  2. Go to the cases page, choose a case and click Edit
  3. Click "Add a court mandate"
    • Check if the text area and select box show up
    • Check if the select area has the correct fields
    • Check if the select area is displayed beside the text area in desktop
    • Check if it is displayed below the text area in mobile, with enough space between the court mandates to avoid confusion
    • Add more court mandates to check the same conditions but with other court mandates
  4. Click "Update CASA Case"
    • Check if the saved court mandate fields show up with the same info as before
    • Check if it looks the same as before, but now with a delete button alongside the fields
Volunteer:
  1. Login as volunteer
  2. Go to the cases page, choose a case that has court mandates and click Edit
    • Check if the disabled text area shows up
    • Check if a text with "Status: [status name]" shows up for each court mandate
    • Check if the implementation status text displays correctly in both desktop and mobile

Screenshots please :)

Admin/Supervisor view

Adding a new court mandate
01-edit-desktop

Saving it and adding a new one
02-more-desktop

Select options
03-select-desktop

Mobile view
04-mobile

Volunteer view

Desktop view
05-volunteer-desktop

Mobile view
06-volunteer-mobile

@github-actions github-actions bot added javascript for use by Github Labeler to mark pull requests that update Javascript code ruby Pull requests that update Ruby code Tests! 🎉💖👏 labels Apr 5, 2021
@compwron
Copy link
Collaborator

compwron commented Apr 5, 2021

Very cool!!!
The filing spec looks like a flake and unrelated to this PR, we should fix that in a later PR
rspec ./spec/system/case_contacts/new_spec.rb:135 # case_contacts/new volunteer user is successful

@compwron compwron merged commit 6d23af9 into rubyforgood:main Apr 5, 2021
@rhian-cs rhian-cs deleted the 1734-add-implementation-status-to-court-mandates branch May 27, 2021 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript for use by Github Labeler to mark pull requests that update Javascript code ruby Pull requests that update Ruby code Tests! 🎉💖👏
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add court mandate implementation status to Edit CASA Case page
2 participants