Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add PDP support for limited account respondents (M2-8092) #1654

Merged
merged 5 commits into from
Nov 13, 2024

Conversation

farmerpaul
Copy link
Contributor

@farmerpaul farmerpaul commented Nov 7, 2024

  • Tests for the changes have been added

📝 Description

🔗 Jira Ticket M2-8092

Fixes responses to the below endpoints consumed by PDP By Participant tab to account for limited accounts possibly having submissions in the database done on their behalf via Take Now:

  • GET /activities/applet/{applet_id}/respondent/{subject_id}
  • GET /subjects/respondent/{subject_id}/activity-or-flow/{activity_or_flow_id}

🪤 Peer Testing

  1. Connect your Admin App connected to this branch of the BE
  2. Create an applet with an activity and/or flow, and add a limited account from the Participants tab.
  3. For any activity or flow, perform Take Now, providing the limited account for the Who will be providing the responses? dropdown, and any participants for the Who will be inputting the responses? and Who are the responses about? dropdowns.
  4. Complete the assessment in the Web App so that there is at least one submission by the limited account as the respondent.
  5. In the Admin App, use DevTools to figure out the applet ID, subject ID of the limited account, and the activity/flow ID of the activity/flow for which you performed take now.
  6. Open your local Swagger UI and authenticate your session as an admin account.
  7. From the Swagger UI, call these endpoints providing the above IDs:
    • GET /activities/applet/{applet_id}/respondent/{subject_id}
    • GET /subjects/respondent/{subject_id}/activity-or-flow/{activity_or_flow_id}
      Expected outcome: Each endpoint succeeds with a valid response, and each resulting array contains at least one entry.

Fixes responses to endpoints consumed by PDP By Participant screen to
account for limited accounts possibly having submissions in the database
done on their behalf via Take Now.
Copy link

github-actions bot commented Nov 7, 2024

➡️ Preview environment failed to be destroyed

Copy link

github-actions bot commented Nov 7, 2024

❌ E2E tests failed

src/apps/activities/tests/test_activities.py Outdated Show resolved Hide resolved
src/apps/subjects/tests/tests.py Outdated Show resolved Hide resolved
@sultanofcardio
Copy link
Contributor

@egodoy-metalab and @Phillipe-Bojorquez tagging you for your attention to the failing E2E tests

@sultanofcardio sultanofcardio merged commit a6c9da6 into develop Nov 13, 2024
14 of 17 checks passed
@sultanofcardio sultanofcardio deleted the fix/M2-8092-pdp-support-limited-respondents branch November 13, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants