Skip to content

ATS-ACC-PRD-006Delete a product after its dependencies are removed: Capability Test Specification

Markdown

ATS-ACC-PRD-006

Delete a product after its dependencies are removed: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleProductsRevision3

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

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

Test Scenarios

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

01 A bundle dependency blocks removalinteractionunitnegativetest
Proves
BR-CAP-ACC-PRD-006-01 INV-DOM-ACC-PRD-001-10
Preconditions
Bundle B includes product A.
Steps
Request removal of product A.
Expected
Deletion fails and A remains available.
Data
Bundle B includes product A.
Bound to
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses deleting a product another product bundles, 409, and keeps it
services-accounting:modules/products/tests/e2e/products.e2e.spec.js#answers 409 to deleting a product a bundle includes
Source
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses deleting a product another product bundles, 409, and keeps it
02 Invoice product use blocks removalrulebrowsernegativetest
Proves
BR-CAP-ACC-PRD-006-02
Preconditions
An invoice line names the product.
Steps
Attempt deletion.
Expected
An in-use refusal preserves the product.
Data
An invoice line names the product.
Bound to
Source
react-console:acceptance/accounting/playwright/journeys/products/ACT-ACC-0121.spec.ts#ACT-ACC-0121
03 Other financial references need useful refusalsfailureapinegativeproposed
Proves
BR-CAP-ACC-PRD-006-02
Preconditions
One product is an invoice discount reference and another appears on an installment line.
Steps
Attempt to delete each product.
Expected
The proposed contract requires explained in-use refusals instead of server faults.
Data
One product is an invoice discount reference and another appears on an installment line.
Source
services-accounting:modules/transactions/db/invoice-lines.table.ts:invoice_lines_product_fk; modules/transactions/db/invoice-lines.table.ts:invoice_lines_discount_product_fk; modules/billing/db/installment-schedule-lines.table.ts:installment_schedule_lines_product_fk
04 Deletion removes owned configurationinvariantunittest
Proves
BR-CAP-ACC-PRD-006-03
Preconditions
A product carries pricing, components, features and accounting children.
Steps
Delete the product.
Expected
Neither the product nor its owned configuration remains.
Data
A product carries pricing, components, features and accounting children.
Bound to
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#takes its prices, components, accounting setup and the setup’s collections with it
Source
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#takes its prices, components, accounting setup and the setup’s collections with it
05 Delete locks protect productspermissionunitnegativetest
Proves
BR-CAP-ACC-PRD-006-04
Preconditions
Products carry each supported lock.
Steps
Attempt to delete both.
Expected
Both deletions fail with lock explanations.
Data
Products carry each supported lock.
Bound to
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a delete of a record under either lock, naming it
Source
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses a product locked against deletes
06 Setup protection extends to product removalpermissionunitnegativetest
Proves
BR-CAP-ACC-PRD-006-05
Preconditions
The product’s setup has a delete lock.
Steps
Attempt product deletion.
Expected
Both records remain after the refusal.
Data
The product’s setup has a delete lock.
Bound to
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses a product whose accounting setup is locked against deletes, leaving the product and its setup (DEF-ACT-0101)
Source
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses a product whose accounting setup is locked against deletes, leaving the product and its setup (DEF-ACT-0101)
07 Cleanup failure leaves deletion committedfailureunittest
Proves
BR-CAP-ACC-PRD-006-06
Preconditions
A product owns confirmation content.
Steps
Delete once with normal cleanup and once with Platform cleanup failure.
Expected
Normal cleanup removes content; failed cleanup is logged while deletion still stands.
Data
A product owns confirmation content.
Bound to
Source
services-accounting:modules/products/tests/integration/services/persistence/products.features.integration.spec.js#leaves the delete standing when Platform cannot clear the template
08 Units remain while products depend on theminteractionapinegativetest
Proves
BR-CAP-ACC-PRD-006-07
Preconditions
A unit owns a product.
Steps
Request unit deletion.
Expected
The dependency preserves both records.
Data
A unit owns a product.
Bound to
services-accounting:modules/products/tests/e2e/products.e2e.spec.js#answers 409 to deleting a business unit that still has products
Source
services-accounting:modules/products/tests/e2e/products.e2e.spec.js#answers 409 to deleting a business unit that still has products
09 Deletion requires delete authoritypermissionapinegativetest
Proves
BR-CAP-ACC-PRD-006-08
Preconditions
A reader can inspect the product.
Steps
Attempt product deletion.
Expected
The request is denied.
Data
A reader can inspect the product.
Bound to
Source
services-accounting:modules/products/tests/e2e/products-security.e2e.spec.js#is refused deleting a product
10 Removal works from each retained availability statetransitionapinegativeproposed
Proves
BR-CAP-ACC-PRD-006-03 BR-CAP-ACC-PRD-006-09
Preconditions
Active, inactive and retired products have no dependencies or locks.
Steps
Delete each product and repeat each removal.
Expected
Every first removal clears the local aggregate; repeated removals return not found.
Data
Active, inactive and retired products have no dependencies or locks.
Source
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#takes its prices, components, accounting setup and the setup’s collections with it; services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#answers another tenant’s product as absent and leaves it
11 Setup protection, bundle references and template cleanup meet at removalinteractionapinegativeproposed
Proves
BR-CAP-ACC-PRD-006-01 BR-CAP-ACC-PRD-006-05 BR-CAP-ACC-PRD-006-06 BR-CAP-ACC-PRD-005-03 BR-CAP-ACC-PRD-011-03 BR-CAP-ACC-PRD-014-05 BR-CAP-ACC-PRD-015-09
Preconditions
A retired component has a protected setup and owned confirmation; another product includes it.
Steps
Reactivate it, request deletion, remove the bundle relationship, request deletion again, clear setup protection, and delete it.
Expected
Each remaining guard preserves the product; the final removal clears owned local data and attempts remote cleanup.
Data
A retired component has a protected setup and owned confirmation; another product includes it.
Source
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses deleting a product another product bundles, 409, and keeps it; services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses a product whose accounting setup is locked against deletes, leaving the product and its setup (DEF-ACT-0101); services-accounting:modules/products/tests/integration/services/persistence/products.features.integration.spec.js#leaves the delete standing when Platform cannot clear the template; 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#keeps a retired component the bundle already holds when a replacement resends it, and refuses a new retired one; services-accounting:modules/products/tests/integration/services/persistence/products.features.integration.spec.js#clears the product’s own template when it switches to a shared one; services-accounting:modules/products/tests/integration/services/persistence/product-accounting-setups.integration.spec.js#unlocks a setup locked against updates when the replacement states sys_locked null, then deletes it

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.