Skip to content

ATS-ACC-BAT-012Inspect posting readiness before submission: Capability Test Specification

Markdown

ATS-ACC-BAT-012

Inspect posting readiness before submission: Capability Test Specification

Markdown
  • DocumentProposed
  • Product intentProposed

Planning

Proves capability
CAP-ACC-BAT-012

Design

Executed by
TST-ACC-BAT-057, TST-ACC-BAT-124

KindAcceptance test setProduct areaAccountingModuleBatch ManagementRevision2

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

Coverage

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

Test Scenarios

6 scenarios proving CAP-ACC-BAT-012; 1 bound to an existing test.

01 Preview validates permission and selection sizepermissionapinegativetest
Proves
BR-CAP-ACC-BAT-012-01 BR-CAP-ACC-BAT-012-02
Preconditions
One caller lacks preview access and another has it.
Steps
Preview as both, then submit empty and oversized selections.
Expected
The unauthorized call returns 403; zero and more than one hundred references return 400.
Data
Provide security fixtures.
Bound to
Source
services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses a preview without the preview permission, 403
02 Preview reports generation problemsruleapinegativeproposed
Proves
BR-CAP-ACC-BAT-012-03 BR-CAP-ACC-BAT-012-04
Preconditions
The selection includes an unknown batch, a posted batch, a closed period, missing account configuration, missing exchange rate and a valid batch.
Steps
Preview the whole selection.
Expected
Generation problems carry their reasons and the valid batch can proceed; preview does not independently enforce all status and lock guards.
Data
Provide seeded documents and configuration.
Source
services-accounting:modules/batches/services/engine/preview-batches.ts:previewBatchPostings
03 Preview leaves no lasting posting changesinvariantapiproposed
Proves
BR-CAP-ACC-BAT-012-06
Preconditions
An Open batch contains documents.
Steps
Preview it and inspect batch state, posting history, ledger and remaining locks.
Expected
The batch stays Open without a posting or entry, and transaction locks have been released.
Data
Provide no fixtures beyond the stated setup.
Source
services-accounting:modules/batches/services/engine/preview-batches.ts
04 Readiness does not reserve eligibilityinteractionapinegativeproposed
Proves
BR-CAP-ACC-BAT-012-06 BR-CAP-ACC-BAT-013-06
Preconditions
Morning has a valid invoice in an Open period.
Steps
Preview Morning, close its fiscal period using a controlled fixture and request posting.
Expected
The earlier preview is eligible; the later action refuses the changed fiscal state without creating a job.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/services/engine/preview-batches.ts:periodProblemOf; services-accounting:modules/batches/services/persistence/posting-periods.ts:lockPostingPeriodForDate; services-accounting:modules/batches/services/actions/batch-actions.ts:postBatch; services-accounting:modules/batches/services/engine/engine-scope.ts:lockBatchesForPosting
05 Account correction changes readinessinteractionapiproposed
Proves
BR-CAP-ACC-BAT-012-03 BR-CAP-ACC-BAT-014-03
Preconditions
Morning’s invoice product has no resolvable revenue account.
Steps
Preview, configure the missing account and preview again.
Expected
The first result names the missing account and the second includes Morning as a candidate.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/services/engine/preview-batches.ts:previewBatchPostings; services-accounting:modules/batches/tests/integration/services/posting/gl-resolution-at-posting.integration.spec.js#fails the batch’s validation with an error naming the invoice, the missing accounts receivable account, the product’s setup and the unit’s default
06 Preview accepts both selection endpointsboundaryapinegativeproposed
Proves
BR-CAP-ACC-BAT-012-02
Preconditions
One hundred existing batch references belong to one isolated workspace.
Steps
Preview selections of one and one hundred, then submit zero and one hundred one references.
Expected
Both supported requests reach preview; both unsupported sizes return 400.
Data
Owned records in an isolated workspace with the stated calendar and accounting setup.
Source
services-accounting:modules/batches/tests/e2e/batch-postings.e2e.spec.js#refuses a preview that names no batch, 400

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.