Feature/1886 Volunteer receives SMS to notify of follow up generated by admin or supervisor#3738
Merged
compwron merged 12 commits intorubyforgood:mainfrom Jul 8, 2022
Merged
Conversation
…ave a phone number if sms preference is picked)
compwron
reviewed
Jul 6, 2022
| notifications/followup_notification.rb | ||
| notifications/followup_resolved_notification.rb | ||
| notifications/youth_birthday_notification.rb | ||
| notifications/delivery_methods/sms.rb |
Collaborator
There was a problem hiding this comment.
ideally let's not add to the skipped tests file
Collaborator
Author
There was a problem hiding this comment.
For sure. I'm beginning to figure out how this could be tested, which will hopefully lay the groundwork for testing the other notifications in .allow_skipping_tests
compwron
reviewed
Jul 6, 2022
| deliver_by :database | ||
| # deliver_by :email, mailer: "UserMailer" | ||
| # deliver_by :email, mailer: "UserMailer", if: :email_notifications? | ||
| # deliver_by :sms, class: "DeliveryMethods::Sms", if: :sms_notifications? |
Collaborator
There was a problem hiding this comment.
is this supposed to be commented out?
Collaborator
Author
There was a problem hiding this comment.
Yes, the email one was commented out when I started this. https://github.com/rubyforgood/casa/pull/1612/files is the email and database pr
Collaborator
Author
There was a problem hiding this comment.
Also the "noticed gem" was first added here #1611
compwron
approved these changes
Jul 6, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What github issue is this PR for, if any?
Resolves #1886
What changed, and why?
Admins and Supervisors can send SMS messages to notify volunteers about case contact follow-ups
delivery_methods/sms.rbtofollowup_notification.rbsms_notifications?andemail_notifications?before corresponding deliveriesvalid_phone_number_if_receive_sms_notificationsto ensure users add aphone numberthat will receive SMSsSmsBodyHelperto store message bodiesHow will this affect user permissions?
How is this tested? (please write tests!) 💖💪
Previous tests:
Follow-up tests→ spec/system/users/edit_spec.rbTwilio delivery tests→ spec/services/twilio_service_spec.rbShort.io tests→ spec/services/short_url_service_spec.rbNew test:
Ensure a valid phone number is required before users select the receive SMS preference →
edit_spec.rbRemoved tests in:
→ spec/lib/tasks/case_contact_types_reminder_spec.rb
→ spec/lib/tasks/no_contact_made_reminder_spec.rb
They were removed because Volunteers can no longer have the SMS preference without
firstadding a phone numberScreenshots please :)
send-followup-sms.mov