Skip to content

ATS-COM-CAT-002Select the policy governing a sale: Capability Test Specification

Markdown

ATS-COM-CAT-002

Select the policy governing a sale: Capability Test Specification

Markdown
  • DocumentProposed
  • Product intentProposed

KindAcceptance test setProduct areaCommerceModuleCatalog and Selling ConfigurationRevision2

Read atservices-commerce c8b66a98react-console baf6dae3

Coverage

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

Test Scenarios

7 scenarios proving CAP-COM-CAT-002; 4 bound to an existing test.

01 Resolution identifies each winning fallbackruleapitest
Proves
BR-CAP-COM-CAT-002-03
Preconditions
Workspace and events defaults reference different policies
Steps
Resolve an explicit policy, an events context and an empty context
Expected
Each response identifies the selected policy and selection source
Data
Two policies
Bound to
Source
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#resolves a context: the profile it names (explicit), else its application’s default, else the tenant default
02 Resolution refuses an unknown policyvalidationapinegativetest
Proves
BR-CAP-COM-CAT-002-04
Preconditions
The requested policy is absent from the workspace
Steps
Request resolution by that policy reference
Expected
The request fails validation
Data
none
Bound to
Source
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#answers 400 to a context naming a profile the tenant does not have, and nothing for a tenant with no profile at all
03 Inactive defaults cannot replace the saved documentvalidationapinegativetest
Proves
BR-CAP-COM-CAT-002-06 INV-DOM-COM-CAT-001-04
Preconditions
An inactive policy and existing defaults are available
Steps
Submit defaults referencing the inactive policy
Expected
The request fails and preserves existing defaults
Data
none
Bound to
Source
services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#refuses a document naming an inactive or an unknown profile, 400, the document unchanged
04 Read authority permits defaults and resolution readspermissionapitest
Proves
BR-CAP-COM-CAT-002-08
Preconditions
The caller has no write permission
Steps
Read defaults and resolve a policy
Expected
Both reads return results
Data
Read-exclusively persona
Bound to
Source
services-commerce:modules/configuration/tests/e2e/configuration-security.e2e.spec.js#lists and reads the ordering profiles, the defaults document and the resolution
05 Checkout selection retains one governing policyinteractionapinegativeproposed
Proves
BR-CAP-COM-CAT-002-01 BR-CAP-COM-CAT-002-02 AS-JNY-COM-CAT-001-02
Preconditions
A store uses Main and an item context specifies Conference EUR
Steps
Open a store checkout, then a storeless checkout with the EUR item and add a Main item
Expected
Selection uses the store or item context respectively; the conflicting item is refused with both policies identified
Data
A participant answering a selling context
Source
services-commerce:docs/milestones/COMM-M1-set-up-what-you-sell.md#D9
06 Changing the default changes fallback selectioninteractionapiproposed
Proves
BR-CAP-COM-CAT-001-09 BR-CAP-COM-CAT-002-03
Preconditions
Two active policies and no application default exist.
Steps
Resolve the fallback, transfer the workspace default, resolve again and attempt to disable the selected policy.
Expected
The new policy is selected and cannot be disabled while retained as default.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/configuration/tests/integration/services/persistence/ordering-profiles.integration.spec.js#makes a second profile no default, and one stating is_tenant_default the default in place of the first, in one transaction,services-commerce:modules/configuration/tests/e2e/ordering-profiles.e2e.spec.js#resolves a context: the profile it names (explicit), else its application’s default, else the tenant default
07 Store selection overrides item context without mixing policiesinteractionapiproposed
Proves
BR-CAP-COM-CAT-002-01 BR-CAP-COM-CAT-002-02 BR-CAP-COM-CAT-003-01
Preconditions
A store uses Main and an item context uses Conference EUR.
Steps
Open one checkout through the store and another without it; add an item resolving to Main to the EUR checkout.
Expected
The store checkout uses Main; the storeless checkout uses Conference EUR and refuses the conflicting item.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:docs/milestones/COMM-M1-set-up-what-you-sell.md#D9,services-commerce:docs/milestones/plans/COMM-M1-plan.md#D9. Adopt the expanded ordering-profile selection order?,services-commerce:modules/configuration/tests/e2e/stores.e2e.spec.js#answers 400 to an ordering profile the tenant does not have, naming the property

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.