Skip to content

ATS-COM-CAT-006Prepare and publish product presentations: Capability Test Specification

Markdown

ATS-COM-CAT-006

Prepare and publish product presentations: Capability Test Specification

Markdown
  • DocumentProposed
  • Product intentProposed

KindAcceptance test setProduct areaCommerceModuleCatalog and Selling ConfigurationRevision2

Read atservices-commerce c8b66a98react-console baf6dae3

Coverage

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

Test Scenarios

19 scenarios proving CAP-COM-CAT-006; 9 bound to an existing test.

01 Listing identities and slugs prevent duplicate publication recordsvalidationapinegativetest
Proves
BR-CAP-COM-CAT-006-01 INV-DOM-COM-CAT-003-01
Preconditions
A listing already occupies a product and slug
Steps
Repeat the product, reuse the slug for another product and submit a malformed slug
Expected
All invalid creations fail
Data
none
Bound to
Source
services-commerce:modules/catalog/tests/e2e/product-listings.e2e.spec.js#answers 400 to a second listing of the same product
02 Listing state controls list and page visibilitytransitionunittest
Proves
BR-CAP-COM-CAT-006-02
Preconditions
Fixtures include draft, published and unlisted listings
Steps
Read storefront lists and individual pages
Expected
Lists retain published items; pages also retain unlisted items; drafts remain excluded
Data
none
Bound to
Source
services-commerce:modules/catalog/tests/unit/storefront/storefront-visibility.spec.js#shows published listings alone on the list, and unlisted ones too on a product page
03 Unlisted products remain publicly quotableinteractionapitest
Proves
BR-CAP-COM-CAT-006-03
Preconditions
An unlisted product belongs to the store assortment
Steps
Request its public quote
Expected
The quote returns a price
Data
none
Bound to
Source
services-commerce:modules/pricing/tests/e2e/price-quote-public-sale.e2e.spec.js#prices an unlisted product, which the product page opens by its link
04 Digital-file and grant bounds reject invalid settingsboundaryapinegativetest
Proves
BR-CAP-COM-CAT-006-04 BR-CAP-COM-CAT-006-05 INV-DOM-COM-CAT-003-04
Preconditions
A physical item and digital item are available
Steps
Attach a file to the physical item and give the digital item an excessive window or zero limit
Expected
Each request identifies its invalid setting
Data
none
Bound to
Source
services-commerce:modules/catalog/tests/e2e/product-listings.e2e.spec.js#answers 400 to files on a product that is not digital merchandise
05 Listing presentation rejects invalid collections and datesvalidationunitnegativetest
Proves
BR-CAP-COM-CAT-006-06 BR-CAP-COM-CAT-006-07 INV-DOM-COM-CAT-003-12
Preconditions
Listing validation accepts a complete input
Steps
Supply nine images, a self-related product and reversed Featured dates
Expected
Validation reports each problem
Data
none
Bound to
Source
react-console:lib/commerce/catalog/__tests__/rules.test.ts#refuses more than eight gallery images or related products
06 Listing replacement reuses and detaches prepared imagesinvariantapinegativetest
Proves
BR-CAP-COM-CAT-006-08 INV-DOM-COM-CAT-003-05
Preconditions
The saved gallery contains two images
Steps
Retain one image, replace the other and separately attempt an unprepared reference
Expected
The retained identity survives, the replacement detaches its predecessor and the unprepared reference fails
Data
Asset pipeline stand-in
Bound to
Source
services-commerce:modules/catalog/tests/integration/services/persistence/product-listings.integration.spec.js#keeps an unchanged picture with its id (no copy), replaces the other (the old one detached), and refuses a stale version
07 Listing edit authority follows initial or existing statepermissionunitnegativetest
Proves
BR-CAP-COM-CAT-006-11
Preconditions
Fixtures distinguish create, update and read-only permissions
Steps
Inspect storefront actions for listed and unlisted products
Expected
Edit and Publish appear only with the applicable permission
Data
none
Bound to
Source
react-console:components/commerce/__tests__/permission-gating.test.tsx#asks a product not on the shelf yet for the create key, since its first save is a create
08 Listing replacement rejects stale or mismatched recordsconcurrencyapinegativetest
Proves
BR-CAP-COM-CAT-006-12
Preconditions
The listing has advanced to version two
Steps
Submit version one and separately name a different product
Expected
Both requests fail without replacing the listing
Data
none
Bound to
Source
services-commerce:modules/catalog/tests/e2e/product-listings.e2e.spec.js#replaces at the version read, a gallery picture kept with its id and one replaced; the stale version is 409; a mismatched product_id 400
09 Merchandise view reflects saved storefront pricinginteractionbrowsertest
Proves
AS-JNY-COM-CAT-001-05
Preconditions
The browser uses mocked Commerce data
Steps
Create an item with storefront information and later change its price
Expected
The item view presents the revised price
Data
Console mock
Bound to
Source
react-console:e2e/mock/merchandise.mock.spec.ts#a new item is created with its storefront, shown on its view, and a price change comes back to the view
10 Listing protection refuses the protected writeinvariantapinegativeproposed
Proves
BR-CAP-COM-CAT-006-13
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/catalog/services/persistence/product-listings.ts
11 Asset cleanup preserves references and records terminal failuresfailureapiproposed
Proves
BR-CAP-COM-CAT-006-14
Preconditions
Detached, abandoned and retained assets are due for cleanup.
Steps
Sweep the assets; inspect the queue before consuming; settle messages, restoring one parent reference before settlement; fail another through its last retry.
Expected
Sweeping changes no stored object; settlement keeps the restored reference, retires detached data, deletes abandoned data and records terminal failure.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/catalog/services/assets/clean-up-one-catalog-asset.ts:1
12 Moving a listing between shelves changes membership orderinteractionapiproposed
Proves
BR-CAP-COM-CAT-005-04 BR-CAP-COM-CAT-006-02
Preconditions
Two shelves and a published listing exist.
Steps
Replace the listing’s shelf selection, then read both memberships.
Expected
The old membership disappears and the new membership is appended in the new shelf.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/catalog/tests/integration/services/persistence/product-categories.integration.spec.js#refuses a list naming one product twice (400) and an unknown category (404),services-commerce:modules/catalog/tests/unit/storefront/storefront-visibility.spec.js#removes a draft everywhere, an unlisted listing from the list only, and a published one nowhere
13 Publication changes list and direct-page visibilityinteractionapiproposed
Proves
BR-CAP-COM-CAT-006-02 BR-CAP-COM-CAT-008-01 BR-CAP-COM-CAT-008-08
Preconditions
A store admits a listing’s shelf.
Steps
Move the listing from draft to published to unlisted to draft, reading list and page after each save.
Expected
The observed list and page results match each declared publication transition.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/catalog/tests/unit/storefront/storefront-visibility.spec.js#removes a draft everywhere, an unlisted listing from the list only, and a published one nowhere,services-commerce:modules/catalog/tests/unit/storefront/storefront-visibility.spec.js#removes a product not yet on sale, and one whose sale has ended (the end exclusive),services-commerce:modules/catalog/tests/integration/services/storefront/storefront-listings.integration.spec.js#opens an unlisted product by its page, and is answered 404 for a draft and for a product another store does not sell
14 A file replacement changes which download can be requestedinteractionapiproposed
Proves
BR-CAP-COM-CAT-006-04 BR-CAP-COM-CAT-006-05 BR-CAP-COM-CAT-009-02 BR-CAP-COM-CAT-009-05
Preconditions
Digital merchandise has a retained file and an owner grant.
Steps
Download the retained file; replace it with another privately prepared file; request the detached file and the replacement.
Expected
The detached file is not found and the retained replacement is available under the grant’s remaining limits.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/catalog/tests/e2e/product-listings.e2e.spec.js#answers 400 to files on a product that is not digital merchandise,services-commerce:modules/catalog/tests/unit/api/product-listing-download-rules.spec.js#refuses a window of 4000 days, naming the field and the bound,services-commerce:modules/catalog/tests/e2e/downloads.e2e.spec.js#gives the grant’s owner a signed link and consumes one use per Idempotency-Key (a retry costs nothing), until the grant is exhausted (409),services-commerce:modules/catalog/tests/e2e/downloads.e2e.spec.js#answers 404 for a grant of another kind, an unknown grant, and a file the product does not have
15 An unlisted page retains public quoting while a draft does notinteractionapiproposed
Proves
BR-CAP-COM-CAT-006-03 BR-CAP-COM-CAT-013-07
Preconditions
The same product stays in the store assortment.
Steps
Save unlisted and quote by its direct page; save draft and quote again as a visitor.
Expected
The unlisted quote returns the product amount and the draft quote is refused.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/pricing/tests/e2e/price-quote-public-sale.e2e.spec.js#prices an unlisted product, which the product page opens by its link,services-commerce:modules/pricing/tests/e2e/price-quote-public-sale.e2e.spec.js#prices the draft and the out-of-assortment product for staff holding commerce.orders.create: Standard 6000 and 15000
16 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
17 Listing publication is exercised across every declared movetransitionapinegativeproposed
Proves
BR-CAP-COM-CAT-006-02 BR-CAP-COM-CAT-006-08 BR-CAP-COM-CAT-006-11 BR-CAP-COM-CAT-006-12 BR-CAP-COM-CAT-006-13 BR-CAP-COM-CAT-006-14
Preconditions
Independent run-owned records start in each declared origin state; guarded variants omit one required condition at a time.
Steps
For each transition case, establish the origin, apply its trigger with the guard satisfied, read the resulting state and side effects, then repeat on a separate record with a required guard absent.
Expected
Every allowed case reaches its stated destination and retains its declared side effects; failed guards preserve the originating record except for the separately documented partial offer action.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
rhythm-v2-docs:specs/commerce/catalog/design/state-models/STATE-COM-CAT-003-listing-publication.md#STATE-COM-CAT-003,react-console:components/commerce/__tests__/permission-gating.test.tsx#asks a product not on the shelf yet for the create key, since its first save is a create,services-commerce:docs/milestones/COMM-M1b-promotions-and-codes.md#R6,services-commerce:modules/catalog/services/persistence/product-listings.ts:createProductListing,services-commerce:modules/catalog/tests/unit/storefront/storefront-visibility.spec.js#removes a draft everywhere, an unlisted listing from the list only, and a published one nowhere,services-commerce:modules/catalog/tests/integration/services/storefront/storefront-listings.integration.spec.js#opens an unlisted product by its page, and is answered 404 for a draft and for a product another store does not sell,services-commerce:modules/catalog/services/persistence/product-listings.ts:updateProductListing,services-commerce:modules/catalog/services/persistence/product-listings.ts:updateProductListing,services-commerce:modules/catalog/services/persistence/product-listings.ts:updateProductListing,services-commerce:modules/catalog/services/persistence/product-listings.ts:updateProductListing,services-commerce:modules/catalog/services/persistence/product-listings.ts:deleteProductListing,services-commerce:modules/catalog/services/persistence/product-listings.ts:deleteProductListing,services-commerce:modules/catalog/services/persistence/product-listings.ts:deleteProductListing
18 Managed catalog file lifecycle is exercised across every declared movetransitionapinegativeproposed
Proves
BR-CAP-COM-CAT-006-02 BR-CAP-COM-CAT-006-08 BR-CAP-COM-CAT-006-11 BR-CAP-COM-CAT-006-12 BR-CAP-COM-CAT-006-13 BR-CAP-COM-CAT-006-14
Preconditions
Independent run-owned records start in each declared origin state; guarded variants omit one required condition at a time.
Steps
For each transition case, establish the origin, apply its trigger with the guard satisfied, read the resulting state and side effects, then repeat on a separate record with a required guard absent.
Expected
Every allowed case reaches its stated destination and retains its declared side effects; failed guards preserve the originating record except for the separately documented partial offer action.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
rhythm-v2-docs:specs/commerce/catalog/design/state-models/STATE-COM-CAT-004-managed-catalog-file.md#STATE-COM-CAT-004,services-commerce:modules/catalog/tests/e2e/product-categories.e2e.spec.js#answers 400 to a picture the pipeline cannot read as a file, creating nothing,services-commerce:modules/catalog/tests/integration/services/persistence/product-listings.integration.spec.js#refuses a gallery picture written past the pipeline (a reference the save never prepared),services-commerce:modules/catalog/services/assets/catalog-assets.ts,services-commerce:modules/catalog/tests/integration/services/persistence/product-categories.integration.spec.js#deletes the category with its memberships and detaches its picture; a second delete is 404,services-commerce:modules/catalog/services/assets/clean-up-catalog-assets.ts,services-commerce:modules/catalog/services/assets/clean-up-catalog-assets.ts,services-commerce:modules/catalog/services/assets/clean-up-one-catalog-asset.ts,services-commerce:modules/catalog/services/assets/clean-up-one-catalog-asset.ts,services-commerce:modules/catalog/aws/lambda/ASSET_CLEANUP_CONSUMER.ts
19 Shared asset settlement respects each saved ownerinteractionapiproposed
Proves
BR-CAP-COM-CAT-003-09 BR-CAP-COM-CAT-005-07 BR-CAP-COM-CAT-006-08 BR-CAP-COM-CAT-006-14
Preconditions
A store, shelf and listing each retain a prepared picture in one run-owned workspace.
Steps
Replace the three pictures, sweep their detached references, restore one owner reference before consuming and inspect every owner and managed asset afterward.
Expected
Only detached, unreferenced pictures retire; the reference restored before settlement remains attached and the saved owners keep their current pictures.
Data
Run-owned workspace, prepared file fixtures and independent fault injection at the handoff.
Source
rhythm-v2-docs:specs/commerce/catalog/design/workflows/WF-COM-CAT-003-save-a-record-with-managed-pictures-or-files.md#WF-COM-CAT-003,rhythm-v2-docs:specs/commerce/catalog/design/workflows/WF-COM-CAT-004-sweep-and-settle-released-catalog-files.md#WF-COM-CAT-004

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.