public
public copied to clipboard
[Admin Tool Feature]: Script to enhance test data for recipient app
Is there an existing request for this feature?
- [X] I have searched the existing issues
Is your feature request related to a problem? Please describe.
Testing the recipient app is challenging due to the lack of comprehensive test data. Currently, we have the ability to mark recipients as "test recipients":
This flag is already leveraged to exclude them from the transparency page calculations (e.g., when tallying the actual number of recipients, test recipients are omitted).
Describe the solution/feature
However, to enhance our testing capabilities, the following test data scenarios need to be improved:
- Payments with various statuses (e.g., completed, pending, failed) spanning past, present, and future dates.
- Surveys with diverse statuses (e.g., open, closed, in progress) across past, present, and future timelines.
Since testing is closely connected to the timeline, it makes sense to have the ability to rewrite the above data, rather than it being fixed in the data seed.
If the script is launched it should:
For every recipient that is flagged as a test user (and ONLY for them) a) erase existing surveys and add the following:
-
onboarding
survey in the past -
checking-1
in the past -
checking-2
is due today -
checking-3
due in the future ... -
offboarding
due in the future
b) erase existing payments and add the following:
- 700 SLE, Payment date: last month on 15th, Status: confirmed
- 700 SLE, Payment date: current month on 15th, Status: paid
- 700 SLE, Payment date: next month on 15th, Status: created
Describe alternatives you've considered
No response
Criteria for Completion
- write a script that creates the survey and payment entries
- add the to the collection of admin scripts in the admin tool (when pressed it should launch the script)
Anything else?
No response
Code of Conduct
- [X] I've read the Code of Conduct and understand my responsibilities as a member of the Social Income community