test: unit, integration and E2E test suite (110 unit tests passing)
Unit (Vitest + jsdom):
po-state-machine.test.ts 21 tests — all transitions and helpers
permissions.test.ts 11 tests — all 7 roles
utils.test.ts 17 tests — formatCurrency INR, formatDate, status labels
validations.test.ts 24 tests — createPoSchema, lineItemSchema, TC defaults
po-status-badge.test.tsx 17 tests — all 10 statuses
po-line-items-editor.test.tsx 20 tests — add/remove, GST calc, read-only, diff mode
Integration (Vitest + real DB, mocked auth/notifier):
create-po.test.ts — S-01 create, S-02 draft, S-03 submit
approval-actions.test.ts — M-02 approve, M-03 reject, M-04 edits/vendor-id, S-06/S-07
payment-actions.test.ts — A-01 queue, A-02 mark paid with reference
E2E (Playwright):
auth.spec.ts — login, role nav, sign out
submitter-journey.spec.ts — S-01 to S-08
manager-approvals.spec.ts — M-01 to M-04
accounts-payment.spec.ts — A-01, A-02
po-export.spec.ts — export buttons, endpoint responses, PDF content