Skip to content
GitHub Actions / Jest Tests succeeded Oct 11, 2024 in 1s

45 passed, 0 failed and 0 skipped

Tests passed successfully

✅ ./test-reports/junit.xml

45 tests were completed in 4s with 45 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Auth Controller 3✅ 384ms
CartStatus Controller 6✅ 2s
Category Controller 5✅ 2s
Notifications Controller 3✅ 522ms
Orders Controller 4✅ 555ms
OrderStatus Controller 6✅ 2s
PaymentMethods Controller 6✅ 572ms
Product Controller 3✅ 489ms
ShoppingCart Controller 3✅ 488ms
UserLikedProducts Controller 6✅ 606ms

✅ Auth Controller

Auth Controller should return a token for valid credentials
  ✅ Auth Controller should return a token for valid credentials
Auth Controller should return 401 for invalid credentials
  ✅ Auth Controller should return 401 for invalid credentials
Auth Controller should return 201 for succesfully register user
  ✅ Auth Controller should return 201 for succesfully register user

✅ CartStatus Controller

CartStatus Controller should retrieve all cart statuses
  ✅ CartStatus Controller should retrieve all cart statuses
CartStatus Controller should retrieve a cart status by ID
  ✅ CartStatus Controller should retrieve a cart status by ID
CartStatus Controller should return 404 if cart status not found
  ✅ CartStatus Controller should return 404 if cart status not found
CartStatus Controller should create a new cart status
  ✅ CartStatus Controller should create a new cart status
CartStatus Controller should update an existing cart status
  ✅ CartStatus Controller should update an existing cart status
CartStatus Controller should perform a soft delete on a cart status
  ✅ CartStatus Controller should perform a soft delete on a cart status

✅ Category Controller

Category Controller should retrieve a category by ID
  ✅ Category Controller should retrieve a category by ID
Category Controller should return 404 if category not found
  ✅ Category Controller should return 404 if category not found
Category Controller should create a new category
  ✅ Category Controller should create a new category
Category Controller should update an existing category
  ✅ Category Controller should update an existing category
Category Controller should perform a soft delete on a category
  ✅ Category Controller should perform a soft delete on a category

✅ Notifications Controller

Notifications Controller should retrieve notifications by userID
  ✅ Notifications Controller should retrieve notifications by userID
Notifications Controller should return 404 if no notifications found for the user
  ✅ Notifications Controller should return 404 if no notifications found for the user
Notifications Controller should create a new notification
  ✅ Notifications Controller should create a new notification

✅ Orders Controller

Orders Controller should create an order from an existing shopping cart
  ✅ Orders Controller should create an order from an existing shopping cart
Orders Controller should retrieve all orders with details
  ✅ Orders Controller should retrieve all orders with details
Orders Controller should retrieve orders by user
  ✅ Orders Controller should retrieve orders by user
Orders Controller should soft delete an order
  ✅ Orders Controller should soft delete an order

✅ OrderStatus Controller

OrderStatus Controller should return a list of order statuses
  ✅ OrderStatus Controller should return a list of order statuses
OrderStatus Controller should return a specific order status by ID
  ✅ OrderStatus Controller should return a specific order status by ID
OrderStatus Controller should return 404 if order status is not found
  ✅ OrderStatus Controller should return 404 if order status is not found
OrderStatus Controller should create a new order status
  ✅ OrderStatus Controller should create a new order status
OrderStatus Controller should update an existing order status
  ✅ OrderStatus Controller should update an existing order status
OrderStatus Controller should perform a soft delete on order status
  ✅ OrderStatus Controller should perform a soft delete on order status

✅ PaymentMethods Controller

PaymentMethods Controller should return a list of payment methods
  ✅ PaymentMethods Controller should return a list of payment methods
PaymentMethods Controller should return a single payment method by ID
  ✅ PaymentMethods Controller should return a single payment method by ID
PaymentMethods Controller should return 404 if payment method is not found
  ✅ PaymentMethods Controller should return 404 if payment method is not found
PaymentMethods Controller should create a new payment method
  ✅ PaymentMethods Controller should create a new payment method
PaymentMethods Controller should update an existing payment method
  ✅ PaymentMethods Controller should update an existing payment method
PaymentMethods Controller should soft delete a payment method
  ✅ PaymentMethods Controller should soft delete a payment method

✅ Product Controller

Product Controller should create a new product
  ✅ Product Controller should create a new product
Product Controller should update an existing product
  ✅ Product Controller should update an existing product
Product Controller should soft delete a product
  ✅ Product Controller should soft delete a product

✅ ShoppingCart Controller

ShoppingCart Controller should add a product to the cart or create a new cart if none exists
  ✅ ShoppingCart Controller should add a product to the cart or create a new cart if none exists
ShoppingCart Controller should retrieve the active cart for a user
  ✅ ShoppingCart Controller should retrieve the active cart for a user
ShoppingCart Controller should remove a product from the cart and mark the cart as inactive if empty
  ✅ ShoppingCart Controller should remove a product from the cart and mark the cart as inactive if empty

✅ UserLikedProducts Controller

UserLikedProducts Controller should mark a product as liked by the user
  ✅ UserLikedProducts Controller should mark a product as liked by the user
UserLikedProducts Controller should not allow a product to be liked twice by the same user
  ✅ UserLikedProducts Controller should not allow a product to be liked twice by the same user
UserLikedProducts Controller should remove a like from a product
  ✅ UserLikedProducts Controller should remove a like from a product
UserLikedProducts Controller should return 404 if trying to remove a like that does not exist
  ✅ UserLikedProducts Controller should return 404 if trying to remove a like that does not exist
UserLikedProducts Controller should retrieve all products liked by the user
  ✅ UserLikedProducts Controller should retrieve all products liked by the user
UserLikedProducts Controller should return 404 if user is not found when fetching liked products
  ✅ UserLikedProducts Controller should return 404 if user is not found when fetching liked products