-
Notifications
You must be signed in to change notification settings - Fork 8
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 respondent subject metadata to applet base info (M2-8164, M2-8026) #1646
fix: Add respondent subject metadata to applet base info (M2-8164, M2-8026) #1646
Conversation
`respondent_meta` is already generated in two places, and now it's also returned by the `/applets/{applet_id}/base_info` endpoint. So ensure consistent structure, created a static method for generating it in `SubjectsService`.
➡️ Preview environment failed to be destroyed |
❌ E2E tests failed |
@Phillipe-Bojorquez @egodoy-metalab I'm seeing failing E2E steps in my PR as well, but I don't understand why they're failing. I don't see actual failed tests, just odd errors like "Resource not accessible by personal access token" and "Resource not accessible by integration". Maybe a misconfiguration? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
You can see the failure report more easily here |
@Phillipe-Bojorquez thanks for the helpful pointer. It looks like some E2E tests are now failing because some tests against endpoints are using strict deep equality comparison checks, and my change in this PR adds new properties to each of these endpoint responses:
Separate to the above, it appears that that's another test that's failing that seems unlikely to be related to my work, "Add item to cart". What do I need to do to make sure it's tracked that the tests need to get fixed? Just tagging you and @egodoy-metalab? |
📝 Description
🔗 Jira Ticket M2-8164
🔗 Jira Ticket M2-8026
This change adds
respondentMeta
to the response forGET /applets/{applet_id}/base-info
to provide the Web App with the current respondent's subject ID, which is required to determine if a previous submission is a self-report in order to fix the bug reported by M2-8164.To note:
respondentMeta
is already provided in two other existing endpoints, but not by ones consumed by the Web App. To ensure uniformity of this data structure across all three endpoints, created a functionSubjectsService.to_respondent_meta
and reused it in all 3 places.Example response
🪤 Peer Testing
/applets/{applet_id}/base_info
request:Expected outcome: The response should include a
respondentMeta
object containingsubjectId
,nickname
, andtag
.