Skip to content

ATS-ACC-BAT-011Assign new documents to the appropriate batch stream: Capability Test Specification

Markdown

ATS-ACC-BAT-011

Assign new documents to the appropriate batch stream: 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-065
  • Edge covered
  • Failure gap: FND-ACC-BAT-065
  • Boundary covered
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

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

01 Assignment settings cap the ordered listboundaryapinegativetest
Proves
BR-CAP-ACC-BAT-011-01
Preconditions
The unit has recurring configurations available for assignment.
Steps
Save one hundred rules and then one hundred one.
Expected
The supported count succeeds; the oversized set returns 400 and preserves the prior rules.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers 400 to 101 rules
02 Replacement is atomicinvariantapinegativeproposed
Proves
BR-CAP-ACC-BAT-011-02
Preconditions
Saved settings contain three rules.
Steps
Replace them with two reordered rules, then force a database refusal during replacement.
Expected
The successful save leaves exactly two numbered rules; the failed save preserves the entire previous configuration.
Data
Provide no fixtures beyond the stated setup.
Source
services-accounting:modules/batches/tests/integration/services/persistence/batch-assignment-settings.integration.spec.js#keeps the previous settings and rules after the database refused a rule the save had already replaced them with
03 Settings versions govern subsequent savesconcurrencyapinegativetest
Proves
BR-CAP-ACC-BAT-011-03
Preconditions
The unit has no saved settings.
Steps
Read, create, then save with no version, an old version and the current version.
Expected
Read returns 404; creation starts version one; missing and stale versions return 400 and 409; the current version advances.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers 409 StaleObject to a save at the version first read
04 Rule references stay inside the unitvalidationapinegativetest
Proves
BR-CAP-ACC-BAT-011-04 INV-DOM-ACC-BAT-001-10
Preconditions
Two units each have recurring, merchant and bank configuration.
Steps
Save the first unit’s default and rules using the second unit’s references.
Expected
Each request identifies the invalid reference without creating settings.
Data
Provide two units.
Bound to
Source
services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers 400 to another unit’s recurring batch in a rule
05 Criteria reject incompatible or unknown fieldsvalidationapinegativetest
Proves
BR-CAP-ACC-BAT-011-05 BR-CAP-ACC-BAT-011-06
Preconditions
The unit already has settings.
Steps
Submit both account kinds in one rule and an unsupported criterion.
Expected
Validation refuses both requests without replacing the prior rules.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers 400 naming bank_account_id to a rule naming both a merchant and a bank account
06 First matching rule winsruleunittest
Proves
BR-CAP-ACC-BAT-011-07 BR-CAP-ACC-BAT-011-08
Preconditions
Several saved rules can match the submitted transaction.
Steps
Evaluate matching facts and facts that miss every rule.
Expected
The earliest match selects its configuration; unmatched facts use the default.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/unit/rules/batch-assignment-rules.spec.js#answers the first matching rule by position, whatever order the rules are listed in
07 Document intake uses assignment when no batch is suppliedinteractionbrowsernegativetest
Proves
BR-CAP-ACC-BAT-011-09
Preconditions
Invoice and check criteria select recurring configurations and a default exists.
Steps
Issue an invoice and check without explicit batches, then delete settings and submit another payment.
Expected
The first documents use the selected current batches; the last request fails because a batch is required.
Data
Provide recurring batches with open batches.
Bound to
Source
react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0510.spec.ts#ACT-ACC-0510
08 Evaluation reports the chosen positionruleapinegativetest
Proves
BR-CAP-ACC-BAT-011-10
Preconditions
One unit has settings and another has none.
Steps
Evaluate facts for both, then omit transaction type.
Expected
The configured unit returns its selection and winning position, with no position for the default; missing settings return 404 and missing type returns 400.
Data
Provide no fixtures beyond the stated setup.
Bound to
Source
services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers the first rule by position when two rules match
09 Readers cannot replace or delete settingspermissionapinegativetest
Proves
BR-CAP-ACC-BAT-011-11
Preconditions
A reader and administrator share saved settings.
Steps
Read, evaluate, save and delete as the reader, then delete settings and the default recurring configuration as administrator.
Expected
Reader reads succeed and writes return 403; administrator deletion removes rules and releases the referenced configuration.
Data
Provide security fixtures.
Bound to
Source
services-accounting:modules/batches/tests/e2e/batches-security.e2e.spec.js#is refused the save 403 permission_missing
10 Default selection respects document and order precedenceedgeunitproposed
Proves
BR-CAP-ACC-BAT-011-12
Preconditions
One document is pro forma and another references an Open order batch.
Steps
Resolve each default, close the order batch and resolve again.
Expected
Pro forma has no batch; the Open order batch wins before assignment; closing it restores assignment selection.
Data
Provide fixtures appropriate to the stated accounting context.
Source
services-accounting:modules/batches/services/rules/batch-rules.ts:defaultBatchOf
11 Routing selection must pass intake checksinteractionapinegativeproposed
Proves
BR-CAP-ACC-BAT-007-10 BR-CAP-ACC-BAT-011-09
Preconditions
Routing selects Daily and its active batch is Closed.
Steps
Evaluate invoice facts and then issue an invoice without an explicit batch.
Expected
Evaluation identifies Daily; issuance refuses the Closed intake and saves no issued invoice.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/integration/services/close/system-batch-guard.integration.spec.js#refuses the system batch as a default batch (BA-12); react-console:acceptance/accounting/playwright/journeys/batches-posting/ACT-ACC-0510.spec.ts#ACT-ACC-0510
12 Routing references prevent stream removalinteractionapinegativeproposed
Proves
BR-CAP-ACC-BAT-009-09 BR-CAP-ACC-BAT-011-11
Preconditions
Routing names Daily as its default and Cards in its first rule.
Steps
Try deleting both streams, remove routing and repeat deletion with unused intake.
Expected
The referenced deletes return 409; after routing removal the unused streams can be deleted.
Data
An isolated workspace with the stated business-unit calendar, documents and configuration.
Source
services-accounting:modules/batches/tests/e2e/recurring-batches.e2e.spec.js#answers 409 naming the settings and how they name it; services-accounting:modules/batches/tests/e2e/batches-security.e2e.spec.js#is refused the save 403 permission_missing
13 Criteria vocabulary rejects repeated valuesvalidationapinegativeproposed
Proves
BR-CAP-ACC-BAT-011-06
Preconditions
Routing already contains one saved rule.
Steps
Replace it with criteria containing a repeated payment type and then an unknown card type.
Expected
Both saves return validation refusals and the previous routing list remains unchanged.
Data
Owned records in an isolated workspace with the stated calendar and accounting setup.
Source
services-accounting:modules/batches/tests/e2e/batch-assignment-settings.e2e.spec.js#answers 400 to a transaction type the vocabulary does not have

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.