test: implement integration and unit tests for invoice and admin behaviors #7
Reference in New Issue
Block a user
Delete Branch "test-plan-docs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds comprehensive integration tests for invoice behaviors covering permissions, CRUD operations, bulk actions, list queries, and legacy routes.
Tests Added
Infrastructure Changes
:journal-entry-line/running-balancetoschema.ednwrap-setupfixture to preventConnection refusederrorssetup-test-datato merge user-provided entities with defaults by:db/idInMemSolrClient.index_documentsto handle entity IDs properlyezcater_xlstest to use dynamic entity IDs instead of hardcoded valuesdocs/testing/behaviors/invoice.mdwith completed status markerstest(invoice): add unit tests for invoice behaviorsto test(invoice): add integration tests for invoice behaviorstest(invoice): add integration tests for invoice behaviorsto test: implement integration and unit tests for invoice and admin behaviorsCode Review:
test-plan-docsScope: 82 files, 10 commits | Verdict: Not ready
P0 -- Critical
.env:1sk-or-v1-30eb4bbe...) committed to repository.envrc:1.envrctest/**/*(52+ locations)thrown? Exceptioncatches any exception including NPE -- tests pass when code throws the wrong error typetest/clj/auto_ap/ledger/cross_cutting_test.clj:19(20+ tests)(is (some? fn))) provide zero behavioral coverage -- pass even if function is a no-opP1 -- High
src/clj/auto_ap/solr.clj:226P2 -- Moderate
src/clj/auto_ap/ssr/admin/vendors.clj:837-851src/clj/auto_ap/ssr/admin/vendors.clj:846test/clj/auto_ap/ledger/journal_entry_test.clj:121(some? schema)not actual validation behaviortest/clj/auto_ap/integration/graphql/ledger/running_balance.clj:12opencode.jsonApplied Fixes (3 safe_auto)
running_balance.clj:72-- Removed debugprintlnstatementgraphql.clj:70-76-- Removed duplicatevendorsdeftest (identical toledger-page)implement-tests/SKILL.md:4-- Added blank line after frontmatter closing---Agent-Native Gaps
implement-testsskill for test workSKIPPEDbehaviors lack inline reasons -- agents may attempt themadmin_behaviors_test.clj(3,179 lines, 75 tests) should be split per-subsectionjournal-entry-line/running-balanceCoverage
thrown? Exceptionassertions mask wrong exception types; 20+ function-existence tests give false confidenceFix order:
.env/.envrcfrom git (P0, credential exposure)thrown? Exceptionwiththrown-with-msg?across 52+ test locations (P0)47720692b9to663963c2dcView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.