waheebh1 / online-bookstore

0 stars 4 forks source link

book recommendations + tests #81

Closed waheebhashmi closed 10 months ago

thanujasiva commented 10 months ago

Do the recommendations only show up for one user?

For example, I created user1 and user2.

  1. user1 buys "To Kill a Mockingbird" and "Go Set a Watchman"
  2. user2 buys "To Kill a Mockingbird" and "The Kite Runner"

After they both checkout, I'm seeing only user1 with recommendations ("To Kill a Mockingbird" and "The Kite Runner")

user2 does not have any recommendations, but I would have expected these: "To Kill a Mockingbird" and "Go Set a Watchman"

waheebhashmi commented 10 months ago

Do the recommendations only show up for one user?

For example, I created user1 and user2.

  1. user1 buys "To Kill a Mockingbird" and "Go Set a Watchman"
  2. user2 buys "To Kill a Mockingbird" and "The Kite Runner"

After they both checkout, I'm seeing only user1 with recommendations ("To Kill a Mockingbird" and "The Kite Runner")

user2 does not have any recommendations, but I would have expected these: "To Kill a Mockingbird" and "Go Set a Watchman"

Im not sure if this is how its supposed to be, but here is how I tested it:

Created user1

user1 buys "To Kill a Mockingbird" and "Go Set a Watchman"

register user2, login

user2 has "To Kill a Mockingbird" and "Go Set a Watchman" recommended

waheebhashmi commented 10 months ago

Do the recommendations only show up for one user? For example, I created user1 and user2.

  1. user1 buys "To Kill a Mockingbird" and "Go Set a Watchman"
  2. user2 buys "To Kill a Mockingbird" and "The Kite Runner"

After they both checkout, I'm seeing only user1 with recommendations ("To Kill a Mockingbird" and "The Kite Runner") user2 does not have any recommendations, but I would have expected these: "To Kill a Mockingbird" and "Go Set a Watchman"

Im not sure if this is how its supposed to be, but here is how I tested it:

Created user1

user1 buys "To Kill a Mockingbird" and "Go Set a Watchman"

register user2, login

user2 has "To Kill a Mockingbird" and "Go Set a Watchman" recommended

oh, i think i found out the bug. Whenever another user adds to cart, the recommended books disappear. This is because recommendBooks is only called when the listAvailableBooks is called and not when the addToCart and removeFromCart is executed