From c8029d23e2a5fae1b12395c69f21b2711772fdf4 Mon Sep 17 00:00:00 2001 From: Edwin van den Houdt Date: Fri, 4 Sep 2026 15:17:10 +0200 Subject: [PATCH] docs: regenerate behaviour-spec.mdx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Catches drift accumulated since the Application → Aanvraag rename (Step 1/8, Step 2/8) plus the new tests from this branch. Co-Authored-By: Claude Sonnet 5 --- libs/shared/docs/behaviour-spec.mdx | 58 ++++++++++++++++++----------- 1 file changed, 36 insertions(+), 22 deletions(-) diff --git a/libs/shared/docs/behaviour-spec.mdx b/libs/shared/docs/behaviour-spec.mdx index 2d7c71d..725d977 100644 --- a/libs/shared/docs/behaviour-spec.mdx +++ b/libs/shared/docs/behaviour-spec.mdx @@ -20,7 +20,7 @@ tested where._ Every bullet below is a real test name from the suite — an `it()` title (frontend) or a test method name (backend), read as a sentence. Nothing here is hand-written prose: this page -**is** the suite, reshaped for a business reader. 497 frontend behaviours across +**is** the suite, reshaped for a business reader. 505 frontend behaviours across 9 contexts; 261 backend behaviours across 42 test classes. @@ -418,6 +418,13 @@ classes. ### registratie +#### AanvragenStore + +- loads and parses the list +- cancels optimistically and confirms via the DELETE endpoint +- rolls back the removal and surfaces the error when the cancel fails +- clears a stale error on the next cancel attempt + #### AdminCasesStore - loads and parses the cross-owner list @@ -425,13 +432,6 @@ classes. - rolls back the removal and surfaces the error when the delete fails - clears a stale error on the next delete attempt -#### ApplicationsStore - -- loads and parses the list -- cancels optimistically and confirms via the DELETE endpoint -- rolls back the removal and surfaces the error when the cancel fails -- clears a stale error on the next cancel attempt - #### STEPS (fixed) - always has the same three steps @@ -544,12 +544,12 @@ classes. - parses each tag with its required fields - rejects a missing status, unknown tag, and wrong-typed fields -#### parseApplicationSummary +#### parseAanvraagSummary - maps a valid DTO to domain - rejects a bad type and non-objects -#### parseApplications / parseApplicationDetail +#### parseAanvragen / parseAanvraagDetail - parses a list and fails fast on a bad element - carries the opaque draft through detail @@ -569,6 +569,9 @@ classes. - maps a valid response into a DashboardView - rejects malformed responses instead of trusting them +- rejects a status whose tag is present but its required fields are missing +- rejects an unknown status tag +- rejects a person with an incomplete adres #### parseDuoLookup (trust boundary) @@ -617,6 +620,12 @@ classes. - statusColor is total over the union - herregistratieDeadline is only set for an active registration +#### sortForDashboard / concepten / ingediend + +- sorts Concept, then still-open, then resolved last +- does not mutate the input array +- concepten/ingediend split on the Concept tag + #### submit - stays in Invullen when the draft is incomplete (no diploma) @@ -923,6 +932,11 @@ classes. - leaves a non-API request untouched even when a subject is known - sends no header at all when no subject has ever been seen +#### successOf + +- unwraps a Success value +- is undefined for every other state + #### upload lifecycle messages - queued → progress → complete @@ -963,18 +977,7 @@ classes. ## Backend (by test class) -### AdminCasesTests - -- Admin lists every case with its owner -- Non admin is forbidden -- Admin can delete a submitted case -- Deleting a missing case is not found - -### ApplicationRuleTests - -- AanvraagStatusTag covers the published lifecycle - -### ApplicationTests +### AanvraagTests - Create then list shows a concept with step progress - Draft sync is readable back from detail @@ -993,6 +996,17 @@ classes. - AutoApprovable flips to goedgekeurd after the window - Manual case never auto advances +### AdminCasesTests + +- Admin lists every case with its owner +- Non admin is forbidden +- Admin can delete a submitted case +- Deleting a missing case is not found + +### ApplicationRuleTests + +- AanvraagStatusTag covers the published lifecycle + ### AuthzAuditTests - A denied admin action is recorded