All Tests Passing

1,218 TESTS PASSING

diagnostic.ly Healthcare Administration Platform

1,218
Total Tests
2,991+
Assertions
📄
89
Test Files
100%
Pass Rate

📊 Test Distribution

Unit Tests

567
43 test classes across 4 categories
46.6% of total suite

Feature Tests

651
47 test classes across 24 domains
53.4% of total suite
Models
328
Services
147
Jobs
67
Finance
112
Catalog Import
106
Remittance
80

🚀 Before vs After

Before — Feb 2026
763
Passed
302
Failed
71.6% pass rate
After — Mar 2026
1,218
Passed
0
Failed
100% pass rate
+455 new tests · 302 failures fixed · 0 regressions
From 71.6% pass rate to 100% — a 59.7% improvement in total passing tests

🏆 Phase Completion Summary

Phase Name Scope Tests Added Status
A Test Infrastructure CreatesTestUsers, TestConstants, base assertions, factory setup 1
B Unit Tests: Models Hashids, casts, fillables, relationships for all 40+ models 328
C Unit Tests: Services HashidsService, FinanceService, RemittanceCalculationService, etc. 147
D Unit Tests: Jobs & Middleware SendEmailJob, ArchiveOldTransactions, CheckAuth, PreventBack, etc. 91
E Feature Tests: Core CRUD Accounts, Users, Roles, Products, Bundles, Settings 165
F Feature Tests: Finance Invoices, Payments, Transactions, ACH, Remittance, Reconciliation 192
G Feature Tests: Catalog & Partners Bulk upload, catalog import, AI mapping, anomaly detection, channel partners 139
H Feature Tests: Modules Documents, messaging, education, direct mail, telemedicine, case notes 155

📋 All 89 Test Classes

# Class Type Domain Tests
#1 AllModelsHashidTest Unit Models
128
#2 ModelRelationshipsTest Unit Models
53
#3 RemittanceControllerTest Feature Remittance
34
#4 ChannelPartnerControllerTest Feature Channel Partners
33
#5 InvoiceControllerTest Feature Finance
33
#6 BulkUploadControllerTest Feature Catalog Import
30
#7 OrderControllerTest Feature Orders
30
#8 AchControllerTest Feature Finance
27
#9 ModelCastsTest Unit Models
26
#10 RemittanceCalculationServiceTest Unit Services
25
#11 InvoiceTest Unit Models
24
#12 BulkUploadTest Unit Models
22
#13 OrderTest Unit Models
22
#14 FinanceDashboardTest Feature Finance
20
#15 ProductControllerTest Feature Products
19
#16 ChannelPartnerTest Unit Models
18
#17 CatalogImportAnomalyServiceTest Unit Services
18
#18 HashidsServiceTest Unit Services
18
#19 CatalogImportControllerTest Feature Catalog Import
17
#20 PaymentControllerTest Feature Finance
17
#21 ReconciliationTest Feature Remittance
17
#22 RolesControllerTest Feature Roles
17
#23 CatalogImportServiceTest Unit Services
17
#24 BundleControllerTest Feature Bundles
16
#25 CategoryRegistryTest Feature Catalog Import
16
#26 ApprovalWorkflowTest Feature Remittance
16
#27 UsersControllerTest Feature Users
16
#28 AccountControllerTest Feature Accounts
15
#29 SharedDocumentTest Feature Documents
15
#30 ClientFinancialAccountTest Feature Finance
15
#31 MessagingControllerTest Feature Messaging
15
#32 AuthControllerTest Feature Auth
14
#33 ReplacementVariablesControllerTest Feature Replacement Variables
14
#34 SupportEntityControllerTest Feature Support Entity
14
#35 AchAccountTest Unit Models
14
#36 EducationControllerTest Feature Education
13
#37 CalculationEngineTest Feature Remittance
13
#38 SettingsControllerTest Feature Settings
13
#39 CatalogImportAiServiceTest Unit Services
12
#40 SaveResumeTest Feature Catalog Import
11
#41 AccountSettingControllerTest Feature Accounts
10
#42 SuperadminReviewTest Feature Catalog Import
10
#43 PermitDirectMailControllerTest Feature Direct Mail
10
#44 DocumentControllerTest Feature Documents
10
#45 MediaControllerTest Feature Media
10
#46 CommunicationTypesControllerTest Feature Messaging
10
#47 GlobalSettingsControllerTest Feature Settings
10
#48 ParseCatalogImportJobTest Unit Jobs
10
#49 UsersTest Unit Models
10
#50 AiMappingTest Feature Catalog Import
9
#51 RemittanceServiceTest Unit Services
9
#52 IssuesResolutionTest Feature Catalog Import
8
#53 TriggersByAccountControllerTest Feature Direct Mail
8
#54 CalculateRemittancePaymentsJobTest Unit Jobs
8
#55 RetrieveBofATransactionsJobTest Unit Jobs
8
#56 BaseModelTest Unit Models
8
#57 BulkUploadServiceTest Unit Services
8
#58 StorageServiceTest Unit Services
8
#59 CaseNoteControllerTest Feature Case Notes
7
#60 PostlyticsControllerTest Feature Direct Mail
7
#61 DynamicPageControllerTest Feature Dynamic Pages
7
#62 ArchiveOldTransactionsJobTest Unit Jobs
7
#63 FinanceServiceTest Unit Services
7
#64 ExecuteRemittancePaymentJobTest Unit Jobs
6
#65 ReconcileSettlementsJobTest Unit Jobs
6
#66 SendRemittanceNotificationJobTest Unit Jobs
6
#67 HandleInertiaRequestsTest Unit Middleware
6
#68 AchServiceTest Unit Services
6
#69 PasswordResetOtpTest Feature Auth
5
#70 AnomalyDetectionTest Feature Catalog Import
5
#71 TelemedicineControllerTest Feature Telemedicine
5
#72 ProcessCatalogImportJobTest Unit Jobs
5
#73 LanguageMiddlewareTest Unit Middleware
5
#74 PreventBackTest Unit Middleware
5
#75 StoreAdminPreviousUrlTest Unit Middleware
5
#76 BulkActionServiceTest Unit Services
5
#77 OrderServiceTest Unit Services
5
#78 OtpVerificationTest Feature Auth
4
#79 ReprocessCatalogImportJobTest Unit Jobs
4
#80 SendEmailJobTest Unit Jobs
4
#81 SettingsManagerTest Unit Services
4
#82 GenericControllerTest Feature Generic
3
#83 SyncTranslationsJobTest Unit Jobs
3
#84 CheckAuthTest Unit Middleware
3
#85 UserEmailHashTest Unit Models
3
#86 ChannelPartnerServiceTest Unit Services
3
#87 RetentionPeriodControllerTest Feature Documents
2
#88 AccountServiceTest Unit Services
2
#89 ExampleTest Feature Other
1
#90 ExampleTest Unit Other
1

🔎 Complete Test Inventory (1,218 tests)

Unit / Models

