feat: add a line item to an order edit (#2243)
**What**
- Implement adding a line item to order (edit)
**How**
- _by implementing the following "flow"_
- generate a line item
- computing line item adjustments for that line item
- creating tax lines
- creating a change record
**Testing**
- **_integration tests_**
- check if line item and order item change objects are created (with correct tax lines)
- line item adjustments are generated if
- fixed discount is applied to cart
- percentage discount is applied
- **_unit tests_**
- ensure that methods from Inventory, LineItem, LineItemAdjustment etc. services are called
---
RESOLVES CORE-495
This commit is contained in:
1 parent
474e97252c
commit
884f36e8a8
19 files changed
+679
-80
No files matched your search
@@ -4,7 +4,6 @@ import LineItemService from "../line-item"
|
||||
import { PricingServiceMock } from "../__mocks__/pricing"
|
||||
import { ProductVariantServiceMock } from "../__mocks__/product-variant"
|
||||
import { RegionServiceMock } from "../__mocks__/region"
|
||||
|
||||
;[true, false].forEach((isTaxInclusiveEnabled) => {
|
||||
describe(`tax inclusive flag set to: ${isTaxInclusiveEnabled}`, () => {
|
||||
describe("LineItemService", () => {
|
||||
|
||||
Reference in new issue
Block a user