feat: added tests for wishlist

This commit is contained in:
2025-01-02 11:29:45 +01:00
parent eed3905638
commit 7ef4d58ffa
9 changed files with 118 additions and 28 deletions
+11 -7
View File
@@ -6,12 +6,12 @@ from web.views.web import (
add_cart_item,
add_to_wishlist,
cart_detail,
category_view,
delete_cart_item,
delete_from_wishlist,
index,
manifest,
product_detail,
category_view,
)
app_name = "web"
@@ -21,26 +21,30 @@ urlpatterns = [
path("categories/<str:slug>/", category_view, name="category_view"),
path("products/<int:pk>/<str:slug>/", product_detail, name="product_detail"),
path("cart/", cart_detail, name="cart_detail"),
# users
path("login/", login, name="login"),
path("logout/", logout, name="logout"),
path("register/", register, name="register"),
path("reset-password/", reset_password, name="reset-password"),
path("my-account/", my_account, name="my_account"),
# components
path("web/components/products/", list_products, name="list_products"),
path("web/components/cart-dropdown/", cart_dropdown, name="cart_dropdown"),
path("web/components/cart/", cart, name="cart"),
path("web/components/wishlist-button/<int:pk>/", wishlist_button, name="wishlist_button"),
path(
"web/components/wishlist-button/<int:pk>/",
wishlist_button,
name="wishlist_button",
),
# api
path("web/add-cart-item/", add_cart_item, name="add_cart_item"),
path("web/delete-cart-item/<int:pk>/", delete_cart_item, name="delete_cart_item"),
path("web/add-to-wishlist/", add_to_wishlist, name="add_to_wishlist"),
path("web/delete-from-wishlist/<int:pk>/", delete_from_wishlist, name="delete_from_wishlist"),
path(
"web/delete-from-wishlist/<int:pk>/",
delete_from_wishlist,
name="delete_from_wishlist",
),
# manifest
path("manifest.json", manifest, name="manifest_json"),
]