Skip to content

ATS-ACC-BAT-003Correct batch details before posting: Capability Test Specification

Markdown

ATS-ACC-BAT-003

Correct batch details before posting: Capability Test Specification

Markdown
  • DocumentProposed
  • Product intentProposed

KindAcceptance test setProduct areaAccountingModuleBatch ManagementRevision2

Read atservices-accounting f47cb263react-console baf6dae3rhythm-v2-docs 37405d50

Coverage

  • Rule covered
  • Transition not-applicable
  • Validation covered
  • Permission gap: FND-ACC-BAT-057
  • Edge covered
  • Failure gap: FND-ACC-BAT-057
  • Boundary covered
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

13 scenarios proving CAP-ACC-BAT-003; 8 bound to an existing test.

01 Details cannot set statusvalidationapinegativetest
Proves
BR-CAP-ACC-BAT-003-01
Preconditions
The batch is Open.
Steps
Submit Closed through the details editor.
Expected
The request returns 400 and leaves the batch Open.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/e2e/batches.e2e.spec.js#refuses a PATCH naming the status 400: a status changes only through the batch’s actions
02 Ownership cannot moveinvariantapinegativeproposed
Proves
BR-CAP-ACC-BAT-003-02 INV-DOM-ACC-BAT-001-02
Preconditions
A recurring batch owns the selected batch.
Steps
Try changing its unit and its recurring-batch reference separately.
Expected
Both changes fail and both references remain intact.
Data
Provide two units, two recurring batches.
Source
services-accounting:modules/batches/services/rules/batch-rules.ts:BATCH_FROZEN_FIELDS
03 Completed batches protect ordinary fieldstransitionapinegativetest
Proves
BR-CAP-ACC-BAT-003-03
Preconditions
The records include Posted, Downloaded and Archived batches.
Steps
Change the posted date, downloaded name and archived description.
Expected
Each request returns a field-specific 409; the posted fiscal context stays fixed and unarchive remains available.
Data
Provide batches in each status.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses moving the date of a posted batch, and the batch keeps its date and fiscal period (DEF-ACT-0502)
04 Recent posting work blocks editsboundaryunitnegativeproposed
Proves
BR-CAP-ACC-BAT-003-04
Preconditions
One posting batch changed two minutes ago and another ten minutes ago.
Steps
Rename each batch.
Expected
The recent batch refuses the edit; the stale posting batch accepts it.
Data
Provide no fixtures beyond the stated setup.
Source
services-accounting:modules/batches/services/rules/batch-rules.ts:assertBatchChangesAllowed
05 Date edits recalculate fiscal placementruleapinegativetest
Proves
BR-CAP-ACC-BAT-003-05
Preconditions
An October batch is Open; September is closed and November open.
Steps
Move its date into November and then September.
Expected
November updates the period; September refuses the change.
Data
Provide fiscal periods in each status.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses moving an open batch’s date into a closed period (journey 0516/0520 setups: the rule stands)
06 Renames preserve unit uniquenessvalidationapinegativetest
Proves
BR-CAP-ACC-BAT-003-06
Preconditions
Two batches share a unit.
Steps
Rename one to the other’s name, then change an unrelated field.
Expected
The duplicate name returns 409; the unrelated update succeeds without renaming.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses a rename to a name another batch of the unit has 409, name_in_use (D14)
07 Submitted stale versions failconcurrencyapinegativetest
Proves
BR-CAP-ACC-BAT-003-07
Preconditions
Another editor has changed a batch since version one was read.
Steps
Save with that earlier version.
Expected
A stale-object conflict returns 409.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses a change at a version the batch has moved on from
08 Unlocking is a separate updateedgeapinegativetest
Proves
BR-CAP-ACC-BAT-003-08
Preconditions
Updates are locked on the batch.
Steps
Try editing, editing while unlocking, and unlocking alone before editing.
Expected
The combined attempts fail; the standalone unlock preserves the external reference and permits the later edit.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses an edit sent with the lock’s release
09 Type edits cannot create system batchesvalidationapinegativetest
Proves
BR-CAP-ACC-BAT-003-09
Preconditions
An ordinary batch is Open.
Steps
Request a deferred-revenue type through the details editor.
Expected
The system-batch refusal leaves the record intact.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/integration/services/close/system-batch-guard.integration.spec.js#refuses changing an ordinary batch’s type to a system type, the batch unchanged
10 Update access controls the editorpermissionbrowsernegativetest
Proves
BR-CAP-ACC-BAT-003-10
Preconditions
The personas include a reader and a staff updater.
Steps
Inspect the read-only batch controls and submit a permitted details edit as staff.
Expected
The reader has no Edit Details action; staff can save an allowed details change.
Data
Provide the acceptance personas.
Bound to
Source
react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0540.spec.ts#ACT-ACC-0540
11 A renamed collection remains findableinteractionapiproposed
Proves
BR-CAP-ACC-BAT-001-01 BR-CAP-ACC-BAT-003-06
Preconditions
Daily exists in an open October period.
Steps
Create Daily, rename it to Morning, then retrieve it by its original reference.
Expected
The reference is unchanged and the name is Morning.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/e2e/batches.e2e.spec.js#refuses a create naming the status 400: a new batch is always open; services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#refuses a rename to a name another batch of the unit has 409, name_in_use (D14)
12 Archive protection ends through Unarchiveinteractionapinegativeproposed
Proves
BR-CAP-ACC-BAT-003-03 BR-CAP-ACC-BAT-004-05
Preconditions
Morning starts Open with description First.
Steps
Archive Morning, try to change its description, unarchive it and save Second.
Expected
The archived save returns 409; the final read is Open with description Second.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/services/persistence/batches.ts:changeBatch; services-accounting:modules/batches/services/rules/batch-rules.ts:assertBatchChangesAllowed; services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#archives an open batch and a closed one, and unarchives to open
13 Removing the close time cancels deliveryinteractionapiproposed
Proves
BR-CAP-ACC-BAT-003-01 BR-CAP-ACC-BAT-005-05
Preconditions
Morning is Open with a future close occurrence.
Steps
Clear its close time through details editing and inspect the saved batch and schedule.
Expected
Morning stays Open without its former close schedule.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/aws/api/batches.schemas.ts:batchPatchSchema; services-accounting:modules/batches/tests/integration/services/persistence/batches.integration.spec.js#removes the schedule and the time when the batch is closed

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.