# Lots multiwarehouse spec validation - 2026-05-05

Validated on local environment `http://demo.enterfarmaplus.test`.

Files reviewed:
- `tests/e2e/lots-multiwarehouse.spec.js`
- `tests/e2e/lots-warehouse-real-chain.spec.js`

Conclusion:
- `lots-multiwarehouse.spec.js` is a skeleton and must not be used as final closure.
- It contains `test.skip(true, SKIP_REASON)` with reason `Pending fixture: multi-warehouse tenant with seeded presentations`.
- The real closure comes from `tests/e2e/lots-warehouse-real-chain.spec.js`.

Real spec execution:
- Command requested by checklist: `npx.cmd playwright test tests/e2e/lots-warehouse-real-chain.spec.js`
- On this shell, `npx.cmd` was not in PATH and Laragon npm failed before running Playwright.
- Equivalent Playwright CLI execution was used with the installed Playwright runner and `MYSQL_BIN=C:\laragon\bin\mysql\mysql-8.4.3-winx64\bin\mysql.exe`.

Result:
- `tests/e2e/lots-warehouse-real-chain.spec.js`: 11 tests passed.
- Duration: 2.1 minutes.

Covered by the real spec:
- Setup and drift health detection.
- Purchase with lot into the correct warehouse.
- Partial transfer between warehouses.
- FEFO sale scoped to warehouse and excess sale rejection.
- Sale annulment returning stock to the correct warehouse.
- Concurrency guard for simultaneous sales.
- Inventory adjustment with lot.
- Devolution with lots.
- Expiry report filtered by warehouse.
- Initial lot creation when enabling lots on an item with stock.
- Purchase annulment rejection when lot stock is no longer enough.
