[Admin Tool Feature]: Script to enhance test data for recipient app
Opened this issue · 0 comments
Is there an existing request for this feature?
- 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 pastchecking-1
in the pastchecking-2
is due todaychecking-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)
![Screenshot 2024-03-01 at 00 18 58](https://private-user-images.githubusercontent.com/6095849/309102118-2eae71b4-4efe-4c5f-90a7-a92c846770c5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU4MjU5NjYsIm5iZiI6MTcyNTgyNTY2NiwicGF0aCI6Ii82MDk1ODQ5LzMwOTEwMjExOC0yZWFlNzFiNC00ZWZlLTRjNWYtOTBhNy1hOTJjODQ2NzcwYzUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MDhUMjAwMTA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NjU1NjU3ZmYyM2NlNTkzODY4OTE0NWQwMzdkNjI0MTE5N2QzYWExYWE4OGRjZjJiYTNiNzNkZTFlNjZlODU5MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.izCT8SLgTdoSzm1oZ5JGcflyjyEgAm7p9ITHDYTGbLY)
Anything else?
No response
Code of Conduct
- I've read the Code of Conduct and understand my responsibilities as a member of the Social Income community