From ed4ad819dcf30c21c05d60677789a23d9959120f Mon Sep 17 00:00:00 2001 From: naomi Date: Thu, 9 Sep 2021 18:35:29 +0200 Subject: [PATCH 1/2] Update 'manual_tests.md' --- manual_tests.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/manual_tests.md b/manual_tests.md index 0ee4694..57bb39c 100644 --- a/manual_tests.md +++ b/manual_tests.md @@ -16,3 +16,15 @@ ## Tests for JS code in js/edit_client.js * The subtypes dropdown should be populated according to the existing value of the types dropdown. E.g. save a client as "licensed premises" type and reopen; the subtypes should be a list including "Pub or Bar" * The status dropdown should be populated according to the existing value of the substatuses dropdown. E.g. save a client as substatus "One-off Training" and reopen; the status should be set to "Confirmed" and it should not be possible to change it. + +# Automatic client status +## Tests for presave hook in goodnightout_opencase.module + +* Setup a client with status "Lead" and give it multiple trainings +* Set some but not all of the trainings to status "post training materials sent" +* The status of the client should not change +* Set all the remaining trainings to status "post training materials sent" +* This should automatically set the client status to "Accredited" and their substatus to "Recently Accredited" + + + From c21725340cb63b8177c44cda0bafddeed1101ac9 Mon Sep 17 00:00:00 2001 From: naomi Date: Thu, 9 Sep 2021 20:15:01 +0200 Subject: [PATCH 2/2] Update 'manual_tests.md' --- manual_tests.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/manual_tests.md b/manual_tests.md index 57bb39c..c7ab09e 100644 --- a/manual_tests.md +++ b/manual_tests.md @@ -27,4 +27,16 @@ * This should automatically set the client status to "Accredited" and their substatus to "Recently Accredited" +# Email notification +## Tests for mail hook and post-save hook in goodnightout_opencase.module + +* Change a client's status from something else to "3-month followup due" - the site admin should receive an email about it with "3-month followup due for " as the subject and a link to the client in the body +* Same for 6-month +* Same for the substatus that is just "follow-up due" +* Should not happen when client is saved without changing status +* Should not happen when status is changed to something else +* Create new clients with those substatuses - notification should happen + + +