328 tests · 11 classes
AllModelsHashidTest
128 tests
  • model has hashid in appends[Accounts]
  • model has hashid in appends[Products]
  • model has hashid in appends[Bundles]
  • model has hashid in appends[GlobalSettings]
  • model has hashid in appends[MessagingTemplateGrouping]
  • model has hashid in appends[EducationPurposeFlows]
  • model has hashid in appends[Invoice]
  • model has hashid in appends[InvoiceItem]
  • model has hashid in appends[Payment]
  • model has hashid in appends[PaymentMethod]
  • model has hashid in appends[FinancialTransaction]
  • model has hashid in appends[AccountBalance]
  • model has hashid in appends[AchAccount]
  • model has hashid in appends[AchTransaction]
  • model has hashid in appends[ChannelPartner]
  • model has hashid in appends[ChannelPartnerAccount]
  • model has hashid in appends[ChannelPartnerCommission]
  • model has hashid in appends[Order]
  • model has hashid in appends[OrderItem]
  • model has hashid in appends[Cart]
  • model has hashid in appends[BulkUpload]
  • model has hashid in appends[BulkUploadRow]
  • model has hashid in appends[Media]
  • model has hashid in appends[Messaging]
  • model has hashid in appends[MessagingTemplates]
  • model has hashid in appends[MessagingTypes]
  • model has hashid in appends[ReplacementVariables]
  • model has hashid in appends[ApplicationSettings]
  • model has hashid in appends[AccountFinancialAccount]
  • model has hashid in appends[CommType]
  • model has hashid in appends[Regions]
  • model has hashid in appends[SubRegions]
  • model has hashid in appends[Countries]
  • model has hashid in appends[States]
  • model has hashid in appends[Cities]
  • model has hashid in appends[Timezone]
  • model has hashid in appends[SupportEntities]
  • model has hashid in appends[SupportEntityCategory]
  • model has hashid in appends[Languages]
  • model has hashid in appends[Translations]
  • model has hashid in appends[AccountTranslationOverrides]
  • HashidsService can encode and decode for model[Accounts]
  • HashidsService can encode and decode for model[Products]
  • HashidsService can encode and decode for model[Bundles]
  • HashidsService can encode and decode for model[GlobalSettings]
  • HashidsService can encode and decode for model[MessagingTemplateGrouping]
  • HashidsService can encode and decode for model[EducationPurposeFlows]
  • HashidsService can encode and decode for model[Invoice]
  • HashidsService can encode and decode for model[InvoiceItem]
  • HashidsService can encode and decode for model[Payment]
  • HashidsService can encode and decode for model[PaymentMethod]
  • HashidsService can encode and decode for model[FinancialTransaction]
  • HashidsService can encode and decode for model[AccountBalance]
  • HashidsService can encode and decode for model[AchAccount]
  • HashidsService can encode and decode for model[AchTransaction]
  • HashidsService can encode and decode for model[ChannelPartner]
  • HashidsService can encode and decode for model[ChannelPartnerAccount]
  • HashidsService can encode and decode for model[ChannelPartnerCommission]
  • HashidsService can encode and decode for model[Order]
  • HashidsService can encode and decode for model[OrderItem]
  • HashidsService can encode and decode for model[Cart]
  • HashidsService can encode and decode for model[BulkUpload]
  • HashidsService can encode and decode for model[BulkUploadRow]
  • HashidsService can encode and decode for model[Media]
  • HashidsService can encode and decode for model[Messaging]
  • HashidsService can encode and decode for model[MessagingTemplates]
  • HashidsService can encode and decode for model[MessagingTypes]
  • HashidsService can encode and decode for model[ReplacementVariables]
  • HashidsService can encode and decode for model[ApplicationSettings]
  • HashidsService can encode and decode for model[AccountFinancialAccount]
  • HashidsService can encode and decode for model[CommType]
  • HashidsService can encode and decode for model[Regions]
  • HashidsService can encode and decode for model[SubRegions]
  • HashidsService can encode and decode for model[Countries]
  • HashidsService can encode and decode for model[States]
  • HashidsService can encode and decode for model[Cities]
  • HashidsService can encode and decode for model[Timezone]
  • HashidsService can encode and decode for model[SupportEntities]
  • HashidsService can encode and decode for model[SupportEntityCategory]
  • HashidsService can encode and decode for model[Languages]
  • HashidsService can encode and decode for model[Translations]
  • HashidsService can encode and decode for model[AccountTranslationOverrides]
  • HashidsService produces minimum 10 character hashids[Accounts]
  • HashidsService produces minimum 10 character hashids[Products]
  • HashidsService produces minimum 10 character hashids[Bundles]
  • HashidsService produces minimum 10 character hashids[GlobalSettings]
  • HashidsService produces minimum 10 character hashids[MessagingTemplateGrouping]
  • HashidsService produces minimum 10 character hashids[EducationPurposeFlows]
  • HashidsService produces minimum 10 character hashids[Invoice]
  • HashidsService produces minimum 10 character hashids[InvoiceItem]
  • HashidsService produces minimum 10 character hashids[Payment]
  • HashidsService produces minimum 10 character hashids[PaymentMethod]
  • HashidsService produces minimum 10 character hashids[FinancialTransaction]
  • HashidsService produces minimum 10 character hashids[AccountBalance]
  • HashidsService produces minimum 10 character hashids[AchAccount]
  • HashidsService produces minimum 10 character hashids[AchTransaction]
  • HashidsService produces minimum 10 character hashids[ChannelPartner]
  • HashidsService produces minimum 10 character hashids[ChannelPartnerAccount]
  • HashidsService produces minimum 10 character hashids[ChannelPartnerCommission]
  • HashidsService produces minimum 10 character hashids[Order]
  • HashidsService produces minimum 10 character hashids[OrderItem]
  • HashidsService produces minimum 10 character hashids[Cart]
  • HashidsService produces minimum 10 character hashids[BulkUpload]
  • HashidsService produces minimum 10 character hashids[BulkUploadRow]
  • HashidsService produces minimum 10 character hashids[Media]
  • HashidsService produces minimum 10 character hashids[Messaging]
  • HashidsService produces minimum 10 character hashids[MessagingTemplates]
  • HashidsService produces minimum 10 character hashids[MessagingTypes]
  • HashidsService produces minimum 10 character hashids[ReplacementVariables]
  • HashidsService produces minimum 10 character hashids[ApplicationSettings]
  • HashidsService produces minimum 10 character hashids[AccountFinancialAccount]
  • HashidsService produces minimum 10 character hashids[CommType]
  • HashidsService produces minimum 10 character hashids[Regions]
  • HashidsService produces minimum 10 character hashids[SubRegions]
  • HashidsService produces minimum 10 character hashids[Countries]
  • HashidsService produces minimum 10 character hashids[States]
  • HashidsService produces minimum 10 character hashids[Cities]
  • HashidsService produces minimum 10 character hashids[Timezone]
  • HashidsService produces minimum 10 character hashids[SupportEntities]
  • HashidsService produces minimum 10 character hashids[SupportEntityCategory]
  • HashidsService produces minimum 10 character hashids[Languages]
  • HashidsService produces minimum 10 character hashids[Translations]
  • HashidsService produces minimum 10 character hashids[AccountTranslationOverrides]
  • different models produce different hashes for same ID
  • Users model has hashid despite not extending BaseModel
  • HashidsService encode decode roundtrip with various IDs
  • HashidsService decode returns null for invalid hash
  • HashidsService uses app key as fallback salt for unknown models
ModelRelationshipsTest
53 tests
  • Accounts has users belongsToMany relationship
  • Accounts has languages belongsToMany relationship
  • Accounts has globalSettings hasOne relationship
  • Accounts has gender belongsTo relationship
  • Products has account belongsTo relationship
  • Products has user belongsTo relationship
  • Products has productSettings hasOne relationship
  • Products has productGeoExclusions hasMany relationship
  • Products has productSupplierInfos hasOne relationship
  • Bundles has productMappings hasMany relationship
  • Bundles has products hasManyThrough relationship
  • Bundles has bundleImages hasMany relationship
  • Bundles has supportEntity belongsTo relationship
  • Order has account belongsTo relationship
  • Order has items hasMany relationship
  • Order has invoice belongsTo relationship
  • Order has channelPartner belongsTo relationship
  • Invoice has account belongsTo relationship
  • Invoice has items hasMany relationship
  • Invoice has payments hasMany relationship
  • Invoice has transactions morphMany relationship
  • Payment has invoice belongsTo relationship
  • Payment has account belongsTo relationship
  • Payment has paymentMethod belongsTo relationship
  • Payment has transactions morphMany relationship
  • FinancialTransaction has reference morphTo relationship
  • FinancialTransaction has account belongsTo relationship
  • ChannelPartner has accountAssignments hasMany relationship
  • ChannelPartner has commissions hasMany relationship
  • ChannelPartnerAccount has channelPartner belongsTo relationship
  • ChannelPartnerAccount has account belongsTo relationship
  • ChannelPartnerAccount has commissions hasMany relationship
  • ChannelPartnerCommission has channelPartner belongsTo relationship
  • ChannelPartnerCommission has invoice belongsTo relationship
  • OrderItem has order belongsTo relationship
  • OrderItem has product belongsTo relationship
  • OrderItem has bundle belongsTo relationship
  • AchAccount has account belongsTo relationship
  • AchAccount has transactions hasMany relationship
  • MessagingTemplateGrouping has translations hasMany relationship
  • GlobalSettings has account belongsTo relationship
  • GlobalSettings has state belongsTo relationship
  • GlobalSettings has country belongsTo relationship
  • GlobalSettings has city belongsTo relationship
  • GlobalSettings has timezone belongsTo relationship
  • PaymentMethod has payments hasMany relationship
  • Users has accounts belongsToMany relationship
  • Languages has translations hasMany relationship
  • Translations has language belongsTo relationship
  • Translations has overrides hasMany relationship
  • InvoiceItem has invoice belongsTo relationship
  • InvoiceItem has product belongsTo relationship
  • AccountBalance has account belongsTo relationship
