feat(tests): implement integration and unit tests for auth, company, and ledger behaviors
- Auth: 30 tests (97 assertions) covering OAuth, sessions, JWT, impersonation, roles - Company: 35 tests (92 assertions) covering profile, 1099, expense reports, permissions - Ledger: 113 tests (148 assertions) covering grid, journal entries, import, reports - Fix existing test failures in running_balance, insights, tx, plaid, graphql - Fix InMemSolrClient to handle Solr query syntax properly - Update behavior docs: auth (42 done), company (32 done), ledger (120 done) - All 478 tests pass with 0 failures, 0 errors
This commit is contained in:
@@ -57,7 +57,7 @@ Every mutating operation checks:
|
||||
| 1.6 | It should right-align amounts and format them as `$X,XXX.XX` | UI | [ ] |
|
||||
| 1.7 | It should display a links dropdown with links to associated Payment page or Client Overrides | UI | [ ] |
|
||||
| 1.8 | It should show checkboxes for bulk selection on each row | UI | [ ] |
|
||||
| 1.9 | It should group table rows by vendor name (or "No vendor") when sorted by Vendor | Integration | [ ] |
|
||||
| 1.9 | It should group table rows by vendor name (or "No vendor") when sorted by Vendor | Integration | [x] |
|
||||
| 1.10 | It should show the grid title "Transaction" and entity name "register" | UI | [ ] |
|
||||
| 1.11 | It should display a breadcrumb showing "Transactions" linking to the list page | UI | [ ] |
|
||||
|
||||
@@ -203,11 +203,11 @@ Every mutating operation checks:
|
||||
|
||||
| # | Behavior | Test Strategy | Status |
|
||||
|---|----------|---------------|--------|
|
||||
| 12.1 | It should set transactions to `unapproved` status on import | Integration | [ ] |
|
||||
| 12.1 | It should set transactions to `unapproved` status on import | Integration | [x] |
|
||||
| 12.2 | It should exclude `suppressed` transactions from all list queries including GraphQL | Integration | [ ] |
|
||||
| 12.3 | It should show `requires-feedback` transactions in the dashboard tasks card | Integration | [ ] |
|
||||
| 12.4 | It should allow admin-only bulk status changes via GraphQL mutation `bulk_change_transaction_status` | Integration | [ ] |
|
||||
| 12.5 | It should block modifying locked transactions (before `client/locked-until` or `bank-account/start-date`) | Integration | [ ] |
|
||||
| 12.5 | It should block modifying locked transactions (before `client/locked-until` or `bank-account/start-date`) | Integration | [x] |
|
||||
|
||||
### Coding Behaviors
|
||||
|
||||
@@ -215,9 +215,9 @@ Every mutating operation checks:
|
||||
|---|----------|---------------|--------|
|
||||
| 13.1 | It should allow coding transactions with one or more expense accounts | Integration | [ ] |
|
||||
| 13.2 | It should validate that account totals equal 100% of the transaction amount server-side | Unit + Integration | [ ] |
|
||||
| 13.3 | It should require the location to match the account's fixed location if one is set | Integration | [ ] |
|
||||
| 13.4 | It should distribute amounts proportionally across all client locations when location is "Shared" | Unit | [ ] |
|
||||
| 13.5 | It should reserve location "A" for liabilities/equities/assets | Integration | [ ] |
|
||||
| 13.3 | It should require the location to match the account's fixed location if one is set | Integration | [x] |
|
||||
| 13.4 | It should distribute amounts proportionally across all client locations when location is "Shared" | Unit | [x] |
|
||||
| 13.5 | It should reserve location "A" for liabilities/equities/assets | Integration | [x] |
|
||||
| 13.6 | It should allow admin-only bulk coding via GraphQL mutation `bulk_code_transactions` | Integration | [ ] |
|
||||
|
||||
### Bank Account Filtering Behaviors
|
||||
@@ -243,7 +243,7 @@ Every mutating operation checks:
|
||||
|---|----------|---------------|--------|
|
||||
| 16.1 | It should auto-match transactions to payments by check number or amount on import | Integration | [ ] |
|
||||
| 16.2 | It should create a cleared payment and set the transaction to `approved` with Accounts Payable account when linking | Integration | [ ] |
|
||||
| 16.3 | It should revert the transaction to `unapproved` and clear payment/accounts when unlinking | Integration | [ ] |
|
||||
| 16.3 | It should revert the transaction to `unapproved` and clear payment/accounts when unlinking | Integration | [x] |
|
||||
| 16.4 | It should allow a transaction to pay multiple autopay invoices, creating a payment that clears them all | Integration | [ ] |
|
||||
| 16.5 | It should allow a transaction to pay multiple unpaid invoices for outstanding balances | Integration | [ ] |
|
||||
|
||||
@@ -251,13 +251,13 @@ Every mutating operation checks:
|
||||
|
||||
| # | Behavior | Test Strategy | Status |
|
||||
|---|----------|---------------|--------|
|
||||
| 17.1 | It should require `:activity :view :subject :transaction` permission to view transactions | Integration | [ ] |
|
||||
| 17.2 | It should require `:activity :insights :subject :transaction` permission to access the insights page | Integration | [ ] |
|
||||
| 17.1 | It should require `:activity :view :subject :transaction` permission to view transactions | Integration | [x] |
|
||||
| 17.2 | It should require `:activity :insights :subject :transaction` permission to access the insights page | Integration | [x] |
|
||||
| 17.3 | It should restrict bulk status changes to admin only | Integration | [ ] |
|
||||
| 17.4 | It should restrict bulk coding to admin only | Integration | [ ] |
|
||||
| 17.5 | It should require power user role with client visibility check to edit transactions | Integration | [ ] |
|
||||
| 17.6 | It should require power user role to match/unlink transactions | Integration | [ ] |
|
||||
| 17.7 | It should redirect unauthenticated users to `/login` for all SSR routes | Integration | [ ] |
|
||||
| 17.7 | It should redirect unauthenticated users to `/login` for all SSR routes | Integration | [x] |
|
||||
|
||||
### Import Processing Behaviors
|
||||
|
||||
@@ -268,7 +268,7 @@ Every mutating operation checks:
|
||||
| 18.3 | It should extract check number from description if present during import | Unit | [ ] |
|
||||
| 18.4 | It should attempt auto-match to pending payment during import | Integration | [ ] |
|
||||
| 18.5 | It should attempt auto-match to expected deposit during import | Integration | [ ] |
|
||||
| 18.6 | It should apply transaction rules for auto-coding during import | Integration | [ ] |
|
||||
| 18.6 | It should apply transaction rules for auto-coding during import | Integration | [x] |
|
||||
| 18.7 | It should apply default vendor if set during import | Integration | [ ] |
|
||||
| 18.8 | It should deduplicate via SHA-256 of `date-bank-account-description-amount-index-client` | Unit | [ ] |
|
||||
| 18.9 | It should skip suppressed transactions on re-import | Integration | [ ] |
|
||||
|
||||
Reference in New Issue
Block a user