Xceptance / posters-demo-store

A simple e-commerce application for demoing load testing, test automation, and functional testing.
Apache License 2.0
5 stars 4 forks source link

MiniCart: title inconsistency #209

Open kqmpetenz opened 1 year ago

kqmpetenz commented 1 year ago

Issue 1: Wrong MiniCart title after adding item to empty cart.

Reproduce:

  1. make sure cart is empty
  2. add exactly 1 product to cart (ProductDetailPage)
  3. open MiniCart

When adding a new item to an empty shopping cart, the title of the MiniCart will be displayed wrongly by saying "1 ITEMS IN CART": 1 Only after updating the page by for example going to the CartPage, the title of the MiniCart will be displayed correctly: 2

Issue 2: Wrong MiniCart title after changing the quantity of a specific item on CartPage.

Reproduce:

  1. make sure cart is empty
  2. add exactly 1 product to cart (ProductDetailPage)
  3. change quantity of item in cart to more than 1
  4. open MiniCart

When changing the quantity of an item on the CartPage to something bigger than 1, the title of the MiniCart will be displayed wrongly by saying "5 ITEM IN CART": 3 Only updating the page fixes that issue as well. After going to any CategoryPage for example, the title of the MiniCart will then be displayed correctly: 4

freddyka commented 11 months ago

Issue not fixed for poster v2.1.

Note: 1.add 2 or more items to cart 2.remove them 3.add 1 item to cart --> display is now "1 items" not "item" issue is fixed after refreshing the page

error adding one item after 2 where inside minicart

EliasTatX commented 7 months ago

As of v2.2 this is still the case. Additional notes: the minicart is created based on a freemarker template in the html and that is only loaded on page load. The template sets the title to "item" if there is exactly 1 item in the cart if there are more or less items in there it uses the default line with "items" since that ("0 items in cart") would be the correct way to say it. The dynamic add to cart that shows the minicart pop up and makes it update without a reload is based on JavaScript and AJAX. We currently do not test in this script how many products in the cart the performed operation is going to result in and accordingly can't adjust the text. If requested this should not be complicated to implement but comes at a slight cost for performance.

EliasTatX commented 6 months ago

This ticket is a duplicate of already existing ticket #129