ModelCastsTest
26 tests
  • Products casts price fields as float
  • Products casts date fields as datetime
  • Bundles casts financial fields as decimal
  • Invoice casts financial fields as decimal
  • Invoice casts date fields correctly
  • Payment casts amount as decimal
  • Order casts financial fields as decimal
  • Order casts timestamp fields as datetime
  • OrderItem casts financial fields as decimal
  • FinancialTransaction casts financial fields as decimal
  • AccountBalance casts balance as decimal
  • PaymentMethod casts is active as boolean
  • ChannelPartner casts commission rate as decimal
  • ChannelPartnerAccount casts commission rate and is active
  • ChannelPartnerCommission casts financial fields as decimal
  • AchAccount casts routing number as encrypted
  • AchAccount hides routing number in serialization
  • Users hides password and remember token
  • Users casts password as hashed
  • GlobalSettings casts remittance boolean and decimal fields
  • InvoiceItem casts financial fields
  • Accounts has expected fillable fields
  • Products has expected fillable fields
  • Order has expected fillable fields
  • Invoice has expected fillable fields
  • Users has expected fillable fields
InvoiceTest
24 tests
  • invoice has expected fillable attributes
  • invoice casts issued date to date
  • invoice casts due date to date
  • invoice casts paid at to datetime
  • invoice casts subtotal to float
  • invoice casts tax amount to float
  • invoice casts total amount to float
  • invoice appends hashid attribute
  • invoice uses soft deletes
  • invoice has account relationship
  • invoice has creator relationship
  • invoice has items relationship
  • invoice has payments relationship
  • invoice has transactions morphMany relationship
  • invoice account relationship points to Accounts model
  • invoice creator relationship points to Users model
  • invoice items relationship points to InvoiceItem model
  • invoice payments relationship points to Payment model
  • invoice extends BaseModel
  • invoice generates hashid when id is set
  • invoice hashid is deterministic for same id
  • invoice hashid differs for different ids
  • invoice status values are valid
  • invoice table name defaults to invoices
BulkUploadTest
22 tests
  • bulk upload has expected fillable attributes
  • bulk upload casts column mapping to array
  • bulk upload casts validation summary to array
  • bulk upload casts started at to datetime
  • bulk upload casts completed at to datetime
  • bulk upload uses soft deletes
  • bulk upload has creator relationship
  • bulk upload has rows relationship
  • bulk upload extends BaseModel
  • bulk upload table name defaults to bulk uploads
  • bulk upload entity type values are valid
  • bulk upload status values are valid
  • bulk upload progress percent returns zero when total rows is zero
  • bulk upload progress percent calculates correctly
  • bulk upload progress percent rounds correctly
  • bulk upload progress percent returns 100 when all rows processed
  • bulk upload generates hashid
  • bulk upload row has expected fillable attributes
  • bulk upload row casts original data to array
  • bulk upload row casts mapped data to array
  • bulk upload row casts errors to array
  • bulk upload row has bulkUpload relationship
OrderTest
22 tests
  • order has expected fillable attributes
  • order casts subtotal to decimal 2
  • order casts tax amount to decimal 2
  • order casts shipping amount to decimal 2
  • order casts discount amount to decimal 2
  • order casts total amount to decimal 2
  • order casts confirmed at to datetime
  • order casts shipped at to datetime
  • order casts delivered at to datetime
  • order uses soft deletes
  • order has account relationship
  • order account relationship points to Accounts model
  • order has items relationship
  • order items relationship points to OrderItem model
  • order has invoice relationship
  • order has channelPartner relationship
  • order has creator relationship
  • order extends BaseModel
  • order table name defaults to orders
  • order status values include all workflow stages
  • order hashid is generated from BaseModel
  • order hashid differs from invoice hashid for same id
ChannelPartnerTest
18 tests
  • channel partner has expected fillable attributes
  • channel partner casts default commission rate to decimal 2
  • channel partner uses soft deletes
  • channel partner has creator relationship
  • channel partner has accountAssignments relationship
  • channel partner has commissions relationship
  • channel partner extends BaseModel
  • channel partner table name defaults to channel partners
  • channel partner status values are valid
  • channel partner generates hashid
  • channel partner code field is in fillable
  • channel partner account has correct casts
  • channel partner account has channelPartner relationship
  • channel partner account has account relationship
  • channel partner commission has correct casts
  • channel partner commission has channelPartner relationship
  • channel partner commission has invoice relationship
  • channel partner commission uses soft deletes
AchAccountTest
14 tests
  • ach account has expected fillable attributes
  • ach account casts verified at to datetime
  • ach account casts routing number to encrypted
  • ach account hides routing number from serialization
  • ach account uses soft deletes
  • ach account has account relationship
  • ach account has creator relationship
  • ach account has transactions relationship
  • ach account extends BaseModel
  • ach account table name defaults to ach accounts
  • ach account status values are valid
  • ach account type values are checking and savings
  • ach account verification methods are micro deposits and instant
  • ach account generates hashid
UsersTest
10 tests
  • users model has expected fillable attributes
  • users model casts email verified at to datetime
  • users model casts password to hashed
  • users model appends hashid attribute
  • users model generates hashid from id
  • users hashid can be decoded back to original id
  • users findByHash returns correct user
  • users findByHash returns null for invalid hash
  • users model has accounts relationship
  • users model uses web guard
BaseModelTest
8 tests
  • base model appends hashid attribute
  • different model classes produce different hashes for same id
  • findByHash returns model for valid hash
  • findByHash returns null for invalid hash
  • getOriginalId decodes hash without DB lookup
  • getOriginalId returns null for invalid hash
  • base model uses LogsActivity trait
  • base model logs fillable fields
UserEmailHashTest
3 tests
  • email hash is generated on user creation
  • email hash updates when email changes
  • user can be found by email hash

Unit / Services

147 tests · 15 classes
RemittanceCalculationServiceTest
25 tests
  • stripe fee calculation 0 029 rate plus 0 30 flat per transaction on 1000 gross with 10 txns equals 32 00
  • stripe fee calculation percentage component scales with gross revenue
  • billcom fee calculation uses percentage rate on gross revenue
  • billcom fee calculation includes flat fee component
  • service fee calculation is a percentage of gross revenue
  • transaction fee calculation is flat amount multiplied by transaction count
  • catch up deduction fully applied when net revenue exceeds catchup balance
  • catch up partial deduction when net revenue is less than catchup balance
  • zero catchup balance results in zero catchup deduction
  • negative balance from prior period is carried forward and subtracted from net
  • when total fees exceed gross revenue net is negative and carry forward is set
  • when net is zero or negative carry forward equals net amount
  • should pay is false when net amount is below minimum daily threshold
  • should pay is true when net amount meets minimum daily threshold exactly
  • should pay is true when net amount exceeds minimum daily threshold
  • carry forward is set to net amount when below minimum so it accumulates
  • isApprovalRequired returns false when approval is disabled globally
  • isApprovalRequired returns true when approval enabled and amount above auto approve threshold
  • isApprovalRequired returns false when approval enabled but amount below auto approve threshold
  • isApprovalRequired returns true when approval enabled and no auto approve threshold set
  • isApprovalRequired returns false when no GlobalSettings record exists
  • calculatePayment returns null when transaction collection is empty
  • chargeback amounts are deducted from net payment
  • line items are included in the calculation result
  • stripe fee appears as negative line item when stripe rate is non zero
