-
-
Notifications
You must be signed in to change notification settings - Fork 479
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
[#1739] Add court details to past court dates #2080
[#1739] Add court details to past court dates #2080
Conversation
Exciting! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is looking great! Please don't merge until I get a chance to look it over in more depth tonight :)
Please fix the failing test :)
https://github.com/rubyforgood/casa/pull/2080/checks?check_run_id=2669068108 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! :)
Hi @compwron , I'm mentoring @rhian-cs in his open sources. He usually give me context about the issues he's working on, and I review his code to help him. |
Very cool :) |
…date and create #show page for this resource
5376f33
to
c498889
Compare
My bad, it was working locally so I thought it was just a flake. Disabling bullet for the spec fixed it though. |
As per our stakeholder meeting today, we do NOT want to wipe court mandates when a court date passes, because the mandates often stay the same. Also on a technical level, it does not yet seem useful to save a snapshot of old court mandates when a court report rolls over to the past. Maybe someday. |
let(:volunteer) { create(:volunteer, casa_org: organization) } | ||
let(:supervisor) { create(:supervisor, casa_org: organization) } | ||
|
||
permissions :show? do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are great tests, yay testing permissions :)
@@ -0,0 +1,25 @@ | |||
require "rails_helper" | |||
|
|||
RSpec.describe "/casa_cases/:casa_case_id/past_court_dates/:id", :disable_bullet, type: :request do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to start un-breaking bullet... we have way too many n+1s
https://github.com/flyerhzm/bullet
end | ||
|
||
let!(:formatted_date_with_details) { I18n.l(past_court_date_with_details.date, format: :full, default: nil) } | ||
let!(:formatted_date_without_details) { I18n.l(past_court_date_without_details.date, format: :full, default: nil) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather spell this out than reference the yaml- tests don't need to be as DRY as prod code. tests Should not test prod code by running other prod code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful :)
What github issue is this PR for, if any?
Resolves #1739
What changed, and why?
As requested in #1739, the past court dates now have a page of their own with additional information about the CASA case at the time, such as: judge, hearing type and court mandates.
The link to that page is available at the edit page of a given CASA case.
Acceptance Criteria
How will this affect user permissions?
The permissions to access the past court date page mirror the permissions to edit the associated case.
How is this tested? (please write tests!) 💖💪
Automated tests
Manual testing
I also had to test if the heroku scheduler task was working, so I modified a CASA case to:
And then I ran the scheduler task.
Screenshots please :)
The CASA case edit page now have links to the past court dates
Past court dates page (desktop)
Past court dates page (mobile top)
Past court dates page (mobile bottom)
To be honest I'm not a big fan of how the table looks in mobile, but I thought I shouldn't modify the global table style just for this alteration.