Skip to content

ATS-COM-CAT-018Preview a promotion against a sample cart: Capability Test Specification

Markdown

ATS-COM-CAT-018

Preview a promotion against a sample cart: Capability Test Specification

Markdown
  • DocumentProposed
  • Product intentProposed

Planning

Proves capability
CAP-COM-CAT-018

Design

Executed by
TST-COM-CAT-093, TST-COM-CAT-116

KindAcceptance test setProduct areaCommerceModuleCatalog and Selling ConfigurationRevision2

Read atservices-commerce c8b66a98react-console baf6dae3

Coverage

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

Test Scenarios

5 scenarios proving CAP-COM-CAT-018; 4 bound to an existing test.

01 Sample preview matches checkout calculationsinteractionapitest
Proves
BR-CAP-COM-CAT-018-01 AS-JNY-COM-CAT-004-06
Preconditions
Member and Student carts use combining and noncombining codes
Steps
Compare sample and checkout preview results for each fixture
Expected
Line amounts, totals and explanations agree in the exercised cases
Data
Promotions and prices
Bound to
Source
services-commerce:modules/promotions/tests/e2e/promotion-previews.e2e.spec.js#is, line for line and total for total, what the real checkout preview answers
02 Parts assessment and shipping omission need dedicated proofruleapiproposed
Proves
BR-CAP-COM-CAT-018-02
Preconditions
Part and shipping offers are configured
Steps
Preview parts, an included automatic draft and a shipping offer
Expected
Part criteria reach assessment and no benefit uses an absent rated shipping charge
Data
Merchandise area provider
Source
services-commerce:modules/promotions/services/previews/promotion-previews.ts:includingPromotions
03 Preview preserves persisted commerce stateinvariantapitest
Proves
BR-CAP-COM-CAT-018-03
Preconditions
The workspace already has checkouts
Steps
Preview several sample carts and compare stored counts and usage
Expected
No relevant row or usage count changes
Data
none
Bound to
Source
services-commerce:modules/promotions/tests/e2e/promotion-previews.e2e.spec.js#opens no checkout and writes no item, event, evaluation, redemption, reservation or order
04 Including a draft changes only the assessmentedgeapitest
Proves
BR-CAP-COM-CAT-018-04
Preconditions
A draft automatic promotion is available
Steps
Preview with and without explicitly including it
Expected
Totals change from eighty to seventy-two dollars while the record remains draft
Data
none
Bound to
Source
services-commerce:modules/promotions/tests/integration/services/previews/promotion-previews.integration.spec.js#judges a draft as if active only when it is named: $80.00 without, $72.00 with
05 Preview requires console read accesspermissionapinegativetest
Proves
BR-CAP-COM-CAT-018-06
Preconditions
Fixtures include a promotion reader, an ungranted caller and a portal buyer
Steps
Submit previews and invalid request bodies
Expected
Only the authorized console caller succeeds and malformed inputs fail
Data
Personas
Bound to
Source
services-commerce:modules/promotions/tests/e2e/promotion-previews.e2e.spec.js#serves a console caller who holds only the promotions read key

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.