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/docs/manual_tests.md

137 lines
8.9 KiB
Markdown
Raw Normal View History

2021-09-12 08:05:38 +00:00
# First
- Log in as a user with the role "GNO Standard User".
2021-09-12 08:22:30 +00:00
# Client & training
2021-10-18 10:47:11 +00:00
- Go to Add New -> Client.
- Check that billing address fields are not there but there is a button to add them.
2021-11-10 16:35:19 +00:00
- Click the button and billing fields should appear.* Do not fill in the billing fields at this stage however.
2021-10-18 10:47:11 +00:00
- Upload a file to the Files field.
- Fill in all required fields and save. You should arrive at the screen for the client you just created.
2021-11-10 16:35:19 +00:00
- Click the Edit tab. The billing fields should be gone and the button shoud be there
- Add one or more billing fields, save and then click the edit tab again- all the billing fields should show, and not the button.
2021-10-18 10:47:11 +00:00
- You should be able to download the file you uploaded.
2021-09-12 08:05:38 +00:00
- On the client screen there is a button to add a training
2021-11-12 06:27:45 +00:00
- Click this and and fill in the required fields and save.
- On the training screen you can add trainers.
2021-11-10 16:35:19 +00:00
- Add 3 trainers:
2021-11-12 06:27:45 +00:00
- one with no rate (rate input should disappear), then change it to Standard and the box should appear and be disabled and grey and say 115, then change to custom and the box shuould clear and become editable, then input 400*. Save it and it should take you back to the Training screen. Click the trainer entry again and the rate type should say custom and the rate should say 400 and be editable.
- Change rate type to None, The rate box should disappear. Save and edit, should still be gone
- CHange it to Standard, the rate should populate and not be editable, save and edit, it should still be there and not be editable
2021-09-12 08:05:38 +00:00
# Umbrella client
- There is a button on the umbrella client screen to add a client
2021-11-10 16:35:19 +00:00
- After adding a client it shows up on the umbrella client's screen
2021-09-12 08:05:38 +00:00
- You can add a project to the umbrella client and it appears at the top of the list on the umbrella client screen
- You can add a training to the umbrella client and it appears at the top of the list on the umbrella client screen
- Add a training to the client who is attached to the umbrella client. It should show up on the umbrella client screen in the "Trainings for clients within this umrella" list.
2021-11-10 16:35:19 +00:00
---------------
STUFF BELOW HERE MIGHT BE ABLE TO BE DONE IN PYTEST
-----------------
- Adding a client creates one attached to that umbrella client and it immediately shows up in the client list for that umbrella client and also in "All clients", at the top of each
2021-09-12 08:05:38 +00:00
# Equal opps
- Should not be able to see the menu items for adding or listing EOs as GNO standard user
- Log in as the special user
- Create one
- It should appear in the All Equal Opps list
## 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").
* 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.
* 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")
* The "-None-" option should always remain present in the subtypes dropdown.
# 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
* 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
# 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"
* 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.
# Email notification
## Tests for mail hook and post-save hook in goodnightout_opencase.module
2021-09-17 10:03:05 +00:00
* Ensure there is a user with the role "Follow-up alerts" whose email address you have access to
* Change a client's status from something else to "3-month followup due" - said user 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
2021-09-12 08:05:38 +00:00
* Same for 6-month
2021-09-17 13:02:03 +00:00
* Should not happen when client is saved without changing substatus (even if another field is changed)
2021-09-12 08:05:38 +00:00
* Should not happen when status is changed to something else
2021-09-13 10:48:38 +00:00
# Automatic client status & accreditation date
## Tests for presave hook in goodnightout_opencase.module
* Setup a client with status "Lead" and give it multiple trainings - leave the training status as N/A.
* 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", their substatus to "Recently Accredited", and their Accreditation Date to today.
## Tests for cron hook in goodnightout_opencase.module
2021-11-10 16:35:19 +00:00
* Start with a client whose substatus is "Recently Accredited"
2021-09-13 10:48:38 +00:00
* Change the accreditation date to one that's more than 3 months in the past
* Run cron
* The status should change to 3-month follow-up due and an email alert should be sen
* Change the status to "3-month follow-up sent" and change the accreditation date to one that's more than 6 months in the past
* Run cron
* The status should change to 6-month follow-up due and an email alert should be sent
2021-09-12 08:05:38 +00:00
# Number of participants
* Create a debrief for a training and fill in "Number of participants".
* The number should appear on the training when you view it.
2021-09-12 08:37:32 +00:00
* Edit the debrief to set a different number - it should overwrite the number on the training
* Create another debrief - should also overwrite
* Delete a debrief - number on training should not change
2021-09-12 08:05:38 +00:00
# Total fees on a project
* Create a project and add some fees
2021-09-12 08:22:30 +00:00
* When you view the project the fees should be listed and also total fee should be displayed
2021-09-12 08:05:38 +00:00
* Edit it and change a fee, delete a fee, add a fee
* The total should update
2021-09-13 11:25:22 +00:00
* The project along with its total fee should appear in the All Projects list
2021-09-13 11:43:13 +00:00
## Unpublishing and deleting entities
### As a GNO Standard User
2021-09-13 13:53:29 +00:00
* There should be no delete tab on any entities (although you can delete links between clients)
* All these entities should a checkbox for whether they are published:
2021-11-10 16:35:19 +00:00
* Client / Umbrella Client
2021-09-17 14:06:35 +00:00
* Training / Project / Partner Organistion
2021-09-13 11:25:22 +00:00
* Train the trainer event
2021-09-17 14:06:35 +00:00
* Debrief / Evaluation
2021-09-17 14:17:27 +00:00
* Trainer
2021-11-10 16:35:19 +00:00
* List of trainings on client & umbrella client screens
2021-09-13 11:25:22 +00:00
* List of projects on client & umbrella client screens screen
* List of clients on umbrella client screens
2021-09-13 14:53:01 +00:00
* List of debriefs and evaluations on trainings screen
* Unpublished entities should not show up in any autocomplete fields. i.e.:
* Unpublished trainers should not come up as an option when filling in the trainer field on a training
* Unpublished clients should not come up as an option when filling in the client field of a training or a project, or when adding a linked client to another client
* Unpublished projects should not come up as an option when filling in the project field of a training
* Unpublished umbrella clients should not come up as an option when filling in the umbrella client field of a client
2021-09-13 11:43:13 +00:00
### As a GNO Admin user
2021-09-13 18:52:14 +00:00
* When you unpublish an entity you can still see it
2021-09-13 14:53:01 +00:00
* Unpublished entities should appear in all the lists, but in grey (and should not show up in autocomplete fields)
2021-09-13 11:43:13 +00:00
* You should be able to delete all entities
2021-09-17 12:18:35 +00:00
* When you delete a training it should warn you it's going to delete the debriefs and evaulations as well.
# Accredited Clients Block
* Block at the top of screen should show how many Clients of each type are Accredited - that is, with status Accredited or Reaccreditation Due
* When you change a client's status to or from one of these or add or delete a client with one of these statuses
2021-11-10 16:35:19 +00:00
* Unpublishing a client should remove them from the total and publishing them again should reinstate it.