Skip to content

ATS-COM-CAT-019Configure recommendation rules and placements: Capability Test Specification

Markdown

ATS-COM-CAT-019

Configure recommendation rules and placements: 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 covered
  • Failure gap: FND-COM-CAT-073
  • Boundary covered
  • Concurrency gap: FND-COM-CAT-073
  • Invariant covered
  • Interaction covered

Test Scenarios

10 scenarios proving CAP-COM-CAT-019; 7 bound to an existing test.

01 Recommendation parameters match the selected kindvalidationunitnegativetest
Proves
BR-CAP-COM-CAT-019-01 INV-DOM-COM-CAT-006-01
Preconditions
Rule inputs can vary their kind and parameters
Steps
Omit add-on products and add a parameter belonging to another kind
Expected
Both inputs fail with the parameter path identified
Data
none
Bound to
Source
services-commerce:modules/recommendations/tests/unit/rule-rules.spec.js#refuses an add_on rule with no products, parameters_invalid, naming the path
02 Placement bindings respect supported kinds and capsboundaryapinegativetest
Proves
BR-CAP-COM-CAT-019-02 INV-DOM-COM-CAT-006-02
Preconditions
Store placements are registered
Steps
Bind an unsupported kind and exceed a placement’s offer cap
Expected
Both bindings fail
Data
none
Bound to
Source
services-commerce:modules/recommendations/tests/e2e/recommendation-rules.e2e.spec.js#refuses a binding to a placement that shows no such kind, 400 placement_unsupported
03 Deferred recommendation kinds retain different availabilityedgeapinegativetest
Proves
BR-CAP-COM-CAT-019-04
Preconditions
Rule creation can select application flow or membership savings
Steps
Create both forms
Expected
Flow action fails and membership-savings configuration is stored
Data
none
Bound to
Source
services-commerce:modules/recommendations/tests/e2e/recommendation-rules.e2e.spec.js#refuses a rule whose action is start_journey, 409 action_unavailable: the journeys are R3’s
04 Recommendation activation requires binding and capacitytransitionapinegativetest
Proves
BR-CAP-COM-CAT-019-05 AS-JNY-COM-CAT-006-01 INV-DOM-COM-CAT-006-03
Preconditions
Bound and unbound rules and a full placement exist
Steps
Exercise lifecycle changes, unbound activation and a twenty-sixth active rule
Expected
Supported moves succeed while missing binding and excess capacity fail
Data
none
Bound to
Source
services-commerce:modules/recommendations/tests/e2e/recommendation-rules.e2e.spec.js#moves through active, paused, active, ended, archived
05 Presentation locks substance but permits message editinginvariantapinegativetest
Proves
BR-CAP-COM-CAT-019-06 INV-DOM-COM-CAT-006-04
Preconditions
A rule has already produced a presentation
Steps
Change its products and then its message
Expected
Locked substance fails and the message saves
Data
A presentation
Bound to
Source
services-commerce:modules/recommendations/tests/integration/services/persistence/offer-presentations.integration.spec.js#locks the rule once the first presentation is written
06 Names and holdouts remain deterministicruleunitnegativetest
Proves
BR-CAP-COM-CAT-019-07 INV-DOM-COM-CAT-006-05
Preconditions
Rule and subject fixtures support duplicate and bucket checks
Steps
Reuse a name, bucket the same subject twice and assess a fifty-percent holdout
Expected
The name fails, buckets match and approximately half the fixture subjects are withheld
Data
none
Bound to
Source
services-commerce:modules/recommendations/tests/integration/services/persistence/recommendation-rules.integration.spec.js#refuses a second rule under the same name, rule_name_taken
07 Recommendation grants separate reading and launchingpermissionapinegativetest
Proves
BR-CAP-COM-CAT-019-11
Preconditions
The caller has read-only rule authority
Steps
Read permitted resources and attempt creation and activation
Expected
Authorized reads succeed and writes or launch requests fail
Data
Read-exclusively persona
Bound to
Source
services-commerce:modules/recommendations/tests/e2e/recommendations-security.e2e.spec.js#lists the rules and the placements, and is refused a create and an activation 403 permission_missing
08 Presenting an active rule protects it before acceptanceinteractionapiproposed
Proves
BR-CAP-COM-CAT-019-05 BR-CAP-COM-CAT-019-06 BR-CAP-COM-CAT-020-01
Preconditions
A compatible bound rule can offer a mug.
Steps
Activate and evaluate, edit its candidate product and then its message, accept the presentation and evaluate again.
Expected
Presentation protects substance, permits messaging changes and completed acceptance suppresses the mug.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/recommendations/tests/integration/services/persistence/recommendation-rules.integration.spec.js#refuses the twenty-sixth active rule of one placement, too_many_active_rules, naming the placement,services-commerce:modules/recommendations/tests/integration/services/persistence/recommendation-rules.integration.spec.js#refuses the substance of a locked rule, rule_locked, naming the columns, while the message stays editable,services-commerce:modules/recommendations/tests/e2e/offers.e2e.spec.js#answers one offer: the mug, from the listing, priced $12.00 by the quote, live, to add to the checkout, expiring with the quote
09 Provisioning reruns preserve audience and placement editsinteractionapiproposed
Proves
BR-CAP-COM-CAT-010-01 BR-CAP-COM-CAT-019-02
Preconditions
A new workspace has built-in audiences and storefront placements.
Steps
Change a permitted audience field and a placement cap; rerun both seed operations and verify setup.
Expected
Required setup exists once and the customer’s saved settings remain.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/pricing/tests/e2e/pricing-audiences.e2e.spec.js#lists standard for everyone at rank 0 and member by eligibility at rank 10, built in, member shown to visitors, with no binding yet,services-commerce:modules/recommendations/tests/e2e/recommendation-rules.e2e.spec.js#refuses a cap above the placement’s, 400 max_offers_exceeds_placement
10 Recommendation rule lifecycle is exercised across every declared movetransitionapinegativeproposed
Proves
BR-CAP-COM-CAT-019-05 BR-CAP-COM-CAT-019-06
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-011-recommendation-rule-lifecycle.md#STATE-COM-CAT-011,services-commerce:modules/recommendations/tests/integration/services/persistence/recommendation-rules.integration.spec.js#refuses the twenty-sixth active rule of one placement, too_many_active_rules, naming the placement,services-commerce:modules/recommendations/services/rules/rule-workflow.ts:RULE_OPERATIONS,services-commerce:modules/recommendations/tests/e2e/recommendations-security.e2e.spec.js#lists the rules and the placements, and is refused a create and an activation 403 permission_missing,services-commerce:modules/recommendations/services/persistence/recommendation-rules.ts,services-commerce:modules/recommendations/services/persistence/recommendation-rules.ts,services-commerce:modules/recommendations/services/persistence/recommendation-rules.ts,services-commerce:modules/recommendations/services/persistence/recommendation-rules.ts,services-commerce:modules/recommendations/tests/integration/services/persistence/recommendation-rules.integration.spec.js#refuses the substance of a locked rule, rule_locked, naming the columns, while the message stays editable

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.