Skip to content

ATS-ACC-PRD-007Keep domain products under their owning application: Capability Test Specification

Markdown

ATS-ACC-PRD-007

Keep domain products under their owning application: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleProductsRevision3

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

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

Test Scenarios

10 scenarios proving CAP-ACC-PRD-007; 7 bound to an existing test.

01 Domain ownership restricts service writespermissionunitnegativetest
Proves
BR-CAP-ACC-PRD-007-01 BR-CAP-ACC-PRD-007-02 INV-DOM-ACC-PRD-001-13
Preconditions
Commerce and Membership service callers have product fixtures.
Steps
Try cross-owner creation, correction, retirement, reactivation and deletion.
Expected
Cross-owner requests fail with ownership details and permitted owner writes succeed.
Data
Commerce and Membership service callers have product fixtures.
Bound to
services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js#refuses Commerce creating a membership package, naming the owner, the type and the caller
services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js#lets Commerce create merchandise, with the capabilities its seed row declares
services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js#refuses another service replacing, retiring, reactivating or deleting the package, and lets its owner
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses another service, naming the owner, the type and the caller
Source
services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js#refuses Commerce creating a membership package, naming the owner, the type and the caller
02 Console callers can create domain productspermissionunittest
Proves
BR-CAP-ACC-PRD-007-03
Preconditions
The caller has console product authority.
Steps
Create an active Membership package and try an inactive Events kind.
Expected
The package succeeds and the inactive kind fails.
Data
The caller has console product authority.
Bound to
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#lets a console caller write any type (the console calls Accounting first and the domain second)
services-accounting:modules/products/tests/integration/services/persistence/products.shared-base.integration.spec.js#refuses a product of a type registered inactive (the Events types) for every caller
services-accounting:modules/products/tests/e2e/products-shared-base.e2e.spec.js#creates a membership package for a console caller, answering its type, the pricing model and no custom fields
Source
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#lets a console caller write any type (the console calls Accounting first and the domain second)
03 Database and API product views agreeinteractionunittest
Proves
BR-CAP-ACC-PRD-007-04
Preconditions
Membership has a workspace database transaction.
Steps
Save a package through the database function and read it through Accounting.
Expected
The common product and its ordered collections match between views.
Data
Membership has a workspace database transaction.
Bound to
Source
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#is the same product Accounting’s own persistence service reads
04 Database writers require trusted session contextboundaryunitnegativetest
Proves
BR-CAP-ACC-PRD-007-05
Preconditions
Sessions lack an application role or workspace.
Steps
Invoke the saving function from each session.
Expected
Both calls fail authorization checks.
Data
Sessions lack an application role or workspace.
Bound to
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#refuses a session that is no macroservice application role (the owner, no role set) as RHP04
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#refuses Accounting’s own role writing a membership package: the owner rule names the owner, the type and the caller
Source
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#refuses a transaction with no tenant as RHP04
05 Database refusals match service validationvalidationunitnegativetest
Proves
BR-CAP-ACC-PRD-007-06
Preconditions
Membership can invoke its product-saving path.
Steps
Submit matching invalid product requests through the function and service.
Expected
Both paths return matching validation sentences and classify request or state failures appropriately.
Data
Membership can invoke its product-saving path.
Bound to
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#refuses bundled prices above the product price with one sentence on both paths
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#refuses a fixed-priced product without a standard price in the base currency with one sentence
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#refuses two prices of one cell applying at the same time with one sentence on both paths
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#refuses a Donation Product with prices with one sentence on both paths
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#refuses a replacement of a product the tenant does not have (RHP03), another tenant’s among them
Source
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#refuses bundled prices above the product price with one sentence on both paths
06 Domain saves reject owned confirmation contentvalidationunitnegativetest
Proves
BR-CAP-ACC-PRD-007-07
Preconditions
Membership can invoke its product-saving path.
Steps
Submit product-owned confirmation content and duplicate creation under an existing identity.
Expected
Both requests fail.
Data
Membership can invoke its product-saving path.
Bound to
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#refuses a product-specific confirmation e-mail, which Accounting’s API composes
Source
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#refuses a product-specific confirmation e-mail, which Accounting’s API composes
07 Database replacement preserves omitted scalarsruleunittest
Proves
BR-CAP-ACC-PRD-007-08
Preconditions
A domain product has stored description and notes.
Steps
Replace it omitting description, clearing notes and supplying complete collections.
Expected
Description remains, notes clear and collections use the submitted replacements.
Data
A domain product has stored description and notes.
Bound to
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#replaces the row and every collection as a whole, keeping an omitted property and clearing a null one
Source
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#replaces the row and every collection as a whole, keeping an omitted property and clearing a null one
08 Compare database and HTTP bundle allocation contractsinteractionunitproposed
Proves
BR-CAP-ACC-PRD-007-11
Preconditions
A domain bundle has quantity greater than one and another request omits a component price.
Steps
Save each request through the database function and compare the HTTP write path.
Expected
Database saving uses unweighted totals and a zero default; HTTP saving multiplies by quantity and requires a component price.
Data
A domain bundle has quantity greater than one and another request omits a component price.
Source
FND-ACC-PRD-034
09 Retain a held audience after Commerce activationedgeunitproposed
Proves
BR-CAP-ACC-PRD-007-12
Preconditions
A product holds a migrated audience absent from the active Commerce registry.
Steps
Submit an otherwise valid database domain replacement with that audience.
Expected
The held audience remains admissible through the database path.
Data
A product holds a migrated audience absent from the active Commerce registry.
Source
FND-ACC-PRD-034
10 Domain creation and retirement agree with common-product readsinteractionapinegativeproposed
Proves
BR-CAP-ACC-PRD-007-04 BR-CAP-ACC-PRD-007-08 BR-CAP-ACC-PRD-002-06 BR-CAP-ACC-PRD-004-04 BR-CAP-ACC-PRD-005-02
Preconditions
An owning domain caller has a valid shared transaction context.
Steps
Create a package through the domain function, replace it at the read version, retire it, and inspect each result through Accounting.
Expected
Readers see the common identity and ordered grid at each version; retired ordinary replacement fails.
Data
An owning domain caller has a valid shared transaction context.
Source
services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#is the same product Accounting’s own persistence service reads; services-accounting:modules/products/tests/integration/db/save-product-function.integration.spec.js#replaces the row and every collection as a whole, keeping an omitted property and clearing a null one; services-accounting:modules/products/tests/integration/db/products.table.integration.spec.js#refuses a change of business_unit_id (RHF01); services-accounting:modules/products/tests/e2e/products.e2e.spec.js#answers 409 to replacing a retired product; services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#retires the product at version 2, changing nothing else

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.