pelagia-portal/App/tests/unit
Hardik 938ff6df89 test+ci: green the test baseline and make type-check + unit tests hard gates
Green-lights the test suite so the PR checks can enforce it:
- Fix the NextAuth v5 auth() mock typing across all integration tests (cast to a
  simple async fn so mockResolvedValue accepts the session) — clears ~86 errors.
- Fix stale test values: intent 'resubmit'->'submit' / 'save'->'draft'; ParsedImportLine
  .description -> .name; approvepo -> approvePo; add missing beforeEach/beforeAll imports.
- permissions: MANAGER *can* process_payment (intentional since e1340b9) — update the
  stale assertion.
- po-import-parser: skip the Sample_PO.xlsx fixture tests when the file is absent (it
  lives outside the repo); synthetic-workbook tests still cover the parser.

type-check is now 0 errors and unit tests pass (167 passed, 13 skipped). pr-checks.yml
flips type-check (whole project) and unit tests to HARD gates.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 13:03:54 +05:30
..
attachments.test.ts fix(po): show all attachments grouped by type on PO details 2026-06-19 04:43:44 +05:30
permissions.test.ts test+ci: green the test baseline and make type-check + unit tests hard gates 2026-06-19 13:03:54 +05:30
po-import-parser.test.ts test+ci: green the test baseline and make type-check + unit tests hard gates 2026-06-19 13:03:54 +05:30
po-line-items-editor.test.tsx fix(seed+tests): correct vessel/cost-centre names, update unit tests 2026-05-30 18:50:23 +05:30
po-state-machine.test.ts chore: restructure repo — flatten App/pelagia-portal to App, rename Prototype→Wireframe and Spec→Design 2026-05-18 23:18:58 +05:30
po-status-badge.test.tsx chore: restructure repo — flatten App/pelagia-portal to App, rename Prototype→Wireframe and Spec→Design 2026-05-18 23:18:58 +05:30
utils.test.ts chore: restructure repo — flatten App/pelagia-portal to App, rename Prototype→Wireframe and Spec→Design 2026-05-18 23:18:58 +05:30
validations.test.ts feat(po): allow submitter to set an optional PO date 2026-06-16 13:06:12 +05:30