CartDisplay Discount Logic Test

Test Scenario:

Current Scenario: normal

Check the console for any warnings. Look for discount display behavior.

Test Product 1

£50

Test Product 2

£50

Order Summary

Subtotal£100
Heinrich Coupon Applied-£10
Buy One Get One (10% off)-£5
Total discount:-£15
ShippingCalculated at next step
Total£85
Including £NaN VAT

Expected Behaviors:

  • Normal: Shows BOGO amount (calculated from data) + coupon + total
  • Fallback Calculation: Shows BOGO amount (£5 = £20 total - £15 coupon)
  • Fallback Fails: Shows "Applied" + console warning (negative calculation)
  • No BOGO: Shows only regular discount + total discount
  • Zero Amount: Shows "Applied" instead of £0.00
  • Calculation Fails: Shows "Applied" for BOGO (no matching products)