This repository has been archived on 2022-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
goodnightout_composer/manual_tests.md

51 lines
3.2 KiB
Markdown
Raw Normal View History

2021-09-08 16:21:05 +00:00
# Adding new client using the GUI
## Tests for GUI settings
* When adding a new client in the GUI, the status should default to Lead and the substatus to New Lead. (Setting: default values for those fields.)
* Neither the status nor the substatus dropdown should not contain a placeholder option such as "None" or "Select". (Setting: Required field)
## Tests for JS code in js/edit_client.js
* If you change the substatus, the status should automatically change accordingly (e.g. "One-off Training" -> "Confirmed", or "3-month follow-up due" -> "Accredited").
2021-09-08 17:31:25 +00:00
* You should not be able to change the status except by changing the substatus.
* Initially the client type should be "-None-" and the only thing in the subtypes dropdown should be "-None-" also.
2021-09-10 09:51:25 +00:00
* If you change the client type, the options in the subtype dropdown should populate accordingly (e.g. "Licensed Premises" -> a list including "Pub or Bar", or "Nightlife Organisation" -> a list including "Festival" and "Staffing Agency")
2021-09-08 17:31:25 +00:00
* The "-None-" option should always remain present in the subtypes dropdown.
2021-09-10 10:22:24 +00:00
# Linked clients
* Client screen should have a button to add a linked client
* When you click it it should take you to a screen saying "Add linked client" with an autocomplete box
* Add One
* You should then see the linked client in the list on the original client's screen
2021-09-10 10:23:49 +00:00
* Clink on the linked client's name in the list and you should see that the original client is in the list of linked clients for it (i.e. it is a symmetrical relation)
* The delete link in the list should work, i.e. remove the linked client from the list
2021-09-10 10:22:24 +00:00
2021-09-08 17:31:25 +00:00
# Editing a client using the GUI
## 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"
2021-09-10 10:10:05 +00:00
* 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 that should be the only option in the status dropdown.
2021-09-09 16:35:29 +00:00
# Automatic client status
## Tests for presave hook in goodnightout_opencase.module
2021-09-10 10:11:32 +00:00
* Setup a client with status "Lead" and give it multiple trainings - leave the training status as N/A.
2021-09-09 16:35:29 +00:00
* 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"
2021-09-09 18:15:01 +00:00
# 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 <client name>" 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
2021-09-09 16:35:29 +00:00