Skip to content

ATS-ACC-PRD-004Save product corrections against the version read: Capability Test Specification

Markdown

ATS-ACC-PRD-004

Save product corrections against the version read: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleProductsRevision3

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

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

Test Scenarios

11 scenarios proving CAP-ACC-PRD-004; 8 bound to an existing test.

01 Stale corrections preserve the latest versionconcurrencyapinegativetest
Proves
BR-CAP-ACC-PRD-004-01
Preconditions
A product has already advanced to version two.
Steps
Replace it using version one.
Expected
The stale request fails and version two remains intact.
Data
A product has already advanced to version two.
Bound to
Source
services-accounting:modules/products/tests/e2e/products.e2e.spec.js#answers 409 to a stale version
02 Replacement retains only the intended exceptionruleunittest
Proves
BR-CAP-ACC-PRD-004-02
Preconditions
A product carries optional values, collections and owned confirmation content.
Steps
Replace it with new collections while omitting optional settings and confirmation configuration.
Expected
Omitted ordinary values clear, collections are replaced and confirmation content remains unchanged.
Data
A product carries optional values, collections and owned confirmation content.
Bound to
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#answers the replaced record at version 2, the cleared fields left out and both collections replaced
services-accounting:modules/products/tests/integration/services/persistence/products.features.integration.spec.js#answers the new features, each list replaced as a whole and the template merged
Source
services-accounting:modules/products/tests/integration/services/persistence/products.features.integration.spec.js#keeps the confirmation e-mail and its template
03 Replacement cannot change ownership coordinatesvalidationapinegativetest
Proves
BR-CAP-ACC-PRD-004-03
Preconditions
An existing product has a stable kind and unit.
Steps
Submit another body identity, another unit and another kind separately.
Expected
Each change is rejected and the original coordinates remain.
Data
An existing product has a stable kind and unit.
Bound to
services-accounting:modules/products/tests/e2e/products.e2e.spec.js#answers 400 to a body whose id is not the path’s: an id never changes
Source
services-accounting:modules/products/tests/e2e/products.e2e.spec.js#answers 400 to a body whose id is not the path’s: an id never changes
04 Retired records require reactivationtransitionapinegativetest
Proves
BR-CAP-ACC-PRD-004-04
Preconditions
A product is retired.
Steps
Attempt a name correction.
Expected
The refusal instructs the caller to reactivate first.
Data
A product is retired.
Bound to
Source
services-accounting:modules/products/tests/e2e/products.e2e.spec.js#answers 409 to replacing a retired product
05 Unlocking must be explicitpermissionunitnegativetest
Proves
BR-CAP-ACC-PRD-004-05
Preconditions
A product has an update-and-delete lock.
Steps
Replace with the lock omitted, repeated and explicitly cleared.
Expected
The first two fail; clearing the lock allows replacement and later deletion.
Data
A product has an update-and-delete lock.
Bound to
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses a locked product replaced without stating sys_locked, or with the same lock
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#unlocks a locked product replaced with sys_locked null, then edits and deletes it
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a replacement that omits sys_locked or resends the lock, naming the lock
Source
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses a locked product replaced without stating sys_locked, or with the same lock
06 Failed replacement restores collectionsfailureunitnegativetest
Proves
BR-CAP-ACC-PRD-004-06 INV-DOM-ACC-PRD-001-07
Preconditions
A product contains prices and components.
Steps
Cause a validation refusal and database failures after collection deletion.
Expected
Every attempt leaves the original collections readable.
Data
A product contains prices and components.
Bound to
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#leaves the old prices and components when a rule refuses the replacement
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#leaves the old prices and components when a new price is refused by the database after the old ones were removed
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#leaves the old prices and components when a new component is refused by the database after the old ones were removed
Source
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#leaves the old prices and components when a rule refuses the replacement
07 Readers cannot correct productspermissionapinegativetest
Proves
BR-CAP-ACC-PRD-004-08
Preconditions
A caller has only product read authority.
Steps
Submit a replacement.
Expected
The request is denied without changing the product.
Data
A caller has only product read authority.
Bound to
Source
services-accounting:modules/products/tests/e2e/products-security.e2e.spec.js#is refused replacing a product
08 The API disregards submitted derived valuesboundaryapinegativeproposed
Proves
BR-CAP-ACC-PRD-004-09
Preconditions
Workspace A owns the product.
Steps
Send workspace B in the body, then resend altered derived fields from A.
Expected
The workspace mismatch fails and derived fields do not replace server values.
Data
Workspace A owns the product.
Source
FND-ACC-PRD-022
09 Console edits retain hidden feature valuesinteractionbrowsertest
Proves
BR-CAP-ACC-PRD-004-10
Preconditions
API configuration supplies quantity bands, a purchase ceiling, task instructions, a cancellation fee and notes.
Steps
Rename it in the editor and deactivate it from the list.
Expected
Those configured values remain unchanged through both writes.
Data
API configuration supplies quantity bands, a purchase ceiling, task instructions, a cancellation fee and notes.
Bound to
Source
react-console:acceptance/accounting/playwright/journeys/products/ACT-ACC-0112.spec.ts#ACT-ACC-0112
10 Editors exercise every supported product lock changetransitionapinegativeproposed
Proves
BR-CAP-ACC-PRD-004-05
Preconditions
An editor reads the current product before each lock change.
Steps
Save unlocked to delete-only and combined protection; save delete-only to unlocked and combined; explicitly reduce combined to each weaker setting.
Expected
Each supported replacement advances the version and leaves the requested protection; omission of combined protection refuses the replacement.
Data
An editor reads the current product before each lock change.
Source
rhythm-v2-docs:specs/accounting/products/design/state-models/STATE-ACC-PRD-002-record-lock.md#transitions; services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses a locked product replaced without stating sys_locked, or with the same lock
11 Catalogue corrections and accounting use separate saved versionsinteractionapinegativeproposed
Proves
BR-CAP-ACC-PRD-004-01 BR-CAP-ACC-PRD-005-03 BR-CAP-ACC-PRD-008-12 BR-CAP-ACC-PRD-015-07
Preconditions
A product has a setup, a valid grid and an independently read version for each record.
Steps
Retire and reactivate it, replace the grid at the latest product version, then update the setup using its unchanged setup version.
Expected
The grid and lifecycle use the product version; the independent setup save succeeds without overwriting the product.
Data
A product has a setup, a valid grid and an independently read version for each record.
Source
services-accounting:modules/products/tests/e2e/products.e2e.spec.js#answers 409 to a stale version; services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#reactivates an inactive product; services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses more than 500 prices (the bound of the grid); services-accounting:modules/products/tests/e2e/product-accounting.e2e.spec.js#answers 400 to a replacement without the version read

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.