Skip to content

ATS-ACC-PRD-017Complete accounting setup for a group of products: Capability Test Specification

Markdown

ATS-ACC-PRD-017

Complete accounting setup for a group of products: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleProductsRevision3

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

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

Test Scenarios

7 scenarios proving CAP-ACC-PRD-017; 5 bound to an existing test.

01 Missing-setup reads share product selectionruleapitest
Proves
BR-CAP-ACC-PRD-017-01
Preconditions
Two units have active, inactive and retired products with and without setups.
Steps
List without status, with explicit statuses and with ordinary product filters.
Expected
Only selected products without setups appear, defaulting to active.
Data
Two units have active, inactive and retired products with and without setups.
Bound to
Source
services-accounting:modules/products/tests/e2e/product-accounting-setups.e2e.spec.js#answers the active products with no setup, by name
02 Bulk setup input is boundedboundaryunitnegativetest
Proves
BR-CAP-ACC-PRD-017-02
Preconditions
One hundred one product fixtures are available.
Steps
Submit absent, empty, one-hundred and one-hundred-one setup collections.
Expected
Only valid nonempty collections within the maximum succeed.
Data
One hundred one product fixtures are available.
Bound to
Source
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#refuses 101 setups before reading any product
03 A later bulk failure undoes earlier writesfailureunitnegativetest
Proves
BR-CAP-ACC-PRD-017-03
Preconditions
Some products have setups and others need creation.
Steps
Cause a later validation, stale-version, missing-version or lock refusal.
Expected
The error identifies the failing entry and the entire request persists nothing.
Data
Some products have setups and others need creation.
Bound to
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#refuses a rule of a later setup naming its position and product, the earlier create rolled back
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#refuses a stale version 409 naming the product, the earlier replacement rolled back
services-accounting:modules/products/tests/e2e/product-accounting-setups.e2e.spec.js#refuses another unit’s account in a later setup 400, naming it, and writes nothing
Source
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#refuses a rule of a later setup naming its position and product, the earlier create rolled back
04 Bulk input rejects repeated or unavailable productsvalidationapinegativetest
Proves
BR-CAP-ACC-PRD-017-04
Preconditions
Two workspaces provide product fixtures.
Steps
Repeat a product, use a missing identity and name another workspace’s product.
Expected
Each request fails before setup writes survive.
Data
Two workspaces provide product fixtures.
Bound to
services-accounting:modules/products/tests/e2e/products-security.e2e.spec.js#refuses tenant B a bulk save naming tenant A’s product as unknown
Source
services-accounting:modules/products/tests/e2e/products-security.e2e.spec.js#refuses tenant B a bulk save naming tenant A’s product as unknown
05 Bulk workflows require setup permissionspermissionapinegativetest
Proves
BR-CAP-ACC-PRD-017-06
Preconditions
Reader, product-only and accounting-only callers are available.
Steps
Request missing-setup reads and bulk saves under each identity.
Expected
Readers can list, product-only callers cannot use either action and setup managers can save.
Data
Reader, product-only and accounting-only callers are available.
Bound to
services-accounting:modules/products/tests/e2e/products-security.e2e.spec.js#is refused listing the products without an accounting setup
Source
services-accounting:modules/products/tests/e2e/products-security.e2e.spec.js#is refused listing the products without an accounting setup
06 Overlapping bulk saves use a common lock orderconcurrencyapinegativeproposed
Proves
BR-CAP-ACC-PRD-017-05 BR-CAP-ACC-PRD-017-03
Preconditions
Two clients read the same versions of two products with setups.
Steps
Submit concurrent replacements listing those products in opposite input orders.
Expected
The product locks serialize the requests; one complete group succeeds and stale competing versions refuse without a partial group.
Data
Two clients read the same versions of two products with setups.
Source
services-accounting:modules/products/services/persistence/products.ts:lockProductsInIdOrder
07 One invalid allocation rolls back a complete setup groupinteractionapinegativeproposed
Proves
BR-CAP-ACC-PRD-017-03 BR-CAP-ACC-PRD-016-06 BR-CAP-ACC-PRD-015-08
Preconditions
Two products lack setups; the second proposed setup has fixed shares exceeding its base price.
Steps
Submit both setups, read both products and the missing-setup list, then correct the allocation and retry.
Expected
The failed group leaves both incomplete; the corrected group sets up both and removes them from missing-setup results.
Data
Two products lack setups; the second proposed setup has fixed shares exceeding its base price.
Source
services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#refuses a rule of a later setup naming its position and product, the earlier create rolled back; services-accounting:modules/products/services/rules/product-rules.ts:listPrice; services-accounting:modules/products/services/rules/product-rules.ts:revenueSplitsProblem; services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#leaves the previous setup and collections when a rule refuses the replacement

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.