Files
medusa-store/integration-tests
Philip Korsholm 15d6f92964 Fix(medusa): Swaps in tax inclusive regions (#2557)
**What**
- Ensure that swaps can be created for orders with discounts in tax inclusive regions

**How**
- Retrieve cart with discounts and region before creating adjustments for line items in cart. 
  - In `discountService.calculateDiscountForLineItem` we used the method `totalsService.getLineItemTotals` if a line-item is tax inclusive. This method uses some fields from the cart that aren't populated on cart creation (such a `items` which caused the original error).

**Testing**
- add integration test `swaps > tax inclusive > "Complete swap flow with discount"` that creates a swap in the following environment
  - tax inclusive region 
  - tax inclusive line item to be swapped
  - fixed type discount with allocation: total

Fixes CORE-748
2022-11-07 10:47:26 +00:00
..
2022-02-24 20:14:09 +01:00