Skip to content

ATS-COM-CAT-007Manage merchandise selections and sale availability: Capability Test Specification

Markdown

ATS-COM-CAT-007

Manage merchandise selections and sale availability: Capability Test Specification

Markdown
  • DocumentProposed
  • Product intentProposed

KindAcceptance test setProduct areaCommerceModuleCatalog and Selling ConfigurationRevision2

Read atservices-commerce c8b66a98react-console baf6dae3

Coverage

  • Rule covered
  • Transition covered
  • Validation covered
  • Permission covered
  • Edge gap: FND-COM-CAT-061
  • Failure covered
  • Boundary covered
  • Concurrency gap: FND-COM-CAT-061
  • Invariant covered
  • Interaction covered

Test Scenarios

12 scenarios proving CAP-COM-CAT-007; 7 bound to an existing test.

01 Merchandise creation rejects incompatible or repeated extensionsvalidationapinegativetest
Proves
BR-CAP-COM-CAT-007-01 INV-DOM-COM-CAT-003-06
Preconditions
A membership product and an already extended merchandise product exist
Steps
Attempt to extend each
Expected
The corresponding type or duplicate refusal is returned
Data
Accounting products
Bound to
Source
services-commerce:modules/merchandise/tests/e2e/merchandise.e2e.spec.js#answers 400 to a product the tenant has not, a selection off the sets, a SKU in use and a second extension, naming the rule
02 Failed merchandise creation leaves no Accounting productfailureapinegativetest
Proves
BR-CAP-COM-CAT-007-02 BR-CAP-COM-CAT-007-03 INV-DOM-COM-CAT-003-10
Preconditions
Creation can exercise an extension constraint and an invalid grid
Steps
Trigger extension failure and omit Standard pricing
Expected
Both fail without leaving a product behind
Data
none
Bound to
Source
services-commerce:modules/merchandise/tests/integration/services/persistence/merchandise-products.queries.integration.spec.js#leaves no product when the database refuses the extension row
03 Retirement preserves history and inventory prevents removaltransitionapinegativetest
Proves
BR-CAP-COM-CAT-007-04 BR-CAP-COM-CAT-007-05 INV-DOM-COM-CAT-003-09
Preconditions
Merchandise is available for retirement and has stock references
Steps
Retire twice and attempt deletion of stock-referenced merchandise
Expected
The repeated retirement and referenced deletion fail
Data
Inventory items for a SKU
Bound to
Source
services-commerce:modules/merchandise/tests/e2e/merchandise.e2e.spec.js#retires the product at its version, keeping the extension; a second retirement is 409
04 Variants and modifier sets reject inconsistent definitionsvalidationapinegativetest
Proves
BR-CAP-COM-CAT-007-06 BR-CAP-COM-CAT-007-08 INV-DOM-COM-CAT-003-07 INV-DOM-COM-CAT-003-11
Preconditions
Size, colour and modifier sets provide allowed values
Steps
Repeat a SKU or selection and submit invalid modifier or variant-set options
Expected
Each invalid definition is refused
Data
Option sets
Bound to
Source
services-commerce:modules/merchandise/tests/integration/db/merchandise-tables.table.integration.spec.js#refuses one SKU twice in a tenant (merchandise_variants_sku_uq) and one selection twice for a product (merchandise_variants_selection_uq), while another tenant may use the SKU
05 Availability distinguishes sufficient stock and permitted shortfallsruleunitnegativetest
Proves
BR-CAP-COM-CAT-007-09
Preconditions
Fixtures provide ample, limited and insufficient stock
Steps
Assess requested quantities with backorders enabled and disabled
Expected
Results distinguish available, limited, backordered and refused lines
Data
none
Bound to
Source
services-commerce:modules/merchandise/tests/unit/participant/merchandise-availability.spec.js#is limited with the units left when the quantity leaves the threshold or fewer, the last unit included
06 Line validation checks note length and variant matchingboundaryunitnegativetest
Proves
BR-CAP-COM-CAT-007-10
Preconditions
A merchandise item has selectable variants
Steps
Submit 200- and 201-character notes and an unmatched selection
Expected
The supported note succeeds; the longer note and unmatched selection fail
Data
none
Bound to
Source
services-commerce:modules/merchandise/tests/unit/participant/merchandise-payload.spec.js#limits a note to 200 characters, counted as the person sees them: an emoji is one, so 201 characters are refused and 200 are not (COM-ACC-0015)
07 Variant adjustment is demonstrated only by the isolated engineinteractionapiproposed
Proves
BR-CAP-COM-CAT-007-11
Preconditions
The engine fixture explicitly supplies a priced variant
Steps
Calculate by that variant’s SKU
Expected
The engine records the substituted price and adjustment provenance, without establishing loader integration
Data
Merchandise with priced variants
Source
services-commerce:modules/pricing/tests/unit/engine/step-3-base-price.spec.js#overrides the standard price with the variant’s by SKU, with provenance of the difference
08 Merchandise contracts enforce access and exclude custom fieldspermissionapinegativetest
Proves
BR-CAP-COM-CAT-007-12
Preconditions
A read-only merchandise principal is available
Steps
List and read items, attempt writes and submit custom fields
Expected
Reads succeed; permission checks refuse writes and schema validation refuses custom fields
Data
Read-exclusively persona
Bound to
Source
services-commerce:modules/merchandise/tests/e2e/merchandise.e2e.spec.js#lets a reader list and read, and refuses it every write 403 permission_missing, leaving the records as they were
09 Merchandise protection refuses the protected writeinvariantapinegativeproposed
Proves
BR-CAP-COM-CAT-007-14
Preconditions
Separate otherwise editable records use full protection and deletion-only protection.
Steps
Replace and delete the fully protected record, then replace and delete the deletion-only protected record; reread both.
Expected
The full-protection requests refuse; the deletion-only replacement succeeds and removal refuses; refused writes preserve the stored record.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/merchandise/services/persistence/merchandise-extensions.ts
10 The combined item screen saves product and presentation separatelyinteractionapiproposed
Proves
BR-CAP-COM-CAT-007-13 BR-CAP-COM-CAT-006-10
Preconditions
The console edits merchandise and a listing for one product.
Steps
Save all three requests successfully; repeat with the listing request refused; reopen the item.
Expected
A successful save presents the changed item; a later refusal can leave earlier product and merchandise changes saved.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
rhythm-v2-docs:specs/commerce/catalog/design/workflows/WF-COM-CAT-005-save-a-merchandise-item-from-the-console-in.md#WF-COM-CAT-005,react-console:lib/commerce/merchandise/live.ts:createLiveMerchandiseAdapter
11 Loaded merchandise adjustments differ from engine fixturesinteractionapiproposed
Proves
BR-CAP-COM-CAT-007-11 BR-CAP-COM-CAT-013-01
Preconditions
A variant and modifier carry distinct amounts.
Steps
Price an isolated engine fixture carrying both inputs, then quote the same product through ordinary loading.
Expected
The fixture records the supplied adjustments; ordinary loading supplies no variant or modifier amounts.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/pricing/services/persistence/catalog-products.ts:toCatalogProduct,services-commerce:modules/pricing/tests/unit/engine/engine.spec.js#prices the hoodies through the member cell, the variant, the bulk rule and the store’s line discount, in that order
12 Retained stock codes keep their variant identitiesinvariantapinegativeproposed
Proves
INV-DOM-COM-CAT-003-08 BR-CAP-COM-CAT-007-07
Preconditions
A product has two variant stock codes and inventory retains one of them.
Steps
Replace the definition while keeping the referenced stock code, dropping the other and adding a new code; read variants and inventory references.
Expected
The retained code keeps its identity and inventory reference, the new code has a new identity and the omitted unreferenced code is gone.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/merchandise/tests/integration/services/persistence/merchandise.integration.spec.js#replaces the extension at its version: the kept SKU keeps its id, a new SKU is added, a dropped one goes,rhythm-v2-docs:specs/commerce/catalog/design/objects/DOM-COM-CAT-003-catalog-product.md#DOM-COM-CAT-003

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.