Skip to content

ATS-COM-CAT-020Present offers and process buyer responses: Capability Test Specification

Markdown

ATS-COM-CAT-020

Present offers and process buyer responses: Capability Test Specification

Markdown
  • DocumentProposed
  • Product intentProposed

Planning

Proves capability
CAP-COM-CAT-020

Design

Executed by
TST-COM-CAT-135, TST-COM-CAT-137

KindAcceptance test setProduct areaCommerceModuleCatalog and Selling ConfigurationRevision2

Read atservices-commerce c8b66a98react-console baf6dae3

Coverage

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

Test Scenarios

10 scenarios proving CAP-COM-CAT-020; 6 bound to an existing test.

01 A cart suggestion is accepted without duplicate itemsinteractionapitest
Proves
BR-CAP-COM-CAT-020-01 BR-CAP-COM-CAT-020-04 AS-JNY-COM-CAT-006-02 INV-DOM-COM-CAT-006-06
Preconditions
A member’s cart contains the trigger for a related mug
Steps
Evaluate, accept twice and reevaluate
Expected
One twelve-dollar mug offer adds one item and is subsequently suppressed
Data
Catalog and quote fixtures
Bound to
Source
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
02 Dismissal suppresses offers and rejects unrelated memberstransitionapinegativetest
Proves
BR-CAP-COM-CAT-020-02 BR-CAP-COM-CAT-020-05
Preconditions
Two member subjects have separate offers
Steps
Dismiss twice, reevaluate and let the unrelated member accept
Expected
One dismissal remains, reevaluation suppresses the offer and unrelated acceptance fails
Data
none
Bound to
Source
services-commerce:modules/recommendations/tests/e2e/offers.e2e.spec.js#records the dismissal once, the second answering the first
03 New acceptance cannot use an expired presentationboundaryapinegativetest
Proves
BR-CAP-COM-CAT-020-03
Preconditions
The offer expires without a recorded acceptance
Steps
Request its first acceptance
Expected
The refusal identifies the expiry time
Data
Clock control
Bound to
Source
services-commerce:modules/recommendations/tests/e2e/offers.e2e.spec.js#is refused 409 offer_expired, naming when it expired
04 Anonymous estimates cannot become accepted offerspermissionapinegativetest
Proves
BR-CAP-COM-CAT-020-06 INV-DOM-COM-CAT-006-07
Preconditions
A visitor uses a public product placement and a private placement
Steps
Evaluate publicly, accept the estimate and evaluate privately
Expected
Public pricing is estimated, estimate acceptance fails and private placement access fails
Data
none
Bound to
Source
services-commerce:modules/recommendations/tests/e2e/offers.e2e.spec.js#sees the mug as an estimate at the public price, for a session subject
05 Offer preview is read-only staff workinvariantapinegativetest
Proves
BR-CAP-COM-CAT-020-08
Preconditions
Console and portal callers are available
Steps
Request preview as each
Expected
Portal preview fails; staff receive suppression diagnostics without saved presentations
Data
none
Bound to
Source
services-commerce:modules/recommendations/tests/e2e/offers.e2e.spec.js#is refused to a portal member, 403 preview_not_allowed, and answers the console the suppressed rules without writing
06 Offer-response permission remains separate from readingpermissionapinegativetest
Proves
BR-CAP-COM-CAT-020-10
Preconditions
A reader and anonymous request form are available
Steps
Evaluate and accept as the reader, then name a person publicly
Expected
Evaluation succeeds, response fails permission checks and public private-context input is rejected
Data
Read-exclusively persona
Bound to
Source
services-commerce:modules/recommendations/tests/e2e/recommendations-security.e2e.spec.js#may evaluate but not accept: 403 permission_missing on the acceptance
07 Offer actions expose independent checkout and history outcomesruleapinegativeproposed
Proves
BR-CAP-COM-CAT-020-11
Preconditions
Item, promotion and page actions exist, plus an unsupported application action.
Steps
Accept each action; fail history recording after promotion application; read the checkout and offer history before retrying.
Expected
Item acceptance commits with its history; a page target is recorded; the unsupported action refuses; a promotion can remain applied when its acceptance history fails.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/recommendations/services/persistence/offer-presentations.ts:insertOfferPresentations
08 Offer presentation and response is exercised across every declared movetransitionapinegativeproposed
Proves
BR-CAP-COM-CAT-020-02 BR-CAP-COM-CAT-020-03 BR-CAP-COM-CAT-020-04 BR-CAP-COM-CAT-020-05 BR-CAP-COM-CAT-020-11
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-012-offer-presentation-and-response.md#STATE-COM-CAT-012,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,services-commerce:modules/recommendations/tests/e2e/offers.e2e.spec.js#answers the first acceptance to a second, repeated, adding nothing,services-commerce:modules/recommendations/services/acceptance/accept-offer.ts,services-commerce:modules/recommendations/tests/e2e/offers.e2e.spec.js#offers nothing inside the dismissal window,services-commerce:modules/recommendations/services/acceptance/accept-offer.ts:acceptOffer
09 Preview and live presentation have different protection effectsinvariantapinegativeproposed
Proves
INV-DOM-COM-CAT-006-08 BR-CAP-COM-CAT-020-11
Preconditions
A new active rule has no presentation and editable substance.
Steps
Preview and inspect presentation rows and rule protection; evaluate live, inspect both, then inject failure before that transaction commits on a separate rule.
Expected
Preview writes neither presentations nor protection; live evaluation commits both and a failed transaction retains neither.
Data
Run-owned workspace and records; fixed clock where dates are exercised.
Source
services-commerce:modules/recommendations/services/persistence/offer-presentations.ts:insertOfferPresentations,rhythm-v2-docs:specs/commerce/catalog/design/objects/DOM-COM-CAT-006-recommendation.md#DOM-COM-CAT-006
10 Promotion acceptance can outlive its failed history writeinteractionapinegativeproposed
Proves
BR-CAP-COM-CAT-020-11 BR-CAP-COM-CAT-016-12
Preconditions
A live promotion-action offer is owned by a member with an accessible checkout.
Steps
Accept the promotion action, fail the separate acceptance-history write, then inspect checkout codes and offer interactions before retrying.
Expected
The applied code can remain without an accepted-offer record; the failed history write does not roll back the earlier promotion application.
Data
Run-owned workspace, prepared file fixtures and independent fault injection at the handoff.
Source
services-commerce:modules/recommendations/services/acceptance/accept-offer.ts:acceptOffer,rhythm-v2-docs:specs/commerce/catalog/design/workflows/WF-COM-CAT-018-accept-or-dismiss-an-offer.md#WF-COM-CAT-018

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.