Skip to content

Added the unit test for the user favorites starclick functionality#1714

Open
nessasmithhh wants to merge 7 commits into
feat/new-dashboardfrom
feat/WP-709--react_dashboard
Open

Added the unit test for the user favorites starclick functionality#1714
nessasmithhh wants to merge 7 commits into
feat/new-dashboardfrom
feat/WP-709--react_dashboard

Conversation

@nessasmithhh

Copy link
Copy Markdown

Overview

I added in the unit test for the users favorites star-click functionality; it covers adding a favorite, listing favorites, and removing favorites via the UserFavoriteList and RemoveFavoriteTool endpoints. It also includes test for the missing tool_id error case on both add and remove.

PR Status

  • Ready.
  • Work in Progress.
  • Hold.

Related Links

https://tacc-main.atlassian.net/browse/WP-1013
https://tacc-main.atlassian.net/browse/WP-1009

Summary of Changes

Added TestUserFavoritesApiViews to designsafe/apps/workspace/tests.py, covering the user-favorites/ and user-favorites/remove/ endpoints: adding a favorite, listing favorites, removing a favorite, and the missing-tool_id 400 error case for both add and remove.

Testing Steps

  1. Make sure the des_django docker container is running
  2. Run : docker exec -it des_django pytest -ra designsafe/apps/workspace/tests.py::TestUserFavoritesApiViews
  3. Confirm that all 5 of the test pass

UI

Notes

@fnets fnets left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tests lgtm! Great work, Vanessa! Been trying to make our backend test github actions compatible with this branch but haven't been able to get it yet.

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.

2 participants