---
id: TST-COM-ORD-037
title: Who may use a promotion through preview and placement
kind: api-lifecycle
product_area: commerce
module: orders
revision: 1
status: draft
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
repository: services-commerce
files:
  - modules/checkout/tests/e2e/promotion-eligibility.e2e.spec.js
implements:
  - ATS-COM-ORD-004-07
  - ATS-COM-ORD-005-08
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 2
isolation: The suite creates its own test workspace records and removes them using the fixture cleanup.
evidence:
  - provenance: test
    source: 'services-commerce:modules/checkout/tests/e2e/promotion-eligibility.e2e.spec.js'
    test_cases:
      - 'applies to the member: the preview carries it and no rejection'
      - places the member’s order with the discount and counts the use
      - 'rejects it in the preview as purchaser_not_eligible, with the customer’s sentence'
      - gives the staff the engine’s words in the rejection
      - refuses the placement 409 promotion_refused and writes no order
      - 'admits the buyer who does not match the rule: applied in the preview, placed with the discount'
      - refuses the member in the preview as purchaser_not_eligible
      - qualified the member in the preview
      - 'refuses the placement 409 promotion_refused, purchaser_not_eligible'
      - 'rolls everything back: no order, no use, the checkout open'
      - 'refuses it even for must_not_match: an indeterminate decision is not "does not match"'
scenario_coverage:
  - scenario: ATS-COM-ORD-004-07
    test_cases:
      - 'applies to the member: the preview carries it and no rejection'
      - 'rejects it in the preview as purchaser_not_eligible, with the customer’s sentence'
      - 'admits the buyer who does not match the rule: applied in the preview, placed with the discount'
      - 'rolls everything back: no order, no use, the checkout open'
      - 'refuses it even for must_not_match: an indeterminate decision is not "does not match"'
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
  - scenario: ATS-COM-ORD-005-08
    test_cases:
      - 'refuses the placement 409 promotion_refused, purchaser_not_eligible'
      - 'rolls everything back: no order, no use, the checkout open'
    scope: >-
      The cited cases exercise the scenario’s listed fixture outcomes; this register makes no verified
      conformance claim.
dependency_evidence:
  provenance: test
  source: 'services-commerce:modules/checkout/tests/e2e/promotion-eligibility.e2e.spec.js'
  declared_by_test: >-
    the composed handler, the routes, the workflows, the promotions library and persistence, the eligibility
    evaluation and its placement re-check, PostgreSQL. Doubled: the display evaluation (the fixture port the
    running macroservice uses when Platform's transport is not configured), Platform's `eligibility_check`
    (the database stand-in), the signing key pair.
---

# Who may use a promotion through preview and placement

## Verification Boundary

The suite drives the composed local API dispatcher and its registered routes.

## What This Suite Proves

The registered cases check who may use a promotion through preview and placement with their fixture records and assertions. Scenario bindings name only the examples those cases exercise.

## What It Does Not Prove

A registered file supplies no run result or verified conformance by itself. Local fixtures do not establish deployed cross-service behavior or complete browser journeys.

## Real Dependencies and Test Doubles

PostgreSQL and the exercised Commerce persistence or workflow code are real. Remote service records, clocks and transports follow the suite’s fixtures.

## Must Not Be Doubled

The database constraints, role restrictions, locks and transactions exercised by this suite must use PostgreSQL.
