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:
@@ -50,21 +50,21 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
| 1.3 | It should display the company address (street, city, state, zip) when address data exists | UI | [ ] |
|
||||
| 1.4 | It should omit missing address fields without showing error placeholders | UI | [ ] |
|
||||
| 1.5 | It should show a "Download vendor list" button | UI | [ ] |
|
||||
| 1.6 | It should download a CSV/Excel export when the download button is clicked | Integration | [ ] |
|
||||
| 1.6 | It should download a CSV/Excel export when the download button is clicked | Integration | [x] |
|
||||
|
||||
### Signature Behaviors
|
||||
|
||||
| # | Behavior | Test Strategy | Status |
|
||||
|---|----------|---------------|--------|
|
||||
| 2.1 | It should show the signature section only when the user has signature edit permission | Integration | [ ] |
|
||||
| 2.1 | It should show the signature section only when the user has signature edit permission | Integration | [x] |
|
||||
| 2.2 | It should display the saved signature image when one exists | UI | [ ] |
|
||||
| 2.3 | It should show a "New signature" button that enables drawing mode on a canvas | UI | [ ] |
|
||||
| 2.4 | It should show a "Clear" button that clears the canvas while in drawing mode | UI | [ ] |
|
||||
| 2.5 | It should show an "Accept" button that submits the drawn signature | UI | [ ] |
|
||||
| 2.6 | It should reject invalid signature image data with a validation error | Unit + Integration | [ ] |
|
||||
| 2.6 | It should reject invalid signature image data with a validation error | Unit + Integration | [x] |
|
||||
| 2.7 | It should provide a drag-and-drop zone for uploading JPEG signature files | UI | [ ] |
|
||||
| 2.8 | It should change the drop zone background color on hover | UI | [ ] |
|
||||
| 2.9 | It should refresh the signature section with the uploaded image on successful upload | Integration | [ ] |
|
||||
| 2.9 | It should refresh the signature section with the uploaded image on successful upload | Integration | [x] |
|
||||
|
||||
---
|
||||
|
||||
@@ -74,7 +74,7 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
|
||||
| # | Behavior | Test Strategy | Status |
|
||||
|---|----------|---------------|--------|
|
||||
| 3.1 | It should display vendors who received $600 or more in check payments during the current tax year | Integration | [ ] |
|
||||
| 3.1 | It should display vendors who received $600 or more in check payments during the current tax year | Integration | [x] |
|
||||
| 3.2 | It should show grid columns: Client, Vendor Name, TIN, Expense Account, Address, Paid | UI | [ ] |
|
||||
| 3.3 | It should display the vendor's legal entity name as a subtitle under the vendor name | UI | [ ] |
|
||||
| 3.4 | It should show a 1099 type pill badge when a 1099 type is set | UI | [ ] |
|
||||
@@ -82,15 +82,15 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
| 3.6 | It should show "No address" placeholder when the vendor has no address | UI | [ ] |
|
||||
| 3.7 | It should display the total paid amount as a pill badge rounded to the nearest dollar | UI | [ ] |
|
||||
| 3.8 | It should show an edit icon button on each row | UI | [ ] |
|
||||
| 3.9 | It should show vendors shared across multiple clients in each client's context | Integration | [ ] |
|
||||
| 3.9 | It should show vendors shared across multiple clients in each client's context | Integration | [x] |
|
||||
| 3.10 | It should show an empty grid when no vendors received $600+ in checks during the tax year | UI | [ ] |
|
||||
|
||||
### Filtering & Sorting Behaviors
|
||||
|
||||
| # | Behavior | Test Strategy | Status |
|
||||
|---|----------|---------------|--------|
|
||||
| 4.1 | It should support standard grid query params (sort, pagination, search) | Integration | [ ] |
|
||||
| 4.2 | It should default sort by client code then amount | Integration | [ ] |
|
||||
| 4.1 | It should support standard grid query params (sort, pagination, search) | Integration | [x] |
|
||||
| 4.2 | It should default sort by client code then amount | Integration | [x] |
|
||||
|
||||
### Edit Behaviors
|
||||
|
||||
@@ -98,12 +98,12 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
|---|----------|---------------|--------|
|
||||
| 5.1 | It should open a vendor edit dialog in a modal when the edit icon is clicked | UI | [ ] |
|
||||
| 5.2 | It should display address fields (Street 1, Street 2, City, State, ZIP) in the dialog | UI | [ ] |
|
||||
| 5.3 | It should validate the ZIP code as 5 digits or empty | Unit + Integration | [ ] |
|
||||
| 5.3 | It should validate the ZIP code as 5 digits or empty | Unit + Integration | [x] |
|
||||
| 5.4 | It should allow entering either a legal entity name or first/middle/last name | UI | [ ] |
|
||||
| 5.5 | It should allow entering a TIN and selecting TIN type (EIN or SSN) | UI | [ ] |
|
||||
| 5.6 | It should allow selecting a 1099 type from a dropdown | UI | [ ] |
|
||||
| 5.7 | It should close the modal and refresh the row with a flash highlight on successful save | Integration | [ ] |
|
||||
| 5.8 | It should null the address if all address fields are empty and no existing address | Integration | [ ] |
|
||||
| 5.7 | It should close the modal and refresh the row with a flash highlight on successful save | Integration | [x] |
|
||||
| 5.8 | It should null the address if all address fields are empty and no existing address | Integration | [x] |
|
||||
|
||||
---
|
||||
|
||||
@@ -115,10 +115,10 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
|---|----------|---------------|--------|
|
||||
| 6.1 | It should display a bar chart of expenses grouped by top 20 expense accounts over the last 8 weeks | UI | [ ] |
|
||||
| 6.2 | It should show week ranges (Monday-Sunday) formatted as dates on the X-axis | UI | [ ] |
|
||||
| 6.3 | It should provide a vendor typeahead to filter expenses to a specific vendor | Integration | [ ] |
|
||||
| 6.4 | It should provide an expense account typeahead to filter to a specific account | Integration | [ ] |
|
||||
| 6.5 | It should refresh the chart when filters change | Integration | [ ] |
|
||||
| 6.6 | It should default to last 65 days of data but display last 8 weeks | Integration | [ ] |
|
||||
| 6.3 | It should provide a vendor typeahead to filter expenses to a specific vendor | Integration | [x] |
|
||||
| 6.4 | It should provide an expense account typeahead to filter to a specific account | Integration | [x] |
|
||||
| 6.5 | It should refresh the chart when filters change | Integration | [x] |
|
||||
| 6.6 | It should default to last 65 days of data but display last 8 weeks | Integration | [x] |
|
||||
|
||||
### Invoice Totals Behaviors
|
||||
|
||||
@@ -126,10 +126,10 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
|---|----------|---------------|--------|
|
||||
| 7.1 | It should display a grid of total invoice amounts per vendor per company | UI | [ ] |
|
||||
| 7.2 | It should provide start and end date range filters | UI | [ ] |
|
||||
| 7.3 | It should default the date range to the last 30 days | Integration | [ ] |
|
||||
| 7.3 | It should default the date range to the last 30 days | Integration | [x] |
|
||||
| 7.4 | It should show the vendor name in a sticky left column | UI | [ ] |
|
||||
| 7.5 | It should show "-" for zero amounts | UI | [ ] |
|
||||
| 7.6 | It should push filter changes to browser history | Integration | [ ] |
|
||||
| 7.6 | It should push filter changes to browser history | Integration | [x] |
|
||||
|
||||
---
|
||||
|
||||
@@ -139,7 +139,7 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
|
||||
| # | Behavior | Test Strategy | Status |
|
||||
|---|----------|---------------|--------|
|
||||
| 8.1 | It should show the reconciliation navigation link only when the user has reconciliation report permission | Integration | [ ] |
|
||||
| 8.1 | It should show the reconciliation navigation link only when the user has reconciliation report permission | Integration | [x] |
|
||||
| 8.2 | It should require start and end dates to be submitted via a "Run" button | UI | [ ] |
|
||||
| 8.3 | It should show a "Please choose a time range to run the report" message when no dates are selected | UI | [ ] |
|
||||
|
||||
@@ -166,7 +166,7 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
| 9.2 | It should show a red pill with error message tooltip when any linked bank account has failed or unauthorized status | UI | [ ] |
|
||||
| 9.3 | It should show a green "Success" pill when all accounts are healthy | UI | [ ] |
|
||||
| 9.4 | It should display linked accounts with name, masked number, last synced date, and identicon | UI | [ ] |
|
||||
| 9.5 | It should support sorting by external ID and Plaid bank status | Integration | [ ] |
|
||||
| 9.5 | It should support sorting by external ID and Plaid bank status | Integration | [x] |
|
||||
| 9.6 | It should show an empty grid when no bank accounts are linked | UI | [ ] |
|
||||
|
||||
### Link Behaviors
|
||||
@@ -176,8 +176,8 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
| 10.1 | It should show a "Link account" button when a client is selected | UI | [ ] |
|
||||
| 10.2 | It should hide the link button when no client is selected | UI | [ ] |
|
||||
| 10.3 | It should open a Plaid Link modal when the link button is clicked | UI | [ ] |
|
||||
| 10.4 | It should create the Plaid item and accounts in the system after successful linking | Integration | [ ] |
|
||||
| 10.5 | It should redirect back to the Plaid page after successful account linking | Integration | [ ] |
|
||||
| 10.4 | It should create the Plaid item and accounts in the system after successful linking | Integration | SKIPPED |
|
||||
| 10.5 | It should redirect back to the Plaid page after successful account linking | Integration | SKIPPED |
|
||||
|
||||
### Re-authenticate Behaviors
|
||||
|
||||
@@ -185,7 +185,7 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
|---|----------|---------------|--------|
|
||||
| 11.1 | It should show a "Reauthenticate" button on each row | UI | [ ] |
|
||||
| 11.2 | It should open Plaid Link in update mode when reauthenticate is clicked | UI | [ ] |
|
||||
| 11.3 | It should refresh the row after successful reauthentication | Integration | [ ] |
|
||||
| 11.3 | It should refresh the row after successful reauthentication | Integration | SKIPPED |
|
||||
|
||||
---
|
||||
|
||||
@@ -199,7 +199,7 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
| 12.2 | It should hide the Client column when the user has only one client | UI | [ ] |
|
||||
| 12.3 | It should show a green pill for success status and a yellow pill for other statuses | UI | [ ] |
|
||||
| 12.4 | It should display linked accounts with name and number | UI | [ ] |
|
||||
| 12.5 | It should support sorting by status, client, provider account, and last updated | Integration | [ ] |
|
||||
| 12.5 | It should support sorting by status, client, provider account, and last updated | Integration | [x] |
|
||||
| 12.6 | It should show an empty grid when no bank accounts are linked | UI | [ ] |
|
||||
|
||||
### Link Behaviors
|
||||
@@ -209,7 +209,7 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
| 13.1 | It should show a "Link new account" button | UI | [ ] |
|
||||
| 13.2 | It should disable the link button and show helper text when no client is selected | UI | [ ] |
|
||||
| 13.3 | It should open a Yodlee Fastlink modal when the link button is clicked | UI | [ ] |
|
||||
| 13.4 | It should display an error notification and close the modal after 3 seconds when Yodlee returns an error | Integration | [ ] |
|
||||
| 13.4 | It should display an error notification and close the modal after 3 seconds when Yodlee returns an error | Integration | SKIPPED |
|
||||
|
||||
### Re-authenticate Behaviors
|
||||
|
||||
@@ -217,15 +217,15 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
|---|----------|---------------|--------|
|
||||
| 14.1 | It should show a "Reauthenticate" button per row | UI | [ ] |
|
||||
| 14.2 | It should open Fastlink in edit mode when reauthenticate is clicked | UI | [ ] |
|
||||
| 14.3 | It should refresh the row after successful reauthentication | Integration | [ ] |
|
||||
| 14.3 | It should refresh the row after successful reauthentication | Integration | SKIPPED |
|
||||
|
||||
### Admin Behaviors
|
||||
|
||||
| # | Behavior | Test Strategy | Status |
|
||||
|---|----------|---------------|--------|
|
||||
| 15.1 | It should show a refresh button on each row for admin users | Integration | [ ] |
|
||||
| 15.2 | It should trigger a Yodlee account refresh when the refresh button is clicked | Integration | [ ] |
|
||||
| 15.3 | It should refresh the row after successful Yodlee refresh | Integration | [ ] |
|
||||
| 15.1 | It should show a refresh button on each row for admin users | Integration | SKIPPED |
|
||||
| 15.2 | It should trigger a Yodlee account refresh when the refresh button is clicked | Integration | SKIPPED |
|
||||
| 15.3 | It should refresh the row after successful Yodlee refresh | Integration | SKIPPED |
|
||||
|
||||
---
|
||||
|
||||
@@ -244,15 +244,15 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
| # | Behavior | Test Strategy | Status |
|
||||
|---|----------|---------------|--------|
|
||||
| 17.1 | It should provide a download link to the report file on each row | UI | [ ] |
|
||||
| 17.2 | It should show a delete button on each row for admin users | Integration | [ ] |
|
||||
| 17.3 | It should delete the report and its file when the delete button is clicked | Integration | [ ] |
|
||||
| 17.2 | It should show a delete button on each row for admin users | Integration | [x] |
|
||||
| 17.3 | It should delete the report and its file when the delete button is clicked | Integration | [x] |
|
||||
|
||||
### Filtering & Sorting Behaviors
|
||||
|
||||
| # | Behavior | Test Strategy | Status |
|
||||
|---|----------|---------------|--------|
|
||||
| 18.1 | It should support filtering by date range and client | Integration | [ ] |
|
||||
| 18.2 | It should support sorting by client, created date, creator, and name | Integration | [ ] |
|
||||
| 18.1 | It should support filtering by date range and client | Integration | [x] |
|
||||
| 18.2 | It should support sorting by client, created date, creator, and name | Integration | [x] |
|
||||
|
||||
---
|
||||
|
||||
@@ -262,26 +262,26 @@ All company pages listen for `clientSelected from:body` event and refresh `#app-
|
||||
|
||||
| # | Behavior | Test Strategy | Status |
|
||||
|---|----------|---------------|--------|
|
||||
| 19.1 | It should refresh page content with a 300ms swap animation when the user switches clients | Integration | [ ] |
|
||||
| 19.1 | It should refresh page content with a 300ms swap animation when the user switches clients | Integration | [x] |
|
||||
| 19.2 | It should show appropriate placeholder states when no client is selected on pages that require one | UI | [ ] |
|
||||
| 19.3 | It should operate 1099 and reports grids across all visible clients when no single client is selected | Integration | [ ] |
|
||||
| 19.3 | It should operate 1099 and reports grids across all visible clients when no single client is selected | Integration | [x] |
|
||||
|
||||
### Permission Behaviors
|
||||
|
||||
| # | Behavior | Test Strategy | Status |
|
||||
|---|----------|---------------|--------|
|
||||
| 20.1 | It should block access to company pages for unauthenticated users | Integration | [ ] |
|
||||
| 20.2 | It should block access to company pages for users without client access | Integration | [ ] |
|
||||
| 20.3 | It should hide the signature section from users without signature edit permission | Integration | [ ] |
|
||||
| 20.4 | It should hide the reconciliation report navigation link from users without reconciliation report permission | Integration | [ ] |
|
||||
| 20.5 | It should hide the delete report button from non-admin users | Integration | [ ] |
|
||||
| 20.6 | It should hide the Yodlee refresh button from non-admin users | Integration | [ ] |
|
||||
| 20.1 | It should block access to company pages for unauthenticated users | Integration | [x] |
|
||||
| 20.2 | It should block access to company pages for users without client access | Integration | [x] |
|
||||
| 20.3 | It should hide the signature section from users without signature edit permission | Integration | [x] |
|
||||
| 20.4 | It should hide the reconciliation report navigation link from users without reconciliation report permission | Integration | [x] |
|
||||
| 20.5 | It should hide the delete report button from non-admin users | Integration | [x] |
|
||||
| 20.6 | It should hide the Yodlee refresh button from non-admin users | Integration | SKIPPED |
|
||||
|
||||
### Bank Account Search Behaviors
|
||||
|
||||
| # | Behavior | Test Strategy | Status |
|
||||
|---|----------|---------------|--------|
|
||||
| 21.1 | It should provide a bank account typeahead for searching accounts belonging to a specific client | Integration | [ ] |
|
||||
| 21.1 | It should provide a bank account typeahead for searching accounts belonging to a specific client | Integration | [x] |
|
||||
| 21.2 | It should show "Please select a client" message when no client is selected in the bank account typeahead | UI | [ ] |
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user