CatalogImportAnomalyServiceTest
18 tests
  • detects currency symbols in price fields
  • detects thousands separator in prices
  • detects negative prices as errors
  • detects unusual SKU characters
  • detects short product names
  • does not flag valid prices
  • detects price outliers above 10x median
  • detects price outliers below 0 1x median
  • detects same SKU with different names across rows
  • detects same SKU with different prices across rows
  • detects name change for existing product on update
  • detects large price change for existing product on update
  • does not flag db conflict for add actions
  • detects dual categories in collection type field
  • detects semicolon separated categories
  • does not flag single category values
  • scanBatch processes multiple rows and returns keyed results
  • scanBatch returns empty anomalies for clean rows
HashidsServiceTest
18 tests
  • hashids service encodes and decodes invoice id
  • hashids service encodes and decodes payment id
  • hashids service encodes and decodes order id
  • hashids service encodes and decodes ach account id
  • hashids service encodes and decodes channel partner id
  • hashids service encodes and decodes bulk upload id
  • hashids service produces minimum 10 character strings
  • different models produce different hashes for same id
  • different models produce different hashes for order and invoice
  • different models produce different hashes for ach and channel partner
  • same model produces same hash for same id
  • same model produces different hashes for different ids
  • hashids service handles large ids
  • hashids service decode returns null for invalid hash
  • hashids service roundtrip preserves id for zero
  • hashids service uses model specific salt from salt map
  • hashids service decoding with wrong model returns wrong result
  • hashids service uses app key as fallback salt for unknown models
CatalogImportServiceTest
17 tests
  • service returns valid action list
  • service has six valid actions
  • add product validator requires product sku
  • add product validator requires product name
  • add product validator requires valid type
  • add product validator requires numeric price
  • add product validator passes with all valid fields
  • add product validator detects duplicate SKU
  • update product validator requires existing SKU
  • update product validator requires product sku field
  • delete product validator requires existing SKU
  • add bundle validator requires bundle sku
  • add bundle validator requires bundle name
  • add bundle validator requires numeric prices
  • add bundle validator passes with all valid fields
  • update bundle validator requires existing SKU
  • delete bundle validator requires existing SKU
CatalogImportAiServiceTest
12 tests
  • isAvailable returns true when configured
  • isAvailable returns false when API key missing
  • isAvailable returns false when disabled
  • suggestMapping returns exact matches for known column names
  • suggestMapping returns null for unrecognized headers when AI unavailable
  • suggestMapping uses learned patterns with high confidence
  • suggestMapping ignores learned patterns below usage threshold
  • suggestMapping calls Anthropic API for unmapped headers
  • suggestMapping handles API failure gracefully
  • recordAcceptedMappings creates new patterns
  • recordAcceptedMappings increments usage count for existing patterns
  • recordAcceptedMappings skips empty mappings
RemittanceServiceTest
9 tests
  • RemittanceService returns payment status options
  • RemittanceService returns approval status options
  • RemittanceService returns transaction status options
  • RemittanceService returns transaction type options
  • RemittanceService returns financial account status options
  • RemittanceService formatCurrency formats correctly
  • RemittanceService getGlobalRemittanceSettings returns defaults when no settings exist
  • RemittanceService getGlobalRemittanceSettings returns configured values
  • RemittanceService getAccountOptions returns active accounts
BulkUploadServiceTest
8 tests
  • BulkUploadService returns entity type options
  • BulkUploadService returns status options
  • BulkUploadService returns entity columns for products
  • BulkUploadService returns entity columns for accounts
  • BulkUploadService returns empty array for unknown entity type
  • BulkUploadService returns required columns for products
  • BulkUploadService returns empty required columns for unknown entity
  • BulkUploadService entity columns contain required columns
StorageServiceTest
8 tests
  • StorageService fileExists returns true for existing file
  • StorageService fileExists returns false for missing file
  • StorageService getFileInfo returns file metadata
  • StorageService getFileInfo throws FileNotFoundException for missing file
  • StorageService deleteFile removes existing file
  • StorageService deleteFile throws FileNotFoundException for missing file
  • StorageService uploadFile stores file and returns path
  • StorageService getSignedUrl throws FileNotFoundException for missing file
FinanceServiceTest
7 tests
  • FinanceService returns invoice status options
  • FinanceService returns payment status options
  • FinanceService returns transaction type options
  • FinanceService formats currency correctly
  • FinanceService getAccountOptions returns active accounts
  • FinanceService checkOverdueInvoices updates sent invoices past due date
  • FinanceService checkOverdueInvoices does not affect paid invoices
AchServiceTest
6 tests
  • AchService returns account status options
  • AchService returns transaction status options
  • AchService returns transaction type options
  • AchService returns account type options
  • AchService getAccountOptions returns active accounts
  • AchService initiatePayment creates a pending transaction
BulkActionServiceTest
5 tests
  • BulkActionService bulkDelete returns zero counts for empty file ids
  • BulkActionService bulkDelete handles missing records gracefully
  • BulkActionService bulkDelete deletes folders without storage call
  • BulkActionService bulkDelete deletes files from storage and DB
  • BulkActionService bulkDelete handles FileNotFoundException as soft success
OrderServiceTest
5 tests
  • OrderService returns status options
  • OrderService getAccountOptions returns active accounts
  • OrderService getProductOptions returns active products with price
  • OrderService getBundleOptions returns active bundles
  • OrderService getProductOptions excludes inactive products
SettingsManagerTest
4 tests
  • SettingsManager can be instantiated with all dependencies
  • SettingsManager exposes all model dependencies as public properties
  • SettingsManager exposes all service dependencies as public properties
  • SettingsManager can be resolved from the service container
ChannelPartnerServiceTest
3 tests
  • ChannelPartnerService returns status options
  • ChannelPartnerService returns commission status options
  • ChannelPartnerService getAccountOptions returns active accounts
AccountServiceTest
2 tests
  • AccountService getAccountsWithUser delegates to repository
  • AccountService getAccountsWithUser returns empty collection when no accounts

Unit / Jobs

67 tests · 11 classes
ParseCatalogImportJobTest
10 tests
  • job can be dispatched
  • job has max one try
  • job parses CSV and creates bulk upload rows
  • job skips rows with empty action
  • job handles malformed CSV gracefully
  • job updates upload status to parsing during execution
  • bulk upload has rows relationship
  • bulk upload has creator relationship
  • bulk upload calculates progress percent
  • bulk upload progress is zero when total rows is zero
CalculateRemittancePaymentsJobTest
8 tests
  • job uses remittance queue
  • job has max one try
  • job implements ShouldBeUnique
  • job can be dispatched
  • job dispatched on remittance queue
  • job handles no accounts gracefully
  • job processes account with mapped transactions
  • job skips accounts without financial accounts
RetrieveBofATransactionsJobTest
8 tests
  • job uses remittance queue
  • job has max three tries
  • job has 60 second backoff
  • job can be dispatched
  • job dispatched on remittance queue
  • duplicate external reference is not re imported
  • inbound bank transaction has expected fillable attributes
  • inbound bank transaction appends hashid
ArchiveOldTransactionsJobTest
7 tests
  • ArchiveOldTransactionsJob can be constructed
  • ArchiveOldTransactionsJob uses remittance queue
  • ArchiveOldTransactionsJob has 1 try
  • ArchiveOldTransactionsJob can be dispatched to queue
  • ArchiveOldTransactionsJob uses default 365 days when no global settings exist
  • ArchiveOldTransactionsJob reads archive days from global settings
  • ArchiveOldTransactionsJob archives in batches until complete
