test(acl): BDD acceptance scenario for opening a zaak (closes #5) #49

Merged
eho merged 3 commits from test/5-acl-bdd-acceptance into main 2026-06-08 11:25:28 +00:00
Owner

Closes #5
Closes #48

What & why

Completes the ACL slice (S-04) by adding the Gherkin acceptance scenario that drives it (CLAUDE.md §11), introducing Reqnroll as the BDD framework. The ACL code + unit tests + ADR-0003 landed earlier under refs #5; this PR adds the missing use-case-level acceptance layer and closes the slice.

Per the agreed "BDD now, split the rest" scoping (§13), the two heavier S-04 acceptance criteria are split into their own issues rather than batched here:

  • #46 — integration test against real OpenZaak (Testcontainers)
  • #47 — mutation-score baseline (Stryker.NET ratchet)

Changes

  • New tests/acceptance/ Reqnroll.xUnit project (PRD §9 layout), added to the solution.
  • EenZaakOpenen.feature — first Gherkin scenario, business language with Dutch domain terms inline; step bindings wired to the existing AclService with an in-memory stand-in for the Zaken API.
  • ADR-0004 records the Reqnroll choice; ADR-0002/0003 registered in the MkDocs nav (pre-existing gap).
  • *.feature.cs (Reqnroll-generated) git-ignored.

TDD trail

  • 1fba877 red — scenario discovered, fails on undefined steps.
  • 389d35f green — bindings implemented, scenario passes.
  • e9e6269 docs — ADR-0004 + nav.

Definition of Done

  • Linked Gitea issue (#5).
  • Failing test committed before the implementation.
  • Implementation makes the test pass.
  • Conventional Commits referencing the issue (refs #5).
  • CI green — make ci green locally (lint, build, unit, compose-up smoke) while no runner exists (#30).
  • docker compose up reaches green health checks within 3 minutes (smoke step).
  • Docs updated — ADR-0004 added.
  • ADR added in docs/architecture/ (ADR-0004).
  • Demo note — N/A, ACL is not user-visible (no portal yet).

Notes for reviewers

  • The acceptance scenario runs against an in-memory IZaakGateway, not real OpenZaak — that real-path verification is deliberately #46. The scenario still asserts the full default-fill contract (ADR-0003) and the returned zaak URL.
  • Reqnroll.xUnit pulls xunit.core but not the assertion lib, so the xunit metapackage (2.9.3, matching the repo) is referenced explicitly for Assert.
Closes #5 Closes #48 ## What & why Completes the ACL slice (S-04) by adding the Gherkin acceptance scenario that **drives** it (CLAUDE.md §11), introducing Reqnroll as the BDD framework. The ACL code + unit tests + ADR-0003 landed earlier under `refs #5`; this PR adds the missing use-case-level acceptance layer and closes the slice. Per the agreed *"BDD now, split the rest"* scoping (§13), the two heavier S-04 acceptance criteria are split into their own issues rather than batched here: - **#46** — integration test against real OpenZaak (Testcontainers) - **#47** — mutation-score baseline (Stryker.NET ratchet) ### Changes - New `tests/acceptance/` Reqnroll.xUnit project (PRD §9 layout), added to the solution. - `EenZaakOpenen.feature` — first Gherkin scenario, business language with Dutch domain terms inline; step bindings wired to the existing `AclService` with an in-memory stand-in for the Zaken API. - **ADR-0004** records the Reqnroll choice; ADR-0002/0003 registered in the MkDocs nav (pre-existing gap). - `*.feature.cs` (Reqnroll-generated) git-ignored. ### TDD trail - `1fba877` red — scenario discovered, fails on undefined steps. - `389d35f` green — bindings implemented, scenario passes. - `e9e6269` docs — ADR-0004 + nav. ## Definition of Done - [x] Linked Gitea issue (#5). - [x] Failing test committed before the implementation. - [x] Implementation makes the test pass. - [x] Conventional Commits referencing the issue (`refs #5`). - [x] CI green — `make ci` green locally (lint, build, unit, compose-up smoke) while no runner exists (#30). - [x] `docker compose up` reaches green health checks within 3 minutes (smoke step). - [x] Docs updated — ADR-0004 added. - [x] ADR added in `docs/architecture/` (ADR-0004). - [ ] Demo note — N/A, ACL is not user-visible (no portal yet). ## Notes for reviewers - The acceptance scenario runs against an in-memory `IZaakGateway`, not real OpenZaak — that real-path verification is deliberately #46. The scenario still asserts the full default-fill contract (ADR-0003) and the returned zaak URL. - Reqnroll.xUnit pulls `xunit.core` but not the assertion lib, so the `xunit` metapackage (2.9.3, matching the repo) is referenced explicitly for `Assert`.
eho added 3 commits 2026-06-04 09:20:38 +00:00
Introduce a Reqnroll.xUnit acceptance project under tests/acceptance/ and
the first Gherkin scenario driving S-04: the ACL default-fills the
ZGW-mandatory zaak fields (ADR-0003) from a domain registration payload.

Red: the scenario is discovered but has no step bindings yet, so it fails
with undefined steps. The green commit wires the bindings to AclService.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Implement the step definitions for EenZaakOpenen.feature against the
existing AclService, with an in-memory gateway standing in for the OpenZaak
Zaken API. The scenario now passes: a domain registration is default-filled
into a ZaakRequest (ADR-0003) and the created zaak URL is returned.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
docs(architecture): ADR-0004 — Reqnroll as BDD framework (refs #5)
Some checks failed
CI / lint (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / unit (pull_request) Has been cancelled
CI / compose-smoke (pull_request) Has been cancelled
e9e6269dc8
Record the choice of Reqnroll.xUnit for the acceptance layer introduced in
S-04, and register the previously-unlisted ADR-0002/0003 in the MkDocs nav.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
eho merged commit 28041228bd into main 2026-06-08 11:25:28 +00:00
Sign in to join this conversation.