---
id: TST-COM-ORD-028
title: The pricing engine 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/engine-pricing.e2e.spec.js
implements: []
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/engine-pricing.e2e.spec.js'
    test_cases:
      - 'previews the T-shirt at the member row, with the row’s provenance for the member'
      - 'places the order at the member price, the row and the audience provenance frozen on the line'
      - >-
        previews the mug at the standard row for the student: no audience of the tenant holds the row’s id, so
        the student qualifies for standard alone
      - 'places the order at the standard row, the one row frozen on the line'
      - gives a buyer the entry never matched the standard price too (the portal member is no student)
      - 'takes ten percent off five mugs, through the preview and onto the placed line'
      - 'previews the surcharge in the unit price, with provenance extension:<id> beside the price row'
      - 'places the order with the surcharge frozen on the line, the previewed and recomputed prices matching'
      - >-
        discounts the first line and the order in the custom store, through the preview snapshot and onto the
        order
      - >-
        refuses the preview and the placement with EXTENSION_UNAVAILABLE (503) when a required extension
        fails, placing nothing
      - skips an optional extension that fails and prices the item as the rules give it
scenario_coverage: []
dependency_evidence:
  provenance: test
  source: 'services-commerce:modules/checkout/tests/e2e/engine-pricing.e2e.spec.js'
  declared_by_test: >-
    the composed handler, the routes, the workflows, the stub participant, the engine, the persistence
    services and PostgreSQL. Doubled: the signing key pair, the other services' tables (local stand-ins), the
    membership facts and the extensions (the fixtures the running macroservice uses today).
---

# The pricing engine 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 the pricing engine 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.
