Skip to content

ATS-COM-CAT-005Organize product shelves: Capability Test Specification

Markdown

ATS-COM-CAT-005

Organize product shelves: 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-059
  • Failure covered
  • Boundary gap: FND-COM-CAT-059
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

13 scenarios proving CAP-COM-CAT-005; 6 bound to an existing test.

01 Category requests reject hierarchy and unsupported sortingvalidationapinegativetest
Proves
BR-CAP-COM-CAT-005-02 BR-CAP-COM-CAT-005-03 INV-DOM-COM-CAT-003-02
Preconditions
A category request is otherwise valid
Steps
Supply a parent and then an unsupported sort
Expected
Both requests identify the invalid field
Data
none
Bound to
Source
services-commerce:modules/catalog/tests/e2e/product-categories.e2e.spec.js#answers 400 to a parent_id: the hierarchy is reserved
02 Membership replacement rejects repeats and reconciles shelvesruleapinegativetest
Proves
BR-CAP-COM-CAT-005-04
Preconditions
Books has three product memberships
Steps
Repeat a product in category replacement, then change a product’s category selection
Expected
The repeat fails; new selections append memberships and omissions remove them
Data
Three products
Bound to
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)
03 Dependent stores keep a category from deletiontransitionapinegativetest
Proves
BR-CAP-COM-CAT-005-05 AS-JNY-COM-CAT-001-04 INV-DOM-COM-CAT-003-03
Preconditions
Stores refer to the category through home or assortment settings
Steps
Attempt category deletion
Expected
The refusal reports the dependent count and at most five store names
Data
Six stores
Bound to
Source
services-commerce:modules/catalog/tests/integration/services/persistence/product-categories.integration.spec.js#is refused while stores name it in their assortment, naming five of them and the count
04 Unreadable category images prevent creationfailureapinegativetest
Proves
BR-CAP-COM-CAT-005-07
Preconditions
The image reference cannot be read by the asset pipeline
Steps
Create a category using that reference
Expected
Creation fails without retaining the category
Data
none
Bound to
Source
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
05 Category replacement detects stale versionsconcurrencyapinegativetest
Proves
BR-CAP-COM-CAT-005-08
Preconditions
The saved category is at version two
Steps
Replace from version one
Expected
A version conflict prevents the change
Data
none
Bound to
Source
services-commerce:modules/catalog/tests/e2e/product-categories.e2e.spec.js#replaces at the version read and refuses the stale version 409
06 Category management requires write authoritypermissionapinegativetest
Proves
BR-CAP-COM-CAT-005-09
Preconditions
The caller has read permissions alone
Steps
Attempt a category write
Expected
The request fails permission evaluation
Data
Read-exclusively persona
Bound to
Source
services-commerce:modules/catalog/tests/e2e/catalog-security.e2e.spec.js#refuses a read-only principal every write, 403 permission_missing
07 Shelf protection refuses the protected writeinvariantapinegativeproposed
Proves
BR-CAP-COM-CAT-005-10
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-categories.ts
08 Moving store references allows a shelf to be removedinteractionapiproposed
Proves
BR-CAP-COM-CAT-005-05 BR-CAP-COM-CAT-003-05
Preconditions
Two stores retain a shelf as home or assortment.
Steps
Remove one reference and request deletion; remove the second and repeat.
Expected
Deletion remains refused after the first move and succeeds after the second.
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#is refused while stores name it in their assortment, naming five of them and the count,services-commerce:modules/configuration/tests/integration/services/persistence/stores.integration.spec.js#refuses a home category an "all_but" rule leaves out, 400 naming home_category_id
09 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
10 Shelf membership changes the browsable assortmentinteractionapiproposed
Proves
BR-CAP-COM-CAT-005-04 BR-CAP-COM-CAT-008-01
Preconditions
A store admits only Books and a published product belongs to Apparel.
Steps
Browse; assign the product to Books; browse; remove its Books membership and browse again.
Expected
The product appears after assignment and disappears after removal.
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 product not yet on sale, and one whose sale has ended (the end exclusive)
11 Shared asset settlement uses each record’s current referenceinteractionapiproposed
Proves
BR-CAP-COM-CAT-003-09 BR-CAP-COM-CAT-005-07
Preconditions
A store and category each have a prepared picture.
Steps
Replace both pictures, sweep detached references, restore one reference before consuming and inspect both owners.
Expected
Settlement retires the detached picture and retains the picture referenced again.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/catalog/tests/integration/services/assets/catalog-assets.integration.spec.js#detaches the store’s picture when the store is deleted,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
12 Managed catalog file lifecycle is exercised across every declared movetransitionapinegativeproposed
Proves
BR-CAP-COM-CAT-005-07 BR-CAP-COM-CAT-005-08 BR-CAP-COM-CAT-005-10
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
13 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.