4648
This commit is contained in:
106
claude.md
106
claude.md
@@ -2,32 +2,98 @@
|
||||
|
||||
## What This Is
|
||||
|
||||
Old integration test project for the AyaNova v8 API. These tests were written during initial API development and have not been maintained. They target .NET Core 3.x and need evaluation before any further use.
|
||||
Integration test project for the AyaNova v8 API. Tests target .NET 8 and run against a locally running server (`http://localhost:7575`).
|
||||
|
||||
## Current Goal
|
||||
Run with:
|
||||
|
||||
Triage these tests to determine what is salvageable:
|
||||
```
|
||||
dotnet test raven-integration.csproj
|
||||
```
|
||||
|
||||
1. Get the project compiling against .NET 8 (update TargetFramework, NuGet packages)
|
||||
2. Inventory all test files and what they cover
|
||||
3. Identify tests that still match current API endpoints and behavior
|
||||
4. Decide per-test: **fix it**, **rewrite it**, or **delete it**
|
||||
5. Broken tests that aren't worth fixing should be deleted — broken tests are worse than no tests
|
||||
## Current Status (March 2026)
|
||||
|
||||
## The Current Backend
|
||||
The initial triage and rebuild is complete. The project now compiles against net8.0, old broken tests have been removed or rewritten, and new gap-coverage tests have been added. All tests pass except three that are blocked by known server-side bugs:
|
||||
|
||||
The production API these tests should validate lives at `../raven/server/AyaNova/` and runs ASP.NET Core 8 with PostgreSQL. Compare test expectations against the actual current API, not what the API looked like when these tests were written.
|
||||
- **CustomerWithWorkorders_cannotbedeleted** — server returns 500 instead of 400 (case 4653)
|
||||
- **ContractCrud.CRUD** — minor server-side issue (tracked separately)
|
||||
- **DirectMessage_SendAndDelete** - server issue prevents delivery as considered a "duplicate" incorrectly. (case 4654)
|
||||
|
||||
## Known Issues
|
||||
These are intentionally left failing until server-side fixes are applied as part of the refactor phase. Except the directMessage test is set to skip as it has a 65 second timeout that would slow down testing unnecessarily.
|
||||
|
||||
- `dotnet test` fails because multiple .csproj/.sln files exist — specify the correct one
|
||||
- Project targets outdated .NET Core 3.x — needs TargetFramework update to net8.0
|
||||
- NuGet package references are likely outdated and may need updating
|
||||
- Test data setup and API endpoints may have changed significantly
|
||||
## What Is Covered
|
||||
|
||||
## What Success Looks Like
|
||||
### Tier 1 (Critical) — Complete
|
||||
|
||||
- A clear inventory of what tests exist and what they cover
|
||||
- Any salvageable tests updated to compile and run against .NET 8
|
||||
- Dead or irrelevant tests removed
|
||||
- A gap analysis: what critical API paths have no test coverage
|
||||
- **DataList** — `DataList/DataListOperations.cs`
|
||||
- Saved filter CRUD (create, list, update visibility, delete, confirm deleted)
|
||||
- Default filter creation blocked by API
|
||||
- String filtering: contains, starts-with, equals, not-equal
|
||||
- Date filtering: range (GT/LT), relative keywords (*yesterday*, *tomorrow*, *thisyear*, *NULL*)
|
||||
- Multi-column AND filter
|
||||
- Sort ascending and descending on date column
|
||||
- Pagination (offset/limit, totalRecordCount consistency, non-overlapping pages)
|
||||
- Column view CRUD (custom column order round-trip)
|
||||
- Rights enforcement (user with no roles gets 403)
|
||||
|
||||
- **Quote** — `Quote/QuoteCrud.cs`
|
||||
- Header CRUD + concurrency violation + id-from-number lookup
|
||||
- QuoteItem CRUD
|
||||
- QuoteItemLabor sub-type CRUD
|
||||
|
||||
- **Customer** — `Customer/CustomerCrud.cs`
|
||||
- CRUD + concurrency violation + alert retrieval
|
||||
- Referential integrity: customer with linked work order cannot be deleted (test exists; server bug pending fix)
|
||||
|
||||
### Tier 2 (Important) — Complete
|
||||
|
||||
- **Contract** — `Contract/ContractCrud.cs` — CRUD + concurrency
|
||||
- **PM** — `PM/PMCrud.cs` — header CRUD + PMItem + concurrency + id-from-number
|
||||
- **Authorization** — `Authentication/AuthRights.cs` — unauthenticated 401, unauthorized 403
|
||||
- **Schedule** — `Schedule/ScheduleReads.cs` — service schedule + personal schedule reads
|
||||
- **Part** — `Part/PartCrud.cs` — CRUD + concurrency + serial numbers round-trip
|
||||
|
||||
### Tier 3 (Reference Data / Nice to Have) — Complete
|
||||
|
||||
- **Vendor** — `Vendor/VendorCrud.cs` — CRUD + concurrency + alert
|
||||
- **ServiceRate / TravelRate / TaxCode** — `Reference/ReferenceCrud.cs` — CRUD + concurrency
|
||||
- **Unit / UnitModel** — `Unit/UnitCrud.cs` — CRUD for both types
|
||||
- **Memo** — `Memo/MemoCrud.cs` — create + read + delete
|
||||
- **Notification** — `Notification/NotificationOps.cs` — count, list, send, delete
|
||||
|
||||
### Already Covered (from original tests)
|
||||
|
||||
- User CRUD, concurrency, password change, inactive user login
|
||||
- Project CRUD and concurrency
|
||||
- WorkOrder + nested items/parts/labor/units CRUD
|
||||
- Attachments (upload/download/delete/authorization)
|
||||
- Search (phrase, wildcard, tags, serial, deletion cleanup)
|
||||
- Custom forms
|
||||
- Pick lists
|
||||
- Translations
|
||||
- Event log (object log, user log, pagination)
|
||||
- Tag bulk operations
|
||||
- Server health, metrics, log files
|
||||
- Global biz settings (fetch + round-trip PUT)
|
||||
|
||||
## What Is Intentionally Not Covered
|
||||
|
||||
- **Report generation** — async job pattern with polling; deferred
|
||||
- **Stock level updates** — require seeded warehouse IDs not known at test time
|
||||
- **Auth roles deep test** — role-change behavioral tests; the existing AuthRights.cs covers the critical 401/403 paths
|
||||
- **EnumList, Name lookup** — low-risk reference reads; not needed for refactor protection
|
||||
|
||||
## Known Configuration
|
||||
|
||||
- API base: `http://localhost:7575/api/v8/`
|
||||
- Seeded logins: `superuser` (password: `l3tm3in`), `BizAdmin`, `OpsAdmin`, `SubContractorRestricted`
|
||||
- Seeded customer id=1 is always safe to reference
|
||||
- Time zone adjustment for date filters: -7 (see `util.cs` `TIME_ZONE_ADJUSTMENT`)
|
||||
- DataList class names ARE the list keys (e.g., `WorkOrderDataList`, `CustomerDataList`)
|
||||
|
||||
## What Comes Next (Refactor Phase)
|
||||
|
||||
This test suite exists to protect against regressions during the Step D refactor. Before starting the refactor:
|
||||
|
||||
1. Confirm all tests pass (except the three known server bugs above)
|
||||
2. Fix the three server-side bugs (case 4653, case 4654 and contract issue)
|
||||
3. Then proceed with the Step D refactor — tests will catch regressions
|
||||
|
||||
Reference in New Issue
Block a user