ExecuteRemittancePaymentJobTest
6 tests
  • ExecuteRemittancePaymentJob can be constructed with pending payment id
  • ExecuteRemittancePaymentJob uses remittance queue
  • ExecuteRemittancePaymentJob has 10 tries
  • ExecuteRemittancePaymentJob has 120 second backoff
  • ExecuteRemittancePaymentJob can be dispatched to queue
  • ExecuteRemittancePaymentJob skips non existent payment gracefully
ReconcileSettlementsJobTest
6 tests
  • ReconcileSettlementsJob can be constructed with default dates
  • ReconcileSettlementsJob can be constructed with custom dates
  • ReconcileSettlementsJob uses remittance queue
  • ReconcileSettlementsJob has 3 tries
  • ReconcileSettlementsJob has 60 second backoff
  • ReconcileSettlementsJob can be dispatched to queue
SendRemittanceNotificationJobTest
6 tests
  • SendRemittanceNotificationJob can be constructed with payment id and type
  • SendRemittanceNotificationJob uses remittance queue
  • SendRemittanceNotificationJob has 3 tries
  • SendRemittanceNotificationJob has 30 second backoff
  • SendRemittanceNotificationJob can be dispatched
  • SendRemittanceNotificationJob handles missing payment gracefully
ProcessCatalogImportJobTest
5 tests
  • ProcessCatalogImportJob can be instantiated with upload id
  • ProcessCatalogImportJob has 1 try
  • ProcessCatalogImportJob has 600 second timeout
  • ProcessCatalogImportJob can be dispatched to queue
  • ProcessCatalogImportJob processes pending rows
ReprocessCatalogImportJobTest
4 tests
  • ReprocessCatalogImportJob can be instantiated with upload id
  • ReprocessCatalogImportJob has 1 try
  • ReprocessCatalogImportJob can be dispatched to queue
  • ReprocessCatalogImportJob targets corrected rows
SendEmailJobTest
4 tests
  • SendEmailJob is dispatched to the default queue
  • SendEmailJob sends email via Mail facade
  • SendEmailJob updates sent at on success
  • SendEmailJob can be dispatched to queue
SyncTranslationsJobTest
3 tests
  • SyncTranslationsJob calls translations sync artisan command
  • SyncTranslationsJob can be dispatched to queue
  • SyncTranslationsJob is idempotent when dispatched multiple times

Unit / Middleware

24 tests · 5 classes
HandleInertiaRequestsTest
6 tests
  • HandleInertiaRequests has app root view
  • HandleInertiaRequests shares null auth when no user
  • HandleInertiaRequests shares flash messages
  • HandleInertiaRequests shares app name
  • HandleInertiaRequests shares translations as lazy closure
  • HandleInertiaRequests shares languages as lazy closure
LanguageMiddlewareTest
5 tests
  • LanguageMiddleware sets locale when valid active language provided
  • LanguageMiddleware does not change locale for inactive language
  • LanguageMiddleware falls back to app locale when no lang param
  • LanguageMiddleware stores language id in session
  • LanguageMiddleware always passes request to next handler
PreventBackTest
5 tests
  • PreventBack adds Cache Control header
  • PreventBack adds Pragma header
  • PreventBack adds Expires header
  • PreventBack passes request to next middleware
  • PreventBack preserves original response content
StoreAdminPreviousUrlTest
5 tests
  • StoreAdminPreviousUrl stores URL on GET requests
  • StoreAdminPreviousUrl does not store URL on POST requests
  • StoreAdminPreviousUrl does not store URL on AJAX requests
  • StoreAdminPreviousUrl always passes request to next handler
  • StoreAdminPreviousUrl does not store URL on PUT requests
CheckAuthTest
3 tests
  • CheckAuth redirects unauthenticated users to login
  • CheckAuth allows authenticated users through
  • CheckAuth passes request to next middleware on success

Unit / Other

1 tests · 1 class
ExampleTest
1 tests
  • true is true

Feature / Auth

23 tests · 3 classes
AuthControllerTest
14 tests
  • login page renders successfully
  • login page renders inertia component when requested via SPA
  • authenticated user is redirected from login page
  • login requires email
  • login requires password
  • login validates email format
  • unauthenticated user is redirected from dashboard
  • authenticated user can access dashboard
  • dashboard renders inertia component when requested via SPA
  • authenticated user can logout
  • forgot password page renders
  • forgot password page renders inertia component via SPA
  • authenticated user can extend session
  • unauthenticated user cannot extend session
PasswordResetOtpTest
5 tests
  • forgot password sends OTP for existing user
  • forgot password returns error for unknown email
  • OTP verification works with correct code
  • expired OTP for password reset returns error
  • invalid OTP for password reset returns error
OtpVerificationTest
4 tests
  • valid OTP logs user in
  • expired OTP returns error
  • invalid OTP returns error
  • missing user returns error

Feature / Accounts

25 tests · 2 classes
AccountControllerTest
15 tests
  • unauthenticated user is redirected from accounts list
  • unauthenticated user is redirected from create account form
  • user without account view permission cannot access accounts list
  • user without account create permission cannot access create form
  • user without account create permission cannot store account
  • user without account modify permission cannot update account
  • authorized user can access accounts list
  • accounts list renders correct inertia component
  • accounts list returns paginated data
  • create account form renders correct inertia component
  • edit account renders correct inertia component
  • account status can be updated by authorized user
  • accounts model appends hashid
  • accounts model has users relationship
  • accounts model has expected fillable attributes
AccountSettingControllerTest
10 tests
  • unauthenticated user is redirected from account settings
  • unauthenticated user cannot save trigger
  • user without account view cannot access account settings
  • user without account modify cannot save trigger
  • user without account modify cannot activate trigger
  • user without account modify cannot save ecommerce settings
  • authorized user can access account settings
  • account settings renders correct inertia component
  • ecommerce settings validates fee rate max
  • ecommerce settings validates notification frequency

Feature / Users

16 tests · 1 class
UsersControllerTest
16 tests
  • unauthenticated user is redirected from users list
  • unauthenticated user is redirected from create user form
  • user without user view permission cannot access users list
  • user without user create permission cannot access create form
  • user without user create permission cannot store user
  • user without user modify permission cannot update user
  • authorized user can access users list
  • users list renders correct inertia component
  • create user form renders correct inertia component
  • store user creates user and redirects
  • store user requires first name
  • store user requires email
  • store user requires password on create
  • store user requires roles
  • edit user renders correct inertia component
  • user status can be updated

Feature / Roles

17 tests · 1 class
RolesControllerTest
17 tests
  • unauthenticated user is redirected from roles list
  • unauthenticated user is redirected from create role form
  • user without role view permission cannot access roles list
  • user without role create permission cannot access create form
  • user without role create permission cannot store role
  • user without role modify permission cannot update role
  • authorized user can access roles list
  • roles list renders correct inertia component
  • roles list excludes Super Admin role from inertia response
  • create role form renders correct inertia component
  • store role creates role with permissions
  • store role requires name
  • store role requires permissions
  • store role prevents duplicate name
  • edit role renders correct inertia component
  • update role modifies role and permissions
  • role status can be updated

Feature / Finance

