ATS-ACC-BAT-004 Use the batch’s permitted lifecycle actions: Capability Test Specification
Markdown Design / Accounting / Batch Management / Batch collection and control / Capability Test Specification Use the batch’s permitted lifecycle actions: Capability Test Specification Coverage The scenarios define focused checks for this outcome. The coverage map distinguishes specified checks from unresolved proof; executable bindings identify inspected assertions and carry no execution result.
Archive protection ends through Unarchive. Manual close cancels a scheduled close. Reopening retires one attention generation. Post produces a protected completed batch. Unpost restores ordinary actions. Fiscal collections reject ordinary controls. These checks use the related capability’s outcome as part of the setup or verification. Unbound interactions remain proposed until a suite executes the complete chain.
Show evidence (sources, provenance, origins, pinned commits)Coverage Rule covered Transition gap: FND-ACC-BAT-058 Validation covered Permission gap: FND-ACC-BAT-058 Edge covered Failure gap: FND-ACC-BAT-058 Boundary covered Concurrency gap: FND-ACC-BAT-058 Invariant covered Interaction covered Test Scenarios 15 scenarios proving CAP-ACC-BAT-004 ; 8 bound to an existing test.
05 Each transition checks its permission permission browser negative test
Proves BR-CAP-ACC-BAT-004-07 Preconditions Reader, staff and administrator personas can inspect Open and Posted batches. Steps Inspect and invoke each available transition. Expected Readers receive no actions; staff receive ordinary actions without Unpost; administrators receive the recovery actions; denied calls return 403. Data Provide the acceptance personas. Bound to Source services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js #refuses a caller without the action’s permission, 403, before the command runs 06 Locks disable transitions invariant api negative test
Proves BR-CAP-ACC-BAT-004-08 Preconditions The batch has an update lock. Steps Retrieve its actions and request Archive. Expected The disabled ordinary actions identify the lock and Archive returns a locked-record refusal. Data Provide no fixtures beyond the stated setup. Bound to Source services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js #lists a locked batch’s status actions with the refusal the command would answer as disabled_reason 07 System batches reject staff transitions edge api negative test
Proves BR-CAP-ACC-BAT-004-09 Preconditions A fiscal close has created a deferred-revenue batch. Steps As an administrator, retrieve and invoke its actions. Expected The list is empty; attempted actions return a system-batch 409 without changing the record. Data Provide a fiscal close's system batch. Bound to Source services-accounting:modules/batches/tests/e2e/system-batches.e2e.spec.js #offers an administrator no action for the system batch 08 Actions reject unsupported requests validation api negative test
Proves BR-CAP-ACC-BAT-004-11 Preconditions The batch is Open. Steps Invoke an unavailable action and submit Close with another batch reference in its body. Expected Both requests return 400; the unsupported-action error identifies the choices. Data Provide no fixtures beyond the stated setup. Bound to Source services-accounting:modules/batches/tests/e2e/batch-actions.e2e.spec.js #refuses an action the batch has not 400, naming the actions 15 Stuck-posting actions respect the one-hour boundary boundary api negative proposed
Proves BR-CAP-ACC-BAT-004-06 Preconditions Two Posting batches last changed exactly one hour ago and one hour plus one second ago. Steps Retrieve their permitted actions at a fixed clock. Expected Only the older batch offers Unpost. Data Owned records in an isolated workspace with the stated calendar and accounting setup. Source services-accounting:modules/batches/tests/unit/actions/batch-actions.spec.js #offers a batch posting for half an hour nothing, and one stuck in posting for over an hour unpost ← Previous Capability Test Specification ATS-ACC-BAT-003 · Correct batch details before posting: Capability Test Specification Next Capability Test Specification → ATS-ACC-BAT-005 · Arrange automatic close and posting: Capability Test Specification