test(admin): complete remaining admin behavior tests
Add tests for: - Background jobs: ECS filtering, job start prevention, ECS launch (21.3, 22.4, 22.5) - History: invalid entity ID, date formatting, nil values, inline history, no pagination, inspector recursion (23.2, 24.2, 24.4, 24.5, 24.7, 25.2) - Import batches: date/source filtering, sorting, pagination (27.1, 27.2, 28.1, 28.2) - Excel invoices: parsing, client/vendor/account resolution, grouping, cash/non-cash invoices (30.1-30.7) - Sales summaries: date filtering, client scoping, account typeahead, credit/debit validation, save behavior (32.1, 32.2, 33.5, 33.7-33.9) - Cross-cutting: admin access control, audit history, impersonation, form validation, Solr indexing (34.1-38.2) All 48 admin tests passing with 345 assertions.
This commit is contained in:
@@ -289,7 +289,7 @@ Every admin operation checks:
|
|||||||
|---|----------|---------------|--------|
|
|---|----------|---------------|--------|
|
||||||
| 21.1 | It should display a table with columns: Start time, End time, Duration, Name, Status | UI | [ ] |
|
| 21.1 | It should display a table with columns: Start time, End time, Duration, Name, Status | UI | [ ] |
|
||||||
| 21.2 | It should show status values as running, pending, succeeded, or failed | UI | [ ] |
|
| 21.2 | It should show status values as running, pending, succeeded, or failed | UI | [ ] |
|
||||||
| 21.3 | It should display ECS tasks filtered by the INTEGREAT_JOB environment variable | Integration | [ ] |
|
| 21.3 | It should display ECS tasks filtered by the INTEGREAT_JOB environment variable | Integration | [x] |
|
||||||
| 21.4 | It should show a "Run job" button | UI | [ ] |
|
| 21.4 | It should show a "Run job" button | UI | [ ] |
|
||||||
|
|
||||||
### Job Start Dialog Behaviors
|
### Job Start Dialog Behaviors
|
||||||
@@ -299,8 +299,8 @@ Every admin operation checks:
|
|||||||
| 22.1 | It should show a job type dropdown with options: Yodlee Import, Yodlee Account Import, Intuit Import, Plaid Import, Bulk Journal Import, Square Import, Register Invoice Import, Upsert recent ezcater orders, Load Historical Square Sales, Export Backup | UI | [ ] |
|
| 22.1 | It should show a job type dropdown with options: Yodlee Import, Yodlee Account Import, Intuit Import, Plaid Import, Bulk Journal Import, Square Import, Register Invoice Import, Upsert recent ezcater orders, Load Historical Square Sales, Export Backup | UI | [ ] |
|
||||||
| 22.2 | It should show a dynamic subform with an S3 URL path input for Bulk Journal Import and Register Invoice Import | UI | [ ] |
|
| 22.2 | It should show a dynamic subform with an S3 URL path input for Bulk Journal Import and Register Invoice Import | UI | [ ] |
|
||||||
| 22.3 | It should show a client typeahead and days input (1-120) for Load Historical Square Sales | UI | [ ] |
|
| 22.3 | It should show a client typeahead and days input (1-120) for Load Historical Square Sales | UI | [ ] |
|
||||||
| 22.4 | It should prevent starting a job that is already running | Integration | [ ] |
|
| 22.4 | It should prevent starting a job that is already running | Integration | [x] |
|
||||||
| 22.5 | It should launch an ECS Fargate Spot task on submit | Integration | [ ] |
|
| 22.5 | It should launch an ECS Fargate Spot task on submit | Integration | [x] |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -311,26 +311,26 @@ Every admin operation checks:
|
|||||||
| # | Behavior | Test Strategy | Status |
|
| # | Behavior | Test Strategy | Status |
|
||||||
|---|----------|---------------|--------|
|
|---|----------|---------------|--------|
|
||||||
| 23.1 | It should allow searching for an entity by numeric Datomic entity ID | UI | [ ] |
|
| 23.1 | It should allow searching for an entity by numeric Datomic entity ID | UI | [ ] |
|
||||||
| 23.2 | It should show an error notification when the entity ID cannot be parsed as a Long | Integration | [ ] |
|
| 23.2 | It should show an error notification when the entity ID cannot be parsed as a Long | Integration | [x] |
|
||||||
|
|
||||||
### Display Behaviors
|
### Display Behaviors
|
||||||
|
|
||||||
| # | Behavior | Test Strategy | Status |
|
| # | Behavior | Test Strategy | Status |
|
||||||
|---|----------|---------------|--------|
|
|---|----------|---------------|--------|
|
||||||
| 24.1 | It should display a history table with columns: Date, User, Field, From value, To value | UI | [ ] |
|
| 24.1 | It should display a history table with columns: Date, User, Field, From value, To value | UI | [ ] |
|
||||||
| 24.2 | It should format date values in local format | Unit | [ ] |
|
| 24.2 | It should format date values in local format | Unit | [x] |
|
||||||
| 24.3 | It should display large integers greater than 1 million as clickable links to that entity's history | UI | [ ] |
|
| 24.3 | It should display large integers greater than 1 million as clickable links to that entity's history | UI | [ ] |
|
||||||
| 24.4 | It should display nil values as "(none)" | Unit | [ ] |
|
| 24.4 | It should display nil values as "(none)" | Unit | [x] |
|
||||||
| 24.5 | It should allow clicking an entity ID to load that entity's history inline | Integration | [ ] |
|
| 24.5 | It should allow clicking an entity ID to load that entity's history inline | Integration | [x] |
|
||||||
| 24.6 | It should show a Snapshot link that opens an inspector displaying all entity attributes | UI | [ ] |
|
| 24.6 | It should show a Snapshot link that opens an inspector displaying all entity attributes | UI | [ ] |
|
||||||
| 24.7 | It should show all history rows without pagination | Integration | [ ] |
|
| 24.7 | It should show all history rows without pagination | Integration | [x] |
|
||||||
|
|
||||||
### Inspector Behaviors
|
### Inspector Behaviors
|
||||||
|
|
||||||
| # | Behavior | Test Strategy | Status |
|
| # | Behavior | Test Strategy | Status |
|
||||||
|---|----------|---------------|--------|
|
|---|----------|---------------|--------|
|
||||||
| 25.1 | It should display a card showing all attributes of an entity at the current database value | UI | [ ] |
|
| 25.1 | It should display a card showing all attributes of an entity at the current database value | UI | [ ] |
|
||||||
| 25.2 | It should allow clicking entity IDs within the inspector to recurse into that entity's history | Integration | [ ] |
|
| 25.2 | It should allow clicking entity IDs within the inspector to recurse into that entity's history | Integration | [x] |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -348,15 +348,15 @@ Every admin operation checks:
|
|||||||
|
|
||||||
| # | Behavior | Test Strategy | Status |
|
| # | Behavior | Test Strategy | Status |
|
||||||
|---|----------|---------------|--------|
|
|---|----------|---------------|--------|
|
||||||
| 27.1 | It should filter import batches by date range | Integration | [ ] |
|
| 27.1 | It should filter import batches by date range | Integration | [x] |
|
||||||
| 27.2 | It should filter import batches by source | Integration | [ ] |
|
| 27.2 | It should filter import batches by source | Integration | [x] |
|
||||||
|
|
||||||
### Sorting Behaviors
|
### Sorting Behaviors
|
||||||
|
|
||||||
| # | Behavior | Test Strategy | Status |
|
| # | Behavior | Test Strategy | Status |
|
||||||
|---|----------|---------------|--------|
|
|---|----------|---------------|--------|
|
||||||
| 28.1 | It should sort import batches by date, source, status, or user | Integration | [ ] |
|
| 28.1 | It should sort import batches by date, source, status, or user | Integration | [x] |
|
||||||
| 28.2 | It should paginate results with 25 import batches per page by default | Integration | [ ] |
|
| 28.2 | It should paginate results with 25 import batches per page by default | Integration | [x] |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -373,13 +373,13 @@ Every admin operation checks:
|
|||||||
|
|
||||||
| # | Behavior | Test Strategy | Status |
|
| # | Behavior | Test Strategy | Status |
|
||||||
|---|----------|---------------|--------|
|
|---|----------|---------------|--------|
|
||||||
| 30.1 | It should parse tab-separated rows with columns: raw-date, vendor-name, check, location, invoice-number, amount, client-name, bill-entered, bill-rejected, added-on, exported-on, account-numeric-code | Unit | [ ] |
|
| 30.1 | It should parse tab-separated rows with columns: raw-date, vendor-name, check, location, invoice-number, amount, client-name, bill-entered, bill-rejected, added-on, exported-on, account-numeric-code | Unit | [x] |
|
||||||
| 30.2 | It should resolve the client by code or name | Integration | [ ] |
|
| 30.2 | It should resolve the client by code or name | Integration | [x] |
|
||||||
| 30.3 | It should resolve the vendor by exact case-sensitive name match | Integration | [ ] |
|
| 30.3 | It should resolve the vendor by exact case-sensitive name match | Integration | [x] |
|
||||||
| 30.4 | It should resolve the account by numeric code | Integration | [ ] |
|
| 30.4 | It should resolve the account by numeric code | Integration | [x] |
|
||||||
| 30.5 | It should group rows into new, existing, and error categories | Unit | [ ] |
|
| 30.5 | It should group rows into new, existing, and error categories | Unit | [x] |
|
||||||
| 30.6 | It should create a paid invoice with zero outstanding balance and a cash transaction when the check type is "Cash" | Integration | [ ] |
|
| 30.6 | It should create a paid invoice with zero outstanding balance and a cash transaction when the check type is "Cash" | Integration | [x] |
|
||||||
| 30.7 | It should create an unpaid invoice with full outstanding balance when the check type is not "Cash" | Integration | [ ] |
|
| 30.7 | It should create an unpaid invoice with full outstanding balance when the check type is not "Cash" | Integration | [x] |
|
||||||
| 30.8 | It should display results as pills showing imported count, extant count, and vendors not found with hover tooltip | UI | [ ] |
|
| 30.8 | It should display results as pills showing imported count, extant count, and vendors not found with hover tooltip | UI | [ ] |
|
||||||
| 30.9 | It should display an error grid for rows that failed validation | UI | [ ] |
|
| 30.9 | It should display an error grid for rows that failed validation | UI | [ ] |
|
||||||
|
|
||||||
@@ -401,8 +401,8 @@ Every admin operation checks:
|
|||||||
|
|
||||||
| # | Behavior | Test Strategy | Status |
|
| # | Behavior | Test Strategy | Status |
|
||||||
|---|----------|---------------|--------|
|
|---|----------|---------------|--------|
|
||||||
| 32.1 | It should filter sales summaries by date range | Integration | [ ] |
|
| 32.1 | It should filter sales summaries by date range | Integration | [x] |
|
||||||
| 32.2 | It should scope results to the user's valid clients | Integration | [ ] |
|
| 32.2 | It should scope results to the user's valid clients | Integration | [x] |
|
||||||
|
|
||||||
### Edit Wizard Behaviors
|
### Edit Wizard Behaviors
|
||||||
|
|
||||||
@@ -412,11 +412,11 @@ Every admin operation checks:
|
|||||||
| 33.2 | It should allow editing the category, account, and debit/credit amounts for manual items | UI | [ ] |
|
| 33.2 | It should allow editing the category, account, and debit/credit amounts for manual items | UI | [ ] |
|
||||||
| 33.3 | It should allow removing manual items from the grid | UI | [ ] |
|
| 33.3 | It should allow removing manual items from the grid | UI | [ ] |
|
||||||
| 33.4 | It should display auto-generated items with read-only category and amount but editable account | UI | [ ] |
|
| 33.4 | It should display auto-generated items with read-only category and amount but editable account | UI | [ ] |
|
||||||
| 33.5 | It should scope the account typeahead to the client and filter for invoice-purpose accounts | Integration | [ ] |
|
| 33.5 | It should scope the account typeahead to the client and filter for invoice-purpose accounts | Integration | [x] |
|
||||||
| 33.6 | It should update the live total row and unbalanced row when amounts change | UI | [ ] |
|
| 33.6 | It should update the live total row and unbalanced row when amounts change | UI | [ ] |
|
||||||
| 33.7 | It should validate that each item has exactly one of credit or debit, not both | Unit + Integration | [ ] |
|
| 33.7 | It should validate that each item has exactly one of credit or debit, not both | Unit + Integration | [x] |
|
||||||
| 33.8 | It should validate that total debits equal total credits before saving | Unit + Integration | [ ] |
|
| 33.8 | It should validate that total debits equal total credits before saving | Unit + Integration | [x] |
|
||||||
| 33.9 | It should update ledger-mapped account assignments and flag manual items on save | Integration | [ ] |
|
| 33.9 | It should update ledger-mapped account assignments and flag manual items on save | Integration | [x] |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -426,39 +426,39 @@ Every admin operation checks:
|
|||||||
|
|
||||||
| # | Behavior | Test Strategy | Status |
|
| # | Behavior | Test Strategy | Status |
|
||||||
|---|----------|---------------|--------|
|
|---|----------|---------------|--------|
|
||||||
| 34.1 | It should redirect unauthenticated users to the login page on all admin routes | Integration | [ ] |
|
| 34.1 | It should redirect unauthenticated users to the login page on all admin routes | Integration | [x] |
|
||||||
| 34.2 | It should show an authorization failure for authenticated non-admin users on all admin routes | Integration | [ ] |
|
| 34.2 | It should show an authorization failure for authenticated non-admin users on all admin routes | Integration | [x] |
|
||||||
| 34.3 | It should require admin role for all mutating admin handlers | Integration | [ ] |
|
| 34.3 | It should require admin role for all mutating admin handlers | Integration | [x] |
|
||||||
|
|
||||||
### Audit History Behaviors
|
### Audit History Behaviors
|
||||||
|
|
||||||
| # | Behavior | Test Strategy | Status |
|
| # | Behavior | Test Strategy | Status |
|
||||||
|---|----------|---------------|--------|
|
|---|----------|---------------|--------|
|
||||||
| 35.1 | It should record the admin user who performed each mutating operation via the `:audit/user` attribute | Integration | [ ] |
|
| 35.1 | It should record the admin user who performed each mutating operation via the `:audit/user` attribute | Integration | [x] |
|
||||||
| 35.2 | It should write all mutating operations through `audit-transact` or `audit-transact-batch` | Integration | [ ] |
|
| 35.2 | It should write all mutating operations through `audit-transact` or `audit-transact-batch` | Integration | [x] |
|
||||||
| 35.3 | It should allow querying all changes to an entity from Datomic's history database on the History page | Integration | [ ] |
|
| 35.3 | It should allow querying all changes to an entity from Datomic's history database on the History page | Integration | [x] |
|
||||||
|
|
||||||
### Impersonation Behaviors
|
### Impersonation Behaviors
|
||||||
|
|
||||||
| # | Behavior | Test Strategy | Status |
|
| # | Behavior | Test Strategy | Status |
|
||||||
|---|----------|---------------|--------|
|
|---|----------|---------------|--------|
|
||||||
| 36.1 | It should allow admin users to select a client from the global client selector to filter admin grids | UI | [ ] |
|
| 36.1 | It should allow admin users to select a client from the global client selector to filter admin grids | UI | [ ] |
|
||||||
| 36.2 | It should respect the selected client when filtering the Clients, Transaction Rules, and Sales Summaries grids | Integration | [ ] |
|
| 36.2 | It should respect the selected client when filtering the Clients, Transaction Rules, and Sales Summaries grids | Integration | [x] |
|
||||||
|
|
||||||
### Form Validation Behaviors
|
### Form Validation Behaviors
|
||||||
|
|
||||||
| # | Behavior | Test Strategy | Status |
|
| # | Behavior | Test Strategy | Status |
|
||||||
|---|----------|---------------|--------|
|
|---|----------|---------------|--------|
|
||||||
| 37.1 | It should enforce form structure via Malli schemas | Unit | [ ] |
|
| 37.1 | It should enforce form structure via Malli schemas | Unit | [x] |
|
||||||
| 37.2 | It should validate query params, route params, and form params via `wrap-schema-enforce` | Integration | [ ] |
|
| 37.2 | It should validate query params, route params, and form params via `wrap-schema-enforce` | Integration | [x] |
|
||||||
| 37.3 | It should re-render dialogs with field-level validation errors on 400 responses | Integration | [ ] |
|
| 37.3 | It should re-render dialogs with field-level validation errors on 400 responses | Integration | [x] |
|
||||||
|
|
||||||
### Solr Indexing Behaviors
|
### Solr Indexing Behaviors
|
||||||
|
|
||||||
| # | Behavior | Test Strategy | Status |
|
| # | Behavior | Test Strategy | Status |
|
||||||
|---|----------|---------------|--------|
|
|---|----------|---------------|--------|
|
||||||
| 38.1 | It should reindex Solr documents after creating or updating a client | Integration | [ ] |
|
| 38.1 | It should reindex Solr documents after creating or updating a client | Integration | [x] |
|
||||||
| 38.2 | It should reindex Solr documents after creating or updating a vendor or account | Integration | [ ] |
|
| 38.2 | It should reindex Solr documents after creating or updating a vendor or account | Integration | [x] |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user