112 tests · 5 classes
InvoiceControllerTest
33 tests
  • unauthenticated user is redirected from finance invoices list
  • unauthenticated user is redirected from finance invoices add form
  • unauthenticated user is redirected from finance payments list
  • unauthenticated user is redirected from finance dashboard
  • authenticated user with finance view can access invoices list
  • invoice list returns inertia page component
  • invoice list includes status options
  • invoice list includes filters
  • authenticated user with finance create can access add invoice form
  • add invoice form returns correct inertia component
  • add invoice form includes account options
  • store invoice creates invoice with items
  • store invoice calculates subtotal correctly
  • store invoice creates invoice items
  • store invoice generates invoice number
  • store invoice requires account id
  • store invoice requires issued date
  • store invoice requires due date
  • store invoice requires due date after or equal to issued date
  • store invoice requires at least one item
  • store invoice requires items to be array
  • store invoice requires item description
  • store invoice requires item quantity
  • store invoice requires item unit price
  • store invoice requires item quantity to be at least 1
  • show invoice returns correct inertia component
  • show invoice with invalid hashid returns 404
  • invoice status can be updated to sent
  • invoice status can be updated to paid
  • invoice status update validates status values
  • invoice status update requires id
  • user without finance view permission cannot access invoice list
  • user without finance create permission cannot store invoice
AchControllerTest
27 tests
  • unauthenticated user is redirected from ach accounts list
  • unauthenticated user is redirected from ach create form
  • unauthenticated user is redirected from ach transactions list
  • authenticated user can access ach accounts list
  • ach accounts list returns correct inertia component
  • create ach account form returns correct inertia component
  • store ach account creates account with valid data
  • store ach account sets status to pending verification
  • store ach account sets verification method to micro deposits
  • store ach account requires account id
  • store ach account requires bank name
  • store ach account requires routing number to be exactly 9 characters
  • store ach account rejects routing number with more than 9 characters
  • store ach account requires account number last4 to be exactly 4 characters
  • store ach account requires valid account type
  • store ach account requires account holder name
  • store ach account accepts checking account type
  • store ach account accepts savings account type
  • verify ach account updates status to verified
  • verify ach account sets verified at timestamp
  • verify ach account requires amount1
  • verify ach account requires amount2
  • verify ach account requires amounts to be at least 0 01
  • verify ach account requires amounts to be at most 0 99
  • show ach account returns correct inertia component
  • user without ach view permission cannot access ach accounts
  • user without ach create permission cannot store ach account
FinanceDashboardTest
20 tests
  • unauthenticated user is redirected from finance dashboard
  • unauthenticated user is redirected from payment methods
  • unauthenticated user is redirected from transactions
  • user without finance view cannot access dashboard
  • user without finance view cannot access payment methods
  • user without finance view cannot access transactions
  • user without finance create cannot access add payment method
  • user without finance create cannot store payment method
  • authorized user can access finance dashboard
  • finance dashboard renders correct inertia component
  • authorized user can access payment methods list
  • payment methods list renders correct inertia component
  • add payment method form renders correct inertia component
  • store payment method requires name
  • store payment method succeeds with valid data
  • payment method status requires id and action
  • payment method status validates action values
  • authorized user can access transactions list
  • transactions list renders correct inertia component
  • invoice status requires valid status value
PaymentControllerTest
17 tests
  • unauthenticated user is redirected from payments list
  • unauthenticated user is redirected from add payment form
  • authenticated user can access payments list
  • payments list returns correct inertia component
  • add payment form returns correct inertia component
  • store payment records a completed payment
  • store completed payment creates financial transaction
  • store completed payment updates account balance
  • store pending payment does not create financial transaction
  • store payment with invoice id links payment to invoice
  • store payment requires account id
  • store payment requires amount
  • store payment requires amount to be at least 0 01
  • store payment requires valid status
  • store payment requires status to be present
  • store payment accepts valid status values
  • store payment requires valid account id reference
ClientFinancialAccountTest
15 tests
  • unauthenticated user is redirected from bank accounts list
  • unauthenticated user is redirected from create bank account form
  • user without remittance permission cannot access bank accounts
  • user without remittance permission cannot create bank account
  • authorized user can access bank accounts list
  • bank accounts list renders inertia component
  • create bank account form renders inertia component
  • set primary requires valid account id
  • delete requires valid account id
  • verify requires valid account id
  • account financial account model has expected fillable attributes
  • account financial account hides sensitive stripe fields
  • account financial account appends hashid
  • account financial account casts is primary to boolean
  • account financial account casts verified at to datetime

Feature / Remittance

80 tests · 4 classes
RemittanceControllerTest
34 tests
  • unauthenticated user is redirected from remittance dashboard
  • unauthenticated user is redirected from pending payments
  • unauthenticated user is redirected from inbound transactions
  • unauthenticated user is redirected from unmapped transactions
  • remittance dashboard returns Inertia page with stats
  • remittance dashboard stats include pending approval count and amount
  • pending payments list returns Inertia page with paginated data
  • pending payments list includes pagination metadata
  • approve payment changes status to approved
  • approve payment sets approval notes
  • approve payment sets approved at timestamp
  • hold payment changes approval status to held
  • hold payment records who placed the hold
  • reject payment changes approval status to rejected
  • reject payment sets approval notes
  • batch approve works on multiple payments
  • batch approve requires ids array
  • batch approve with empty ids array returns validation error
  • inbound transactions list returns Inertia page with transactions
  • inbound transactions list includes paginated transaction data
  • unmapped transactions list returns Inertia page
  • unmapped transactions only includes transactions without account id
  • map transaction assigns account id to an unmapped transaction
  • map transaction requires account id
  • trigger manual run dispatches RetrieveBofATransactionsJob
  • trigger manual run uses yesterday as default date when none provided
  • user without remittance view permission cannot access dashboard
  • user without remittance view permission cannot access pending payments
  • user without remittance approve permission cannot approve payment
  • user without remittance approve permission cannot hold payment
  • user without remittance approve permission cannot reject payment
  • user without remittance approve permission cannot batch approve
  • user without remittance admin permission cannot trigger manual run
  • user without remittance admin permission cannot map transaction
ReconciliationTest
17 tests
  • matching BofA settlement to pending payment via customerReference
  • findPendingByCustomerReference returns null when no match exists
  • matching settlement to processed payment via customerReference
  • unmatched customer reference returns null for processed lookup
  • settled payment is moved to processed table via moveToProcessed
  • moveToProcessed copies original pending id to processed record
  • moveToProcessed correctly calculates total fees from pending fee columns
  • moveToProcessed copies line items to processed payment
  • moveToProcessed copies customer reference to processed record
  • returned ACH payment can be marked with returned status and timestamp
  • returned payment retains its original gross revenue and net amount
  • common ACH return codes can be stored in failure reason
  • settled payment has settled at timestamp
  • moveToProcessed defaults status to settled
  • pending payment can be looked up by customer reference after being sent for processing
  • processed payment has correct relationship back to original pending payment
  • processed payment has correct relationship back to account
ApprovalWorkflowTest
16 tests
  • payment auto approved when below auto approve threshold
  • payment requires approval when above auto approve threshold
  • all payments auto approved when approval workflow disabled globally
  • payment at exactly the auto approve threshold is auto approved
  • payment one cent above auto approve threshold requires approval
  • approve action moves payment from pending approval to approved
  • approve action on already approved payment still succeeds
  • hold action moves payment to held approval status
  • held payment retains its original status field
  • reject action moves payment to rejected approval status
  • reject action updates main status to rejected
  • repository approvePendingPayment sets correct fields
  • repository holdPendingPayment sets correct fields
  • repository rejectPendingPayment sets correct fields
  • batch approve transitions all selected payments to approved
  • batch approve does not affect payments not in the ids list
CalculationEngineTest
13 tests
  • full calculation with real models produces correct net amount
  • full calculation with client level ecommerce settings overrides global defaults
  • full calculation when ecommerce settings remittance enabled is false falls back to global
  • multi client calculation produces correct results per client with different fee rates
  • each client calculation is isolated and does not affect other clients
  • chargeback deduction reduces gross revenue before fee calculation
  • multiple chargebacks are summed and deducted
  • chargeback exceeding gross results in negative net and carry forward
  • balance carry forward is created when none exists for account
  • negative carried balance from prior period is applied to current calculation
  • positive catchup balance is carried across cycles
  • full calculation with all fee types applies correctly
  • line items are generated for all non zero fee types

Feature / Orders

