Test Coverage Improvement

diagnostic.ly — SPA Migration Test Coverage Report — February 2026

Before
487
393 PHP + 94 Vue tests
After
782
659 PHP + 123 Vue tests
Added
+295
266 PHP + 29 Vue new tests

Coverage by Layer

Layer Total Coverage Before → After
Controllers 39
7 / 18% 23 / 59%
Repositories 34
1 / 3% 11 / 32%
Services 20
2 / 10% 6 / 30%
Jobs 11
0 / 0% 3 / 27%
Models (unit) ~114
6 / 5% 14 / 12%
Vue Composables 3
3 / 100% 3 / 100%
Vue Components ~20
5 / 25% 10 / 50%

Before & After Snapshot

Before

  • PHP Test Files19
  • Vue Test Files8
  • PHP Tests393
  • Vue Tests94
  • Phases Covered5 of 13
  • Auth Tests0
  • Roles Tests0
  • Users Tests0
  • Document Tests0
  • Product Tests0
  • Job Tests0

After

  • PHP Test Files39
  • Vue Test Files13
  • PHP Tests659
  • Vue Tests123
  • Phases Covered13 of 13
  • Auth Tests14
  • Roles Tests17
  • Users Tests26
  • Document Tests25
  • Product Tests19
  • Job Tests26

New Tests by Phase

Phase 1: Auth / Roles / Users Critical
Login, logout, RBAC, user CRUD, model unit tests
57 tests
Phase 2: Documents / Financial Critical
Document API, shared links, OTP, bank accounts
40 tests
Phase 3: Jobs / Catalog Import Critical
Remittance calc, BofA sync, CSV parse, validators
60 tests
Phase 4: Products / Bundles / Settings High
CRUD, validation, Inertia rendering, global settings
58 tests
Phase 5: Messaging / Accounts / Education Medium
Messaging sets/types, account CRUD, education flows
43 tests
Phase 6: Frontend / BaseModel Polish
Sidebar, Select, Dialog, Input, Textarea, BaseModel
37 tests

New Test Files

PHP — 20 new files, 266 tests

Feature/Auth/AuthControllerTest14
Feature/Roles/RolesControllerTest17
Feature/Users/UsersControllerTest16
Unit/Models/UsersTest10
Feature/Document/DocumentControllerTest10
Feature/Document/SharedDocumentTest15
Feature/Finance/ClientFinancialAccountTest15
Unit/Jobs/CalculateRemittancePaymentsJobTest8
Unit/Jobs/RetrieveBofATransactionsJobTest8
Unit/Jobs/ParseCatalogImportJobTest10
Feature/CatalogImport/CatalogImportControllerTest17
Unit/Services/CatalogImportServiceTest17
Feature/Products/ProductControllerTest19
Feature/Bundles/BundleControllerTest16
Feature/Settings/SettingsControllerTest13
Feature/Settings/GlobalSettingsControllerTest10
Feature/Accounts/AccountControllerTest15
Feature/Messaging/MessagingControllerTest15
Feature/Education/EducationControllerTest13
Unit/Models/BaseModelTest8

Vue — 5 new files, 29 tests

components/__tests__/Sidebar.spec.ts6
components/__tests__/Select.spec.ts5
components/__tests__/Dialog.spec.ts5
components/__tests__/Textarea.spec.ts6
components/__tests__/Input.spec.ts7

Infrastructure — 2 files

tests/Traits/CreatesTestUsers.phptrait
tests/Fixtures/TestConstants.php+60 constants

Coverage Gap Closure

Area (Previously 0 Tests) Before After Status
Authentication (login, logout, sessions)014Covered
Roles (CRUD, permissions, middleware)017Covered
Users (CRUD, validation, hashids)026Covered
Documents (API, folders, permissions)010Covered
Shared Documents (OTP, tokens, expiry)015Covered
Client Financial Accounts (Stripe)015Covered
Background Jobs (remittance, BofA, parse)026Covered
Catalog Import (upload, review, reprocess)034Covered
Products (CRUD, validation, model)019Covered
Bundles (CRUD, validation, model)016Covered
Settings (15 entity types, dynamic routes)013Covered
Global Settings (per-account config)010Covered
Accounts (CRUD, status, model)015Covered
Messaging (sets, types, templates, comms)015Covered
Education (purpose flows, screen configs)013Covered
BaseModel (hashids, activity log)08Covered