Skip to content

ATS-ACC-PRD-010Configure discounts for quantity purchases: Capability Test Specification

Markdown

ATS-ACC-PRD-010

Configure discounts for quantity purchases: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaAccountingModuleProductsRevision3

Read atservices-accounting f47cb263react-console baf6dae3

Coverage

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

Test Scenarios

5 scenarios proving CAP-ACC-PRD-010; 3 bound to an existing test.

01 Band ranges and percentage ceilings are validatedvalidationunitnegativetest
Proves
BR-CAP-ACC-PRD-010-01 BR-CAP-ACC-PRD-010-02
Preconditions
A fixed-priced product supports quantity bands.
Steps
Try backward ranges, percentages above one hundred and a flat reduction of 150 minor units.
Expected
Invalid boundaries fail and the monetary reduction succeeds.
Data
A fixed-priced product supports quantity bands.
Bound to
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a range that ends before it starts, naming the row
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#accepts a flat amount above 100, which is minor units
Source
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses a percentage above 100
02 Every band pair is checkedinvariantunitnegativetest
Proves
BR-CAP-ACC-PRD-010-03 INV-DOM-ACC-PRD-001-11
Preconditions
A product supports disjoint quantity ranges.
Steps
Try shared endpoints, nesting and intersecting open ranges, then adjacent disjoint bands.
Expected
Shared quantities fail and nonoverlapping adjacent bands succeed.
Data
A product supports disjoint quantity ranges.
Bound to
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#refuses two rules that overlap, naming both rows and their ranges
services-accounting:modules/products/tests/unit/rules/product-rules.spec.js#finds no overlap between ranges that only touch, the ends inclusive
services-accounting:modules/products/tests/e2e/product-features.e2e.spec.js#refuses overlapping bulk pricing ranges by the service’s rule, naming the rows
Source
services-accounting:modules/products/tests/integration/services/persistence/products.features.integration.spec.js#refuses overlapping bulk pricing ranges, naming the rows
03 An empty setting disables bandstransitionapinegativetest
Proves
BR-CAP-ACC-PRD-010-04
Preconditions
A product already has quantity bands.
Steps
Send an empty setting and then an empty array.
Expected
The setting clears bands and the array fails validation.
Data
A product already has quantity bands.
Bound to
Source
services-accounting:modules/products/tests/e2e/product-features.e2e.spec.js#switches every feature off with null
04 Discount collection accepts its maximum and refuses one moreboundaryapinegativeproposed
Proves
BR-CAP-ACC-PRD-010-04
Preconditions
A sellable fixed-priced product has a valid grid.
Steps
Replace with fifty disjoint bands, then try fifty-one bands.
Expected
The maximum collection reads back in order; the larger replacement leaves it unchanged.
Data
A sellable fixed-priced product has a valid grid.
Source
services-accounting:modules/products/tests/e2e/product-features.e2e.spec.js#switches every feature off with null
05 Discount configuration survives a price correctioninteractionapinegativeproposed
Proves
BR-CAP-ACC-PRD-010-03 BR-CAP-ACC-PRD-008-12
Preconditions
A fixed-priced product carries two disjoint discount bands.
Steps
Replace its price grid while resending the bands, then submit a replacement with overlapping bands.
Expected
The price correction retains the configured bands; the later invalid replacement preserves both grid and bands.
Data
A fixed-priced product carries two disjoint discount bands.
Source
services-accounting:modules/products/tests/integration/services/persistence/products.features.integration.spec.js#refuses overlapping bulk pricing ranges, naming the rows; services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses more than 500 prices (the bound of the grid)

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.