Skip to content

ATS-ACC-REC-016Accept an understood problem with the required approval: Capability Test Specification

Markdown

ATS-ACC-REC-016

Accept an understood problem with the required approval: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleReconciliationRevision3

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

  • Rule covered
  • Transition covered
  • Validation covered
  • Permission covered
  • Invariant covered
  • Interaction covered
  • Edge gap: FND-ACC-REC-061
  • Failure gap: FND-ACC-REC-061
  • Boundary gap: FND-ACC-REC-061
  • Concurrency gap: FND-ACC-REC-061

Test Scenarios

11 scenarios proving CAP-ACC-REC-016; 8 bound to an existing test.

01 Single-person warning acceptanceruleapitest
Proves
BR-CAP-ACC-REC-016-01
Preconditions
A warning is open.
Steps
Accept with a resolution and retry its key.
Expected
Acceptance is immediate without approver or pending request, and replay returns that result.
Data
No additional fixture beyond the case setup.
Bound to
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with a warning accepted by one user, with no approver
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#accepts a warning by one user, without a second and with no request
02 Blocker request remains blockinginteractionapinegativetest
Proves
BR-CAP-ACC-REC-016-02 BR-CAP-ACC-REC-016-05
Preconditions
An open blocker is available.
Steps
Request acceptance, repeat the pending request and supply a client-selected approver.
Expected
The first request leaves it open and blocking; duplicate and supplied-approver requests fail.
Data
No additional fixture beyond the case setup.
Bound to
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#records a blocker’s acceptance request by the first user and leaves it open (`exception.acceptance-requested`)
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses a second acceptance request while one is pending (409, `acceptance_already_requested`)
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with the blocker still open and its acceptance requested by the caller
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses an approvedById in the body with 400 approved_by_id_not_allowed
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#records a blocker’s acceptance request by the first user and leaves it open (`exception.acceptance-requested`)
03 Independent blocker approval and repeatpermissionapinegativetest
Proves
BR-CAP-ACC-REC-016-03 BR-CAP-ACC-REC-016-04
Preconditions
A blocker has a pending acceptance request.
Steps
Approve as requester, stale version and independent approver, retry approval and try a blocker without a request.
Expected
Invalid approvals fail; independent approval preserves requester and approver and returns the accepted result on repeat.
Data
Provide Two approvers for this case.
Bound to
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses an approval at a version that is not the exception’s (409, `stale_version`)
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#accepts the blocker on a second user’s approval, the requester its resolver (`exception.accepted`)
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses the approval of a blocker with no acceptance requested (409, `no_acceptance_requested`)
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#answers 200 with the blocker accepted, the requester its resolver and the second user its approver
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses the requester’s own approval (403, `second_user_required`)
04 Requester-only withdrawaltransitionapinegativetest
Proves
BR-CAP-ACC-REC-016-06
Preconditions
A pending blocker request exists.
Steps
Withdraw as another person, then requester, then repeat withdrawal.
Expected
The outsider and repeat fail; requester clears the request and leaves an open blocker with history.
Data
Provide Two approvers for this case.
Bound to
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#withdraws the request by its requester, clearing it and leaving the blocker open (`exception.acceptance-withdrawn`)
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#records the withdrawal in the exception’s history
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses another user’s withdrawal (403, `acceptance_requester_only`)
05 Database acceptance guardsinvariantapinegativetest
Proves
BR-CAP-ACC-REC-016-07
Preconditions
Direct exception writes exercise acceptance constraints.
Steps
Omit blocker approver, reuse requester or resolver, add a warning approver and put a request on a warning.
Expected
Every incompatible acceptance row is rejected.
Data
No additional fixture beyond the case setup.
Bound to
services-accounting:modules/reconciliation/tests/integration/db/reconciliation-exceptions.table.integration.spec.js#accepts an accepted blocker with its request and an approver other than its requester and resolver
Source
services-accounting:modules/reconciliation/tests/integration/db/reconciliation-exceptions.table.integration.spec.js#refuses an accepted blocker with no approver
06 Resolution removes pending acceptancepermissionapitest
Proves
BR-CAP-ACC-REC-016-08
Preconditions
An open blocker awaits approval.
Steps
Resolve one example manually and clear another through its detector.
Expected
Both paths clear the pending request and record the resolution.
Data
No additional fixture beyond the case setup.
Bound to
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#clears a pending acceptance request when the exception is resolved, saying so in `exception.resolved`
Source
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#clears a pending acceptance request when the exception is resolved, saying so in `exception.resolved`
07 Accept authorization, keys and refusal historyvalidationapinegativetest
Proves
BR-CAP-ACC-REC-016-09 BR-CAP-ACC-REC-016-10
Preconditions
A caller has update but lacks accept.
Steps
Try acceptance with that caller, omit a key and change a keyed body.
Expected
Missing authority and keys and changed requests fail with acceptance refusals recorded as applicable.
Data
Assign callers through the relevant role policies.
Bound to
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a principal who may update exceptions but not accept them with 403
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses an accept without an Idempotency-Key with 400 idempotency_key_required
services-accounting:modules/reconciliation/tests/integration/services/persistence/reconciliation-exceptions.integration.spec.js#refuses the request’s key sent with another request (409, `idempotency_key_reused`)
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#records each refused acceptance command in the exception’s history
Source
services-accounting:modules/reconciliation/tests/e2e/outstanding.e2e.spec.js#refuses a principal who may update exceptions but not accept them with 403
08 Browser approval request and API resultinteractionbrowsertest
Proves
BR-CAP-ACC-REC-016-11 AS-JNY-ACC-REC-005-02
Preconditions
Mock mode shows a pending blocker acceptance.
Steps
Open its detail and approve as another person, comparing separate API acceptance evidence.
Expected
The browser sends its current version; API assertions establish accepted status and independent approval.
Data
Use reconciliation mock route handlers.
Bound to
react-console:e2e/mock/accounting-reconciliation.mock.spec.ts#a second person approves a request to accept an exception
Source
react-console:e2e/mock/accounting-reconciliation.mock.spec.ts#a second person approves a request to accept an exception
09 Independent acceptance changes readinessinteractionapiproposed
Proves
BR-CAP-ACC-REC-016-02 BR-CAP-ACC-REC-016-05 BR-CAP-ACC-REC-018-04
Preconditions
Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
Steps
[ { "do": "Request acceptance of an overdue blocker, assess, approve independently and assess again.", "expect": "The request leaves the blocker; completed acceptance removes that overdue blocker.", "provenance": "proposed", "source": [ "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-016-accept-a-problem-under-policy-with-a-second-persons-approval.md", "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-018-tell-month-end-close-what-stops-a-period-from-closing.md" ] } ]
Expected
The request leaves the blocker; completed acceptance removes that overdue blocker.
Data
Local merchant and bank accounts, an open operational batch and distinct preparation and approval callers.
Source
specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-016-accept-a-problem-under-policy-with-a-second-persons-approval.md,specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-018-tell-month-end-close-what-stops-a-period-from-closing.md
10 Acceptance derives the acting approverinteractionapiproposed
Proves
BR-CAP-ACC-REC-016-03 BR-CAP-ACC-REC-016-04 BR-CAP-ACC-REC-020-02
Preconditions
Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
Steps
[ { "do": "Request acceptance, try supplying an approval identity and approve as a second authorized person.", "expect": "Supplied identity fails and completion names the actual requester and approver.", "provenance": "proposed", "source": [ "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-016-accept-a-problem-under-policy-with-a-second-persons-approval.md", "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-020-keep-preparing-apart-from-approving-and-leave-a-trail-of.md" ] } ]
Expected
Supplied identity fails and completion names the actual requester and approver.
Data
Local merchant and bank accounts, an open operational batch and distinct preparation and approval callers.
Source
specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-016-accept-a-problem-under-policy-with-a-second-persons-approval.md,specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-020-keep-preparing-apart-from-approving-and-leave-a-trail-of.md
11 Acceptance history keeps guarded refusalsinteractionapinegativeproposed
Proves
BR-CAP-ACC-REC-016-09 BR-CAP-ACC-REC-016-10 BR-CAP-ACC-REC-020-05
Preconditions
Use one isolated workspace with the financial records and caller roles required by the relied-on cases.
Steps
[ { "do": "Request acceptance, try self-approval, approve independently and inspect history.", "expect": "Refusal and completion retain their actual actors without allowing requester approval.", "provenance": "proposed", "source": [ "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-016-accept-a-problem-under-policy-with-a-second-persons-approval.md", "specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-020-keep-preparing-apart-from-approving-and-leave-a-trail-of.md" ] } ]
Expected
Refusal and completion retain their actual actors without allowing requester approval.
Data
Local merchant and bank accounts, an open operational batch and distinct preparation and approval callers.
Source
specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-016-accept-a-problem-under-policy-with-a-second-persons-approval.md,specs/accounting/reconciliation/planning/capabilities/CAP-ACC-REC-020-keep-preparing-apart-from-approving-and-leave-a-trail-of.md

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.