30 tests · 1 class
OrderControllerTest
30 tests
  • unauthenticated user is redirected from orders list
  • unauthenticated user is redirected from create order form
  • authenticated user can access orders list
  • orders list returns correct inertia component
  • orders list includes dashboard stats
  • create order form returns correct inertia component
  • store order creates order with items
  • store order sets status to draft
  • store order calculates subtotal from items
  • store order calculates total amount with tax and shipping minus discount
  • store order generates order number
  • store order creates order items
  • store order sets created by to authenticated user
  • store order requires account id
  • store order requires at least one item
  • store order requires item name
  • store order requires item quantity
  • store order requires item unit price
  • store order requires item quantity to be at least 1
  • store order validates account exists
  • show order returns correct inertia component
  • show order with invalid hashid returns 404
  • order status can be updated to confirmed
  • order status can be updated to shipped
  • order status can be updated to delivered
  • order status can be updated to cancelled
  • order status update validates status values
  • order status update requires id
  • user without order view permission cannot access orders list
  • user without order create permission cannot store order

Feature / Products

19 tests · 1 class
ProductControllerTest
19 tests
  • unauthenticated user is redirected from products list
  • unauthenticated user is redirected from create product form
  • user without product view permission cannot access products list
  • user without product create permission cannot access create form
  • user without product create permission cannot store product
  • user without product modify permission cannot update product
  • authorized user can access products list
  • products list renders correct inertia component
  • products list returns paginated results
  • create product form renders correct inertia component
  • store product requires name
  • store product requires SKU
  • store product requires type
  • store product prevents duplicate SKU
  • edit product renders correct inertia component
  • product status can be updated by authorized user
  • products model has expected fillable attributes
  • products model appends hashid
  • products model has account relationship

Feature / Bundles

16 tests · 1 class
BundleControllerTest
16 tests
  • unauthenticated user is redirected from bundles list
  • unauthenticated user is redirected from create bundle form
  • user without bundle view permission cannot access bundles list
  • user without bundle create permission cannot access create form
  • user without bundle create permission cannot store bundle
  • user without bundle modify permission cannot update bundle
  • authorized user can access bundles list
  • bundles list renders correct inertia component
  • bundles list returns paginated data
  • create bundle form renders correct inertia component
  • edit bundle renders correct inertia component
  • bundle status can be updated by authorized user
  • bundles model appends hashid
  • bundles model casts prices to decimal
  • bundles model has products relationship
  • bundles model has supportEntity relationship

Feature / Channel Partners

33 tests · 1 class
ChannelPartnerControllerTest
33 tests
  • unauthenticated user is redirected from channel partners list
  • unauthenticated user is redirected from channel partners create form
  • authenticated user can access channel partners list
  • channel partners list returns correct inertia component
  • create channel partner form returns correct inertia component
  • store channel partner creates partner with valid data
  • store channel partner sets created by to authenticated user
  • store channel partner requires name
  • store channel partner requires code
  • store channel partner requires unique code
  • store channel partner requires default commission rate
  • store channel partner requires commission rate between 0 and 100
  • store channel partner requires commission rate to be non negative
  • store channel partner validates contact email format
  • store channel partner accepts valid contact email
  • show channel partner returns correct inertia component
  • edit channel partner returns correct inertia component
  • update channel partner modifies partner data
  • update channel partner allows same code for own record
  • update channel partner rejects duplicate code from another record
  • assign account to channel partner
  • assign account requires account id
  • assign account requires assigned at date
  • assign account validates expires at is after assigned at
  • commissions list returns correct inertia component
  • update commission status changes commission status
  • update commission status to paid sets paid at timestamp
  • update commission status validates status values
  • update commission status requires id
  • channel partner status can be toggled to inactive
  • channel partner status can be toggled to active
  • user without channel partner view permission cannot access list
  • user without channel partner create permission cannot store partner

Feature / Catalog Import

106 tests · 8 classes
BulkUploadControllerTest
30 tests
  • unauthenticated user is redirected from bulk upload list
  • unauthenticated user is redirected from bulk upload create form
  • authenticated user can access bulk upload list
  • bulk upload list returns correct inertia component
  • create bulk upload form returns correct inertia component
  • store bulk upload with csv file
  • store bulk upload sets status to pending
  • store bulk upload saves original filename
  • store bulk upload stores file to s3
  • store bulk upload sets created by
  • store bulk upload requires name
  • store bulk upload requires entity type
  • store bulk upload requires valid entity type
  • store bulk upload requires file
  • store bulk upload requires file to be csv txt or xlsx
  • store bulk upload rejects file larger than 10MB
  • store bulk upload accepts accounts entity type
  • store bulk upload accepts users entity type
  • store bulk upload accepts products entity type
  • show bulk upload returns correct inertia component
  • update mapping saves column mapping
  • update mapping sets status to validating
  • update mapping requires column mapping array
  • process trigger updates status to processing
  • process trigger sets started at timestamp
  • rows endpoint returns json response
  • rows endpoint returns paginated results
  • user without bulk upload view permission cannot access list
  • user without bulk upload create permission cannot store upload
  • user without bulk upload modify permission cannot process upload
CatalogImportControllerTest
17 tests
  • unauthenticated user is redirected from catalog import hub
  • unauthenticated user is redirected from catalog import create
  • user without catalog import view cannot access hub
  • user without catalog import create cannot upload
  • authorized user can access catalog import hub
  • catalog import hub renders inertia component
  • create page renders inertia component
  • upload CSV stores file and dispatches parse job
  • upload requires CSV file
  • upload rejects non CSV file
  • status page renders for valid upload
  • status JSON endpoint returns upload stats
  • review exception page renders for valid row
  • save correction updates row status to corrected
  • reprocess dispatches reprocess job
  • history page renders
  • download failures returns CSV for completed upload
CategoryRegistryTest
16 tests
  • unauthenticated user cannot access category registry
  • user without permissions cannot access category registry
  • user without create permission cannot store entry
  • user without modify permission cannot promote entry
  • authorized user can access category registry index
  • index page shows pending review count
  • store creates master level registry entry
  • store rejects duplicate values
  • store validates required fields
  • store validates entity type enum
  • update modifies registry entry value
  • update can deprecate an entry
  • promote creates master copy and activates entity entry
  • reject marks entry as deprecated
  • scopedValues returns master and entity values
  • entity scoped values are isolated per support entity
SaveResumeTest
11 tests
  • save progress stores step state on upload
  • unauthenticated user cannot save progress
  • resume redirects to mapping step
  • resume redirects to resolving step
  • resume redirects to scanning step
  • resume redirects to summary for completed imports
  • hub shows in progress imports for the current user
  • completed screen shows product and bundle breakdown
  • completed screen shows filename and uploader
  • completion email job can be dispatched
  • completion email job has correct retry configuration
SuperadminReviewTest
10 tests
  • unauthenticated user cannot access review page
  • user without modify permission cannot access review page
  • user without modify permission cannot approve requests
  • review page renders with grouped requests
  • review page shows pending category review requests
  • approve updates request status and records reviewer
  • reject updates request status
  • pendingCount returns combined review and category counts
  • pendingCount returns zero when no pending requests
  • approved requests are not counted as pending
AiMappingTest
9 tests
  • unauthenticated user cannot access mapping page
  • user without permissions cannot access mapping page
  • mapping page renders with catalog fields
  • suggest mapping returns AI suggestions with confidence scores
  • suggest mapping falls back gracefully when AI unavailable
  • suggest mapping uses learned patterns from previous imports
  • confirm mapping stores mapping and dispatches scan job
  • confirm mapping records accepted patterns for learning
  • confirm mapping requires mapping array
IssuesResolutionTest
8 tests
  • unauthenticated user cannot access issues page
  • user without permissions cannot access issues page
  • issues page renders with issue rows
  • issues page includes scoped registry values
  • resolve row accepts resolution data for issue row
  • resolve row rejects non issue rows
  • resolve row requires resolution data
  • skip remaining marks all issue rows as skipped
