Skip to content

[achievements] tests for recent_achievements on the UI frontend side#1496

Open
bensim0305 wants to merge 15 commits intodevfrom
achievements/recent_ac_ui_test
Open

[achievements] tests for recent_achievements on the UI frontend side#1496
bensim0305 wants to merge 15 commits intodevfrom
achievements/recent_ac_ui_test

Conversation

@bensim0305
Copy link
Contributor

This PR ensures coverage of PR #1257 . This PR also caught a bug where the "recent_achievements" function was not being called even on the user's own profile, so made the small fix in the user_achievements view to include the recent achievements. This test covers that the user achievement attributes are populating correctly on the frontend.

@bensim0305 bensim0305 added this to the 2025/Sprint 4 milestone May 24, 2025
@bensim0305 bensim0305 requested a review from jiayuew1 May 24, 2025 01:21
@bensim0305 bensim0305 self-assigned this May 24, 2025
@jiayuew1
Copy link
Contributor

The test worked out great! I just have a minor question regarding the recent achievements not being called.
It seems that PR #1257 does include recent achievements in both the if pk block and the final context dictionary.
Could you help confirm if there's anything I might be missing?

@bensim0305 bensim0305 changed the title Achievements/recent ac UI test [achievements] tests for recent_achievements on the UI frontend side May 24, 2025
@bensim0305
Copy link
Contributor Author

It looked like the if block is for when the user is viewing another user's profile, which then calls the recent_achievements function. In the else statement, it doesn't call the recent_achievements for viewing one's own recent achievements in the first "if-else" block. I noticed this error when testing, and the "recent_achivements" was not popping up when viewing their own profile.

Copy link
Contributor

@jiayuew1 jiayuew1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the explanation !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants