
> oms-web@0.1.0 test
> vitest run --coverage

[33mThe CJS build of Vite's Node API is deprecated. See https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.[39m

 RUN  v2.1.9 /opt/drcarrot-deploy/cross-repo-orchestration/oms-web
      Coverage enabled with v8

 ✓ tests/actions-users.test.ts (19 tests) 132ms
stderr | tests/expense-form.test.tsx > ExpenseForm — create mode rendering > renders the project field, one empty item row, and remarks
Warning: Invalid value for prop `action` on <form> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior 
    at form
    at ExpenseForm (/opt/drcarrot-deploy/cross-repo-orchestration/oms-web/components/forms/ExpenseForm.tsx:41:3)

 ✓ tests/expense-form.test.tsx (17 tests) 1605ms
   ✓ ExpenseForm — create mode rendering > selects an expense type via the row's Listbox 334ms
stderr | tests/user-form.test.tsx > UserForm — create mode rendering > renders username, mobile, type, role, password, confirm password, and status fields
Warning: Invalid value for prop `action` on <form> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior 
    at form
    at UserForm (/opt/drcarrot-deploy/cross-repo-orchestration/oms-web/components/forms/UserForm.tsx:27:3)

 ✓ tests/user-form.test.tsx (13 tests) 1816ms
   ✓ UserForm — create mode rendering > renders username, mobile, type, role, password, confirm password, and status fields 337ms
   ✓ UserForm — create mode rendering > filters Role options down to the selected Type and enables the select 586ms
 ✓ tests/schemas.test.ts (36 tests) 91ms
stderr | tests/order-fulfillment-form.test.tsx > OrderFulfillmentForm — rendering with mock data > renders order summary, line items, and empty attachments state
Warning: Invalid value for prop `action` on <form> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior 
    at form
    at div
    at OrderFulfillmentForm (/opt/drcarrot-deploy/cross-repo-orchestration/oms-web/components/forms/OrderFulfillmentForm.tsx:23:3)

 ✓ tests/order-fulfillment-form.test.tsx (13 tests) 1480ms
 ✓ tests/lib-auth.test.ts (18 tests) 51ms
 ✓ tests/actions-expenses.test.ts (12 tests) 47ms
 ✓ tests/actions-auth.test.ts (10 tests) 80ms
 ✓ tests/actions-suppliers.test.ts (15 tests) 106ms
 ✓ tests/actions-uom.test.ts (15 tests) 42ms
 ✓ tests/actions-items.test.ts (15 tests) 43ms
 ✓ tests/components-confirm-modal.test.tsx (15 tests) 639ms
stderr | tests/components-sidebar.test.tsx > Sidebar — renders every nav group and item > renders the brand header, both group labels, and all item labels
Warning: Invalid value for prop `action` on <form> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior 
    at form
    at LogoutButton (/opt/drcarrot-deploy/cross-repo-orchestration/oms-web/components/layout/LogoutButton.tsx:13:63)
    at div
    at aside
    at Sidebar (/opt/drcarrot-deploy/cross-repo-orchestration/oms-web/components/layout/Sidebar.tsx:29:20)

 ✓ tests/components-sidebar.test.tsx (14 tests) 1822ms
   ✓ Sidebar — collapse/rail toggle (#3247) > clicking the toggle again expands the sidebar back and persists that choice 408ms
 ✓ tests/actions-projects.test.ts (14 tests) 53ms
stderr | tests/item-form.test.tsx > ItemForm — create mode rendering > renders name, uom, and status fields
Warning: Invalid value for prop `action` on <form> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior 
    at form
    at ItemForm (/opt/drcarrot-deploy/cross-repo-orchestration/oms-web/components/forms/ItemForm.tsx:22:3)

 ✓ tests/item-form.test.tsx (13 tests) 767ms
stderr | tests/supplier-form.test.tsx > SupplierForm — create mode rendering > renders name, supplier no, mobile, email, address, and status fields
Warning: Invalid value for prop `action` on <form> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior 
    at form
    at SupplierForm (/opt/drcarrot-deploy/cross-repo-orchestration/oms-web/components/forms/SupplierForm.tsx:20:3)

 ✓ tests/supplier-form.test.tsx (11 tests) 834ms
stderr | tests/order-form.test.tsx > OrderForm — rendering with mock data > renders supplier, project fields, one empty order-item row, and Generate Order
Warning: Invalid value for prop `action` on <form> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior 
    at form
    at OrderForm (/opt/drcarrot-deploy/cross-repo-orchestration/oms-web/components/forms/OrderForm.tsx:27:3)

 ✓ tests/order-form.test.tsx (12 tests) 1162ms
stderr | tests/uom-form.test.tsx > UomForm — create mode rendering > renders name and symbol fields and the Create UOM button
Warning: Invalid value for prop `action` on <form> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior 
    at form
    at UomForm (/opt/drcarrot-deploy/cross-repo-orchestration/oms-web/components/forms/UomForm.tsx:20:3)

 ✓ tests/uom-form.test.tsx (11 tests) 536ms
 ✓ tests/admin-users-page.test.tsx (8 tests) 1338ms
   ✓ UsersPage — rendering with mock data > renders a row per user with username, role, type, mobile, and status 461ms
stderr | tests/project-form.test.tsx > ProjectForm — create mode rendering > renders the project name field and Create Project button
Warning: Invalid value for prop `action` on <form> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior 
    at form
    at ProjectForm (/opt/drcarrot-deploy/cross-repo-orchestration/oms-web/components/forms/ProjectForm.tsx:20:3)

 ✓ tests/project-form.test.tsx (11 tests) 614ms
 ✓ tests/queries-users.test.ts (12 tests) 56ms
 ✓ tests/creatable-select.test.tsx (8 tests) 1022ms
   ✓ CreatableSelect — rendering > renders the underlying Listbox with the given options 551ms
 ✓ tests/filter-bar.test.tsx (8 tests) 494ms
 ✓ tests/admin-suppliers-page.test.tsx (5 tests) 619ms
   ✓ SuppliersPage — rendering with mock data > renders a row per supplier with name, supplier no, mobile, address, and status 439ms
 ✓ tests/quick-create-registry.test.ts (6 tests) 15ms
 ✓ tests/lib-nav.test.ts (13 tests) 18ms
 ✓ tests/quick-create-modal.test.tsx (6 tests) 269ms
 ✓ tests/expenses-page.test.tsx (6 tests) 601ms
stderr | tests/app-layout.test.tsx > RootLayout — sidebar gating (regression guard: signed-out visitors must never see the app shell) > renders children without the Sidebar when there is no session
Warning: validateDOMNesting(...): <html> cannot appear as a child of <div>.
    at html

 ✓ tests/app-layout.test.tsx (6 tests) 128ms
 ✓ tests/permissions-guard.test.ts (8 tests) 20ms
 ✓ tests/admin-projects-page.test.tsx (5 tests) 268ms
 ✓ tests/admin-items-page.test.tsx (5 tests) 328ms
 ✓ tests/api-lookups-route.test.ts (6 tests) 52ms
 ✓ tests/admin-uom-page.test.tsx (5 tests) 354ms
 ✓ tests/orders-page.test.tsx (5 tests) 436ms
 ✓ tests/expense-summary-project-page.test.tsx (4 tests) 372ms
 ✓ tests/queries-rbac.test.ts (7 tests) 16ms
 ✓ tests/order-detail-page.test.tsx (5 tests) 86ms
 ✓ tests/permissions-registry.test.ts (26 tests) 26ms
 ✓ tests/components-delete-confirm-modal.test.tsx (7 tests) 401ms
 ✓ tests/select-field.test.tsx (7 tests) 145ms
 ✓ tests/expenses-new-edit-pages.test.tsx (3 tests) 84ms
 ✓ tests/pagination.test.tsx (9 tests) 521ms
 ✓ tests/permissions-ui.test.ts (6 tests) 16ms
 ✓ tests/admin-items-edit-page.test.tsx (3 tests) 94ms
 ✓ tests/params.test.ts (12 tests) 31ms
 ✓ tests/orders-new-page.test.tsx (2 tests) 85ms
 ✓ tests/modal.test.tsx (8 tests) 276ms
 ✓ tests/row-actions.test.tsx (7 tests) 467ms
 ✓ tests/app-403-page.test.tsx (4 tests) 106ms
 ✓ tests/repeater-table.test.tsx (7 tests) 200ms
 ✓ tests/data-table.test.tsx (6 tests) 315ms
stderr | tests/components-logout-button.test.tsx > LogoutButton — trigger > renders a type=button trigger (does not submit directly) with no dialog open by default
Warning: Invalid value for prop `action` on <form> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior 
    at form
    at LogoutButton (/opt/drcarrot-deploy/cross-repo-orchestration/oms-web/components/layout/LogoutButton.tsx:13:63)

 ✓ tests/components-logout-button.test.tsx (5 tests) 387ms
 ✓ tests/text-field.test.tsx (9 tests) 157ms
 ✓ tests/admin-users-edit-page.test.tsx (2 tests) 79ms
 ✓ tests/admin-users-detail-page.test.tsx (2 tests) 78ms
 ✓ tests/admin-items-detail-page.test.tsx (2 tests) 159ms
 ✓ tests/supplier-row-actions.test.tsx (3 tests) 57ms
 ✓ tests/project-row-actions.test.tsx (3 tests) 60ms
 ✓ tests/user-row-actions.test.tsx (3 tests) 61ms
 ✓ tests/item-row-actions.test.tsx (3 tests) 148ms
 ✓ tests/app-root-page.test.tsx (3 tests) 17ms
 ✓ tests/permissions-evaluate.test.ts (8 tests) 11ms
 ✓ tests/auth-password.test.ts (10 tests) 1481ms
   ✓ hashPassword / verifyPassword round trip > verifies a password against its own hash 334ms
   ✓ hashPassword / verifyPassword round trip > rejects the wrong password 324ms
   ✓ hashPassword / verifyPassword round trip > salts every hash independently — the same password hashes differently each time 647ms
 ✓ tests/uom-row-actions.test.tsx (3 tests) 58ms
 ✓ tests/attachment-chip.test.tsx (6 tests) 142ms
 ✓ tests/app-not-found.test.tsx (3 tests) 94ms
 ✓ tests/admin-suppliers-edit-page.test.tsx (2 tests) 82ms
 ✓ tests/admin-suppliers-detail-page.test.tsx (2 tests) 176ms
 ✓ tests/admin-projects-edit-page.test.tsx (2 tests) 81ms
 ✓ tests/admin-projects-detail-page.test.tsx (2 tests) 199ms
 ✓ tests/admin-items-new-page.test.tsx (2 tests) 230ms
 ✓ tests/admin-uom-edit-page.test.tsx (2 tests) 192ms
 ✓ tests/admin-uom-detail-page.test.tsx (2 tests) 79ms
 ✓ tests/expense-summary-page.test.tsx (2 tests) 161ms
 ✓ tests/list-toolbar.test.tsx (5 tests) 416ms
 ✓ tests/admin-users-new-page.test.tsx (2 tests) 93ms
 ✓ tests/auth-can.test.tsx (3 tests) 196ms
 ✓ tests/StatusBadge.test.tsx (8 tests) 221ms
 ✓ tests/expense-row-actions.test.tsx (2 tests) 198ms
 ✓ tests/sort-icon.test.tsx (3 tests) 83ms
 ✓ tests/admin-suppliers-new-page.test.tsx (1 test) 74ms
 ✓ tests/admin-projects-new-page.test.tsx (1 test) 69ms
 ✓ tests/admin-uom-new-page.test.tsx (1 test) 80ms
 ✓ tests/page-header.test.tsx (3 tests) 226ms
 ✓ tests/order-row-actions.test.tsx (1 test) 183ms

 Test Files  86 passed (86)
      Tests  630 passed (630)
   Start at  09:01:15
   Duration  263.95s (transform 4.38s, setup 16.52s, collect 32.65s, tests 27.20s, environment 114.78s, prepare 21.28s)

 % Coverage report from v8
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   99.53 |    96.56 |   94.92 |   99.53 |                   
 app               |     100 |      100 |     100 |     100 |                   
  layout.tsx       |     100 |      100 |     100 |     100 |                   
  not-found.tsx    |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 app/403           |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 app/admin/items   |     100 |     92.3 |     100 |     100 |                   
  ...owActions.tsx |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |     90.9 |     100 |     100 | 29                
 ...min/items/[id] |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 ...tems/[id]/edit |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 ...dmin/items/new |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 ...admin/projects |     100 |    91.66 |     100 |     100 |                   
  ...owActions.tsx |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |       90 |     100 |     100 | 28                
 .../projects/[id] |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 ...ects/[id]/edit |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 ...n/projects/new |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 ...dmin/suppliers |     100 |    93.33 |     100 |     100 |                   
  ...owActions.tsx |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |     92.3 |     100 |     100 | 31                
 ...suppliers/[id] |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 ...iers/[id]/edit |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 .../suppliers/new |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 app/admin/uom     |     100 |     92.3 |     100 |     100 |                   
  ...owActions.tsx |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |     90.9 |     100 |     100 | 29                
 ...admin/uom/[id] |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 .../uom/[id]/edit |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 app/admin/uom/new |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 app/admin/users   |     100 |      100 |     100 |     100 |                   
  ...owActions.tsx |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 ...min/users/[id] |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 ...sers/[id]/edit |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 ...dmin/users/new |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 app/api/lookups   |     100 |      100 |     100 |     100 |                   
  route.ts         |     100 |      100 |     100 |     100 |                   
 ...xpense-summary |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 ...mary/[project] |   84.84 |    91.66 |    62.5 |   84.84 |                   
  page.tsx         |   84.84 |    91.66 |    62.5 |   84.84 | 21-24,56-61       
 app/expenses      |     100 |      100 |     100 |     100 |                   
  ...owActions.tsx |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 ...nses/[id]/edit |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 app/expenses/new  |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 app/orders        |     100 |      100 |     100 |     100 |                   
  ...owActions.tsx |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 app/orders/[id]   |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 app/orders/new    |     100 |      100 |     100 |     100 |                   
  page.tsx         |     100 |      100 |     100 |     100 |                   
 components/auth   |     100 |      100 |     100 |     100 |                   
  Can.tsx          |     100 |      100 |     100 |     100 |                   
 components/forms  |     100 |    96.82 |   83.33 |     100 |                   
  ExpenseForm.tsx  |     100 |       96 |      80 |     100 | 104,161,165       
  ItemForm.tsx     |     100 |     97.5 |   66.66 |     100 | 77                
  OrderForm.tsx    |     100 |    97.36 |   73.33 |     100 | 68                
  ...lmentForm.tsx |     100 |    83.33 |     100 |     100 | ...87,145,162,168 
  ProjectForm.tsx  |     100 |      100 |     100 |     100 |                   
  SupplierForm.tsx |     100 |      100 |     100 |     100 |                   
  UomForm.tsx      |     100 |      100 |     100 |     100 |                   
  UserForm.tsx     |     100 |      100 |     100 |     100 |                   
 components/layout |     100 |      100 |     100 |     100 |                   
  LogoutButton.tsx |     100 |      100 |     100 |     100 |                   
  PageHeader.tsx   |     100 |      100 |     100 |     100 |                   
  Sidebar.tsx      |     100 |      100 |     100 |     100 |                   
 components/ui     |     100 |    96.37 |   96.15 |     100 |                   
  ...hmentChip.tsx |     100 |      100 |     100 |     100 |                   
  ConfirmModal.tsx |     100 |    94.73 |     100 |     100 | 41                
  DataTable.tsx    |     100 |      100 |     100 |     100 |                   
  ...firmModal.tsx |     100 |      100 |     100 |     100 |                   
  FilterBar.tsx    |     100 |    94.73 |   83.33 |     100 | 77                
  ListToolbar.tsx  |     100 |      100 |     100 |     100 |                   
  Modal.tsx        |     100 |      100 |     100 |     100 |                   
  Pagination.tsx   |     100 |    96.66 |     100 |     100 | 51                
  ...eateModal.tsx |     100 |    83.33 |     100 |     100 | 42                
  ...aterTable.tsx |     100 |     90.9 |     100 |     100 | 55                
  RowActions.tsx   |     100 |      100 |     100 |     100 |                   
  StatusBadge.tsx  |     100 |      100 |     100 |     100 |                   
 ...ents/ui/fields |     100 |      100 |   83.33 |     100 |                   
  ...bleSelect.tsx |     100 |      100 |      75 |     100 |                   
  SelectField.tsx  |     100 |      100 |     100 |     100 |                   
  TextField.tsx    |     100 |      100 |     100 |     100 |                   
 ...nents/ui/icons |     100 |      100 |     100 |     100 |                   
  SortIcon.tsx     |     100 |      100 |     100 |     100 |                   
 lib               |     100 |    93.97 |     100 |     100 |                   
  auth.ts          |     100 |    90.56 |     100 |     100 | ...67,169-170,172 
  nav.ts           |     100 |      100 |     100 |     100 |                   
  params.ts        |     100 |      100 |     100 |     100 |                   
 lib/actions       |   97.56 |    96.96 |     100 |   97.56 |                   
  auth.ts          |     100 |      100 |     100 |     100 |                   
  items.ts         |     100 |      100 |     100 |     100 |                   
  projects.ts      |     100 |      100 |     100 |     100 |                   
  shared.ts        |     100 |      100 |     100 |     100 |                   
  suppliers.ts     |   90.47 |    85.71 |     100 |   90.47 | 28-29,40-41       
  users.ts         |   96.96 |    96.66 |     100 |   96.96 | 71-72             
 lib/auth          |     100 |    78.26 |     100 |     100 |                   
  password.ts      |     100 |    78.26 |     100 |     100 | 27,56,58-59,71    
 lib/permissions   |     100 |    97.72 |     100 |     100 |                   
  evaluate.ts      |     100 |      100 |     100 |     100 |                   
  guard.ts         |     100 |    92.85 |     100 |     100 | 29                
  registry.ts      |     100 |      100 |     100 |     100 |                   
  ui.ts            |     100 |      100 |     100 |     100 |                   
 lib/queries       |     100 |      100 |     100 |     100 |                   
  rbac.ts          |     100 |      100 |     100 |     100 |                   
  users.ts         |     100 |      100 |     100 |     100 |                   
 lib/validation    |     100 |      100 |     100 |     100 |                   
  schemas.ts       |     100 |      100 |     100 |     100 |                   
-------------------|---------|----------|---------|---------|-------------------