AnomalyDetectionTest
5 tests
  • confirm mapping dispatches anomaly scan job
  • upload anomaly scan status defaults to null before scan
  • status page is accessible during anomaly scanning
  • rows can store anomaly warnings
  • rows can store anomaly errors

Feature / Messaging

25 tests · 2 classes
MessagingControllerTest
15 tests
  • unauthenticated user is redirected from messaging sets list
  • unauthenticated user is redirected from messaging types list
  • unauthenticated user is redirected from communication types list
  • unauthenticated user is redirected from template groupings list
  • user without messaging set view cannot access messaging sets
  • user without messaging set create cannot access create form
  • authorized user can access messaging sets list
  • messaging sets list renders inertia component
  • create messaging set form renders inertia component
  • authorized user can access messaging types list
  • messaging types list renders inertia component
  • authorized user can access communication types list
  • communication types list renders inertia component
  • authorized user can access template groupings list
  • template groupings list renders inertia component
CommunicationTypesControllerTest
10 tests
  • unauthenticated user is redirected from communication types list
  • unauthenticated user is redirected from communication types add
  • user without communication type view cannot access list
  • user without communication type create cannot access add form
  • user without communication type create cannot store
  • authorized user can access communication types list
  • communication types list renders correct inertia component
  • add form renders correct inertia component
  • store communication type requires name
  • user without status permission cannot update status

Feature / Documents

27 tests · 3 classes
SharedDocumentTest
15 tests
  • valid share token returns document page
  • invalid share token returns 404
  • expired share token still renders if active
  • deactivated share token denies access
  • external access form renders for valid token
  • external access form returns 404 for invalid token
  • verify email requires email field
  • verify email requires share token field
  • verify otp requires all fields
  • share requiring login redirects unauthenticated user
  • share requiring login allows authenticated matching user
  • shared document generates share token
  • shared document generates secure share token
  • shared document casts expires at to datetime
  • shared document casts requires login to boolean
DocumentControllerTest
10 tests
  • unauthenticated user cannot access document API
  • unauthenticated user cannot upload files
  • authenticated user can create a folder
  • create folder requires name
  • authenticated user can rename a folder
  • authenticated user can upload a file
  • authenticated user can fetch retention periods
  • authenticated user can fetch role permissions for folder
  • authenticated user can bulk delete documents
  • view url for non existent document returns error
RetentionPeriodControllerTest
2 tests
  • unauthenticated user cannot access retention periods
  • authenticated user can access retention periods via sanctum

Feature / Media

10 tests · 1 class
MediaControllerTest
10 tests
  • unauthenticated user is redirected from media list
  • unauthenticated user cannot upload media
  • unauthenticated user cannot delete media
  • user without media view permission cannot access media list
  • user without media create permission cannot upload media
  • user without media delete permission cannot delete media
  • authorized user can access media list
  • media list renders correct inertia component
  • upload requires files
  • delete requires an id

Feature / Education

13 tests · 1 class
EducationControllerTest
13 tests
  • unauthenticated user is redirected from purpose flow list
  • unauthenticated user is redirected from screen configuration list
  • authenticated user can access purpose flow list
  • purpose flow list renders inertia component
  • purpose flow create renders inertia component
  • purpose flow store creates flow and redirects
  • purpose flow store requires name
  • authenticated user can access screen configuration list
  • screen configuration list renders inertia component
  • screen configuration create renders inertia component
  • screen configuration store creates config and redirects
  • screen configuration store requires name
  • purpose flow status update endpoint exists

Feature / Settings

23 tests · 2 classes
SettingsControllerTest
13 tests
  • unauthenticated user is redirected from regions list
  • unauthenticated user is redirected from countries list
  • unauthenticated user is redirected from genders list
  • authenticated user can access regions list
  • regions list renders correct inertia component
  • regions add page renders
  • authenticated user can access countries list
  • countries list renders inertia component
  • authenticated user can access genders list
  • genders list renders inertia component
  • invalid settings type returns fallback
  • authenticated user can access states list
  • states list renders inertia component
GlobalSettingsControllerTest
10 tests
  • unauthenticated user is redirected from global settings
  • authorized user can access global settings page
  • global settings page renders inertia component
  • authorized user can save global settings
  • authenticated user can access language management
  • language management renders blade view
  • global settings model appends hashid
  • global settings has account relationship
  • global settings casts remittance fields to decimal
  • global settings casts remittance approval enabled to boolean

Feature / Support Entity

14 tests · 1 class
SupportEntityControllerTest
14 tests
  • unauthenticated user is redirected from support entity categories
  • unauthenticated user is redirected from support entity category add
  • user without support entity category view cannot access categories list
  • user without support entity category create cannot access add category form
  • user without support entity category create cannot store category
  • user without status permission cannot update category status
  • authorized user can access support entity categories list
  • category list renders correct inertia component
  • add category form renders correct inertia component
  • store category requires name
  • unauthenticated user is redirected from support entities list
  • unauthenticated user is redirected from support entity add
  • authorized user can access support entities list
  • support entity list renders correct inertia component

Feature / Replacement Variables

14 tests · 1 class
ReplacementVariablesControllerTest
14 tests
  • unauthenticated user is redirected from replacement variables list
  • unauthenticated user is redirected from replacement variables add
  • user without replacement variable view cannot access list
  • user without replacement variable create cannot access add form
  • user without replacement variable create cannot store
  • user without replacement variable modify cannot update
  • authorized user can access replacement variables list
  • replacement variables list renders correct inertia component
  • add form renders correct inertia component
  • store replacement variable requires name
  • store replacement variable requires scope
  • store replacement variable requires use type
  • store replacement variable requires use field
  • user without status permission cannot update replacement variable status

Feature / Direct Mail

25 tests · 3 classes
PermitDirectMailControllerTest
10 tests
  • unauthenticated user cannot update permit direct mail
  • unauthenticated user cannot update direct mail types
  • unauthenticated user cannot update triggers
  • update permit direct mail requires account id
  • update permit direct mail requires permit direct mail
  • update permit direct mail succeeds with valid data
  • update direct mail types requires direct mail type ids
  • update direct mail types requires array
  • update triggers requires trigger ids
  • update triggers requires array
TriggersByAccountControllerTest
8 tests
  • unauthenticated user cannot update or create trigger
  • unauthenticated user cannot update or create direct mail type
  • update or create trigger requires accountId
  • update or create trigger requires triggerIds
  • update or create trigger requires triggerIds to be array
  • update or create direct mail type requires accountId
  • update or create direct mail type requires directMailTypeIds
  • update or create direct mail type requires directMailTypeIds to be array
PostlyticsControllerTest
7 tests
  • send mail requires first name
  • send mail requires last name
  • send mail requires address street
  • send mail requires address city
  • send mail requires address state
  • send mail requires address zip
  • send mail requires template id

Feature / Case Notes

7 tests · 1 class
CaseNoteControllerTest
7 tests
  • unauthenticated user cannot add case note
  • unauthenticated user cannot remove case note
  • add case note requires note field
  • add case note requires account id field
  • add case note enforces max length of 5000
  • remove case note requires id field
  • authenticated user can call add case note endpoint

Feature / Dynamic Pages

7 tests · 1 class
DynamicPageControllerTest
7 tests
  • unauthenticated user is redirected from dynamic page
  • rejects page names with path traversal characters
  • rejects page names with dots
  • rejects page names with spaces
  • allows valid page names with alphanumeric characters
  • allows page names with underscores
  • allows page names with hyphens

Feature / Telemedicine

5 tests · 1 class
TelemedicineControllerTest
5 tests
  • unauthenticated user cannot update external network
  • update external network requires action field
  • update external network rejects invalid action
  • update external network accepts valid actions
  • update external network validates network id is integer

Feature / Generic

3 tests · 1 class
GenericControllerTest
3 tests
  • unauthenticated user cannot get cities
  • authenticated user can call get cities endpoint
  • authenticated user can pass state id to get cities

Feature / Other

1 tests · 1 class
ExampleTest
1 tests
  • application returns a successful response