Refactor production and stock tests to remove UOM dependency
- Updated production.spec.ts, stock-adjustments.spec.ts, and stock-transfers.spec.ts to eliminate UOM references in API seeder and test cases. - Adjusted ApiSeeder methods to remove UOM parameters from stock receiving and production template creation. - Revised documentation to reflect changes in UOM handling, emphasizing that stock is counted in base UOM only. - Introduced new enums for MeasureUnit and StageQtyUnit to clarify content size and stage input quantities. - Implemented ItemContent service to validate and normalize content sizes. - Updated smoke tests to validate production stage inputs expressed in content units, ensuring correct consumption calculations. - Modified frontend UOM label handling to reflect the removal of per-line UOMs in document lines.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { test, expect, APIRequestContext } from "@playwright/test"
|
||||
import { ApiSeeder, newApiContext, Warehouse, Item, Uom, Vendor } from "../support/api"
|
||||
import { ApiSeeder, newApiContext, Warehouse, Item, Vendor } from "../support/api"
|
||||
import { StockTransferNewPage, StockTransferDetailPage } from "../pages/StockPages"
|
||||
|
||||
// Stock transfer flow (Backend/ERPCore/Controllers/StockTransfersController.cs, Frontend
|
||||
@@ -11,7 +11,6 @@ test.describe("Stock transfers", () => {
|
||||
let srcWarehouse: Warehouse
|
||||
let destWarehouse: Warehouse
|
||||
let vendor: Vendor
|
||||
let uom: Uom
|
||||
let item: Item
|
||||
|
||||
test.beforeAll(async () => {
|
||||
@@ -19,7 +18,6 @@ test.describe("Stock transfers", () => {
|
||||
seeder = new ApiSeeder(api)
|
||||
srcWarehouse = await seeder.firstWarehouse()
|
||||
destWarehouse = await seeder.secondWarehouse()
|
||||
uom = await seeder.firstUom()
|
||||
vendor = await seeder.createVendor()
|
||||
item = await seeder.createItem({ namePrefix: "Transfer Test Item" })
|
||||
|
||||
@@ -27,7 +25,7 @@ test.describe("Stock transfers", () => {
|
||||
warehouseId: srcWarehouse.warehouseId,
|
||||
vendorId: vendor.vendorId,
|
||||
itemId: item.itemId,
|
||||
uomId: uom.uomId,
|
||||
|
||||
qty: 50,
|
||||
unitCost: 15,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user