Skip to content

ATS-COM-CAT-003Configure a store’s offered assortment: Capability Test Specification

Markdown

ATS-COM-CAT-003

Configure a store’s offered assortment: 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-057
  • Failure gap: FND-COM-CAT-057
  • Boundary covered
  • Concurrency covered
  • Invariant covered
  • Interaction covered

Test Scenarios

17 scenarios proving CAP-COM-CAT-003; 7 bound to an existing test.

01 Store creation requires an existing policyvalidationapinegativetest
Proves
BR-CAP-COM-CAT-003-01 INV-DOM-COM-CAT-002-01
Preconditions
Creation requests have no valid policy selected
Steps
Submit an omitted policy and an unknown policy
Expected
Both requests fail with the policy field identified
Data
none
Bound to
Source
services-commerce:modules/configuration/tests/e2e/stores.e2e.spec.js#answers 400 to a store without an ordering profile
02 Store currency cannot be supplied independentlyvalidationapinegativetest
Proves
BR-CAP-COM-CAT-003-02 INV-DOM-COM-CAT-002-02
Preconditions
A store creation request is otherwise valid
Steps
Add a currency field to the request
Expected
The unsupported field is rejected
Data
none
Bound to
Source
services-commerce:modules/configuration/tests/e2e/stores.e2e.spec.js#answers 400 to a currency or a business unit on the body: the store carries neither since D23
03 Assortment and home-category references remain validboundaryapinegativetest
Proves
BR-CAP-COM-CAT-003-04 BR-CAP-COM-CAT-003-05 INV-DOM-COM-CAT-002-04
Preconditions
Books belongs to this workspace and Toys to another
Steps
Reference Toys, choose Apparel under only Books, and choose Books under an exclusion of Books
Expected
Each invalid selection fails on its relevant field
Data
Two workspaces
Bound to
Source
services-commerce:modules/configuration/tests/integration/services/persistence/stores.integration.spec.js#refuses another tenant’s category as unknown
04 Checkout references prevent store deletiontransitionapinegativetest
Proves
BR-CAP-COM-CAT-003-08 INV-DOM-COM-CAT-002-05
Preconditions
A checkout references Bookstore
Steps
Request removal of Bookstore
Expected
The refusal identifies the retained store
Data
A checkout
Bound to
Source
services-commerce:modules/configuration/tests/integration/services/persistence/stores.integration.spec.js#refuses deleting a store a checkout was opened in, naming the store
05 Stale store replacement failsconcurrencyapinegativetest
Proves
BR-CAP-COM-CAT-003-11 INV-DOM-COM-CAT-002-07
Preconditions
The stored version is two
Steps
Submit a replacement based on version one
Expected
The version conflict prevents replacement
Data
none
Bound to
Source
services-commerce:modules/configuration/tests/e2e/stores.e2e.spec.js#replaces a store at the version read, the purchasing roles with it, and answers 409 to the stale version after
06 Store writes require administrator authoritypermissionapinegativetest
Proves
BR-CAP-COM-CAT-003-12
Preconditions
A caller holds only store read permission
Steps
Attempt creating, replacing and deleting a store
Expected
All writes fail permission checks
Data
Read-exclusively persona
Bound to
Source
services-commerce:modules/configuration/tests/e2e/configuration-security.e2e.spec.js#is refused the creates, 403 permission_missing
07 Store view reflects a changed sortrulebrowsertest
Proves
AS-JNY-COM-CAT-001-03
Preconditions
Commerce screens use mocked records
Steps
Create a store, open its view, change the default sort and save
Expected
The view displays the saved sort
Data
Console mock
Bound to
Source
react-console:e2e/mock/commerce-view-edit.mock.spec.ts#create a store, land on its view, edit the default sort, save, and see it on the view
08 Store protection refuses the protected writeinvariantapinegativeproposed
Proves
BR-CAP-COM-CAT-003-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/configuration/services/persistence/stores.ts
09 A saved unknown store handler is diagnosed during pricingruleapiproposed
Proves
BR-CAP-COM-CAT-003-10
Preconditions
An active store and an unknown pricing handler reference are available.
Steps
Save the reference, read the store, then request a quote and placement using the saved handler.
Expected
The store retains the reference; pricing reports the unavailable handler according to its configured failure mode.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/configuration/services/persistence/stores.ts:storeColumns
10 A changed assortment changes the next storefront readinteractionapiproposed
Proves
BR-CAP-COM-CAT-003-03 BR-CAP-COM-CAT-003-11 BR-CAP-COM-CAT-008-01 BR-CAP-COM-CAT-008-08
Preconditions
Books and Apparel have published products in an active store.
Steps
Browse; replace the assortment with only Books; browse and open an Apparel product page.
Expected
Only the admitted shelf remains visible and the excluded page is not found.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/catalog/tests/integration/db/catalog-tables.table.integration.spec.js#refuses a store category rule outside all, only and all_but,services-commerce:modules/configuration/tests/e2e/stores.e2e.spec.js#replaces a store at the version read, the purchasing roles with it, and answers 409 to the stale version after,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
11 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
12 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
13 Store activation is exercised across every declared movetransitionapinegativeproposed
Proves
BR-CAP-COM-CAT-003-08 BR-CAP-COM-CAT-003-11 BR-CAP-COM-CAT-003-13
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-002-store-activation.md#STATE-COM-CAT-002,services-commerce:modules/configuration/services/persistence/stores.ts:updateStore,services-commerce:modules/configuration/services/persistence/stores.ts,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/configuration/tests/integration/services/persistence/stores.integration.spec.js#refuses deleting a store a checkout was opened in, naming the store
14 Managed catalog file lifecycle is exercised across every declared movetransitionapinegativeproposed
Proves
BR-CAP-COM-CAT-003-08 BR-CAP-COM-CAT-003-11 BR-CAP-COM-CAT-003-13
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
15 A foreign shelf cannot enter the store assortmentinvariantapinegativeproposed
Proves
INV-DOM-COM-CAT-002-03 BR-CAP-COM-CAT-003-04
Preconditions
Books exists in one workspace and Toys only in another.
Steps
Create a store in the first workspace with Toys in its selected assortment and inspect saved stores afterward.
Expected
The refusal names the unknown shelf and no store is created.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/configuration/tests/integration/services/persistence/stores.integration.spec.js#refuses a category id the tenant does not have, 400 naming category_ids and the id, creating nothing,rhythm-v2-docs:specs/commerce/catalog/design/objects/DOM-COM-CAT-002-store.md#DOM-COM-CAT-002
16 Replacing and deleting a store detaches its old picturesinvariantapinegativeproposed
Proves
INV-DOM-COM-CAT-002-06 BR-CAP-COM-CAT-003-09
Preconditions
A store retains a privately prepared default picture and a replacement upload exists.
Steps
Replace the default picture and inspect both managed states; delete the store and inspect the replacement state.
Expected
The old picture is detached after replacement, the new picture is attached until deletion and then becomes detached.
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,rhythm-v2-docs:specs/commerce/catalog/design/objects/DOM-COM-CAT-002-store.md#DOM-COM-CAT-002
17 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.